mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 22:04:23 +00:00
dynamic back message in return values
This commit is contained in:
parent
3c434852d5
commit
835ead6ccd
@ -18,7 +18,7 @@ Moderator: Animateur
|
||||
Details of an event: Détails d'un événement
|
||||
New event: Nouvel événement
|
||||
Back to the most recent events: Retour aux derniers événements
|
||||
Back to the person events: Retour aux événements de la personne
|
||||
'Back to %person% events': Retour aux événements de %person%
|
||||
Event creation: Création d'un événement
|
||||
Add an event: Ajouter un événement
|
||||
Event edit: Modifier un événement
|
||||
|
@ -17,6 +17,7 @@
|
||||
{% extends "ChillPersonBundle::layout.html.twig" %}
|
||||
|
||||
{% set activeRouteKey = 'chill_event__list_by_person' %}
|
||||
{% set currentPerson = person.firstName ~ ' ' ~ person.lastName %}
|
||||
|
||||
{% block title %}{{ 'Events participation' |trans }}{% endblock title %}
|
||||
|
||||
@ -46,7 +47,7 @@
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
{% set currentPath = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %}
|
||||
{% set returnLabel = 'Back to the person events'|trans %}
|
||||
{% set returnLabel = 'Back to %person% events'|trans({ '%person%' : currentPerson } ) %}
|
||||
|
||||
{# temporaire --
|
||||
TODO corriger EventVoter.php pour régler les autorisations sur les boutons, puis remplacer ci-dessous par le code commenté #}
|
||||
@ -84,7 +85,7 @@
|
||||
'event_id' : participation.event.id,
|
||||
'return_path' : currentPath,
|
||||
'return_label' : returnLabel
|
||||
} ) }}" class="sc-button bt-show"></a>
|
||||
} ) }}" class="sc-button bt-show"></a>
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('CHILL_EVENT_UPDATE', participation.event)
|
||||
@ -145,7 +146,7 @@
|
||||
{% endif %}
|
||||
|
||||
{#
|
||||
#}
|
||||
{{ dump() }}
|
||||
#}
|
||||
|
||||
{% endblock %}
|
@ -34,8 +34,10 @@
|
||||
</table>
|
||||
|
||||
<ul class="record_actions">
|
||||
|
||||
{% set returnPath = app.request.get('return_path') %}
|
||||
{% set returnLabel = app.request.get('return_label') %}
|
||||
|
||||
{% if returnPath and returnLabel %}
|
||||
<li class="cancel">
|
||||
<a href="{{ returnPath }}" class="sc-button bt-cancel">{{ returnLabel }}</a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user