1
0
Fork 0
spejstore-new/templates/widgets/itemlist.html

49 lines
1.5 KiB
HTML
Raw Normal View History

<table class="table table-striped table-hover">
2020-05-11 18:09:02 +00:00
{% if item %}
<tr><td colspan=2 class="placeholder">
<a href="/admin/storage/item/add?parent={{ item.uuid }}">
<span class="glyphicon glyphicon-plus"></span>
Add child
</a>
</td></tr>
{% endif %}
{% for item in list %}
<tr>
<td style="padding: 0px 8px; width: 2rem;">
{% include "widgets/categoryicon.html" with category=item.primary_category %}
</td>
<td>
{% if show_count|default_if_none:True and item.get_children.count %}
<small class="pull-right">({{ item.get_children.count }} children)</small>
{% endif %}
{% if show_paths %}
{% for parent in item.get_ancestors %}
{{ parent.name }} &raquo;
{% endfor %}
<a href="{{ item.get_absolute_url }}">{{ item.name }}</a>
{% else %}
<a href="{{ item.get_absolute_url }}" style="display: block">{{ item.name }}</a>
{% endif %}
</td>
</tr>
{% empty %}
{% if show_placeholder %}
<tr>
<td colspan=2 class="placeholder">Nothing found</td>
</tr>
{% endif %}
{% endfor %}
{% if item %}
<tr><td colspan=2 class="placeholder">
2020-05-11 18:09:02 +00:00
<a href="/admin/storage/item/add?parent={{ item.uuid }}">
<span class="glyphicon glyphicon-plus"></span>
Add child
</a>
</td></tr>
{% endif %}
</table>