]> git.parisson.com Git - mezzo.git/commitdiff
Update playlist filters
authorJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Fri, 21 Oct 2016 10:01:46 +0000 (12:01 +0200)
committerJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Fri, 21 Oct 2016 10:01:46 +0000 (12:01 +0200)
app/templates/media/playlist_list.html

index 657f159b2d1424d02f2ac34648871d9dee5800bc..301f63a4aeac365fbbefaa64feddf79ccf539d58 100644 (file)
 {% block meta_title %}{% trans "Media" %}{% endblock %}
 
 {% block page_sidebar %}
-    Filters
-    <a href="{% url 'organization-playlist-list' 'audio' %}">{% trans 'audio' %}</a>
-    <a href="{% url 'organization-playlist-list' 'video' %}">{% trans 'video' %}</a>
+    <ul class="nav-tree nav-tree--level-0" data-sticky data-sticky-parent="row" data-sticky-offset="100" data-sticky-detach-at="971">
+        <li class="nav-tree__item">
+            <a class="nav-tree__link nav-tree__link--filter{% if current_type == 'audio' %} active{% endif %}" href="{% if current_type == 'audio' %}{% url 'organization-playlist-list' %}{% else %}{% url 'organization-playlist-list' 'audio' %}{% endif %}">
+                {% trans 'audio' %}{% if current_type == 'audio' %} <i class="fa fa-times"></i>{% endif %}
+            </a>
+        </li>
+        <li class="nav-tree__item">
+            <a class="nav-tree__link nav-tree__link--filter{% if current_type == 'video' %} active{% endif %}" href="{% if current_type == 'video' %}{% url 'organization-playlist-list' %}{% else %}{% url 'organization-playlist-list' 'video' %}{% endif %}">
+                {% trans 'video' %}{% if current_type == 'video' %} <i class="fa fa-times"></i>{% endif %}
+            </a>
+        </li>
+    </ul>
+
     <!--to cancel : {% url 'organization-playlist-list' %}-->
 {% endblock %}
 
 {% block page_content %}
-
     <div class="row">
         {% for playlist in playlists %}
             {% with playlist.type as type %}