small buttons in lists, coherence of messages

This commit is contained in:
Mathieu Jaumotte 2021-08-01 19:42:21 +02:00
parent ee819e7767
commit 9f5086e9c1
7 changed files with 58 additions and 60 deletions

View File

@ -125,20 +125,23 @@
</ul> </ul>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('chill_activity_activity_show', { 'id': activity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}" class="btn btn-show "></a> <a href="{{ path('chill_activity_activity_show', { 'id': activity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}"
class="btn btn-sm btn-show "></a>
</li> </li>
{# TOOD {# TOOD
{% 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, 'accompanying_period_id': accompanying_course_id }) }}" class="btn btn-update "></a> <a href="{{ path('chill_activity_activity_edit', { 'id': activity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}"
class="btn btn-sm btn-update "></a>
</li> </li>
{# TOOD {# TOOD
{% 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, 'accompanying_period_id': accompanying_course_id } ) }}" class="btn btn-delete "></a> <a href="{{ path('chill_activity_activity_delete', { 'id': activity.id, 'person_id' : person_id, 'accompanying_period_id': accompanying_course_id } ) }}"
class="btn btn-sm btn-delete "></a>
</li> </li>
{# {#
{% endif %} {% endif %}

View File

@ -8,7 +8,7 @@
{% if person.isSharingHousehold %} {% if person.isSharingHousehold %}
<li> <li>
<a href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id': person.getCurrentHousehold.id }) }}" <a href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id': person.getCurrentHousehold.id }) }}"
class="btn btn-chill-pink" title="{{ 'Show household'|trans ~ ' n° ' ~ person.getCurrentHousehold.id }}"> class="btn btn-sm btn-chill-pink" title="{{ 'Show household'|trans ~ ' n° ' ~ person.getCurrentHousehold.id }}">
<i class="fa fa-home"></i> <i class="fa fa-home"></i>
</a> </a>
</li> </li>

View File

@ -2,30 +2,28 @@
<div class="flex-table"> <div class="flex-table">
{% for accompanying_period in accompanying_periods %} {% for accompanying_period in accompanying_periods %}
<div class="item-bloc"> <div class="item-bloc">
<div class="item-row">
<div class="item-row">
<div class="item-col"> <div class="item-col">
<span class="h3"> <span class="h3">
<i class="fa fa-fw fa-random"></i> <i class="fa fa-fw fa-random"></i>
<b>{{ accompanying_period.id }}</b> <b>{{ accompanying_period.id }}</b>
</span> </span>
{% if accompanying_period.step == 'DRAFT' %} {% if accompanying_period.step == 'DRAFT' %}
<span class="badge bg-primary">{{- 'Draft'|trans|upper -}}</span> <span class="badge bg-secondary">{{- 'Draft'|trans|upper -}}</span>
{% else %} {% else %}
<span class="badge bg-primary">{{- 'Confirmed'|trans|upper -}}</span> <span class="badge bg-success">{{- 'Confirmed'|trans|upper -}}</span>
{% endif %} {% endif %}
{% if accompanying_period.emergency %} {% if accompanying_period.emergency %}
<span class="badge bg-primary">{{- 'Emergency'|trans|upper -}}</span> <span class="badge bg-danger">{{- 'Emergency'|trans|upper -}}</span>
{% endif %} {% endif %}
{% if accompanying_period.confidential %} {% if accompanying_period.confidential %}
<span class="badge bg-primary">{{- 'Confidential'|trans|upper -}}</span> <span class="badge bg-warning">{{- 'Confidential'|trans|upper -}}</span>
{% endif %} {% endif %}
</div> </div>
<div class="item-col"></div> <div class="item-col"></div>
</div> </div>
<div class="item-row"> <div class="item-row">
<div class="item-col"> <div class="item-col">
{% if accompanying_period.closingDate == null %} {% if accompanying_period.closingDate == null %}
{{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': accompanying_period.openingDate|format_date('long') } ) }} {{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': accompanying_period.openingDate|format_date('long') } ) }}
@ -42,7 +40,6 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
</div> </div>
<div class="item-col"> <div class="item-col">
{% if chill_accompanying_periods.fields.user == 'visible' %} {% if chill_accompanying_periods.fields.user == 'visible' %}
{% if accompanying_period.user %} {% if accompanying_period.user %}
@ -52,10 +49,9 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
</div> </div>
</div> </div>
<div class="item-row separator">
<div class="item-row separator">
<div class="item-col"><h3>{{ 'Participants'|trans }}</h3></div> <div class="item-col"><h3>{{ 'Participants'|trans }}</h3></div>
<div class="item-col"> <div class="item-col">
{% if accompanying_period.participations.count > 0 %} {% if accompanying_period.participations.count > 0 %}
@ -70,10 +66,8 @@
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span> <span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
{% endif %} {% endif %}
</div> </div>
</div> </div>
<div class="item-row"> <div class="item-row">
<div class="item-col"><h3>{{ 'Requestor'|trans }}</h3></div> <div class="item-col"><h3>{{ 'Requestor'|trans }}</h3></div>
<div class="item-col"> <div class="item-col">
{% if accompanying_period.requestorPerson is not null or accompanying_period.requestorThirdParty is not null %} {% if accompanying_period.requestorPerson is not null or accompanying_period.requestorThirdParty is not null %}
@ -91,10 +85,8 @@
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span> <span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
{% endif %} {% endif %}
</div> </div>
</div> </div>
<div class="item-row"> <div class="item-row">
<h3>{{ 'Social issues'|trans }}</h3> <h3>{{ 'Social issues'|trans }}</h3>
{% if accompanying_period.socialIssues.count > 0 %} {% if accompanying_period.socialIssues.count > 0 %}
{% for si in accompanying_period.socialIssues %} {% for si in accompanying_period.socialIssues %}
@ -103,27 +95,26 @@
{% else %} {% else %}
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span> <span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
{% endif %} {% endif %}
</div> </div>
<div class="item-row separator">
<div class="item-row separator">
<ul class="record_actions"> <ul class="record_actions">
{# TODO if enable_accompanying_course_with_multiple_persons is true ... #} {# TODO if enable_accompanying_course_with_multiple_persons is true ... #}
<li> <li>
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': accompanying_period.id }) }}" <a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': accompanying_period.id }) }}"
class="btn btn-show" title="{{ 'See accompanying period'|trans }}">{{ 'See this period'|trans }}</a> class="btn btn-sm btn-show" title="{{ 'See accompanying period'|trans }}">{# {{ 'See this period'|trans }} #}</a>
</li> </li>
{# TODO cause error in household context. only works in person context {% if person is defined %}
<li> <li>
<a href="{{ path('chill_person_accompanying_period_update', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}" <a href="{{ path('chill_person_accompanying_period_update', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}"
class="btn btn-update" title="{{ 'Edit Accompanying Course'|trans }}"></a> class="btn btn-sm btn-update" title="{{ 'Edit accompanying period'|trans }}"></a>
</li> </li>
{% if accompanying_period.isOpen == true %} {% if accompanying_period.isOpen == true %}
<li> <li>
<a href="{{ path('chill_person_accompanying_period_close', {'person_id' : person.id}) }}" <a href="{{ path('chill_person_accompanying_period_close', {'person_id' : person.id}) }}"
class="btn btn-update change-icon"> class="btn btn-sm btn-update change-icon">
<i class="fa fa-fw fa-lock" aria-hidden="true"></i> <i class="fa fa-fw fa-lock" aria-hidden="true"></i>
{{'Close accompanying period'|trans }} {{'Close accompanying period'|trans }}
</a> </a>
@ -132,16 +123,19 @@
{% if accompanying_period.canBeReOpened(person) == true %} {% if accompanying_period.canBeReOpened(person) == true %}
<li> <li>
<a href="{{ path('chill_person_accompanying_period_re_open', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}" <a href="{{ path('chill_person_accompanying_period_re_open', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}"
class="btn btn-create change-icon"> class="btn btn-sm btn-create change-icon">
<i class="fa fa-fw fa-unlock" aria-hidden="true"></i> <i class="fa fa-fw fa-unlock" aria-hidden="true"></i>
{{'Re-open accompanying period'|trans }} {{'Re-open accompanying period'|trans }}
</a> </a>
</li> </li>
{% endif %} {% endif %}
#} {% elseif household is defined %}
</ul> {# TODO buttons specific for household ? #}
{% endif %}
</ul>
</div> </div>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>

View File

@ -128,7 +128,7 @@
{%- if options['customButtons']['replace'] is not defined and is_granted('CHILL_PERSON_SEE', person) -%} {%- if options['customButtons']['replace'] is not defined and is_granted('CHILL_PERSON_SEE', person) -%}
<li> <li>
<a class="btn btn-show" target="_blank" title="{{ 'Show person'|trans }}" <a class="btn btn-sm btn-show" target="_blank" title="{{ 'Show person'|trans }}"
href="{{ path('chill_person_view', { person_id: person.id }) }}"></a> href="{{ path('chill_person_view', { person_id: person.id }) }}"></a>
</li> </li>
{%- else -%} {%- else -%}

View File

@ -1,7 +1,7 @@
{% macro button_person(person) %} {% macro button_person(person) %}
<li> <li>
<a href="{{ path('chill_person_accompanying_period_list', { 'person_id' : person.id }) }}" <a href="{{ path('chill_person_accompanying_period_list', { 'person_id' : person.id }) }}"
class="btn btn-primary" title="{{ 'See accompanying periods'|trans }}"><i class="fa fa-random"></i></a> class="btn btn-sm btn-primary" title="{{ 'See accompanying periods'|trans }}"><i class="fa fa-random"></i></a>
</li> </li>
{% endmacro %} {% endmacro %}

View File

@ -192,7 +192,8 @@ Social issues: Problématiques sociales
Last events on accompanying course: Dernières actions de suivi Last events on accompanying course: Dernières actions de suivi
Edit & activate accompanying course: Modifier et valider Edit & activate accompanying course: Modifier et valider
See accompanying periods: Voir les périodes d'accompagnement See accompanying periods: Voir les périodes d'accompagnement
See accompanying period: Voir cette période d'accompagnement See accompanying period: Voir la période
Edit accompanying period: Modifier la période
See this period: Voir cette période See this period: Voir cette période
Referrer: Référent Referrer: Référent
Some peoples does not belong to any household currently. Add them to an household soon: Certaines personnes n'appartiennent à aucun ménage actuellement. Renseignez leur appartenance à un ménage dès que possible. Some peoples does not belong to any household currently. Add them to an household soon: Certaines personnes n'appartiennent à aucun ménage actuellement. Renseignez leur appartenance à un ménage dès que possible.

View File

@ -94,7 +94,7 @@
{%- if options['customButtons']['replace'] is not defined and is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) -%} {%- if options['customButtons']['replace'] is not defined and is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) -%}
<li> <li>
<a class="btn btn-show" target="_blank" title="{{ 'Show thirdparty'|trans }}" <a class="btn btn-sm btn-show" target="_blank" title="{{ 'Show thirdparty'|trans }}"
href="{{ path('chill_3party_3party_show', { thirdparty_id: thirdparty.id }) }}"></a> href="{{ path('chill_3party_3party_show', { thirdparty_id: thirdparty.id }) }}"></a>
</li> </li>
{%- else -%} {%- else -%}