improve activity new/edit twig template

This commit is contained in:
Mathieu Jaumotte 2021-12-10 12:42:52 +01:00
parent c7ee2cc600
commit f2117ea1cd
3 changed files with 35 additions and 23 deletions

View File

@ -1,5 +1,12 @@
<h1>{{ "Update activity"|trans }}</h1> <h1>
<h2 class="chill-green mb-4">{{ entity.type.name|localize_translatable_string }}</h2> {{ "Update activity"|trans }}
</h1>
<h2 class="badge-title mb-5">
<span class="title_label"></span>
<span class="title_action">
{{ entity.type.name | localize_translatable_string }}
</span>
</h2>
{{ form_start(edit_form) }} {{ form_start(edit_form) }}
{{ form_errors(edit_form) }} {{ form_errors(edit_form) }}
@ -37,7 +44,7 @@
{% endif %} {% endif %}
{%- if edit_form.persons is defined or edit_form.thirdParties is defined or edit_form.users is defined -%} {%- if edit_form.persons is defined or edit_form.thirdParties is defined or edit_form.users is defined -%}
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2> <h2 class="chill-blue">{{ 'Concerned groups'|trans }}</h2>
{%- if edit_form.persons is defined -%} {%- if edit_form.persons is defined -%}
{{ form_widget(edit_form.persons) }} {{ form_widget(edit_form.persons) }}
@ -53,7 +60,7 @@
{% endif %} {% endif %}
<h2 class="chill-red">{{ 'Activity data'|trans }}</h2> <h2 class="chill-blue">{{ 'Activity data'|trans }}</h2>
{%- if edit_form.date is defined -%} {%- if edit_form.date is defined -%}
{{ form_row(edit_form.date) }} {{ form_row(edit_form.date) }}
@ -73,7 +80,6 @@
{% endif %} {% endif %}
{%- if edit_form.comment is defined -%} {%- if edit_form.comment is defined -%}
{# TODO .. public and private #}
{{ form_row(edit_form.comment) }} {{ form_row(edit_form.comment) }}
{% endif %} {% endif %}
@ -97,16 +103,16 @@
{% set accompanying_course_id = accompanyingCourse.id %} {% set accompanying_course_id = accompanyingCourse.id %}
{% endif %} {% endif %}
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_activity_activity_show', { 'id': entity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id } ) }}" class="btn btn-cancel"> <a href="{{ path('chill_activity_activity_show', { 'id': entity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id } ) }}" class="btn btn-cancel">
{{ 'Cancel'|trans }} {{ 'Cancel'|trans }}
</a> </a>
</li> </li>
<li> <li>
<button class="btn btn-update" type="submit">{{ 'Save'|trans }}</button> <button class="btn btn-update" type="submit">{{ 'Save'|trans }}</button>
</li> </li>
</ul> </ul>
{{ form_end(edit_form) }}
{{ form_end(edit_form) }}
{# {{ form(delete_form) }} #} {# {{ form(delete_form) }} #}

View File

@ -1,10 +1,16 @@
<h1>{{ "Activity creation"|trans ~ ' :' }}</h1> <h1>
<h2 class="chill-green mb-4">{{ entity.type.name|localize_translatable_string }}</h2> {{ "Activity creation"|trans }}
</h1>
<h2 class="badge-title mb-5">
<span class="title_label"></span>
<span class="title_action">
{{ entity.type.name | localize_translatable_string }}
</span>
</h2>
{{ form_start(form) }} {{ form_start(form) }}
{{ form_errors(form) }} {{ form_errors(form) }}
{%- if form.emergency is defined -%} {%- if form.emergency is defined -%}
{{ form_row(form.emergency) }} {{ form_row(form.emergency) }}
{% endif %} {% endif %}
@ -39,7 +45,7 @@
{%- if form.persons is defined or form.thirdParties is defined or form.users is defined -%} {%- if form.persons is defined or form.thirdParties is defined or form.users is defined -%}
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2> <h2 class="chill-blue">{{ 'Concerned groups'|trans }}</h2>
{%- if form.persons is defined -%} {%- if form.persons is defined -%}
{{ form_widget(form.persons) }} {{ form_widget(form.persons) }}
@ -55,7 +61,7 @@
{% endif %} {% endif %}
<h2 class="chill-red">{{ 'Activity data'|trans }}</h2> <h2 class="chill-blue">{{ 'Activity data'|trans }}</h2>
{%- if form.date is defined -%} {%- if form.date is defined -%}
{{ form_row(form.date) }} {{ form_row(form.date) }}
@ -103,7 +109,7 @@
</a> </a>
</li> </li>
<li> <li>
<button class="btn btn-create" type="submit"> <button class="btn btn-save" type="submit">
{{ 'Create'|trans }} {{ 'Create'|trans }}
</button> </button>
</li> </li>

View File

@ -197,7 +197,7 @@ div.wrap-list {
div.wl-col.list { div.wl-col.list {
background-color: cyan; background-color: cyan;
p.wl-item { .wl-item {
background-color: orange; background-color: orange;
} }
} }