diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2020-04-12 18:42:31 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2020-04-28 10:13:58 +0200 |
commit | 19c407f2967786bb106ebae636055b30af900e7b (patch) | |
tree | 8d908313c4183f74f6108a28a32efda103fa3070 /src/Wallabag/CoreBundle/Resources | |
parent | 4bc6ef346ab28025d613d308da84812325f4c7ce (diff) | |
download | wallabag-19c407f2967786bb106ebae636055b30af900e7b.tar.gz wallabag-19c407f2967786bb106ebae636055b30af900e7b.tar.zst wallabag-19c407f2967786bb106ebae636055b30af900e7b.zip |
First draft for EntrySortType
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/config/services.yml | 7 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig | 42 |
2 files changed, 26 insertions, 23 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index 8417ac35..8867ec0c 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml | |||
@@ -22,6 +22,13 @@ services: | |||
22 | tags: | 22 | tags: |
23 | - { name: form.type } | 23 | - { name: form.type } |
24 | 24 | ||
25 | wallabag_core.sort.type.entry: | ||
26 | class: Wallabag\CoreBundle\Form\Type\EntrySortType | ||
27 | arguments: | ||
28 | - "@security.token_storage" | ||
29 | tags: | ||
30 | - { name: form.type } | ||
31 | |||
25 | wallabag_core.param_converter.username_feed_token_converter: | 32 | wallabag_core.param_converter.username_feed_token_converter: |
26 | class: Wallabag\CoreBundle\ParamConverter\UsernameFeedTokenConverter | 33 | class: Wallabag\CoreBundle\ParamConverter\UsernameFeedTokenConverter |
27 | tags: | 34 | tags: |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig index e6497893..7706896f 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig | |||
@@ -209,36 +209,32 @@ | |||
209 | {% endif %} | 209 | {% endif %} |
210 | 210 | ||
211 | <!-- Sort --> | 211 | <!-- Sort --> |
212 | {% if sortForm is not null %} | ||
212 | <div id="sort" class="side-nav right-aligned"> | 213 | <div id="sort" class="side-nav right-aligned"> |
214 | <form action="{{ path('all') }}"> | ||
213 | <h4 class="center">{{ 'entry.sort.title'|trans }}</h4> | 215 | <h4 class="center">{{ 'entry.sort.title'|trans }}</h4> |
214 | 216 | ||
215 | <div class="row"> | 217 | <div class="row"> |
216 | <div class="col s12"> | 218 | <div class="input-field col s6 with-checkbox"> |
217 | <label>{{ 'entry.sort.status_label'|trans }}</label> | 219 | {{ form_widget(sortForm.sortType) }} |
218 | </div> | 220 | {{ form_label(sortForm.sortType) }} |
221 | </div> | ||
219 | 222 | ||
220 | <div class="input-field col s12 with-checkbox"> | 223 | <div class="col s12"> |
221 | <select> | 224 | <div class="switch"> |
222 | <option value="" disabled selected>Creation date</option> | 225 | <label>Ascendant |
223 | <option value="createdAt">{{ 'entry.sort.by.creation_date' | trans }}</option> | 226 | {{ form_widget(sortForm.sortOrder) }} <span class="lever"></span> |
224 | <option value="title">{{ 'entry.sort.by.title' | trans }}</option> | 227 | Descendant |
225 | <option value="updatedAt">{{ 'entry.sort.by.last_updated' | trans }}</option> | 228 | </label> |
226 | </select> | 229 | </div> |
227 | </div> | 230 | </div> |
228 | 231 | ||
229 | <div class="col s12"> | 232 | <div class="col s12"> |
230 | <div class="switch"> | 233 | <button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button> |
231 | <label> | ||
232 | Ascendant | ||
233 | <input type="checkbox"> | ||
234 | <span class="lever"></span> | ||
235 | Descendant | ||
236 | </label> | ||
237 | </div> | 234 | </div> |
238 | </div> | 235 | </div> |
239 | </div> | 236 | </form> |
240 | </div> | 237 | </div> |
241 | 238 | {% endif %} | |
242 | {# {% include "WallabagCoreBundle:Entry:pager.html.twig" with {'entries': entries} %} #} | ||
243 | 239 | ||
244 | {% endblock %} | 240 | {% endblock %} |