Use only one method to randomize

Instead of one per type, one for all is ok.
This commit is contained in:
Jeremy Benoist
2018-10-12 21:41:05 +02:00
parent f85d220c19
commit 0447a75b06
4 changed files with 42 additions and 85 deletions

View File

@ -28,7 +28,7 @@
<div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div>
<div class="pagination">
<a href="{{ path('switch_view_mode') }}"><i class="listMode-btn material-icons md-24">{% if listMode == 0 %}list{% else %}view_module{% endif %}</i></a>
<a href="{{ path(currentRoute ~ '_random') }}">random</a>
<a href="{{ path('random_entry', { 'type': currentRoute }) }}">random</a>
{% if app.user.config.rssToken %}
{% include "@WallabagCore/themes/common/Entry/_rss_link.html.twig" %}
{% endif %}

View File

@ -28,7 +28,7 @@
<div class="nb-results">
{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
<a href="{{ path('switch_view_mode') }}"><i class="material-icons">{% if listMode == 0 %}view_list{% else %}view_module{% endif %}</i></a>
<a href="{{ path(currentRoute ~ '_random') }}">random</a>
<a href="{{ path('random_entry', { 'type': currentRoute }) }}">random</a>
{% if app.user.config.rssToken %}
{% include "@WallabagCore/themes/common/Entry/_rss_link.html.twig" %}
{% endif %}