{% extends "Global/layout.html.twig" %} {% if is_granted('ROLE_ATTENDEE') %} {% set pagetitle = 'My reviews' | trans %} {% elseif is_granted('ROLE_ORGANIZER') %} {% set pagetitle = 'Reviews' | trans %} {% elseif is_granted('ROLE_ADMINISTRATOR') %} {% set pagetitle = 'Manage reviews' | trans %} {% endif %} {% block title %}{{pagetitle}}{% endblock %} {% block content %} {% set navigation = [{"current":(pagetitle)}] %} {% include "Global/navigation.html.twig" with navigation %} {% if is_granted('ROLE_ORGANIZER') or is_granted('ROLE_ADMINISTRATOR') %} {{ "%resultsCount% reviews(s) found"|trans({'%resultsCount%': reviews.getTotalItemCount}) }} {{ "Sort by"|trans }} {{ knp_pagination_sortable(reviews, "Rating"|trans ~ ' (' ~ "desc"|trans ~ ')', "r.rating", {"direction": "desc", "criteria": "r.rating"}) }} {{ knp_pagination_sortable(reviews, "Rating"|trans ~ ' (' ~ "asc"|trans ~ ')', "r.rating", {"direction": "asc", "criteria": "r.rating"}) }} {{ knp_pagination_sortable(reviews, "Review date"|trans ~ ' (' ~ "desc"|trans ~ ')', "r.createdAt", {"direction": "desc", "criteria": "r.createdAt"}) }} {{ knp_pagination_sortable(reviews, "Review date"|trans ~ ' (' ~ "asc"|trans ~ ')', "r.createdAt", {"direction": "asc", "criteria": "r.createdAt"}) }} {{ "Keyword"|trans }} {{ "Event"|trans }} {{ "All"|trans }} {{ "Visible only"|trans }} {{ "Hidden only"|trans }} {{ "All"|trans }} {{ "5 stars"|trans }} {{ "4 stars"|trans }} {{ "3 stars"|trans }} {{ "2 stars"|trans }} {{ "1 star"|trans }} {% endif %} {% if reviews.getTotalItemCount > 0 %} {% for review in reviews %} {% include "Global/user-review.html.twig" with {review: review, showevent: 1} %} {% if is_granted('ROLE_ADMINISTRATOR') %} {% if review.visible %} {{ "Visible"|trans }} {% else %} {{ "Hidden"|trans }} {% endif %} {% if review.deletedAt %} {{ "Deleted"|trans }} {% endif %} {{ "Actions"|trans }} {% if review.visible %} {{ "Hide"|trans }} {% else %} {{ "Show"|trans }} {% endif %} {% if review.deletedAt %} {{ "Restore"|trans }} {{ "Delete permanently"|trans }} {% else %} {{ "Delete"|trans }} {% endif %} {% endif %} {% endfor %} {% else %} {% include "Global/message.html.twig" with { type: "info", message: ('No reviews found'|trans), icon: "fas fa-exclamation-circle" } %} {% endif %} {{ knp_pagination_render(reviews, null, {}, {'align': 'center'}) }} {% endblock %} {% block javascripts %} {% endblock %}