From 99c1d488e3504bbf8c3d52eb1dffd9b767b1a233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 2 Sep 2016 08:24:25 +0200 Subject: [PATCH] adding condition for displaying message with number of result Now, the message "Result x-y of z" displays only if the number of events in result is > 0 --- Resources/views/Event/list.html.twig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Resources/views/Event/list.html.twig b/Resources/views/Event/list.html.twig index 6da14a82f..6c78a49e1 100644 --- a/Resources/views/Event/list.html.twig +++ b/Resources/views/Event/list.html.twig @@ -2,9 +2,10 @@

{% transchoice total with { '%pattern%' : pattern } %}%total% events match the search %pattern%{% endtranschoice %}

-

{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + events|length, '%total%' : total } ) }}

- {% if events|length > 0 %} + +

{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + events|length, '%total%' : total } ) }}

+