diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/material')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig | 6 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig | 11 |
2 files changed, 13 insertions, 4 deletions
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 742dd330..067c8975 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 | |||
@@ -21,6 +21,9 @@ | |||
21 | {% block content %} | 21 | {% block content %} |
22 | {% set listMode = app.user.config.listMode %} | 22 | {% set listMode = app.user.config.listMode %} |
23 | {% set currentRoute = app.request.attributes.get('_route') %} | 23 | {% set currentRoute = app.request.attributes.get('_route') %} |
24 | {% if currentRoute == 'homepage' %} | ||
25 | {% set currentRoute = 'unread' %} | ||
26 | {% endif %} | ||
24 | <div class="results"> | 27 | <div class="results"> |
25 | <div class="nb-results"> | 28 | <div class="nb-results"> |
26 | {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }} | 29 | {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }} |
@@ -60,9 +63,6 @@ | |||
60 | {% if tag is defined %} | 63 | {% if tag is defined %} |
61 | {% set currentTag = tag.slug %} | 64 | {% set currentTag = tag.slug %} |
62 | {% endif %} | 65 | {% endif %} |
63 | {% if currentRoute == 'homepage' %} | ||
64 | {% set currentRoute = 'unread' %} | ||
65 | {% endif %} | ||
66 | <h4 class="center">{{ 'entry.list.export_title'|trans }}</h4> | 66 | <h4 class="center">{{ 'entry.list.export_title'|trans }}</h4> |
67 | <ul> | 67 | <ul> |
68 | {% if craue_setting('export_epub') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'epub', 'tag' : currentTag }) }}">EPUB</a></li>{% endif %} | 68 | {% if craue_setting('export_epub') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'epub', 'tag' : currentTag }) }}">EPUB</a></li>{% endif %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig index 052a8c01..b9c45567 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig | |||
@@ -46,6 +46,8 @@ | |||
46 | {% set activeRoute = 'starred' %} | 46 | {% set activeRoute = 'starred' %} |
47 | {% elseif currentRoute == 'unread' or currentRoute == 'homepage' or currentRouteFromQueryParams == 'unread' %} | 47 | {% elseif currentRoute == 'unread' or currentRoute == 'homepage' or currentRouteFromQueryParams == 'unread' %} |
48 | {% set activeRoute = 'unread' %} | 48 | {% set activeRoute = 'unread' %} |
49 | {% elseif currentRoute == 'untagged' %} | ||
50 | {% set activeRoute = 'untagged' %} | ||
49 | {% endif %} | 51 | {% endif %} |
50 | 52 | ||
51 | <li class="bold {% if activeRoute == 'unread' %}active{% endif %}"> | 53 | <li class="bold {% if activeRoute == 'unread' %}active{% endif %}"> |
@@ -113,6 +115,13 @@ | |||
113 | <i class="material-icons">search</i> | 115 | <i class="material-icons">search</i> |
114 | </a> | 116 | </a> |
115 | </li> | 117 | </li> |
118 | {% if activeRoute %} | ||
119 | <li id="button_random"> | ||
120 | <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 }) }}"> | ||
121 | <i class="material-icons">casino</i> | ||
122 | </a> | ||
123 | </li> | ||
124 | {% endif %} | ||
116 | <li id="button_filters"> | 125 | <li id="button_filters"> |
117 | <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"> | 126 | <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"> |
118 | <i class="material-icons">filter_list</i> | 127 | <i class="material-icons">filter_list</i> |
@@ -125,7 +134,7 @@ | |||
125 | </li> | 134 | </li> |
126 | </ul> | 135 | </ul> |
127 | </div> | 136 | </div> |
128 | {{ render(controller("WallabagCoreBundle:Entry:searchForm", {'currentRoute': app.request.attributes.get('_route')})) }} | 137 | {{ render(controller("WallabagCoreBundle:Entry:searchForm", {'currentRoute': currentRoute})) }} |
129 | {{ render(controller("WallabagCoreBundle:Entry:addEntryForm")) }} | 138 | {{ render(controller("WallabagCoreBundle:Entry:addEntryForm")) }} |
130 | </div> | 139 | </div> |
131 | </nav> | 140 | </nav> |