]> git.0d.be Git - panikdb.git/commitdiff
templates: use new targeted blocks to extend soundfiles table
authorFrédéric Péters <fpeters@0d.be>
Sun, 30 May 2021 08:32:21 +0000 (10:32 +0200)
committerFrédéric Péters <fpeters@0d.be>
Sun, 30 May 2021 08:32:21 +0000 (10:32 +0200)
panikdb/templates/emissions/episode_detail.html

index 0a7927ab2ff370f564f376859a56da8a760d7044..2c805e12987ebdf35d33a1ae4c88df7e7ad6e2ae 100644 (file)
 </div>
 {% endblock %}
 
-{% block soundfiles-data %}
-<div class="bo-block">
-<h3>{% trans "Soundfiles" %}</h3>
-
-<table id="soundfiles">
-<thead>
-<tr>
- <th>{% trans "File" %}</th>
- <th>{% trans "Title" %}</th>
- <th>{% trans "Duration" %}</th>
- <th>{% trans "Format" %}</th>
- <th>{% trans "Podcast?" %}</th>
- <th>{% trans "Fragment?" %}</th>
+{% block soundfiles-extra-column-headers %}
  <th>{% trans "Download count" %}</th>
- {% if can_manage %}<th>{% trans "Edit" %}</th>{% endif %}
- {% if can_manage %}<th>{% trans "Delete" %}</th>{% endif %}
+{% endblock %}
+
+{% block soundfiles-extra-action-headers %}
  {% if perms.emissions.add_focus %}<th>Focus</th>{% endif %}
-</thead>
-<tbody>
-{% for soundfile in soundfiles %}
-<tr>
-<td><a href="{{ soundfile.get_url }}">{{ soundfile|sound_filename }}</a></td>
-<td>{{ soundfile.title }}</td>
-<td>{{ soundfile.duration|as_duration }}</td>
-<td>{% if soundfile.format %}{{ soundfile.format }}{% else %}-{% endif %}</td>
-<td>{% if soundfile.podcastable %}oui{% else %}non{% endif %}</td>
-<td>{% if soundfile.fragment %}oui{% else %}non{% endif %}</td>
+{% endblock %}
+
+{% block soundfiles-extra-column-cells %}
 <td>{{ soundfile|nb_visits }}</td>
-{% if can_manage %}<td><a href="sounds/{{ soundfile.id }}/"
-               class="icon-edit" title="Modifier"></a></td>{% endif %}
-{% if can_manage %}<td><a href="sounds/{{ soundfile.id }}/remove"
-                class="icon-remove-sign" title="{% trans "Remove" %}"></a></td>{% endif %}
+{% endblock %}
+
+{% block soundfiles-extra-action-cells %}
 {% if perms.emissions.add_focus %}
 <td>
 {% if soundfile|has_focus %}
 {% endif %}
 </td>
 {% endif %}
-{% endfor %}
-</tbody>
-</table>
-</div>
 {% endblock %}
 
 {% block page-end %}