]> 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 0cd00cfdf53bf717824da65fb190dbd3ffcb67a1..7706896fd82e804b25a163dc65adbd170072dda3 100644 (file)
@@ -24,6 +24,7 @@
     {% if currentRoute == 'homepage' %}
         {% set currentRoute = 'unread' %}
     {% endif %}
+    <form name="form_mass_action" action="{{ path('mass_action') }}" method="post">
     <div class="results">
         <div class="nb-results">
             {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
     </div>
 
     <ul class="{% if listMode == 1 %}collection{% else %}row data{% endif %}">
+
+        <li class="mass-buttons">
+            {% if entries.count > 0 and listMode == 1 %}
+                <span>
+                    <input id="selectAll" type="checkbox" data-toggle="[data-js='entry-checkbox']" data-js="checkboxes-toggle" />&nbsp;
+                </span>
+
+                <span>
+                    <button class="btn cyan darken-1" type="submit" name="toggle-read" title="{{ 'entry.list.toogle_as_read'|trans }}"><i class="material-icons">done</i></button>
+                    <button class="btn cyan darken-1" type="submit" name="toggle-star" title="{{ 'entry.list.toogle_as_star'|trans }}" ><i class="material-icons">star</i></button>
+                    <button class="btn cyan darken-1" type="submit" name="delete" onclick="return confirm('{{ 'entry.confirm.delete_entries'|trans|escape('js') }}')" title="{{ 'entry.list.delete'|trans }}"><i class="material-icons">delete</i></button>
+                </span>
+            {% endif %}
+        </li>
+
         {% for entry in entries %}
             <li id="entry-{{ entry.id|e }}" class="entry col {% if listMode == 0 %}l3 m6{% else %}collection-item{% endif %} s12">
                 {% if listMode == 1 %}
@@ -50,6 +66,7 @@
             </li>
         {% endfor %}
     </ul>
+</form>
 
     {% if entries.getNbPages > 1 %}
         <div class="results">
     {% if form is not null %}
     <div id="filters" class="side-nav right-aligned">
         <form action="{{ path('all') }}">
-
             <h4 class="center">{{ 'entry.filters.title'|trans }}</h4>
 
             <div class="row">
     </div>
     {% 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="input-field col s6 with-checkbox">
+                    {{ form_widget(sortForm.sortType) }}
+                    {{ form_label(sortForm.sortType) }}
+                </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">
+                    <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button>
+                </div>
+            </div>
+        </form>
+    </div>
+    {% endif %}
+
 {% endblock %}