diff options
author | Nicolas Lœuillet <nicolas@loeuillet.org> | 2016-08-23 11:51:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-23 11:51:13 +0200 |
commit | 1bee9e0760c89756ebab0b67f9ab7efc5c6a709b (patch) | |
tree | cd6200f084675195aaa5789a3d0e1297eca1a94a /src/Wallabag/CoreBundle/Resources | |
parent | 79efca1e6ff28362d4bd2713f68205294cdd07de (diff) | |
parent | 97e7ad4dc7bfc26cea334bc880a39e388d6848f3 (diff) | |
download | wallabag-1bee9e0760c89756ebab0b67f9ab7efc5c6a709b.tar.gz wallabag-1bee9e0760c89756ebab0b67f9ab7efc5c6a709b.tar.zst wallabag-1bee9e0760c89756ebab0b67f9ab7efc5c6a709b.zip |
Merge pull request #2218 from wallabag/api-delete-tags-1982
Delete tag or tags by label
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources')
15 files changed, 42 insertions, 9 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index f8835198..e95ef452 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml | |||
@@ -119,3 +119,9 @@ services: | |||
119 | class: Wallabag\CoreBundle\Helper\Redirect | 119 | class: Wallabag\CoreBundle\Helper\Redirect |
120 | arguments: | 120 | arguments: |
121 | - "@router" | 121 | - "@router" |
122 | |||
123 | wallabag_core.helper.prepare_pager_for_entries: | ||
124 | class: Wallabag\CoreBundle\Helper\PreparePagerForEntries | ||
125 | arguments: | ||
126 | - "@security.token_storage" | ||
127 | - "@router" | ||
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index c24475d2..87988539 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | |||
@@ -139,6 +139,7 @@ entry: | |||
139 | # starred: 'Starred entries' | 139 | # starred: 'Starred entries' |
140 | # archived: 'Archived entries' | 140 | # archived: 'Archived entries' |
141 | # filtered: 'Filtered entries' | 141 | # filtered: 'Filtered entries' |
142 | # filtered_tags: 'Filtered by tags' | ||
142 | list: | 143 | list: |
143 | # number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.' | 144 | # number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.' |
144 | reading_time: 'estimeret læsetid' | 145 | reading_time: 'estimeret læsetid' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index 384ec09a..461967d6 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | |||
@@ -139,6 +139,7 @@ entry: | |||
139 | starred: 'Favorisierte Einträge' | 139 | starred: 'Favorisierte Einträge' |
140 | archived: 'Archivierte Einträge' | 140 | archived: 'Archivierte Einträge' |
141 | filtered: 'Gefilterte Einträge' | 141 | filtered: 'Gefilterte Einträge' |
142 | # filtered_tags: 'Filtered by tags' | ||
142 | list: | 143 | list: |
143 | number_on_the_page: '{0} Es gibt keine Einträge.|{1} Es gibt einen Eintrag.|]1,Inf[ Es gibt %count% Einträge.' | 144 | number_on_the_page: '{0} Es gibt keine Einträge.|{1} Es gibt einen Eintrag.|]1,Inf[ Es gibt %count% Einträge.' |
144 | reading_time: 'geschätzte Lesezeit' | 145 | reading_time: 'geschätzte Lesezeit' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index ea860564..600b7472 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | |||
@@ -139,6 +139,7 @@ entry: | |||
139 | starred: 'Starred entries' | 139 | starred: 'Starred entries' |
140 | archived: 'Archived entries' | 140 | archived: 'Archived entries' |
141 | filtered: 'Filtered entries' | 141 | filtered: 'Filtered entries' |
142 | filtered_tags: 'Filtered by tags' | ||
142 | list: | 143 | list: |
143 | number_on_the_page: '{0} There are no entries.|{1} There is one entry.|]1,Inf[ There are %count% entries.' | 144 | number_on_the_page: '{0} There are no entries.|{1} There is one entry.|]1,Inf[ There are %count% entries.' |
144 | reading_time: 'estimated reading time' | 145 | reading_time: 'estimated reading time' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index f64e95d5..6da8a593 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | |||
@@ -139,6 +139,7 @@ entry: | |||
139 | starred: 'Artículos favoritos' | 139 | starred: 'Artículos favoritos' |
140 | archived: 'Artículos archivados' | 140 | archived: 'Artículos archivados' |
141 | filtered: 'Artículos filtrados' | 141 | filtered: 'Artículos filtrados' |
142 | # filtered_tags: 'Filtered by tags' | ||
142 | list: | 143 | list: |
143 | number_on_the_page: '{0} No hay artículos.|{1} Hay un artículo.|]1,Inf[ Hay %count% artículos.' | 144 | number_on_the_page: '{0} No hay artículos.|{1} Hay un artículo.|]1,Inf[ Hay %count% artículos.' |
144 | reading_time: 'tiempo estimado de lectura' | 145 | reading_time: 'tiempo estimado de lectura' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index e3592a78..4684b08b 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | |||
@@ -139,6 +139,7 @@ entry: | |||
139 | starred: 'مقالههای برگزیده' | 139 | starred: 'مقالههای برگزیده' |
140 | archived: 'مقالههای بایگانیشده' | 140 | archived: 'مقالههای بایگانیشده' |
141 | filtered: 'مقالههای فیلترشده' | 141 | filtered: 'مقالههای فیلترشده' |
142 | # filtered_tags: 'Filtered by tags' | ||
142 | list: | 143 | list: |
143 | number_on_the_page: '{0} هیج مقالهای نیست.|{1} یک مقاله هست.|]1,Inf[ %count% مقاله هست.' | 144 | number_on_the_page: '{0} هیج مقالهای نیست.|{1} یک مقاله هست.|]1,Inf[ %count% مقاله هست.' |
144 | reading_time: 'زمان تخمینی برای خواندن' | 145 | reading_time: 'زمان تخمینی برای خواندن' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 9e47d600..2b6e4194 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | |||
@@ -139,6 +139,7 @@ entry: | |||
139 | starred: 'Articles favoris' | 139 | starred: 'Articles favoris' |
140 | archived: 'Articles lus' | 140 | archived: 'Articles lus' |
141 | filtered: 'Articles filtrés' | 141 | filtered: 'Articles filtrés' |
142 | filtered_tags: 'Articles filtrés par tags' | ||
142 | list: | 143 | list: |
143 | number_on_the_page: "{0} Il n'y a pas d'articles.|{1} Il y a un article.|]1,Inf[ Il y a %count% articles." | 144 | number_on_the_page: "{0} Il n'y a pas d'articles.|{1} Il y a un article.|]1,Inf[ Il y a %count% articles." |
144 | reading_time: 'durée de lecture' | 145 | reading_time: 'durée de lecture' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index 1e23168b..95435606 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | |||
@@ -139,6 +139,7 @@ entry: | |||
139 | starred: 'Articles favorits' | 139 | starred: 'Articles favorits' |
140 | archived: 'Articles legits' | 140 | archived: 'Articles legits' |
141 | filtered: 'Articles filtrats' | 141 | filtered: 'Articles filtrats' |
142 | # filtered_tags: 'Filtered by tags' | ||
142 | list: | 143 | list: |
143 | number_on_the_page: "{0} I a pas cap d'article.|{1} I a un article.|]1,Inf[ I a %count% articles." | 144 | number_on_the_page: "{0} I a pas cap d'article.|{1} I a un article.|]1,Inf[ I a %count% articles." |
144 | reading_time: 'durada de lectura' | 145 | reading_time: 'durada de lectura' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index 0a325c57..b0b7e49b 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | |||
@@ -139,6 +139,7 @@ entry: | |||
139 | starred: 'Wpisy oznaczone gwiazdką' | 139 | starred: 'Wpisy oznaczone gwiazdką' |
140 | archived: 'Zarchiwizowane wpisy' | 140 | archived: 'Zarchiwizowane wpisy' |
141 | filtered: 'Odfiltrowane wpisy' | 141 | filtered: 'Odfiltrowane wpisy' |
142 | # filtered_tags: 'Filtered by tags' | ||
142 | list: | 143 | list: |
143 | number_on_the_page: '{0} Nie ma wpisów.|{1} Jest jeden wpis.|]1,Inf[ Są %count% wpisy.' | 144 | number_on_the_page: '{0} Nie ma wpisów.|{1} Jest jeden wpis.|]1,Inf[ Są %count% wpisy.' |
144 | reading_time: 'szacunkowy czas czytania' | 145 | reading_time: 'szacunkowy czas czytania' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 42ad28ee..d735df4c 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | |||
@@ -139,6 +139,7 @@ entry: | |||
139 | # starred: 'Starred entries' | 139 | # starred: 'Starred entries' |
140 | # archived: 'Archived entries' | 140 | # archived: 'Archived entries' |
141 | # filtered: 'Filtered entries' | 141 | # filtered: 'Filtered entries' |
142 | # filtered_tags: 'Filtered by tags' | ||
142 | list: | 143 | list: |
143 | # number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.' | 144 | # number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.' |
144 | reading_time: 'timp estimat de citire' | 145 | reading_time: 'timp estimat de citire' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index a60dfc86..77bfa0f0 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml | |||
@@ -139,6 +139,7 @@ entry: | |||
139 | # starred: 'Starred entries' | 139 | # starred: 'Starred entries' |
140 | # archived: 'Archived entries' | 140 | # archived: 'Archived entries' |
141 | # filtered: 'Filtered entries' | 141 | # filtered: 'Filtered entries' |
142 | # filtered_tags: 'Filtered by tags' | ||
142 | list: | 143 | list: |
143 | number_on_the_page: '{0} Herhangi bir makale yok.|{1} Burada bir adet makale var.|]1,Inf[ Burada %count% adet makale var.' | 144 | number_on_the_page: '{0} Herhangi bir makale yok.|{1} Burada bir adet makale var.|]1,Inf[ Burada %count% adet makale var.' |
144 | reading_time: 'tahmini okuma süresi' | 145 | reading_time: 'tahmini okuma süresi' |
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 92eecb9b..9380e67a 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,6 +1,20 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | 1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
2 | 2 | ||
3 | {% block title %}{{ 'entry.page_titles.unread'|trans }}{% endblock %} | 3 | {% block title %} |
4 | {% set currentRoute = app.request.attributes.get('_route') %} | ||
5 | |||
6 | {% if currentRoute == 'starred' %} | ||
7 | {{ 'entry.page_titles.starred'|trans }} | ||
8 | {% elseif currentRoute == 'archive' %} | ||
9 | {{ 'entry.page_titles.archived'|trans }} | ||
10 | {% elseif currentRoute == 'all' %} | ||
11 | {{ 'entry.page_titles.filtered'|trans }} | ||
12 | {% elseif currentRoute == 'tag_entries' %} | ||
13 | {{ 'entry.page_titles.filtered_tags'|trans }} | ||
14 | {% else %} | ||
15 | {{ 'entry.page_titles.unread'|trans }} | ||
16 | {% endif %} | ||
17 | {% endblock %} | ||
4 | 18 | ||
5 | {% block content %} | 19 | {% block content %} |
6 | {% include "WallabagCoreBundle:Entry:pager.html.twig" with {'entries': entries} %} | 20 | {% include "WallabagCoreBundle:Entry:pager.html.twig" with {'entries': entries} %} |
@@ -44,7 +58,6 @@ | |||
44 | </div> | 58 | </div> |
45 | {% endfor %} | 59 | {% endfor %} |
46 | 60 | ||
47 | |||
48 | <!-- Export --> | 61 | <!-- Export --> |
49 | <aside id="download-form"> | 62 | <aside id="download-form"> |
50 | {% set currentRoute = app.request.attributes.get('_route') %} | 63 | {% set currentRoute = app.request.attributes.get('_route') %} |
@@ -63,8 +76,10 @@ | |||
63 | {% if craue_setting('export_xml') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'xml' }) }}">XML</a></li>{% endif %} | 76 | {% if craue_setting('export_xml') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'xml' }) }}">XML</a></li>{% endif %} |
64 | </ul> | 77 | </ul> |
65 | </aside> | 78 | </aside> |
79 | |||
66 | <!-- Filter --> | 80 | <!-- Filter --> |
67 | <aside id="filter-form"> | 81 | {% if form is not null %} |
82 | <aside id="filter-form" class=""> | ||
68 | <form method="get" action="{{ path('all') }}"> | 83 | <form method="get" action="{{ path('all') }}"> |
69 | <h2>{{ 'entry.filters.title'|trans }}</h2> | 84 | <h2>{{ 'entry.filters.title'|trans }}</h2> |
70 | <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">×</a> | 85 | <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">×</a> |
@@ -145,6 +160,5 @@ | |||
145 | </div> | 160 | </div> |
146 | </form> | 161 | </form> |
147 | </aside> | 162 | </aside> |
148 | 163 | {% endif %} | |
149 | {% include "WallabagCoreBundle:Entry:pager.html.twig" with {'entries': entries} %} | ||
150 | {% endblock %} | 164 | {% endblock %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig index 524a1d23..739e1486 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | <ul> | 10 | <ul> |
11 | {% for tag in tags %} | 11 | {% for tag in tags %} |
12 | <li id="tag-{{ tag.id|e }}">{{tag.label}} ({{ tag.getEntriesByUserId(app.user.id) | length }})</li> | 12 | <li id="tag-{{ tag.id|e }}"><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{tag.label}} ({{ tag.entries.getValues | length }})</a></li> |
13 | {% endfor %} | 13 | {% endfor %} |
14 | </ul> | 14 | </ul> |
15 | {% endblock %} | 15 | {% endblock %} |
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 eca8924e..2a972e1c 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 | |||
@@ -9,10 +9,11 @@ | |||
9 | {{ 'entry.page_titles.archived'|trans }} | 9 | {{ 'entry.page_titles.archived'|trans }} |
10 | {% elseif currentRoute == 'all' %} | 10 | {% elseif currentRoute == 'all' %} |
11 | {{ 'entry.page_titles.filtered'|trans }} | 11 | {{ 'entry.page_titles.filtered'|trans }} |
12 | {% elseif currentRoute == 'tag_entries' %} | ||
13 | {{ 'entry.page_titles.filtered_tags'|trans }} | ||
12 | {% else %} | 14 | {% else %} |
13 | {{ 'entry.page_titles.unread'|trans }} | 15 | {{ 'entry.page_titles.unread'|trans }} |
14 | {% endif %} | 16 | {% endif %} |
15 | |||
16 | {% endblock %} | 17 | {% endblock %} |
17 | 18 | ||
18 | {% block content %} | 19 | {% block content %} |
@@ -122,6 +123,7 @@ | |||
122 | </div> | 123 | </div> |
123 | 124 | ||
124 | <!-- Filters --> | 125 | <!-- Filters --> |
126 | {% if form is not null %} | ||
125 | <div id="filters" class="side-nav fixed right-aligned"> | 127 | <div id="filters" class="side-nav fixed right-aligned"> |
126 | <form action="{{ path('all') }}"> | 128 | <form action="{{ path('all') }}"> |
127 | 129 | ||
@@ -205,5 +207,6 @@ | |||
205 | 207 | ||
206 | </form> | 208 | </form> |
207 | </div> | 209 | </div> |
208 | {% include "WallabagCoreBundle:Entry:pager.html.twig" with {'entries': entries} %} | 210 | {% endif %} |
211 | |||
209 | {% endblock %} | 212 | {% endblock %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig index d958c4b8..9495f543 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig | |||
@@ -9,7 +9,7 @@ | |||
9 | <br /> | 9 | <br /> |
10 | <ul class="row data"> | 10 | <ul class="row data"> |
11 | {% for tag in tags %} | 11 | {% for tag in tags %} |
12 | <li id="tag-{{ tag.id|e }}" class="col l4 m6 s12">{{tag.label}} ({{ tag.getEntriesByUserId(app.user.id) | length }})</li> | 12 | <li id="tag-{{ tag.id|e }}" class="col l4 m6 s12"><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{tag.label}} ({{ tag.entries.getValues | length }})</a></li> |
13 | {% endfor %} | 13 | {% endfor %} |
14 | </ul> | 14 | </ul> |
15 | {% endblock %} | 15 | {% endblock %} |