]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
First draft for EntrySortType
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / material / Entry / entries.html.twig
index e6497893649ee23c4aca93ec6b7dfd9d8b986f5e..7706896fd82e804b25a163dc65adbd170072dda3 100644 (file)
     {% endif %}
 
     <!-- Sort -->
+    {% if sortForm is not null %}
     <div id="sort" class="side-nav right-aligned">
+        <form action="{{ path('all') }}">
         <h4 class="center">{{ 'entry.sort.title'|trans }}</h4>
 
-        <div class="row">
-            <div class="col s12">
-                <label>{{ 'entry.sort.status_label'|trans }}</label>
-            </div>
+            <div class="row">
+                <div class="input-field col s6 with-checkbox">
+                    {{ form_widget(sortForm.sortType) }}
+                    {{ form_label(sortForm.sortType) }}
+                </div>
 
-            <div class="input-field col s12 with-checkbox">
-                <select>
-                    <option value="" disabled selected>Creation date</option>
-                    <option value="createdAt">{{ 'entry.sort.by.creation_date' | trans }}</option>
-                    <option value="title">{{ 'entry.sort.by.title' | trans }}</option>
-                    <option value="updatedAt">{{ 'entry.sort.by.last_updated' | trans }}</option>
-                </select>
-            </div>
+                <div class="col s12">
+                    <div class="switch">
+                        <label>Ascendant
+                        {{ form_widget(sortForm.sortOrder) }} <span class="lever"></span>
+                            Descendant
+                        </label>
+                    </div>
+                </div>
 
-            <div class="col s12">
-                <div class="switch">
-                    <label>
-                        Ascendant
-                        <input type="checkbox">
-                        <span class="lever"></span>
-                        Descendant
-                    </label>
+                <div class="col s12">
+                    <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button>
                 </div>
             </div>
-        </div>
+        </form>
     </div>
-
-    {# {% include "WallabagCoreBundle:Entry:pager.html.twig" with {'entries': entries} %} #}
+    {% endif %}
 
 {% endblock %}