{% load telemeta_tags %}
{% load i18n %}
+{% block extra_javascript %}
+<script src="{{ STATIC_URL }}telemeta/js/popupdiv.js" type="text/javascript"></script>
+<script src="{{ STATIC_URL }}telemeta/js/playlist.js" type="text/javascript"></script>
+{% endblock %}
+
{% if items %}
{% if user.is_authenticated %}
<table class="listing">
<thead>
<tr>
- {% if user.is_authenticated %}
- <th class="highlight"><input id="selectAll" type="checkbox"/> select all </th>
- {% endif %}
+ <th></th>
<th>{% trans "Title" %}</th>
<th>{% trans "Digitized" %}</th>
<th>{% trans "Recordist" %}</th>
{% endif %}
<th>{% trans "Year of recording" %}</th>
<th>{% trans "Code" %}</th>
+ {% if user.is_authenticated %}
+ <th class="highlight"><input id="selectAll" type="checkbox"/> select all </th>
+ {% endif %}
</tr>
</thead>
<tbody>
{% for item in items %}
<tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
- {% if user.is_authenticated %}
- <td class="highlight"><input type="checkbox" class="check1" name="selected_items_list" value="{{ item.id }}"/></td>
- {% endif %}
+ <!-- Add the button to listen the item -->
+ <td align="center" style="vertical-align:middle;">
+ {% if item.file %}
+ <a href="#" id="{% url 'telemeta-item-export' item.public_id 'mp3' %}" onclick="playlistUtils.changeGlyph(this.id)" class="glyphicon glyphicon-play" style="font-size: 1.3em;text-decoration: none"><p style="opacity:0;font-size:0">d</p></a>
+ {% endif %}
+ </td>
<td>
<a href="{% url "telemeta-item-detail" item.public_id %}">{{ item }}</a>
</td>
<td align="center">
{% if item.file %}
- <a href="{% url "telemeta-item-detail" item.public_id %}">
- <center><span class="glyphicon glyphicon-volume-up" style="font-size: 1.3em;"></span></center>
+ <span class="glyphicon glyphicon-ok" style="font-size: 1.3em;color: green;"><p style="opacity:0;font-size:0">d</p></span>
{% endif %}
</td>
<td>
{{ item.code|default:item.old_code }}
</td>
+ {% if user.is_authenticated %}
+ <td class="highlight"><input type="checkbox" class="check1" name="selected_items_list" value="{{ item.id }}"/></td>
+ {% endif %}
</tr>
{% endfor %}
</tbody>