From c235fb75a7a1670fabe0aed1a3173e4e591a1a4a Mon Sep 17 00:00:00 2001 From: Tchama Date: Thu, 17 Jan 2019 15:13:02 +0100 Subject: [PATCH] sort events by date (DESC) --- Controller/EventController.php | 1 + Resources/views/Event/listByPerson.html.twig | 13 ++----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Controller/EventController.php b/Controller/EventController.php index fb5ea0052..518c084c3 100644 --- a/Controller/EventController.php +++ b/Controller/EventController.php @@ -294,6 +294,7 @@ class EventController extends Controller JOIN participation.event event WHERE participation.person = :person_id AND event.circle IN (:reachable_circles) + ORDER BY event.date DESC ") ->setParameters(array( ':person_id' => $person_id, diff --git a/Resources/views/Event/listByPerson.html.twig b/Resources/views/Event/listByPerson.html.twig index 2f553c284..9c174bb92 100644 --- a/Resources/views/Event/listByPerson.html.twig +++ b/Resources/views/Event/listByPerson.html.twig @@ -30,10 +30,6 @@ {{ 'Name'|trans }} {{ 'Date'|trans }} {{ 'Event type'|trans }} - {# - {{ 'Circle'|trans }} - {{ 'Moderator'|trans }} - #} {{ 'Role'|trans }} {{ 'Status'|trans }} @@ -49,10 +45,6 @@ {{ participation.event.date|localizeddate('long', 'short') }} {{ participation.event.type.name|localize_translatable_string }} - {# - {{ participation.event.circle.name|localize_translatable_string }} - {{ participation.event.moderator|trans|default('-') }} - #} {{ participation.role.name|localize_translatable_string }} {{ participation.status.name|localize_translatable_string }} @@ -69,8 +61,7 @@ {% endif %} {% if is_granted('CHILL_EVENT_PARTICIPATION_UPDATE', participation) %} - + {{ 'Edit'|trans }} {% endif %} @@ -88,6 +79,7 @@ {% endif %} +{#
 /!\ dev notes
 =============
@@ -98,7 +90,6 @@
 
{{ dump() }} -{# #} {% endblock %} \ No newline at end of file