adapt layout to new rules

This commit is contained in:
Julien Fastré 2017-08-19 21:48:36 +02:00
parent dab43fef6b
commit 5aff866ed8
5 changed files with 42 additions and 20 deletions

View File

@ -29,10 +29,14 @@
{{ form_row(edit_form.cFData) }}
{{ form_widget(edit_form) }}
<div class="grid-12 centered sticky-form-buttons">
<button class="sc-button green margin-10" type="submit"><i class="fa fa-save"></i> {{ 'Save report'|trans }}</button>
<button class="sc-button red margin-10" type="reset"><i class="fa fa-eraser"></i> {{ 'Reset report'|trans }}</button>
</div>
<ul class="sticky-form-buttons record_actions">
<li class="cancel">
<a href="{{ path('report_list', { 'person_id': person.id } ) }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a>
<li>
<li>
<button class="sc-button bt-save" type="submit">{{ 'Save report'|trans }}</button>
</li>
</ul>
{{ form_end(edit_form) }}
{% endblock %}

View File

@ -25,9 +25,8 @@
<h1>{{ 'Report list'|trans }}</h1>
{% if reports|length == 0 %}
<p style="text-align:center;">
<p>
<span class="chill-no-data-statement">{{ "No report registered for this person."|trans }}</span>
<a href="{{ path('report_select_type', { 'person_id' : person.id } ) }}">{{ 'Create a new report'|trans }}</a>
</p>
{% else %}
<table class="" style="width:100%">
@ -36,7 +35,7 @@
<th class="chill-red">{{ 'Date' | trans }}</th>
<th class="chill-green">{{ 'Report type' | trans }}</th>
<th class="chill-orange">{{ 'Circle' | trans }}</th>
<th>{{ 'Actions'|trans }}</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
@ -49,12 +48,12 @@
<ul class="record_actions">
{% if is_granted('CHILL_REPORT_SEE', report) %}
<li>
<a href="{{ path('report_view', { 'person_id': report.person.id, 'report_id': report.id }) }}" class="sc-button bt-view">{{ 'View the report' | trans | capitalize }}</a>
<a href="{{ path('report_view', { 'person_id': report.person.id, 'report_id': report.id }) }}" class="sc-button bt-view"></a>
</li>
{% endif %}
{% if is_granted('CHILL_REPORT_UPDATE', report) %}
<li>
<a href="{{ path('report_edit', { 'person_id': report.person.id, 'report_id': report.id }) }}" class="sc-button bt-update">{{ 'Update' | trans }}</a>
<a href="{{ path('report_edit', { 'person_id': report.person.id, 'report_id': report.id }) }}" class="sc-button bt-update"></a>
</li>
{% endif %}
</ul>
@ -73,7 +72,6 @@
<ul class="record_actions">
<li>
<a href="{{ path('report_select_type', { 'person_id' : person.id } ) }}" class="sc-button bt-new">
<i class="fa fa-plus"></i>
{{ 'Create a new report'|trans }}
</a>
</li>

View File

@ -27,9 +27,14 @@
{{ form_row(form.date) }}
{{ form_row(form.scope) }}
{{ form_row(form.cFData) }}
<div class="grid-12 centered sticky-form-buttons">
<button class="sc-button green margin-10" type="submit"><i class="fa fa-save"></i> {{ 'Add report'|trans }}</button>
</div>
<ul class="sticky-form-buttons record_actions">
<li class="cancel">
<a href="{{ path('report_list', { 'person_id': person.id } ) }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a>
<li>
<li>
<button class="sc-button bt-create" type="submit"> {{ 'Add report'|trans }}</button>
</li>
</ul>
{{ form_end(form) }}
{% endblock %}

View File

@ -24,10 +24,17 @@
{{ form_start(form) }}
{{ form_widget(form.cFGroup) }}
<button class="sc-button green" type="submit">
<i class="fa fa-plus"></i>
{{ 'Create a new report'|trans }}
</button>
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('report_list', { 'person_id': person.id } ) }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a>
<li>
<button class="sc-button green" type="submit">
<i class="fa fa-plus"></i>
{{ 'Create a new report'|trans }}
</button>
</li>
</ul>
{{ form_end(form) }}
{% endblock %}

View File

@ -43,7 +43,15 @@
<dl class="chill_report_view_data">
{{ chill_custom_fields_group_widget(entity.cFData, entity.cFGroup) }}
</dl>
{% if is_granted('CHILL_REPORT_UPDATE', entity) %}
<a class="sc-button bt-update" href="{{ path('report_edit', { 'person_id': entity.person.id, 'report_id': entity.id }) }}"><i class="fa fa-pencil"></i> {{ 'Update the report' | trans }}</a>
{% endif %}
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('report_list', { 'person_id': person.id } ) }}" class="sc-button bt-cancel">{{ 'Back to the list'|trans }}</a>
<li>
{% if is_granted('CHILL_REPORT_UPDATE', entity) %}
<li>
<a class="sc-button bt-edit" href="{{ path('report_edit', { 'person_id': entity.person.id, 'report_id': entity.id }) }}">{{ 'Update the report' | trans }}</a>
</li>
{% endif %}
</ul>
{% endblock %}