mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 08:33:49 +00:00
Allow the modification of event + adding the prefix chill_even to all the route
This commit is contained in:
@@ -8,11 +8,11 @@ chill_event_list_most_recent:
|
||||
label: Events
|
||||
icons: [calendar]
|
||||
|
||||
event_show:
|
||||
chill_event__event_show:
|
||||
path: /{event_id}/show
|
||||
defaults: { _controller: "ChillEventBundle:Event:show" }
|
||||
|
||||
event_new:
|
||||
chill_event__event_new:
|
||||
path: /new
|
||||
defaults: { _controller: "ChillEventBundle:Event:new" }
|
||||
options:
|
||||
@@ -22,22 +22,21 @@ event_new:
|
||||
label: Add an event
|
||||
icons: [plus, calendar-o]
|
||||
|
||||
|
||||
event_create:
|
||||
chill_event__event_create:
|
||||
path: /create
|
||||
defaults: { _controller: "ChillEventBundle:Event:create" }
|
||||
methods: POST
|
||||
|
||||
event_edit:
|
||||
path: /{id}/edit
|
||||
chill_event__event_edit:
|
||||
path: /{event_id}/edit
|
||||
defaults: { _controller: "ChillEventBundle:Event:edit" }
|
||||
|
||||
event_update:
|
||||
path: /{id}/update
|
||||
chill_event__event_update:
|
||||
path: /{event_id}/update
|
||||
defaults: { _controller: "ChillEventBundle:Event:update" }
|
||||
methods: [POST, PUT]
|
||||
|
||||
event_delete:
|
||||
path: /{id}/delete
|
||||
chill_event__event_delete:
|
||||
path: /{event_id}/delete
|
||||
defaults: { _controller: "ChillEventBundle:Event:delete" }
|
||||
methods: [POST, DELETE]
|
||||
|
@@ -1,13 +1,13 @@
|
||||
{% extends '::base.html.twig' %}
|
||||
{% extends 'ChillEventBundle::layout.html.twig' %}
|
||||
|
||||
{% block body -%}
|
||||
{% block event_content -%}
|
||||
<h1>Event edit</h1>
|
||||
|
||||
{{ form(edit_form) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('event') }}">
|
||||
<a href="{{ path('chill_event_list_most_recent') }}">
|
||||
Back to the list
|
||||
</a>
|
||||
</li>
|
||||
|
@@ -15,16 +15,16 @@
|
||||
<tbody>
|
||||
{% for entity in entities %}
|
||||
<tr>
|
||||
<td><a href="{{ path('event_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
|
||||
<td><a href="{{ path('chill_event__event_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
|
||||
<td>{{ entity.label }}</td>
|
||||
<td>{% if entity.date %}{{ entity.date|date('Y-m-d H:i:s') }}{% endif %}</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ path('event_show', { 'id': entity.id }) }}">show</a>
|
||||
<a href="{{ path('chill_event__event_show', { 'id': entity.id }) }}">show</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('event_edit', { 'id': entity.id }) }}">edit</a>
|
||||
<a href="{{ path('chill_event__event_edit', { 'id': entity.id }) }}">edit</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ path('event_new') }}">
|
||||
<a href="{{ path('chill_event__event_new') }}">
|
||||
Create a new entry
|
||||
</a>
|
||||
</li>
|
||||
|
@@ -23,12 +23,12 @@
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
{# {% if is_granted('CHILL_EVENT_SEE_DETAILS', event) %} #}
|
||||
<a href="{{ path('event_show', { 'event_id' : event.id } ) }}" class="sc-button btn-action">
|
||||
<a href="{{ path('chill_event__event_show', { 'event_id' : event.id } ) }}" class="sc-button btn-action">
|
||||
{{ 'See'|trans }}
|
||||
</a>
|
||||
{# {% endif %} #}
|
||||
{% if is_granted('CHILL_EVENT_UPDATE', event) %}
|
||||
<a href="#" class="sc-button btn-edit">
|
||||
<a href="{{ path('chill_event__event_edit', { 'event_id' : event.id } ) }}" class="sc-button btn-edit">
|
||||
{{ 'Edit'|trans }}
|
||||
</a>
|
||||
{% endif %}
|
||||
@@ -44,8 +44,8 @@
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('event_new') }}" class="sc-button btn-create" >
|
||||
<a href="{{ path('chill_event__event_new') }}" class="sc-button btn-create" >
|
||||
{{ 'New event'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('event') }}">
|
||||
<a href="{{ path('chill_event_list_most_recent') }}">
|
||||
Back to the list
|
||||
</a>
|
||||
</li>
|
||||
|
@@ -30,7 +30,7 @@
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('event_edit', { 'id': event.id }) }}" class="sc-button btn-edit">
|
||||
<a href="{{ path('chill_event__event_edit', { 'id': event.id }) }}" class="sc-button btn-edit">
|
||||
{{ 'Edit'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
|
@@ -28,7 +28,7 @@
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('event_show', { 'event_id' : participation.event.id } ) }}" class="sc-button btn-cancel">
|
||||
<a href="{{ path('chill_event__event_show', { 'event_id' : participation.event.id } ) }}" class="sc-button btn-cancel">
|
||||
{{ 'Back to the event'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
|
@@ -26,7 +26,7 @@
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('event_show', { 'event_id' : participation.event.id } ) }}" class="sc-button btn-cancel">
|
||||
<a href="{{ path('chill_event__event_show', { 'event_id' : participation.event.id } ) }}" class="sc-button btn-cancel">
|
||||
{{ 'Back to the event'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
|
Reference in New Issue
Block a user