Commit 5aff866e authored by Julien Fastré's avatar Julien Fastré
Browse files

adapt layout to new rules

parent dab43fef
Pipeline #21123 failed with stages
in 3 minutes and 31 seconds
......@@ -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 %}
......
......@@ -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>
......
......@@ -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 %}
......
......@@ -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 %}
......@@ -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 %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment