List works on project page

This commit is contained in:
Tris Forster 2023-03-02 13:28:24 +11:00
parent 6edc612ed6
commit 2a6554471d

View File

@ -1,12 +1,12 @@
{% with project.items.count as items %} <h4 class="is-size-4">Items</h4>
{% if items %} <ul>
<p> {% for item in project.items.all %}
There {{ items|pluralize:"is,are" }} currently {{ items}} item{{ items|pluralize }} for this project.<br/> {% with work=item.work %}
Click the '<a href="{% url 'item_list' project=project.pk %}">My Music</a>' button below to access your parts... <li>
</p> <a href="{% url 'work_detail' item.work.collection.pk item.work.pk %}">{{ item.work.name }}</a>
{% else %} </li>
<p> {% endwith %}
There are no items listed yet for this project - please check back later... {% empty %}
</p> <li>There are no items listed yet for this project - please check back later...</li>
{% endif %} {% endfor %}
{% endwith %} </ul>