]> 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 f0012ad9f74b70f29e166a1ef41c137fbe287c09..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>
                     </div>
                     <div class="col s12 l4">
                         <p class="footer-text">
-                            {{ 'footer.wallabag.powered_by'|trans }} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a> –
+                            {{ 'footer.wallabag.powered_by'|trans }} <a target="_blank" rel="noopener" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a> –
                             <a class="grey-text text-lighten-4" href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans|lower }}</a>
                         </p>
                     </div>