2015-04-18 21:04:23 +02:00
|
|
|
{% extends "combo/manager_base.html" %}
|
|
|
|
{% load i18n %}
|
|
|
|
|
|
|
|
{% block appbar %}
|
|
|
|
<h2>{% trans 'Assets' %}</h2>
|
2018-08-16 14:22:02 +02:00
|
|
|
<span class="actions">
|
2019-04-28 10:48:32 +02:00
|
|
|
<a class="extra-actions-menu-opener"></a>
|
2017-12-25 18:27:34 +01:00
|
|
|
<a href="{% url 'combo-manager-asset-upload' %}" rel="popup">{% trans 'Upload' %}</a>
|
2019-04-28 10:48:32 +02:00
|
|
|
<ul class="extra-actions-menu">
|
|
|
|
<li><a href="{% url 'combo-manager-assets-export' %}">{% trans 'Export Assets' %}</a></li>
|
|
|
|
<li><a rel="popup" href="{% url 'combo-manager-assets-import' %}">{% trans 'Import Assets' %}</a></li>
|
|
|
|
</ul>
|
2018-08-16 14:22:02 +02:00
|
|
|
</span>
|
2015-04-18 21:04:23 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
2015-06-08 10:25:09 +02:00
|
|
|
{% block breadcrumb %}
|
2015-04-18 21:04:23 +02:00
|
|
|
{{ block.super }}
|
|
|
|
<a href="{% url 'combo-manager-assets' %}">{% trans 'Assets' %}</a>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
2017-12-25 18:05:50 +01:00
|
|
|
{% if not object_list and not query %}
|
2015-04-18 21:04:23 +02:00
|
|
|
<div class="big-msg-info">
|
|
|
|
{% blocktrans %}
|
|
|
|
This site doesn't have any asset yet. You can add some directly when editing
|
|
|
|
pages, in the "Upload Image" dialog.
|
|
|
|
{% endblocktrans %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% else %}
|
|
|
|
|
2017-12-25 18:05:50 +01:00
|
|
|
<form>
|
|
|
|
<p><input name="q" type="search" value="{{query}}"> <button>{% trans 'Search' %}</button>
|
|
|
|
<span class="help_text">{% trans "(case insensitive search over filenames)" %}</span>
|
|
|
|
</p>
|
|
|
|
</form>
|
|
|
|
|
2015-04-18 21:04:23 +02:00
|
|
|
<div id="assets-browser">
|
2017-12-24 16:58:10 +01:00
|
|
|
<div id="assets-listing">
|
|
|
|
<table class="main">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2018-06-13 11:43:41 +02:00
|
|
|
<th>{% trans "Name" %}</th>
|
2017-12-24 16:58:10 +01:00
|
|
|
<th>{% trans "Size" %}</th>
|
|
|
|
<th></th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for asset in object_list %}
|
|
|
|
<tr class="{{ asset.css_classes }}">
|
2018-06-13 11:43:41 +02:00
|
|
|
<td><a href="{{ asset.src }}">{{ asset.name }}</a></td>
|
|
|
|
<td>{% if asset.size %}{{ asset.size|filesizeformat }}{% else %}-{% endif %}</td>
|
2017-12-24 16:58:10 +01:00
|
|
|
<td class="image">{% if asset.is_image %}<img data-href="{{ asset.src }}" src="{{ asset.thumb }}"/>{% endif %}</td>
|
|
|
|
<td class="actions">
|
2018-06-13 11:43:41 +02:00
|
|
|
{% if asset.key %}{# theme asset #}
|
|
|
|
<a href="{% url 'combo-manager-slot-asset-upload' key=asset.key %}"
|
|
|
|
class="overwrite" rel="popup">{% trans 'Overwrite' %}</a>
|
|
|
|
{% if asset.asset %}
|
|
|
|
<a href="{% url 'combo-manager-slot-asset-delete' key=asset.key %}"
|
|
|
|
class="delete" rel="popup">{% trans 'Delete' %}</a>
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
2017-12-25 19:08:26 +01:00
|
|
|
<a href="{% url 'combo-manager-asset-overwrite' %}?img={{asset.filepath|iriencode}}"
|
|
|
|
class="overwrite" rel="popup">{% trans 'Overwrite' %}</a>
|
2017-12-24 16:58:10 +01:00
|
|
|
<a href="{% url 'combo-manager-asset-delete' %}?img={{asset.filepath|iriencode}}"
|
|
|
|
class="delete" rel="popup">{% trans 'Delete' %}</a>
|
2018-06-13 11:43:41 +02:00
|
|
|
{% endif %}
|
2017-12-24 16:58:10 +01:00
|
|
|
</td>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2015-04-18 21:04:23 +02:00
|
|
|
</div>
|
2017-12-24 16:58:10 +01:00
|
|
|
<div id="asset-preview"></div>
|
|
|
|
</div>
|
2015-04-18 21:04:23 +02:00
|
|
|
|
2017-12-26 20:56:09 +01:00
|
|
|
{% include "gadjo/pagination.html" %}
|
2015-04-18 21:04:23 +02:00
|
|
|
|
2017-12-24 16:58:10 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2015-04-18 21:04:23 +02:00
|
|
|
{% endblock %}
|