]> git.parisson.com Git - telemeta.git/commitdiff
Ajout lecture des sons dans telemeta/templates/telemeta/inc/mediaitem_list.html
authorlesaec <lesaec@lam.jussieu.fr>
Mon, 20 Jun 2016 15:48:24 +0000 (17:48 +0200)
committerlesaec <lesaec@lam.jussieu.fr>
Mon, 20 Jun 2016 15:48:24 +0000 (17:48 +0200)
telemeta/templates/telemeta/inc/mediaitem_list.html

index 9c525987b2b2db40f2ee8d8d2fa9ae9d29db9630..a2f0048a1e2103881986418642889780f5de327a 100644 (file)
@@ -1,6 +1,11 @@
 {% 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 %}
 
@@ -12,9 +17,7 @@
 <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>
 
@@ -60,6 +68,9 @@
     <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>