mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 08:33:49 +00:00
Event CRUD generated
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
chill_event_event:
|
||||
resource: "@ChillEventBundle/Resources/config/routing/event.yml"
|
||||
prefix: /event
|
||||
|
||||
chill_event_fr_admin_event_status:
|
||||
resource: "@ChillEventBundle/Resources/config/routing/status.yml"
|
||||
prefix: /{_locale}/admin/event/status
|
||||
|
30
Resources/config/routing/event.yml
Normal file
30
Resources/config/routing/event.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
event:
|
||||
path: /
|
||||
defaults: { _controller: "ChillEventBundle:Event:index" }
|
||||
|
||||
event_show:
|
||||
path: /{id}/show
|
||||
defaults: { _controller: "ChillEventBundle:Event:show" }
|
||||
|
||||
event_new:
|
||||
path: /new
|
||||
defaults: { _controller: "ChillEventBundle:Event:new" }
|
||||
|
||||
event_create:
|
||||
path: /create
|
||||
defaults: { _controller: "ChillEventBundle:Event:create" }
|
||||
methods: POST
|
||||
|
||||
event_edit:
|
||||
path: /{id}/edit
|
||||
defaults: { _controller: "ChillEventBundle:Event:edit" }
|
||||
|
||||
event_update:
|
||||
path: /{id}/update
|
||||
defaults: { _controller: "ChillEventBundle:Event:update" }
|
||||
methods: [POST, PUT]
|
||||
|
||||
event_delete:
|
||||
path: /{id}/delete
|
||||
defaults: { _controller: "ChillEventBundle:Event:delete" }
|
||||
methods: [POST, DELETE]
|
16
Resources/views/Event/edit.html.twig
Normal file
16
Resources/views/Event/edit.html.twig
Normal file
@@ -0,0 +1,16 @@
|
||||
{% extends '::base.html.twig' %}
|
||||
|
||||
{% block body -%}
|
||||
<h1>Event edit</h1>
|
||||
|
||||
{{ form(edit_form) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('event') }}">
|
||||
Back to the list
|
||||
</a>
|
||||
</li>
|
||||
<li>{{ form(delete_form) }}</li>
|
||||
</ul>
|
||||
{% endblock %}
|
43
Resources/views/Event/index.html.twig
Normal file
43
Resources/views/Event/index.html.twig
Normal file
@@ -0,0 +1,43 @@
|
||||
{% extends '::base.html.twig' %}
|
||||
|
||||
{% block body -%}
|
||||
<h1>Event list</h1>
|
||||
|
||||
<table class="records_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Label</th>
|
||||
<th>Date</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entity in entities %}
|
||||
<tr>
|
||||
<td><a href="{{ path('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>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('event_edit', { 'id': entity.id }) }}">edit</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ path('event_new') }}">
|
||||
Create a new entry
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
15
Resources/views/Event/new.html.twig
Normal file
15
Resources/views/Event/new.html.twig
Normal file
@@ -0,0 +1,15 @@
|
||||
{% extends '::base.html.twig' %}
|
||||
|
||||
{% block body -%}
|
||||
<h1>Event creation</h1>
|
||||
|
||||
{{ form(form) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('event') }}">
|
||||
Back to the list
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
36
Resources/views/Event/show.html.twig
Normal file
36
Resources/views/Event/show.html.twig
Normal file
@@ -0,0 +1,36 @@
|
||||
{% extends '::base.html.twig' %}
|
||||
|
||||
{% block body -%}
|
||||
<h1>Event</h1>
|
||||
|
||||
<table class="record_properties">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<td>{{ entity.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Label</th>
|
||||
<td>{{ entity.label }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<td>{{ entity.date|date('Y-m-d H:i:s') }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('event') }}">
|
||||
Back to the list
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('event_edit', { 'id': entity.id }) }}">
|
||||
Edit
|
||||
</a>
|
||||
</li>
|
||||
<li>{{ form(delete_form) }}</li>
|
||||
</ul>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user