merge upgrade-sf5 branch

This commit is contained in:
2024-07-15 15:16:27 +02:00
96 changed files with 1424 additions and 415 deletions

View File

@@ -30,7 +30,7 @@ div.list-with-period {
// override wrap-list
div.wrap-list.periods-list {
padding-right: 1rem;
padding-right: 0;
div.wl-row {
flex-wrap: nowrap;
div.wl-col {

View File

@@ -1,6 +1,6 @@
<template>
<a class="btn" :class="getClassButton" :title="$t(buttonTitle)" @click="openModal">
<span v-if="displayTextButton">{{ $t(buttonTitle) }}</span>
<a class="btn" :class="getClassButton" :title="$t(buttonTitle || '')" @click="openModal">
<span v-if="displayTextButton">{{ $t(buttonTitle || '') }}</span>
</a>
<teleport to="body">

View File

@@ -7,10 +7,8 @@
{% endif %}
<a id="comment-{{ comment.id }}" href="{{ '#comment-' ~ comment.id }}" class="fa fa-pencil-square-o fa-fw"></a>
{% set creator = comment.creator is defined ? comment.creator : comment.createdBy %}
{{ 'by'|trans }}<b>{{ creator }}</b>
{{ ', ' ~ 'on'|trans ~ ' ' ~ comment.createdAt|format_date('long') }}<br>
{{ 'by'|trans }}
<span class="badge-user">{{ comment.createdBy|chill_entity_render_box({'at_date': comment.createdAt }) }}</span>{{ ', ' ~ 'on'|trans ~ ' ' ~ comment.createdAt|format_date('long') }}<br>
<i>{{ 'Last updated on'|trans ~ ' ' ~ comment.updatedAt|format_datetime('long', 'short') }}</i>
</div>
<ul class="record_actions">

View File

@@ -99,7 +99,7 @@
<div class="metadata">
{{ 'Last updated by'| trans }}
<span class="user">
{{ accompanyingCourse.pinnedComment.updatedBy|chill_entity_render_box }}
{{ accompanyingCourse.pinnedComment.updatedBy|chill_entity_render_box({'at_date': accompanyingCourse.pinnedComment.updatedAt}) }}
</span>
{{ 'on'|trans ~ ' ' }}
<span class="date">

View File

@@ -83,9 +83,9 @@
</div>
<div class="wl-col list">
{%- if w.referrers|length > 0 -%}
{% for u in w.referrers %}
{% for r in w.referrersHistory %}
<span class="wl-item">
<span class="badge-user">{{ u|chill_entity_render_box }}</span>
<span class="badge-user">{{ r.user|chill_entity_render_box({'at_date': r.startDate}) }}</span>
{% if not loop.last %}, {% endif %}
</span>
{% endfor %}

View File

@@ -33,8 +33,8 @@
{% if w.referrers %}
<li>
<span class="item-key">{{ 'Referrers'|trans ~ ' : ' }}</span>
{% for u in w.referrers %}
<span class="badge-user">{{ u|chill_entity_render_box }}</span>
{% for rh in w.referrersHistory %}
<span class="badge-user">{{ rh.user|chill_entity_render_box({'at_date': rh.startDate}) }}</span>
{% endfor %}
{% if w.referrers|length == 0 %}
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>

View File

@@ -89,7 +89,7 @@
<li>
{% if evaluation.createdBy is not null %}
<span class="item-key">créé par</span>
<b>{{ evaluation.createdBy.username }}</b>
<b>{{ evaluation.createdBy|chill_entity_render_string({'at_date': evaluation.createdAt}) }}</b>
{% endif %}
{% if evaluation.createdAt is not null %}
<span class="item-key">{{ 'le'|trans }}</span>

View File

@@ -13,7 +13,7 @@
{{ 'Last updated by'|trans }}
{% endif %}
<span class="user">
{{ entity.updatedBy|chill_entity_render_box }}
{{ entity.updatedBy|chill_entity_render_box({'at_date': entity.updatedAt }) }}
</span>
{% endif %}
</div>
@@ -34,8 +34,8 @@
{{ 'Created by'|trans }}
{% endif %}
<span class="user">
{{ entity.createdBy|chill_entity_render_string }}
{{ entity.createdBy|chill_entity_render_string({'at_date': entity.createdAt}) }}
</span>
{% endif %}
</div>
{% endmacro %}
{% endmacro %}

View File

@@ -1,13 +1,19 @@
{% macro button_person_before(person) %}
{{ chill_menu('person_quick_menu', {
'layout': '@ChillMain/Menu/quick_menu.html.twig',
'args' : { 'person': person }
}) }}
{% endmacro %}
{% macro button_person_after(person) %}
{% set household = person.getCurrentHousehold %}
{% if household is not null and is_granted('CHILL_PERSON_HOUSEHOLD_SEE', household) %}
<li>
<a href="{{ path('chill_person_household_summary', { 'household_id': household.id }) }}" class="btn btn-sm btn-chill-beige"><i class="fa fa-home"></i></a>
</li>
{% endif %}
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_CREATE', person) %}
<li>
<a href="{{ path('chill_person_accompanying_course_new', { 'person_id': [ person.id ]}) }}" class="btn btn-sm btn-create change-icon" title="{{ 'Create an accompanying period'|trans }}"><i class="fa fa-random"></i></a>
<a href="{{ path('chill_person_household_summary', { 'household_id': household.id }) }}"
class="btn btn-sm btn-chill-beige"
title="{{ 'Show household'|trans }}"
><i class="fa fa-home"></i>
</a>
</li>
{% endif %}
{% endmacro %}
@@ -165,7 +171,24 @@
<h3>{{ 'chill_calendar.Next calendars'|trans }}</h3>
</div>
<div class="wl-col list">
{% for c in calendars %}<span>{{ c.startDate|format_datetime('long', 'short') }}</span>{% if not loop.last %}, {% endif %}{% endfor %}
<div class="calendar-list">
<ul class="calendar-list">
{% for c in calendars %}
<li>
{% if is_granted('CHILL_CALENDAR_CALENDAR_EDIT', c) %}
<a href="{{ chill_path_add_return_path('chill_calendar_calendar_edit', {id: c.id}) }}">
<span class="badge bg-secondary">{{ c.startDate|format_datetime('long', 'short') }}</span>
</a>
{% else %}
<span class="badge bg-secondary">{{ c.startDate|format_datetime('long', 'short') }}</span>
{% endif %}
</li>
{% endfor %}
</ul>
{% if is_granted('CHILL_CALENDAR_CALENDAR_SEE', acp) %}
<a href="{{ chill_path_add_return_path('chill_calendar_calendar_list_by_period', {'id': acp.id}) }}" class="calendar-list__global"><i class="fa fa-list"></i></a>
{% endif %}
</div>
</div>
</div>
@@ -184,13 +207,20 @@
</div>
{% endif %}
<ul class="record_actions record_actions_column">
<ul class="record_actions">
{{ chill_menu('accompanying_course_quick_menu', {
'layout': '@ChillMain/Menu/quick_menu.html.twig',
'args' : { 'accompanying-course': acp }
}) }}
<li>
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': acp.id }) }}"
class="btn btn-sm btn-outline-primary" title="{{ 'See accompanying period'|trans }}">
<i class="fa fa-random fa-fw"></i>
class="btn btn-sm btn-primary"
title="{{ 'See accompanying period'|trans }}"
><i class="fa fa-random fa-fw"></i>
</a>
</li>
</ul>
</div>
</div>
@@ -247,7 +277,7 @@
'addAltNames': true,
'addCenter': true,
'address_multiline': false,
'customButtons': { 'after': _self.button_person_after(person) }
'customButtons': { 'after': _self.button_person_after(person), 'before': _self.button_person_before((person)) }
}) }}
{#- 'acps' is for AcCompanyingPeriodS #}

View File

@@ -296,7 +296,7 @@ This view should receive those arguments:
<div class="created-updated">
{% if person.createdBy %}
<div class="createdBy">
{{ 'Created by'|trans}}: <b>{{ person.createdBy|chill_entity_render_box }}</b>,<br>
{{ 'Created by'|trans}}: <b>{{ person.createdBy|chill_entity_render_box({'at_date': person.createdAt}) }}</b>,<br>
{{ 'on'|trans ~ person.createdAt|format_datetime('long', 'short') }}
</div>
{% endif %}

View File

@@ -64,7 +64,7 @@
<li>
{% if evaluation.createdBy is not null %}
<span class="item-key">créé par</span>
<b>{{ evaluation.createdBy.username }}</b>
<b>{{ evaluation.createdBy|chill_entity_render_string({'at_date': evaluation.createdAt}) }}</b>
{% endif %}
{% if evaluation.createdAt is not null %}
<span class="item-key">{{ 'le'|trans }}</span>

View File

@@ -92,7 +92,7 @@
<li>
{% if evaluation.createdBy is not null %}
<span class="item-key">créé par</span>
<b>{{ evaluation.createdBy.username }}</b>
<b>{{ evaluation.createdBy|chill_entity_render_string({'at_date': evaluation.createdAt}) }}</b>
{% endif %}
{% if evaluation.createdAt is not null %}
<span class="item-key">{{ 'le'|trans }}</span>