From f9143c4255ebba863dc161bdc0e1fc4cdb1182a9 Mon Sep 17 00:00:00 2001 From: Simounet Date: Wed, 10 May 2023 21:10:42 +0200 Subject: [PATCH] [Boyscout] Elements in need of entries hidden if no entry available --- .../Resources/views/Entry/entries.html.twig | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig index 6c68d215e..2aede087d 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig @@ -29,11 +29,15 @@
{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }} - {% if list_mode == 0 %}view_list{% else %}view_module{% endif %} + {% if entries.count > 0 %} + {% if list_mode == 0 %}view_list{% else %}view_module{% endif %} + {% endif %} + {% if entries.count > 0 %} + + {% endif %} {% if app.user.config.feedToken %} {% include "@WallabagCore/Entry/_feed_link.html.twig" %} {% endif %} -
{% if current_route == 'search' %}
{{ 'entry.list.assign_search_tag'|trans }}
{% endif %} {% if entries.getNbPages > 1 %} @@ -59,22 +63,22 @@
+ +
    + + {% for entry in entries %} +
  1. + {% if list_mode == 1 %} + {% include "@WallabagCore/Entry/_card_list.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %} + {% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %} + {% include "@WallabagCore/Entry/_card_full_image.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %} + {% else %} + {% include "@WallabagCore/Entry/_card_preview.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %} + {% endif %} +
  2. + {% endfor %} +
{% endif %} - -
    - - {% for entry in entries %} -
  1. - {% if list_mode == 1 %} - {% include "@WallabagCore/Entry/_card_list.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %} - {% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %} - {% include "@WallabagCore/Entry/_card_full_image.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %} - {% else %} - {% include "@WallabagCore/Entry/_card_preview.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %} - {% endif %} -
  2. - {% endfor %} -
{% if entries.getNbPages > 1 %}