mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 06:44:59 +00:00
improve ux for admin configuration crud interface
This commit is contained in:
@@ -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 %}
|
||||
|
Reference in New Issue
Block a user