improve layout of list

This commit is contained in:
Julien Fastré 2017-08-19 20:11:45 +02:00
parent 7ccb46c0c4
commit b154f5db65
5 changed files with 35 additions and 15 deletions

View File

@ -38,10 +38,16 @@
{{ form_widget(edit_form) }} {{ form_widget(edit_form) }}
<div class="grid-12 centered sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<button class="sc-button green margin-10" type="submit"><i class="fa fa-save"></i> {{ 'Save activity'|trans }}</button> <li class="cancel">
<button class="sc-button red margin-10" type="reset"><i class="fa fa-eraser"></i> {{ 'Reset form'|trans }}</button> <a href="{{ path('chill_activity_activity_show', { 'id': entity.id, 'person_id': entity.person.id } ) }}" class="sc-button bt-cancel">
</div> {{ 'Cancel'|trans }}
</a>
</li>
<li>
<button class="sc-button bt-update" type="submit">{{ 'Save activity'|trans }}</button>
</li>
</ul>
{{ form_end(edit_form) }} {{ form_end(edit_form) }}
{# {{ form(delete_form) }} #} {# {{ form(delete_form) }} #}

View File

@ -26,7 +26,10 @@
<h2>{{ 'Activity list' |trans }}</h2> <h2>{{ 'Activity list' |trans }}</h2>
{% if activities|length == 0 %} {% if activities|length == 0 %}
<p class="chill-no-data-statement">{{ "There isn't any activities."|trans }}</p> <p class="chill-no-data-statement">
{{ "There isn't any activities."|trans }}
<a href="{{ path('chill_activity_activity_new', {'person_id': person.id}) }}" class="sc-button bt-create button-small no-content"></a>
</p>
{% else %} {% else %}
<table class="records_list"> <table class="records_list">
<thead> <thead>
@ -54,17 +57,21 @@
<td> <td>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_activity_activity_show', { 'id': activity.id, 'person_id': person.id }) }}" class="sc-button">{{ 'show'|trans|capitalize }}</a> <a href="{{ path('chill_activity_activity_show', { 'id': activity.id, 'person_id': person.id }) }}" class="sc-button bt-show has-hidden">
</a>
</li> </li>
{% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %} {% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %}
<li> <li>
<a href="{{ path('chill_activity_activity_edit', { 'id': activity.id, 'person_id': person.id }) }}" class="sc-button bt-update">{{ 'Edit' | trans }}</a> <a href="{{ path('chill_activity_activity_edit', { 'id': activity.id, 'person_id': person.id }) }}" class="sc-button bt-update has-hidden">
</a>
</li> </li>
{% endif %} {% endif %}
{% if is_granted('CHILL_ACTIVITY_DELETE', activity) %} {% if is_granted('CHILL_ACTIVITY_DELETE', activity) %}
<li> <li>
<a href="{{ path('chill_activity_activity_delete', { 'id': activity.id, 'person_id' : person.id } ) }}" class="sc-button bt-delete"> <a href="{{ path('chill_activity_activity_delete', { 'id': activity.id, 'person_id' : person.id } ) }}" class="sc-button bt-delete has-hidden">
{{ 'Delete'|trans }}
</a> </a>
</li> </li>
{% endif %} {% endif %}
@ -75,9 +82,11 @@
</table> </table>
{% endif %} {% endif %}
<p> <ul class="record_actions">
<a href="{{ path('chill_activity_activity_new', {'person_id': person.id}) }}" class="sc-button bt-create"> <li>
{{ 'Add a new activity' | trans }} <a href="{{ path('chill_activity_activity_new', {'person_id': person.id}) }}" class="sc-button bt-create">
</a> {{ 'Add a new activity' | trans }}
</p> </a>
</li>
</ul>
{% endblock %} {% endblock %}

View File

@ -41,9 +41,14 @@
</dl> </dl>
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel">
<a class="sc-button bt-cancel" href="{{ path('chill_activity_activity_list', { 'person_id': person.id } ) }}">
{{ 'Back to the list'|trans }}
</a>
</li>
<li> <li>
<a class="sc-button bt-update" href="{{ path('chill_activity_activity_edit', { 'id': entity.id, 'person_id': person.id }) }}"> <a class="sc-button bt-update" href="{{ path('chill_activity_activity_edit', { 'id': entity.id, 'person_id': person.id }) }}">
<i class="fa fa-pencil"></i> {{ 'Edit the activity'|trans }} {{ 'Edit the activity'|trans }}
</a> </a>
</li> </li>
{% if is_granted('CHILL_ACTIVITY_DELETE', entity) %} {% if is_granted('CHILL_ACTIVITY_DELETE', entity) %}

Binary file not shown.

Binary file not shown.