From 74d68fbf25e313ef5cc8af17812387a8ae813df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 26 Aug 2016 21:26:21 +0200 Subject: Changed where page title is displayed --- .../CoreBundle/Resources/views/themes/_title.html.twig | 13 +++++++++++++ .../Resources/views/themes/baggy/Entry/entries.html.twig | 14 +------------- .../views/themes/material/Entry/entries.html.twig | 14 +------------- 3 files changed, 15 insertions(+), 26 deletions(-) create mode 100644 src/Wallabag/CoreBundle/Resources/views/themes/_title.html.twig (limited to 'src/Wallabag') diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/_title.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/_title.html.twig new file mode 100644 index 00000000..525e2a20 --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/_title.html.twig @@ -0,0 +1,13 @@ +{% set currentRoute = app.request.attributes.get('_route') %} + +{% if currentRoute == 'starred' %} + {{ 'entry.page_titles.starred'|trans }} +{% elseif currentRoute == 'archive' %} + {{ 'entry.page_titles.archived'|trans }} +{% elseif currentRoute == 'all' %} + {{ 'entry.page_titles.filtered'|trans }} +{% elseif currentRoute == 'tag_entries' %} + {{ 'entry.page_titles.filtered_tags'|trans }} +{% else %} + {{ 'entry.page_titles.unread'|trans }} +{% endif %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig index 9380e67a..1554cce4 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig @@ -1,19 +1,7 @@ {% extends "WallabagCoreBundle::layout.html.twig" %} {% block title %} - {% set currentRoute = app.request.attributes.get('_route') %} - - {% if currentRoute == 'starred' %} - {{ 'entry.page_titles.starred'|trans }} - {% elseif currentRoute == 'archive' %} - {{ 'entry.page_titles.archived'|trans }} - {% elseif currentRoute == 'all' %} - {{ 'entry.page_titles.filtered'|trans }} - {% elseif currentRoute == 'tag_entries' %} - {{ 'entry.page_titles.filtered_tags'|trans }} - {% else %} - {{ 'entry.page_titles.unread'|trans }} - {% endif %} + {% include "@WallabagCore/themes/_title.html.twig" %} {% endblock %} {% block content %} 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 2a972e1c..a061bdc3 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 @@ -1,19 +1,7 @@ {% extends "WallabagCoreBundle::layout.html.twig" %} {% block title %} - {% set currentRoute = app.request.attributes.get('_route') %} - - {% if currentRoute == 'starred' %} - {{ 'entry.page_titles.starred'|trans }} - {% elseif currentRoute == 'archive' %} - {{ 'entry.page_titles.archived'|trans }} - {% elseif currentRoute == 'all' %} - {{ 'entry.page_titles.filtered'|trans }} - {% elseif currentRoute == 'tag_entries' %} - {{ 'entry.page_titles.filtered_tags'|trans }} - {% else %} - {{ 'entry.page_titles.unread'|trans }} - {% endif %} + {% include "@WallabagCore/themes/_title.html.twig" %} {% endblock %} {% block content %} -- cgit v1.2.3