forked from wallabag/wallabag
Move icon into the top menu bar
Change the way to select a random entry: - select all ids from the given user (with filters) - choose randomly one in php - find that entry
This commit is contained in:
@ -28,10 +28,12 @@
|
||||
<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('random_entry', { 'type': currentRoute }) }}">random</a>
|
||||
{% if app.user.config.rssToken %}
|
||||
{% include "@WallabagCore/themes/common/Entry/_rss_link.html.twig" %}
|
||||
{% endif %}
|
||||
{% if currentRoute in ['unread', 'starred', 'archive', 'untagged', 'all'] %}
|
||||
<a href="{{ path('random_entry', { 'type': currentRoute }) }}"><i class="btn-clickable material-icons md-24 js-random-action">shuffle</i></a>
|
||||
{% endif %}
|
||||
<i class="btn-clickable download-btn material-icons md-24 js-export-action">file_download</i>
|
||||
<i class="btn-clickable filter-btn material-icons md-24 js-filters-action">filter_list</i>
|
||||
{% if entries.getNbPages > 1 %}
|
||||
|
||||
@ -28,7 +28,6 @@
|
||||
<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('random_entry', { 'type': currentRoute }) }}" title="random"><i class="material-icons">shuffle</i></a>
|
||||
{% if app.user.config.rssToken %}
|
||||
{% include "@WallabagCore/themes/common/Entry/_rss_link.html.twig" %}
|
||||
{% endif %}
|
||||
|
||||
@ -46,6 +46,8 @@
|
||||
{% set activeRoute = 'starred' %}
|
||||
{% elseif currentRoute == 'unread' or currentRoute == 'homepage' or currentRouteFromQueryParams == 'unread' %}
|
||||
{% set activeRoute = 'unread' %}
|
||||
{% elseif currentRoute == 'untagged' %}
|
||||
{% set activeRoute = 'untagged' %}
|
||||
{% endif %}
|
||||
|
||||
<li class="bold {% if activeRoute == 'unread' %}active{% endif %}">
|
||||
@ -113,6 +115,13 @@
|
||||
<i class="material-icons">search</i>
|
||||
</a>
|
||||
</li>
|
||||
{% if activeRoute %}
|
||||
<li id="button_random">
|
||||
<a class="waves-effect tooltipped js-random-action" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.random_entry'|trans }}" href="{{ path('random_entry', { 'type': activeRoute }) }}">
|
||||
<i class="material-icons">shuffle</i>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li id="button_filters">
|
||||
<a class="nav-panel-menu button-collapse-right tooltipped js-filters-action" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.filter_entries'|trans }}" href="#" data-activates="filters">
|
||||
<i class="material-icons">filter_list</i>
|
||||
@ -125,7 +134,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{ render(controller("WallabagCoreBundle:Entry:searchForm", {'currentRoute': app.request.attributes.get('_route')})) }}
|
||||
{{ render(controller("WallabagCoreBundle:Entry:searchForm", {'currentRoute': currentRoute})) }}
|
||||
{{ render(controller("WallabagCoreBundle:Entry:addEntryForm")) }}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user