]> git.parisson.com Git - telemeta.git/commitdiff
Add display form playlist when authenticated
authormathieu <mathieu.boye28@gmail.com>
Mon, 9 May 2016 09:08:23 +0000 (11:08 +0200)
committermathieu <mathieu.boye28@gmail.com>
Mon, 9 May 2016 09:08:23 +0000 (11:08 +0200)
telemeta/templates/telemeta/inc/mediaitem_list.html

index 42683992d53c9aa3ecd31eab163ee9f1c2c33857..9c525987b2b2db40f2ee8d8d2fa9ae9d29db9630 100644 (file)
@@ -2,12 +2,19 @@
 {% load i18n %}
 
 {% if items %}
+    {% if user.is_authenticated %}
+
 <form action="{% url "playlist"%}" method="post">
 {% csrf_token %}
+
+{% endif %}
+
 <table class="listing">
 <thead>
 <tr>
+    {% if user.is_authenticated %}
     <th class="highlight"><input id="selectAll" type="checkbox"/> select all </th>
+    {% endif %}
     <th>{% trans "Title" %}</th>
     <th>{% trans "Digitized" %}</th>
     <th>{% trans "Recordist" %}</th>
@@ -23,8 +30,9 @@
 <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 %}
     <td>
         <a href="{% url "telemeta-item-detail" item.public_id %}">{{ item }}</a>
     </td>
 </tbody>
 </table>
 
+    {% if user.is_authenticated %}
+
     <button style="margin-top:10px" type="submit" id="btn" class="btn btn-default">{% trans "Add to playlist" %}</button>
 
 </form>
 
+        {% endif %}
+
 {% else %}
     <p>{% trans "No item" %}</p>
 {% endif %}