combo/combo/apps/assets/templates/combo/manager_assets_fragment.html

47 lines
2.0 KiB
HTML

{% load i18n %}
<table class="main">
<thead>
<tr>
<th>{% trans "Name" %}</th>
<th>{% trans "Size" %}</th>
<th></th>
{% if not asset_for_ckeditor %}
<th></th>
{% endif %}
</tr>
</thead>
<tbody>
{% for asset in object_list %}
<tr class="{{ asset.css_classes }}" data-href="{{ asset.src }}">
<td>
{% if asset_for_ckeditor %}
{{ asset.name }}
{% elif asset.src %}
<a href="{{ asset.src }}">{{ asset.name }}</a>
{% else %}
{{ asset.name }} <span class="not-defined">({% trans "not defined" %})</span>
{% endif %}
<td>{% if asset.size %}{{ asset.size|filesizeformat }}{% else %}-{% endif %}</td>
<td class="image">{% if asset.is_image %}<img data-href="{{ asset.src }}" src="{{ asset.thumb }}"/>{% endif %}</td>
{% if not asset_for_ckeditor %}
<td class="actions">
{% if asset.key %}{# theme asset #}
<a href="{% url 'combo-manager-slot-asset-upload' key=asset.key %}{% if cell_reference %}?cell_reference={{ cell_reference }}{% endif %}"
class="overwrite" rel="popup">{% trans 'Overwrite' %}</a>
{% if asset.asset %}
<a href="{% url 'combo-manager-slot-asset-delete' key=asset.key %}{% if cell_reference %}?cell_reference={{ cell_reference }}{% endif %}"
class="delete" rel="popup">{% trans 'Delete' %}</a>
{% endif %}
{% else %}
<a href="{% url 'combo-manager-asset-overwrite' %}?img={{asset.filepath|iriencode}}"
class="overwrite" rel="popup">{% trans 'Overwrite' %}</a>
<a href="{% url 'combo-manager-asset-delete' %}?img={{asset.filepath|iriencode}}"
class="delete" rel="popup">{% trans 'Delete' %}</a>
{% endif %}
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>