improve ux for admin configuration crud interface

This commit is contained in:
Mathieu Jaumotte 2021-02-05 22:30:23 +01:00
parent 22efcf0c1d
commit 3278d07137
13 changed files with 99 additions and 94 deletions

View File

@ -45,7 +45,7 @@ class ActivityReasonController extends AbstractController
$em->persist($entity);
$em->flush();
return $this->redirect($this->generateUrl('chill_activity_activityreason_show', array('id' => $entity->getId())));
return $this->redirect($this->generateUrl('chill_activity_activityreason', array('id' => $entity->getId())));
}
return $this->render('ChillActivityBundle:ActivityReason:new.html.twig', array(
@ -167,7 +167,7 @@ class ActivityReasonController extends AbstractController
if ($editForm->isValid()) {
$em->flush();
return $this->redirect($this->generateUrl('chill_activity_activityreason_edit', array('id' => $id)));
return $this->redirect($this->generateUrl('chill_activity_activityreason', array('id' => $id)));
}
return $this->render('ChillActivityBundle:ActivityReason:edit.html.twig', array(

View File

@ -23,14 +23,15 @@
{{ form_row(edit_form.name) }}
{{ form_row(edit_form.active) }}
{{ form_row(edit_form.category) }}
{{ form_row(edit_form.submit, { 'attr': { 'class' : 'sc-button orange' } } ) }}
{{ form_end(edit_form) }}
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activityreason') }}">
{{ 'Back to the list'|trans }}
</a>
</li>
</ul>
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('chill_activity_activityreason') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a>
</li>
<li>
{{ form_row(edit_form.submit, { 'attr': { 'class' : 'sc-button orange' } } ) }}
</li>
</ul>
{{ form_end(edit_form) }}
{% endblock %}

View File

@ -31,12 +31,12 @@
<tr class="{% if entity.active %}active{% else %}inactive{% endif %}">
<td><a href="{{ path('chill_activity_activityreason_show', { 'id': entity.id }) }}">{{ entity.name|localize_translatable_string }}</a></td>
<td>
<ul>
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activityreason_show', { 'id': entity.id }) }}">{{ 'show'|trans }}</a>
<a href="{{ path('chill_activity_activityreason_show', { 'id': entity.id }) }}" class="sc-button bt-show" title="{{ 'show'|trans }}"></a>
</li>
<li>
<a href="{{ path('chill_activity_activityreason_edit', { 'id': entity.id }) }}">{{ 'edit'|trans }}</a>
<a href="{{ path('chill_activity_activityreason_edit', { 'id': entity.id }) }}" class="sc-button bt-edit" title="{{ 'edit'|trans }}"></a>
</li>
</ul>
</td>
@ -45,9 +45,9 @@
</tbody>
</table>
<ul>
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activityreason_new') }}">
<a href="{{ path('chill_activity_activityreason_new') }}" class="sc-button bt-new">
{{ 'Create a new activity reason'|trans }}
</a>
</li>

View File

@ -23,14 +23,15 @@
{{ form_row(form.name) }}
{{ form_row(form.active) }}
{{ form_row(form.category) }}
{{ form_row(form.submit, { 'attr': { 'class' : 'sc-button green' } } ) }}
{{ form_end(form) }}
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activityreason') }}">
{{ 'Back to the list'|trans }}
</a>
</li>
</ul>
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('chill_activity_activityreason') }}" 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 %}

View File

@ -38,16 +38,16 @@
</tbody>
</table>
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activityreason') }}">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
<a href="{{ path('chill_activity_activityreason_edit', { 'id': entity.id }) }}">
{{ 'Edit'|trans }}
</a>
</li>
</ul>
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('chill_activity_activityreason') }}" class="sc-button bt-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
<a href="{{ path('chill_activity_activityreason_edit', { 'id': entity.id }) }}" class="sc-button bt-edit">
{{ 'Edit'|trans }}
</a>
</li>
</ul>
{% endblock %}

View File

@ -22,14 +22,17 @@
{{ form_start(edit_form) }}
{{ form_row(edit_form.name) }}
{{ form_row(edit_form.active) }}
{{ form_row(edit_form.submit, { 'attr': { 'class': 'sc-button orange' } } ) }}
{{ form_end(edit_form) }}
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activityreasoncategory') }}">
{{ 'Back to the list'|trans }}
</a>
</li>
</ul>
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('chill_activity_activityreasoncategory') }}" 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 %}

View File

@ -29,14 +29,15 @@
<tbody>
{% for entity in entities %}
<tr>
<td><a href="{{ path('chill_activity_activityreasoncategory_show', { 'id': entity.id }) }}">{{ entity.name|localize_translatable_string }}</a></td>
<td>
<ul>
<a href="{{ path('chill_activity_activityreasoncategory_show', { 'id': entity.id }) }}">{{ entity.name|localize_translatable_string }}</a></td>
<td>
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activityreasoncategory_show', { 'id': entity.id }) }}">{{ 'show'|trans }}</a>
<a href="{{ path('chill_activity_activityreasoncategory_show', { 'id': entity.id }) }}" class="sc-button bt-show" title="{{ 'show'|trans }}"></a>
</li>
<li>
<a href="{{ path('chill_activity_activityreasoncategory_edit', { 'id': entity.id }) }}">{{ 'edit'|trans }}</a>
<a href="{{ path('chill_activity_activityreasoncategory_edit', { 'id': entity.id }) }}" class="sc-button bt-edit" title="{{ 'edit'|trans }}"></a>
</li>
</ul>
</td>
@ -45,9 +46,9 @@
</tbody>
</table>
<ul>
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activityreasoncategory_new') }}">
<a href="{{ path('chill_activity_activityreasoncategory_new') }}" class="sc-button bt-new">
{{ 'Create a new activity category reason'|trans }}
</a>
</li>

View File

@ -22,14 +22,15 @@
{{ form_start(form) }}
{{ form_row(form.name) }}
{{ form_row(form.active) }}
{{ form_widget(form.submit, { 'attr': { 'class' : 'sc-button blue' } } ) }}
<p>{{ form_end(form) }}</p>
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activityreasoncategory') }}">
{{ 'Back to the list'|trans }}
</a>
</li>
</ul>
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('chill_activity_activityreasoncategory') }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a>
</li>
<li>
{{ form_widget(form.submit, { 'attr': { 'class' : 'sc-button bt-new' } } ) }}
</li>
</ul>
{{ form_end(form) }}
{% endblock %}

View File

@ -37,17 +37,16 @@
</tr>
</tbody>
</table>
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activityreasoncategory') }}">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
<a href="{{ path('chill_activity_activityreasoncategory_edit', { 'id': entity.id }) }}">
{{ 'Edit'|trans }}
</a>
</li>
</ul>
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('chill_activity_activityreasoncategory') }}" class="sc-button bt-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
<a href="{{ path('chill_activity_activityreasoncategory_edit', { 'id': entity.id }) }}" class="sc-button bt-edit">
{{ 'Edit'|trans }}
</a>
</li>
</ul>
{% endblock %}

View File

@ -26,8 +26,8 @@
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activitytype') }}">
<li class="cancel">
<a href="{{ path('chill_activity_activitytype') }}" class="sc-button bt-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>

View File

@ -41,10 +41,10 @@
<td>
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activitytype_show', { 'id': entity.id }) }}" class="sc-button bt-reset">{{ 'show'|trans|capitalize }}</a>
<a href="{{ path('chill_activity_activitytype_show', { 'id': entity.id }) }}" class="sc-button bt-show" title="{{ 'show'|trans }}"></a>
</li>
<li>
<a href="{{ path('chill_activity_activitytype_edit', { 'id': entity.id }) }}" class="sc-button bt-edit">{{ 'edit'|trans|capitalize }}</a>
<a href="{{ path('chill_activity_activitytype_edit', { 'id': entity.id }) }}" class="sc-button bt-edit" title="{{ 'edit'|trans }}"></a>
</li>
</ul>
</td>

View File

@ -24,13 +24,13 @@
{{ form_row(form.name) }}
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activitytype') }}">
<li class="cancel">
<a href="{{ path('chill_activity_activitytype') }}" class="sc-button bt-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
{{ form_widget(form.submit, { 'attr' : { 'class' : 'sc-button blue' } } ) }}
{{ form_widget(form.submit, { 'attr' : { 'class' : 'sc-button bt-new' } } ) }}
</li>
</ul>
{{ form_end(form) }}

View File

@ -27,17 +27,16 @@
</tr>
</tbody>
</table>
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activitytype') }}">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
<a href="{{ path('chill_activity_activitytype_edit', { 'id': entity.id }) }}">
{{ 'Edit'|trans }}
</a>
</li>
</ul>
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('chill_activity_activitytype') }}" class="sc-button bt-cancel">
{{ 'Back to the list'|trans }}
</a>
</li>
<li>
<a href="{{ path('chill_activity_activitytype_edit', { 'id': entity.id }) }}" class="sc-button bt-edit">
{{ 'Edit'|trans }}
</a>
</li>
</ul>
{% endblock %}