Layout tweeks

This commit is contained in:
Tris Forster
2023-03-02 12:15:19 +11:00
parent b1eaf9c7bc
commit f441940e8c
7 changed files with 64 additions and 46 deletions
@@ -306,7 +306,7 @@
function assignInstrument(tag, el) {
addTag(tag, pageNum, pageNum);
el.remove();
//el.remove();
}
function addTag(tag, start, end) {
@@ -91,10 +91,9 @@
{% if sections %}
<a class="tag is-danger" href="{% url 'work_partset' collection.pk work.pk %}">Full Set</a>
{% endif %}
{% regroup sections by tag as unique_sections %}
{% for section in unique_sections %}
<a class="tag is-info" href="{% url 'work_download' collection.pk work.pk %}?tag={{ section.list.0.tag }}"
target="section_{{ section.list.0.pk }}" rel="">{{ section.list.0.name }}</a>
{% for tag, name in sections %}
<a class="tag is-info" href="{% url 'work_download' collection.pk work.pk %}?tag={{ tag }}"
target="section_{{ tag }}" rel="">{{ name }}</a>
{% empty %}
<p class="is-italic">No digital parts available</p>
{% endfor %}
+40 -24
View File
@@ -3,35 +3,51 @@
{% block page %}
<h3 class="subtitle"><a href="{% url 'work_detail' collection.pk work.pk %}">{{ work.name }}</a></h3>
<p class="block">
You can generate a custom partset for printing - select the number of copies of each you want...
</p>
<div class="columns is-centered">
<div class="column is-narrow">
<form action="" method="post" target="_blank">
{% csrf_token %}
<table class="table">
<thead>
<div class="admin-tools is-pulled-right">
<button type="submit" class="button is-link">
<span class="icon"><i class="fas fa-print"></i></span>
<span>Print Set</span>
</button>
<a class="button is-link is-light" href="{% url 'work_detail' collection.pk object.pk %}">
<span>Cancel</span>
</a>
</div>
<h3 class="subtitle"><a href="{% url 'work_detail' collection.pk work.pk %}">{{ work.name }}</a></h3>
<p class="block">
You can generate a custom partset for printing - select the number of copies of each you want...
</p>
<div class="columns is-multiline is-mobile">
{% for part in work.digital_parts %}
<div class="column is-3 has-text-right">
<span style="white-space: nowrap">{{ part.name }}</span>
<input name="parts" type="hidden" value="{{ part.tag }}">
<input class="input" name="copies" type="number" value="{% if part.tag == 'score' %}0{% else %}1{% endif %}" size="1">
</div>
</thead>
<tbody>
{% for tag, name in work.digital_parts %}
<tr>
<td>{{ name }}</td>
<td>
<input name="parts" type="hidden" value="{{ tag }}">
<input class="input is-small" name="copies" type="number" value="{% if tag == 'score' %}0{% else %}1{% endif %}">
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="field is-grouped">
<div class="control">
<button class="button is-link">
<span class="icon"><i class="fas fa-print"></i></span>
<span>Print Set</span>
</button>
</div>
<div class="control">
<a class="button is-link is-light" href="{% url 'work_detail' collection.pk object.pk %}">
<span>Cancel</span>
</a>
</div>
</div>
</form>
</div>
</div>
{% endblock %}