Merge remote-tracking branch 'origin/master' into issue560_ACCent_parcours_household

This commit is contained in:
2022-03-21 18:01:26 +01:00
40 changed files with 794 additions and 113 deletions

View File

@@ -28,11 +28,14 @@
{% if w.createdBy %}
<div class="wl-row">
<div class="wl-col title">
<h3>{{ 'Referrer'|trans }}</h3>
<h3>{{ 'Referrers'|trans }}</h3>
</div>
<div class="wl-col list">
<p class="wl-item">
{{ w.createdBy|chill_entity_render_box }}
{% for u in w.referrers %}
{{ u|chill_entity_render_box }}
{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
</div>
</div>

View File

@@ -0,0 +1,82 @@
{% extends 'ChillMainBundle::layout.html.twig' %}
{% block title 'period_by_user_list.Period by user'|trans %}
{% block js %}
{{ encore_entry_script_tags('mod_set_referrer') }}
{% endblock %}
{% block css %}
{{ encore_entry_link_tags('mod_set_referrer') }}
{% endblock %}
{% macro period_meta(period) %}
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_UPDATE', period) %}
<div class="item-col item-meta">
{% set job_id = null %}
{% if period.job is defined %}
{% set job_id = period.job.id %}
{% endif %}
<span
data-set-referrer-app="data-set-referrer-app"
data-set-referrer-accompanying-period-id="{{ period.id }}"
data-set-referrer-job-id="{{ job_id }}"
></span>
</div>
{% endif %}
{% endmacro %}
{% macro period_actions(period) %}
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', period) %}
<li>
<a href="{{ chill_path_add_return_path('chill_person_accompanying_course_index', {'accompanying_period_id': period.id}) }}" class="btn btn-show"></a>
</li>
{% endif %}
{% endmacro %}
{% import _self as m %}
{% block content %}
<div class="col-10">
<h1>{{ block('title') }}</h1>
{{ form_start(form) }}
<div class="row filter-box">
<div class="col-md-6">
{{ form_label(form.user ) }}
{{ form_widget(form.user, {'attr': {'class': 'select2'}}) }}
</div>
</div>
<ul class="record_actions">
<li>
<button type="submit" class="btn btn-save change-icon">
<i class="fa fa-filter"></i> Filtrer
</button>
</li>
</ul>
{{ form_end(form) }}
{% if form.user.vars.value is empty %}
<p class="chill-no-data-statement">{{ 'period_by_user_list.Pick a user'|trans }}</p>
{% elseif periods|length == 0 and form.user.vars.value is not empty %}
<p class="chill-no-data-statement">{{ 'period_by_user_list.Any course or no authorization to see them'|trans }}</p>
{% else %}
<p><span class="badge rounded-pill bg-primary">{{ paginator.totalItems }}</span> parcours à réassigner (calculé ce jour à {{ null|format_time('medium') }})</p>
<div class="flex-table">
{% for period in periods %}
{% include '@ChillPerson/AccompanyingPeriod/_list_item.html.twig' with {'period': period,
'recordAction': m.period_actions(period), 'itemMeta': m.period_meta(period) } %}
{% endfor %}
</div>
{% endif %}
{{ chill_pagination(paginator) }}
</div>
{% endblock %}