2017-10-24 18:59:08 +00:00
|
|
|
<table class="table table-striped table-hover">
|
|
|
|
{% for item in list %}
|
|
|
|
<tr>
|
|
|
|
<td style="padding: 0px 8px; width: 2rem;">
|
|
|
|
{% include "widgets/categoryicon.html" with category=item.primary_category %}
|
|
|
|
</td>
|
|
|
|
<td>
|
2017-12-13 19:03:40 +00:00
|
|
|
{% if show_count|default_if_none:True and item.get_children.count %}
|
2017-10-24 21:03:01 +00:00
|
|
|
<small class="pull-right">({{ item.get_children.count }} children)</small>
|
|
|
|
{% endif %}
|
|
|
|
|
2017-10-24 18:59:08 +00:00
|
|
|
{% if show_paths %}
|
|
|
|
{% for parent in item.get_ancestors %}
|
|
|
|
{{ parent.name }} »
|
|
|
|
{% endfor %}
|
2017-10-24 19:38:43 +00:00
|
|
|
<a href="{{ item.get_absolute_url }}">{{ item.name }}</a>
|
|
|
|
{% else %}
|
2017-10-24 18:59:08 +00:00
|
|
|
<a href="{{ item.get_absolute_url }}" style="display: block">{{ item.name }}</a>
|
2017-10-24 19:38:43 +00:00
|
|
|
{% endif %}
|
2017-10-24 18:59:08 +00:00
|
|
|
</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">
|
|
|
|
<a href="/admin/storage/item/add?parent={{ item.uuid }}">
|
|
|
|
<span class="glyphicon glyphicon-plus"></span>
|
|
|
|
Add child
|
|
|
|
</a>
|
|
|
|
</td></tr>
|
|
|
|
{% endif %}
|
|
|
|
</table>
|