- {% if project.deadline %}In {{ project.deadline|timeuntil }}
{% endif %}
- {% if project.submissions.count %}{{ project.submissions.count }} submissions
{% endif %}
-
diff --git a/app/interface/templates/interface/project_items.html b/app/interface/templates/interface/project_items.html index 32faf4e..7b92ab8 100644 --- a/app/interface/templates/interface/project_items.html +++ b/app/interface/templates/interface/project_items.html @@ -6,27 +6,19 @@
{% if not ensemble %}{{ project.ensemble }}{% endif%} {{ project.name }}
++ {{ project.name }} +
- {% if project.deadline %}In {{ project.deadline|timeuntil }}
{% endif %}
- {% if project.submissions.count %}{{ project.submissions.count }} submissions
{% endif %}
-
Page - / -
-Add Instrument
+ +{{ document.upload.name }}
{% endblock %} @@ -194,10 +223,9 @@ if (pageNum <= 1) { return; } - pageNum--; - queueRenderPage(pageNum); + queueRenderPage(pageNum-1); } - //document.getElementById('prev').addEventListener('click', onPrevPage); + document.getElementById('prev').addEventListener('click', onPrevPage); /** * Displays next page. @@ -206,10 +234,9 @@ if (pageNum >= pdfDoc.numPages) { return; } - pageNum++; - queueRenderPage(pageNum); + queueRenderPage(pageNum+1); } - //document.getElementById('next').addEventListener('click', onNextPage); + document.getElementById('next').addEventListener('click', onNextPage); /** * Asynchronously downloads PDF. @@ -243,6 +270,12 @@ dirty = false; }); + function closeAddModal() { + document.getElementById('add-modal').classList.remove('is-active'); + document.getElementById('add-instrument-name').value = ""; + document.getElementById('add-instrument-variant').value = ""; + } + function addInstrument() { let name = document.getElementById('add-instrument-name'); let variant = document.getElementById('add-instrument-variant'); @@ -271,6 +304,11 @@ addTag(tag, pageNum, pageNum); } + function assignInstrument(tag, el) { + addTag(tag, pageNum, pageNum); + el.remove(); + } + function addTag(tag, start, end) { console.log("addTag", tag, start, end); const el = document.createElement('div'); @@ -295,7 +333,15 @@ let del = document.createElement('span'); del.className = "icon is-action"; del.innerHTML = ''; - del.addEventListener('click', () => {el.remove(), dirty=true}); + del.addEventListener('click', () => { + let li = document.createElement('li'); + li.classList.add("is-clickable"); + li.addEventListener('click', () => assignInstrument(tag, li)); + li.innerHTML = get_instrument(el.dataset.tag); + document.getElementById('unassigned-area').appendChild(li); + el.remove(); + dirty=true; + }); label.appendChild(del) el.appendChild(label); @@ -315,8 +361,8 @@ let start = tag.dataset.start; let end = tag.dataset.end; let span = end-start+1; - let height = span * 25 + (span-1) * 10; - let top = (start-1) * 35; + let height = span * 25 + (span-1) * 5; + let top = (start-1) * 30; tag.style.height = height + 'px'; tag.style.marginTop = top + 'px'; @@ -341,6 +387,19 @@ updateTag(el); } + function expandEntries() { + const entries = Array.from(tagArea.children); + entries.sort((a, b) => a.dataset.start-b.dataset.start); + const c = entries.length; + for (let i=0; i{{ work.notes }}
- Location: {{ work.collection }} [{{ work.identifier }}]
- Running time: {% firstof work.duration 'Unknown' %}
- Licence: {{ work.get_licence_display }}
+
| Location: | {{ work.collection }} [{{ work.identifier }}] | +Orchestration: | {{ work.orchestration }} | +
|---|---|---|---|
| Running time: | {% firstof work.duration 'Unknown' %} | +Licence: | {{ work.get_licence_display }} | +
|
{% for meta in work.meta %}
- {{ meta.get_name_display }}: {{ meta.value }} + + {{ meta.get_name_display }}: + {{ meta.value }} + {% endfor %} - + |
+ |||