adding remove event feature

This commit is contained in:
2019-11-28 17:37:24 +01:00
parent 8618efc35a
commit 30e0c663dc
7 changed files with 135 additions and 26 deletions

View File

@@ -41,3 +41,9 @@ chill_event__list_by_person:
defaults: { _controller: "ChillEventBundle:Event:listByPerson" }
methods: [ GET ]
chill_event__event_delete:
path: /{event_id}/delete
requirements:
event_id: \d+
defaults: { _controller: "ChillEventBundle:Event:delete" }
methods: [ GET, DELETE ]

View File

@@ -44,11 +44,13 @@ The participation was updated: La participation a été mise à jour
There are no participation to edit for this event: Il n'y a pas de participation pour cet événement
The participations have been successfully updated.: Les participations ont été mises à jour.
The participation has been sucessfully removed: La participation a été correctement supprimée.
The event has been sucessfully removed: L'événement et toutes les participations associées ont été correctement supprimées.
The participations were created: Les participations ont été créées
Events participation: Participation aux événements
Remove participation: Supprimer la participation
Delete event: Supprimer l'événement
Are you sure you want to remove that participation ?: Êtes-vous certain de vouloir supprimer cette participation ?
Are you sure you want to remove that event ?: Êtes-vous certain de vouloir supprimer cet événement, ainsi que toutes les participations associées ?
#search
Event search: Recherche d'événements

View File

@@ -2,14 +2,14 @@
{% set activeRouteKey = 'chill_event__event_show' %}
{% block title 'Remove participation'|trans %}
{% block title 'Delete event'|trans %}
{% block event_content %}
{{ include('ChillMainBundle:Util:confirmation_template.html.twig',
{
'title' : 'Remove participation'|trans,
'confirm_question' : 'Are you sure you want to remove that participation ?'|trans,
'title' : 'Delete event'|trans,
'confirm_question' : 'Are you sure you want to remove that event ?'|trans,
'cancel_route' : activeRouteKey,
'cancel_parameters' : { 'event_id' : event_id },
'form' : delete_form

View File

@@ -57,6 +57,10 @@
</a>
</li>
{% endif %}
<li>
<a href="{{ path('chill_event__event_delete', {'event_id' : event.id } ) }}"
class="sc-button bt-delete">{{ 'Delete event'|trans }}</a>
</li>
</ul>
@@ -87,13 +91,11 @@
{% if is_granted('CHILL_EVENT_PARTICIPATION_UPDATE', participation) %}
<li>
<a href="{{ path('chill_event_participation_edit', { 'participation_id' : participation.id } ) }}"
class="sc-button bt-edit">
{{ 'Edit'|trans }}
</a>
class="sc-button bt-edit" title="{{ 'Edit'|trans }}"></a>
</li>
<li>
<a href="{{ path('chill_event_participation_delete', {'participation_id' : participation.id } ) }}"
class="sc-button bt-delete"></a>
class="sc-button bt-delete" title="{{ 'Delete'|trans }}"></a>
</li>
{% endif %}
</ul>

View File

@@ -0,0 +1,20 @@
{% extends 'ChillEventBundle::layout.html.twig' %}
{% set activeRouteKey = 'chill_event__event_show' %}
{% block title 'Remove participation'|trans %}
{% block event_content %}
{{ include('ChillMainBundle:Util:confirmation_template.html.twig',
{
'title' : 'Remove participation'|trans,
'confirm_question' : 'Are you sure you want to remove that participation ?'|trans,
'cancel_route' : activeRouteKey,
'cancel_parameters' : { 'event_id' : event_id },
'form' : delete_form
}
) }}
{% endblock %}