]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
Move icon into the top menu bar
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / material / layout.html.twig
index 052a8c01b739032399fb38546286a5b8401cdd79..948e7eaa4b509f316e15ada58a67c87afcc496bb 100644 (file)
@@ -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 %}">
                             <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>
                     </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>