diff options
Diffstat (limited to 'src/Wallabag')
3 files changed, 17 insertions, 16 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/Card/_content.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/Card/_content.html.twig index 06dc0b6d..fc5bfc48 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/Card/_content.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/Card/_content.html.twig | |||
@@ -8,12 +8,8 @@ | |||
8 | 8 | ||
9 | <div class="{{ subClass|default('original grey-text') }}"> | 9 | <div class="{{ subClass|default('original grey-text') }}"> |
10 | <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool grey-text">{{ entry.domainName|removeWww }}</a> | 10 | <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool grey-text">{{ entry.domainName|removeWww }}</a> |
11 | {% if withTags %} | 11 | {% if withTags is defined %} |
12 | {% for tag in entry.tags | slice(0, 3) %} | 12 | {% include "@WallabagCore/themes/material/Entry/_tags.html.twig" with {'tags': entry.tags | slice(0, 3), 'listClass': ' hide-on-med-and-down'} only %} |
13 | <span class="chip hide-on-med-and-down"> | ||
14 | <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a> | ||
15 | </span> | ||
16 | {% endfor %} | ||
17 | {% endif %} | 13 | {% endif %} |
18 | </div> | 14 | </div> |
19 | </div> | 15 | </div> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_tags.html.twig new file mode 100644 index 00000000..144a105e --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_tags.html.twig | |||
@@ -0,0 +1,14 @@ | |||
1 | {% if tags is iterable and tags is not empty %} | ||
2 | <ul class="tags{{ listClass|default("")}}"> | ||
3 | {% for tag in tags %} | ||
4 | <li class="chip"> | ||
5 | <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a> | ||
6 | {% if withRemove %} | ||
7 | <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}" onclick="return confirm('{{ 'entry.confirm.delete_tag'|trans|escape('js') }}')"> | ||
8 | <i class="material-icons vertical-align-middle">delete</i> | ||
9 | </a> | ||
10 | {% endif %} | ||
11 | </li> | ||
12 | {% endfor %} | ||
13 | </ul> | ||
14 | {% endif %} | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig index 86588a7b..273a9b57 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig | |||
@@ -268,16 +268,7 @@ | |||
268 | </li> | 268 | </li> |
269 | {% endif %} | 269 | {% endif %} |
270 | </ul> | 270 | </ul> |
271 | <ul class="tags"> | 271 | {% include "@WallabagCore/themes/material/Entry/_tags.html.twig" with {'tags': entry.tags, 'withRemove': true} only %} |
272 | {% for tag in entry.tags %} | ||
273 | <li class="chip"> | ||
274 | <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a> | ||
275 | <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}" onclick="return confirm('{{ 'entry.confirm.delete_tag'|trans|escape('js') }}')"> | ||
276 | <i class="material-icons vertical-align-middle">delete</i> | ||
277 | </a> | ||
278 | </li> | ||
279 | {% endfor %} | ||
280 | </ul> | ||
281 | </div> | 272 | </div> |
282 | 273 | ||
283 | <div class="input-field nav-panel-add-tag" style="display: none"> | 274 | <div class="input-field nav-panel-add-tag" style="display: none"> |