mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
improve ux for admin configuration crud interface
This commit is contained in:
parent
8029b9b8ff
commit
31176f8bc8
@ -46,7 +46,7 @@ class EventTypeController extends AbstractController
|
||||
$em->persist($entity);
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($this->generateUrl('chill_eventtype_admin_show',
|
||||
return $this->redirect($this->generateUrl('chill_eventtype_admin',
|
||||
array('id' => $entity->getId())));
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ class EventTypeController extends AbstractController
|
||||
if ($editForm->isValid()) {
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($this->generateUrl('chill_eventtype_admin_edit',
|
||||
return $this->redirect($this->generateUrl('chill_eventtype_admin',
|
||||
array('id' => $id)));
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ class RoleController extends AbstractController
|
||||
$em->persist($entity);
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($this->generateUrl('chill_event_admin_role_show',
|
||||
return $this->redirect($this->generateUrl('chill_event_admin_role',
|
||||
array('id' => $entity->getId())));
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@ class RoleController extends AbstractController
|
||||
if ($editForm->isValid()) {
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($this->generateUrl('chill_event_admin_role_edit',
|
||||
return $this->redirect($this->generateUrl('chill_event_admin_role',
|
||||
array('id' => $id)));
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ class StatusController extends AbstractController
|
||||
$em->persist($entity);
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($this->generateUrl('chill_event_admin_status_show', array('id' => $entity->getId())));
|
||||
return $this->redirect($this->generateUrl('chill_event_admin_status', array('id' => $entity->getId())));
|
||||
}
|
||||
|
||||
return $this->render('ChillEventBundle:Status:new.html.twig', array(
|
||||
@ -174,7 +174,7 @@ class StatusController extends AbstractController
|
||||
if ($editForm->isValid()) {
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($this->generateUrl('chill_event_admin_status_edit', array('id' => $id)));
|
||||
return $this->redirect($this->generateUrl('chill_event_admin_status', array('id' => $id)));
|
||||
}
|
||||
|
||||
return $this->render('ChillEventBundle:Status:edit.html.twig', array(
|
||||
|
@ -17,7 +17,5 @@
|
||||
#}
|
||||
|
||||
{% extends "@ChillMain/Menu/verticalMenu.html.twig" %}
|
||||
{% block v_menu_title %}
|
||||
{{ 'Events configuration menu'|trans }}
|
||||
{% endblock %}
|
||||
{% block v_menu_title %}{{ 'Events configuration menu'|trans }}{% endblock %}
|
||||
|
||||
|
@ -4,14 +4,18 @@
|
||||
|
||||
<h1>{{ 'EventType edit'|trans }}</h1>
|
||||
|
||||
{{ form(edit_form) }}
|
||||
{{ form_start(edit_form) }}
|
||||
{{ form_row(edit_form.name) }}
|
||||
{{ form_row(edit_form.active) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_eventtype_admin') }}">
|
||||
Back to the list
|
||||
</a>
|
||||
</li>
|
||||
<li>{{ form(delete_form) }}</li>
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li class="cancel">
|
||||
<a href="{{ path('chill_eventtype_admin') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_row(edit_form.submit, { 'attr': { 'class' : 'sc-button bt-edit' }}) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(edit_form) }}
|
||||
{% endblock %}
|
||||
|
@ -7,10 +7,10 @@
|
||||
<table class="records_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Label</th>
|
||||
<th>Active</th>
|
||||
<th>Actions</th>
|
||||
<th>{{ 'Id'|trans }}</th>
|
||||
<th>{{ 'Label'|trans }}</th>
|
||||
<th>{{ 'Active'|trans }}</th>
|
||||
<th>{{ 'Actions'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -20,12 +20,12 @@
|
||||
<td>{{ entity.name|localize_translatable_string }}</td>
|
||||
<td>{{ entity.active }}</td>
|
||||
<td>
|
||||
<ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_eventtype_admin_show', { 'id': entity.id }) }}">show</a>
|
||||
<a href="{{ path('chill_eventtype_admin_show', { 'id': entity.id }) }}" class="sc-button bt-show" title="{{ 'show'|trans }}"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_eventtype_admin_show', { 'id': entity.id }) }}">edit</a>
|
||||
<a href="{{ path('chill_eventtype_admin_edit', { 'id': entity.id }) }}" class="sc-button bt-edit" title="{{ 'edit'|trans }}"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
@ -34,11 +34,9 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_eventtype_admin_new') }}">
|
||||
Create a new entry
|
||||
</a>
|
||||
<a href="{{ path('chill_eventtype_admin_new') }}" class="sc-button bt-new">{{ 'Create a new type'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
@ -4,13 +4,18 @@
|
||||
|
||||
<h1>{{ 'EventType creation'|trans }}</h1>
|
||||
|
||||
{{ form(form) }}
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.active) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_eventtype_admin') }}">
|
||||
Back to the list
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li class="cancel">
|
||||
<a href="{{ path('chill_eventtype_admin') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_row(form.submit, { 'attr': { 'class' : 'sc-button bt-new' }}) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
@ -7,31 +7,31 @@
|
||||
<table class="record_properties">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>{{ 'Id'|trans }}</th>
|
||||
<td>{{ entity.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>{{ 'Name'|trans }}</th>
|
||||
<td>{{ entity.name|localize_translatable_string }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Active</th>
|
||||
<th>{{ 'Active'|trans }}</th>
|
||||
<td>{{ entity.active }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_eventtype_admin') }}">
|
||||
Back to the list
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_eventtype_admin_edit', { 'id': entity.id }) }}">
|
||||
Edit
|
||||
</a>
|
||||
</li>
|
||||
<li>{{ form(delete_form) }}</li>
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li class="cancel">
|
||||
<a href="{{ path('chill_eventtype_admin') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_eventtype_admin_edit', { 'id': entity.id }) }}" class="sc-button bt-edit">{{ 'Edit'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_start(delete_form) }}
|
||||
{{ form_row(delete_form.submit, { 'attr': { 'class' : 'sc-button bt-delete' }}) }}
|
||||
{{ form_end(delete_form) }}
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
@ -1,17 +1,21 @@
|
||||
{% extends "ChillEventBundle:Admin:layout.html.twig" %}
|
||||
|
||||
{% block admin_content -%}
|
||||
|
||||
<h1>{{ 'Role edit'|trans }}</h1>
|
||||
|
||||
{{ form(edit_form) }}
|
||||
{{ form_start(edit_form) }}
|
||||
{{ form_row(edit_form.name) }}
|
||||
{{ form_row(edit_form.type) }}
|
||||
{{ form_row(edit_form.active) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_event_admin_role') }}">
|
||||
Back to the list
|
||||
</a>
|
||||
</li>
|
||||
<li>{{ form(delete_form) }}</li>
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li class="cancel">
|
||||
<a href="{{ path('chill_event_admin_role') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_row(edit_form.submit, { 'attr': { 'class' : 'sc-button bt-edit' }}) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(edit_form) }}
|
||||
{% endblock %}
|
||||
|
@ -7,11 +7,11 @@
|
||||
<table class="records_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Active</th>
|
||||
<th>Actions</th>
|
||||
<th>{{ 'Id'|trans }}</th>
|
||||
<th>{{ 'Role'|trans }}</th>
|
||||
<th>{{ 'Type'|trans }}</th>
|
||||
<th>{{ 'Active'|trans }}</th>
|
||||
<th>{{ 'Actions'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -22,25 +22,23 @@
|
||||
<td>{{ entity.type.name|localize_translatable_string }}</td>
|
||||
<td>{{ entity.active }}</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ path('chill_event_admin_role_show', { 'id': entity.id }) }}">show</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_event_admin_role_edit', { 'id': entity.id }) }}">edit</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_event_admin_role_show', { 'id': entity.id }) }}" class="sc-button bt-show" title="{{ 'show'|trans }}"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_event_admin_role_edit', { 'id': entity.id }) }}" class="sc-button bt-edit" title="{{ 'edit'|trans }}"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_event_admin_role_new') }}">
|
||||
Create a new entry
|
||||
</a>
|
||||
<a href="{{ path('chill_event_admin_role_new') }}" class="sc-button bt-new">{{ 'Create a new role'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
@ -4,13 +4,19 @@
|
||||
|
||||
<h1>{{ 'Role creation'|trans }}</h1>
|
||||
|
||||
{{ form(form) }}
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.type) }}
|
||||
{{ form_row(form.active) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_event_admin_role') }}">
|
||||
Back to the list
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li class="cancel">
|
||||
<a href="{{ path('chill_event_admin_role') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_row(form.submit, { 'attr': { 'class' : 'sc-button bt-new' }}) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
@ -7,31 +7,35 @@
|
||||
<table class="record_properties">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>{{ 'Id'|trans }}</th>
|
||||
<td>{{ entity.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>{{ 'Name'|trans }}</th>
|
||||
<td>{{ entity.name|localize_translatable_string }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Active</th>
|
||||
<th>{{ 'Type'|trans }}</th>
|
||||
<td>{{ entity.type.name|localize_translatable_string }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ 'Active'|trans }}</th>
|
||||
<td>{{ entity.active }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_event_admin_role') }}">
|
||||
Back to the list
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_event_admin_role_edit', { 'id': entity.id }) }}">
|
||||
Edit
|
||||
</a>
|
||||
</li>
|
||||
<li>{{ form(delete_form) }}</li>
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li class="cancel">
|
||||
<a href="{{ path('chill_event_admin_role') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_event_admin_role_edit', { 'id': entity.id }) }}" class="sc-button bt-edit">{{ 'Edit'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_start(delete_form) }}
|
||||
{{ form_row(delete_form.submit, { 'attr': { 'class' : 'sc-button bt-delete' }}) }}
|
||||
{{ form_end(delete_form) }}
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
@ -4,14 +4,19 @@
|
||||
|
||||
<h1>{{ 'Status edit'|trans }}</h1>
|
||||
|
||||
{{ form(edit_form) }}
|
||||
{{ form_start(edit_form) }}
|
||||
{{ form_row(edit_form.name) }}
|
||||
{{ form_row(edit_form.type) }}
|
||||
{{ form_row(edit_form.active) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_event_admin_status') }}">
|
||||
Back to the list
|
||||
</a>
|
||||
</li>
|
||||
<li>{{ form(delete_form) }}</li>
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li class="cancel">
|
||||
<a href="{{ path('chill_event_admin_status') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_row(edit_form.submit, { 'attr': { 'class' : 'sc-button bt-edit' }}) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(edit_form) }}
|
||||
{% endblock %}
|
||||
|
@ -7,11 +7,11 @@
|
||||
<table class="records_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Active</th>
|
||||
<th>Actions</th>
|
||||
<th>{{ 'Id'|trans }}</th>
|
||||
<th>{{ 'Statut'|trans }}</th>
|
||||
<th>{{ 'Type'|trans }}</th>
|
||||
<th>{{ 'Active'|trans }}</th>
|
||||
<th>{{ 'Actions'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -22,12 +22,12 @@
|
||||
<td>{{ entity.type.name|localize_translatable_string }}</td>
|
||||
<td>{{ entity.active }}</td>
|
||||
<td>
|
||||
<ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_event_admin_status_show', { 'id': entity.id }) }}">show</a>
|
||||
<a href="{{ path('chill_event_admin_status_show', { 'id': entity.id }) }}" class="sc-button bt-show" title="{{ 'show'|trans }}"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_event_admin_status_edit', { 'id': entity.id }) }}">edit</a>
|
||||
<a href="{{ path('chill_event_admin_status_edit', { 'id': entity.id }) }}" class="sc-button bt-edit" title="{{ 'edit'|trans }}"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
@ -36,11 +36,9 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul>
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li>
|
||||
<a href="{{ path('chill_event_admin_status_new') }}">
|
||||
Create a new entry
|
||||
</a>
|
||||
<a href="{{ path('chill_event_admin_status_new') }}" class="sc-button bt-new">{{ 'Create a new status'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
@ -4,13 +4,19 @@
|
||||
|
||||
<h1>{{ 'Status creation'|trans }}</h1>
|
||||
|
||||
{{ form(form) }}
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.type) }}
|
||||
{{ form_row(form.active) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_event_admin_status') }}">
|
||||
Back to the list
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li class="cancel">
|
||||
<a href="{{ path('chill_event_admin_status') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_row(form.submit, { 'attr': { 'class' : 'sc-button bt-new' }}) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
@ -7,31 +7,35 @@
|
||||
<table class="record_properties">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>{{ 'Id'|trans }}</th>
|
||||
<td>{{ entity.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>{{ 'Status'|trans }}</th>
|
||||
<td>{{ entity.name|localize_translatable_string }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Active</th>
|
||||
<th>{{ 'Type'|trans }}</th>
|
||||
<td>{{ entity.type.name|localize_translatable_string }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ 'Active'|trans }}</th>
|
||||
<td>{{ entity.active }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_event_admin_status') }}">
|
||||
Back to the list
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_event_admin_status_edit', { 'id': entity.id }) }}">
|
||||
Edit
|
||||
</a>
|
||||
</li>
|
||||
<li>{{ form(delete_form) }}</li>
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li class="cancel">
|
||||
<a href="{{ path('chill_event_admin_status') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_event_admin_status_edit', { 'id': entity.id }) }}" class="sc-button bt-edit">{{ 'Edit'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_start(delete_form) }}
|
||||
{{ form_row(delete_form.submit, { 'attr': { 'class' : 'sc-button bt-delete' }}) }}
|
||||
{{ form_end(delete_form) }}
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
@ -104,4 +104,8 @@ Role edit: Modifier un rôle
|
||||
'': ''
|
||||
xlsx: xlsx
|
||||
ods: ods
|
||||
csv: csv
|
||||
csv: csv
|
||||
|
||||
Create a new role: Créer un nouveau rôle
|
||||
Create a new type: Créer un nouveau type
|
||||
Create a new status: Créer un nouveau statut
|
Loading…
x
Reference in New Issue
Block a user