add basic crud for admin

This commit is contained in:
2016-03-18 11:34:25 +01:00
parent cd7e9a9e2b
commit 9512528018
27 changed files with 1413 additions and 4 deletions

View File

@@ -1,3 +1,12 @@
chill_event_homepage:
path: /hello/{name}
defaults: { _controller: ChillEventBundle:Default:index }
chill_event_fr_admin_event_status:
resource: "@ChillEventBundle/Resources/config/routing/status.yml"
prefix: /{_locale}/admin/event/status
chill_event_admin_role:
resource: "@ChillEventBundle/Resources/config/routing/role.yml"
prefix: /{_locale}/admin/event/role
chill_event_admin_event_type:
resource: "@ChillEventBundle/Resources/config/routing/eventtype.yml"
prefix: /{_locale}/admin/event/event_type

View File

@@ -0,0 +1,30 @@
chill_event_admin:
path: /
defaults: { _controller: "ChillEventBundle:EventType:index" }
chill_event_admin_show:
path: /{id}/show
defaults: { _controller: "ChillEventBundle:EventType:show" }
chill_event_admin_new:
path: /new
defaults: { _controller: "ChillEventBundle:EventType:new" }
chill_event_admin_create:
path: /create
defaults: { _controller: "ChillEventBundle:EventType:create" }
methods: POST
chill_event_admin_edit:
path: /{id}/edit
defaults: { _controller: "ChillEventBundle:EventType:edit" }
chill_event_admin_update:
path: /{id}/update
defaults: { _controller: "ChillEventBundle:EventType:update" }
methods: [POST, PUT]
chill_event_admin_delete:
path: /{id}/delete
defaults: { _controller: "ChillEventBundle:EventType:delete" }
methods: [POST, DELETE]

View File

@@ -0,0 +1,30 @@
chill_event_admin_role:
path: /
defaults: { _controller: "ChillEventBundle:Role:index" }
chill_event_admin_role_show:
path: /{id}/show
defaults: { _controller: "ChillEventBundle:Role:show" }
chill_event_admin_role_new:
path: /new
defaults: { _controller: "ChillEventBundle:Role:new" }
chill_event_admin_role_create:
path: /create
defaults: { _controller: "ChillEventBundle:Role:create" }
methods: POST
chill_event_admin_role_edit:
path: /{id}/edit
defaults: { _controller: "ChillEventBundle:Role:edit" }
chill_event_admin_role_update:
path: /{id}/update
defaults: { _controller: "ChillEventBundle:Role:update" }
methods: [POST, PUT]
chill_event_admin_role_delete:
path: /{id}/delete
defaults: { _controller: "ChillEventBundle:Role:delete" }
methods: [POST, DELETE]

View File

@@ -0,0 +1,30 @@
fr_admin_event_status:
path: /
defaults: { _controller: "ChillEventBundle:Status:index" }
fr_admin_event_status_show:
path: /{id}/show
defaults: { _controller: "ChillEventBundle:Status:show" }
fr_admin_event_status_new:
path: /new
defaults: { _controller: "ChillEventBundle:Status:new" }
fr_admin_event_status_create:
path: /create
defaults: { _controller: "ChillEventBundle:Status:create" }
methods: POST
fr_admin_event_status_edit:
path: /{id}/edit
defaults: { _controller: "ChillEventBundle:Status:edit" }
fr_admin_event_status_update:
path: /{id}/update
defaults: { _controller: "ChillEventBundle:Status:update" }
methods: [POST, PUT]
fr_admin_event_status_delete:
path: /{id}/delete
defaults: { _controller: "ChillEventBundle:Status:delete" }
methods: [POST, DELETE]

View File

@@ -0,0 +1,16 @@
{% extends '::base.html.twig' %}
{% block body -%}
<h1>EventType edit</h1>
{{ form(edit_form) }}
<ul class="record_actions">
<li>
<a href="{{ path('{_locale}_admin') }}">
Back to the list
</a>
</li>
<li>{{ form(delete_form) }}</li>
</ul>
{% endblock %}

View File

@@ -0,0 +1,43 @@
{% extends '::base.html.twig' %}
{% block body -%}
<h1>EventType list</h1>
<table class="records_list">
<thead>
<tr>
<th>Id</th>
<th>Label</th>
<th>Active</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for entity in entities %}
<tr>
<td><a href="{{ path('{_locale}_admin_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
<td>{{ entity.label }}</td>
<td>{{ entity.active }}</td>
<td>
<ul>
<li>
<a href="{{ path('{_locale}_admin_show', { 'id': entity.id }) }}">show</a>
</li>
<li>
<a href="{{ path('{_locale}_admin_edit', { 'id': entity.id }) }}">edit</a>
</li>
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<ul>
<li>
<a href="{{ path('{_locale}_admin_new') }}">
Create a new entry
</a>
</li>
</ul>
{% endblock %}

View File

@@ -0,0 +1,15 @@
{% extends '::base.html.twig' %}
{% block body -%}
<h1>EventType creation</h1>
{{ form(form) }}
<ul class="record_actions">
<li>
<a href="{{ path('{_locale}_admin') }}">
Back to the list
</a>
</li>
</ul>
{% endblock %}

View File

@@ -0,0 +1,36 @@
{% extends '::base.html.twig' %}
{% block body -%}
<h1>EventType</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>Active</th>
<td>{{ entity.active }}</td>
</tr>
</tbody>
</table>
<ul class="record_actions">
<li>
<a href="{{ path('{_locale}_admin') }}">
Back to the list
</a>
</li>
<li>
<a href="{{ path('{_locale}_admin_edit', { 'id': entity.id }) }}">
Edit
</a>
</li>
<li>{{ form(delete_form) }}</li>
</ul>
{% endblock %}

View File

@@ -0,0 +1,16 @@
{% extends '::base.html.twig' %}
{% block body -%}
<h1>Role edit</h1>
{{ form(edit_form) }}
<ul class="record_actions">
<li>
<a href="{{ path('{_locale}_admin_role') }}">
Back to the list
</a>
</li>
<li>{{ form(delete_form) }}</li>
</ul>
{% endblock %}

View File

@@ -0,0 +1,43 @@
{% extends '::base.html.twig' %}
{% block body -%}
<h1>Role list</h1>
<table class="records_list">
<thead>
<tr>
<th>Id</th>
<th>Label</th>
<th>Active</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for entity in entities %}
<tr>
<td><a href="{{ path('{_locale}_admin_role_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
<td>{{ entity.label }}</td>
<td>{{ entity.active }}</td>
<td>
<ul>
<li>
<a href="{{ path('{_locale}_admin_role_show', { 'id': entity.id }) }}">show</a>
</li>
<li>
<a href="{{ path('{_locale}_admin_role_edit', { 'id': entity.id }) }}">edit</a>
</li>
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<ul>
<li>
<a href="{{ path('{_locale}_admin_role_new') }}">
Create a new entry
</a>
</li>
</ul>
{% endblock %}

View File

@@ -0,0 +1,15 @@
{% extends '::base.html.twig' %}
{% block body -%}
<h1>Role creation</h1>
{{ form(form) }}
<ul class="record_actions">
<li>
<a href="{{ path('{_locale}_admin_role') }}">
Back to the list
</a>
</li>
</ul>
{% endblock %}

View File

@@ -0,0 +1,36 @@
{% extends '::base.html.twig' %}
{% block body -%}
<h1>Role</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>Active</th>
<td>{{ entity.active }}</td>
</tr>
</tbody>
</table>
<ul class="record_actions">
<li>
<a href="{{ path('{_locale}_admin_role') }}">
Back to the list
</a>
</li>
<li>
<a href="{{ path('{_locale}_admin_role_edit', { 'id': entity.id }) }}">
Edit
</a>
</li>
<li>{{ form(delete_form) }}</li>
</ul>
{% endblock %}

View File

@@ -0,0 +1,16 @@
{% extends '::base.html.twig' %}
{% block body -%}
<h1>Status edit</h1>
{{ form(edit_form) }}
<ul class="record_actions">
<li>
<a href="{{ path('fr_admin_event_status') }}">
Back to the list
</a>
</li>
<li>{{ form(delete_form) }}</li>
</ul>
{% endblock %}

View File

@@ -0,0 +1,43 @@
{% extends '::base.html.twig' %}
{% block body -%}
<h1>Status list</h1>
<table class="records_list">
<thead>
<tr>
<th>Id</th>
<th>Label</th>
<th>Active</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for entity in entities %}
<tr>
<td><a href="{{ path('fr_admin_event_status_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
<td>{{ entity.label }}</td>
<td>{{ entity.active }}</td>
<td>
<ul>
<li>
<a href="{{ path('fr_admin_event_status_show', { 'id': entity.id }) }}">show</a>
</li>
<li>
<a href="{{ path('fr_admin_event_status_edit', { 'id': entity.id }) }}">edit</a>
</li>
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<ul>
<li>
<a href="{{ path('fr_admin_event_status_new') }}">
Create a new entry
</a>
</li>
</ul>
{% endblock %}

View File

@@ -0,0 +1,15 @@
{% extends '::base.html.twig' %}
{% block body -%}
<h1>Status creation</h1>
{{ form(form) }}
<ul class="record_actions">
<li>
<a href="{{ path('fr_admin_event_status') }}">
Back to the list
</a>
</li>
</ul>
{% endblock %}

View File

@@ -0,0 +1,36 @@
{% extends '::base.html.twig' %}
{% block body -%}
<h1>Status</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>Active</th>
<td>{{ entity.active }}</td>
</tr>
</tbody>
</table>
<ul class="record_actions">
<li>
<a href="{{ path('fr_admin_event_status') }}">
Back to the list
</a>
</li>
<li>
<a href="{{ path('fr_admin_event_status_edit', { 'id': entity.id }) }}">
Edit
</a>
</li>
<li>{{ form(delete_form) }}</li>
</ul>
{% endblock %}