mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
Merge remote-tracking branch 'origin/master' into issue596_admin_user
This commit is contained in:
@@ -4,17 +4,19 @@
|
||||
|
||||
{% block js %}
|
||||
{{ encore_entry_script_tags('mod_set_referrer') }}
|
||||
{{ encore_entry_script_tags('mod_pickentity_type') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ encore_entry_link_tags('mod_set_referrer') }}
|
||||
{{ encore_entry_link_tags('mod_pickentity_type') }}
|
||||
{% 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 %}
|
||||
{% if period.job is defined and period.job is not null %}
|
||||
{% set job_id = period.job.id %}
|
||||
{% endif %}
|
||||
<span
|
||||
@@ -28,9 +30,9 @@
|
||||
|
||||
|
||||
{% macro period_actions(period) %}
|
||||
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', period) %}
|
||||
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_UPDATE', period) %}
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_accompanying_course_index', {'accompanying_period_id': period.id}) }}" class="btn btn-show"></a>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_accompanying_course_edit', {'accompanying_period_id': period.id}) }}" class="btn btn-edit"></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
@@ -38,45 +40,66 @@
|
||||
{% import _self as m %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-10">
|
||||
<div class="row col-10">
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
{{ form_start(form) }}
|
||||
<div class="row filter-box">
|
||||
<div class="col-md-6">
|
||||
{{ form_start(form) }}
|
||||
{{ form_label(form.user ) }}
|
||||
{{ form_widget(form.user, {'attr': {'class': 'select2'}}) }}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button type="submit" class="btn btn-misc">
|
||||
<i class="fa fa-filter"></i> {{ 'Filter'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{% if userFrom is not null %}
|
||||
<div>
|
||||
{{ form_start(assignForm) }}
|
||||
{{ form_label(assignForm.userTo ) }}
|
||||
{{ form_widget(assignForm.userTo, {'attr': {'class': 'select2'}}) }}
|
||||
</div>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button type="submit" class="btn btn-update change-icon">
|
||||
{{ 'reassign.Reassign'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
{{ form_end(assignForm) }}
|
||||
{% else %}
|
||||
<div class="alert alert-info">{{ 'reassign.List periods to be able to reassign them'|trans }}</div>
|
||||
{% endif %}
|
||||
|
||||
</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 %}
|
||||
{% if userFrom is not null %}
|
||||
<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 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) } %}
|
||||
{% else %}
|
||||
{% if userFrom is same as(null) %}
|
||||
<p class="chill-no-data-statement">{{ 'period_by_user_list.Pick a user'|trans }}</p>
|
||||
{% else %}
|
||||
<p class="chill-no-data-statement">{{ 'period_by_user_list.Any course or no authorization to see them'|trans }}</p>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% if paginator is defined %}
|
||||
{{ chill_pagination(paginator) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% endblock %}
|
||||
|
@@ -93,6 +93,8 @@
|
||||
|
||||
{{ form_row(form.gender, { 'label' : 'Gender'|trans }) }}
|
||||
|
||||
{{ form_row(form.civility, { 'label' : 'Civility'|trans }) }}
|
||||
|
||||
{{ form_row(form.birthdate, { 'label' : 'Date of birth'|trans }) }}
|
||||
|
||||
{{ form_row(form.phonenumber, { 'label' : 'Phonenumber'|trans }) }}
|
||||
@@ -105,6 +107,13 @@
|
||||
{{ form_row(form.center) }}
|
||||
{% endif %}
|
||||
|
||||
<div id=addressForm>
|
||||
{{ form_row(form.addressForm) }}
|
||||
</div>
|
||||
<div id=address>
|
||||
{{ form_row(form.address) }}
|
||||
</div>
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="dropdown">
|
||||
<a class="btn btn-create dropdown-toggle"
|
||||
@@ -132,4 +141,10 @@
|
||||
|
||||
{% block js %}
|
||||
{{ encore_entry_script_tags('page_suggest_names') }}
|
||||
{{ encore_entry_script_tags('page_create_person') }}
|
||||
{{ encore_entry_script_tags('mod_input_address') }}
|
||||
{% endblock js %}
|
||||
|
||||
{% block css %}
|
||||
{{ encore_entry_link_tags('mod_input_address') }}
|
||||
{% endblock %}
|
||||
|
@@ -48,7 +48,9 @@
|
||||
</div>
|
||||
<div class="wl-col list">
|
||||
<p class="item">
|
||||
{{ p.position.label|localize_translatable_string }}
|
||||
{% if p.position %}
|
||||
{{ p.position.label|localize_translatable_string }}
|
||||
{% endif %}
|
||||
{% if p.holder %}
|
||||
<span class="fa-stack fa-holder" title="{{ 'houshold.holder'|trans|e('html_attr') }}">
|
||||
<i class="fa fa-circle fa-stack-1x text-success"></i>
|
||||
|
Reference in New Issue
Block a user