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 20-update-telephone-type-new-approach
This commit is contained in:
@@ -101,14 +101,31 @@
|
||||
{% if notif_counter.total > 0 %}
|
||||
{{ chill_counter_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id) }}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% import '@ChillPerson/Macro/updatedBy.html.twig' as macro %}
|
||||
{{ macro.updatedBy(w) }}
|
||||
</div>
|
||||
|
||||
|
||||
{% if displayAction is defined and displayAction == true %}
|
||||
<div class="item-col">
|
||||
<ul class="record_actions">
|
||||
{% set suppEvaluations = [] %}
|
||||
{% for e in w.accompanyingPeriodWorkEvaluations %}
|
||||
{% set suppEvaluations = suppEvaluations|merge([
|
||||
{'relatedEntityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluation', 'relatedEntityId': e.id }
|
||||
]) %}
|
||||
|
||||
{% for d in e.documents %}
|
||||
{% set suppEvaluations = suppEvaluations|merge([
|
||||
{'relatedEntityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument', 'relatedEntityId': d.id }
|
||||
]) %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
<li>
|
||||
{{ chill_entity_workflow_list(
|
||||
'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork',
|
||||
w.id, [], suppEvaluations) }}
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-edit" title="{{ 'Edit'|trans }}"
|
||||
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}"
|
||||
|
@@ -2,6 +2,16 @@
|
||||
|
||||
{% block title 'accompanying_course_work.List accompanying course work'|trans %}
|
||||
|
||||
{% block js %}
|
||||
{{ parent() }}
|
||||
{{ encore_entry_script_tags('mod_entity_workflow_pick') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ parent() }}
|
||||
{{ encore_entry_link_tags('mod_entity_workflow_pick') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="accompanying_course_work">
|
||||
|
||||
|
@@ -5,6 +5,12 @@
|
||||
{% block title %}{{ 'My accompanying periods in draft'|trans }}{% endblock title %}
|
||||
|
||||
{% macro recordAction(period) %}
|
||||
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_DELETE', period) %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_course_delete', {'accompanying_period_id': period.id }) }}"
|
||||
class="btn btn-delete" title="{{ 'Delete'|trans }}"></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': period.id }) }}"
|
||||
class="btn btn-show" title="{{ 'See accompanying period'|trans }}"></a>
|
||||
|
@@ -1,11 +1,17 @@
|
||||
{% macro updatedBy(entity) %}
|
||||
<div class="updatedBy">
|
||||
{{ 'Last updated on'|trans }}
|
||||
<span class="date">
|
||||
{{ entity.updatedAt|format_datetime('medium', 'short') }}
|
||||
</span>
|
||||
{% if entity.updatedBy %}
|
||||
{{ ', ' ~ 'by_user'|trans }}
|
||||
{% if entity.updatedAt != null %}
|
||||
{{ 'Last updated on'|trans }}
|
||||
<span class="date">
|
||||
{{ entity.updatedAt|format_datetime('medium', 'short') }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if entity.updatedBy != null %}
|
||||
{% if entity.updatedAt != null %}
|
||||
{{ ', ' ~ 'by_user'|trans }}
|
||||
{% else %}
|
||||
{{ 'Last updated by'|trans }}
|
||||
{% endif %}
|
||||
<span class="user">
|
||||
{{ entity.updatedBy|chill_entity_render_box }}
|
||||
</span>
|
||||
@@ -14,13 +20,19 @@
|
||||
{% endmacro %}
|
||||
|
||||
{% macro createdBy(entity) %}
|
||||
<div class="updatedBy">
|
||||
{{ 'Created on'|trans }}
|
||||
<span class="date">
|
||||
{{ entity.createdAt|format_datetime('medium', 'short') }}
|
||||
</span>
|
||||
{% if entity.createdBy %}
|
||||
{{ ', ' ~ 'by_user'|trans }}
|
||||
<div class="createdBy">
|
||||
{% if entity.createdAt != null %}
|
||||
{{ 'Created on'|trans }}
|
||||
<span class="date">
|
||||
{{ entity.createdAt|format_datetime('medium', 'short') }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if entity.createdBy != null %}
|
||||
{% if entity.createdAt != null %}
|
||||
{{ ', ' ~ 'by_user'|trans }}
|
||||
{% else %}
|
||||
{{ 'Created by'|trans }}
|
||||
{% endif %}
|
||||
<span class="user">
|
||||
{{ entity.createdBy|chill_entity_render_string }}
|
||||
</span>
|
||||
|
@@ -1,19 +0,0 @@
|
||||
{% import '@ChillMain/Workflow/macro_breadcrumb.html.twig' as m %}
|
||||
|
||||
<div class="flex-grow-1 {% if add_classes is defined %}{{ add_classes }}{% else %}h2{% endif %}">
|
||||
<div>
|
||||
{% if concerne is defined and concerne == true %}
|
||||
<span class="item-key">{{ 'Concerne'|trans }}: </span>
|
||||
{% endif %}
|
||||
|
||||
{{ 'workflow.Work (n°%w%)'|trans({'%w%': work.id }) }}
|
||||
|
||||
{% if description is defined and description == true %}
|
||||
{{ ' — ' ~ work.socialAction|chill_entity_render_string }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if breadcrumb is defined and breadcrumb == true %}
|
||||
{{ m.breadcrumb(_context) }}
|
||||
{% endif %}
|
||||
</div>
|
@@ -62,10 +62,14 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
{% if evaluation.createdBy is not null %}
|
||||
<span class="item-key">créé par</span>
|
||||
<b>{{ evaluation.createdBy.username }}</b>
|
||||
{% endif %}
|
||||
{% if evaluation.createdAt is not null %}
|
||||
<span class="item-key">{{ 'le'|trans }}</span>
|
||||
<b>{{ evaluation.createdAt|format_date('short') }}</b>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
{% if evaluation.comment %}
|
||||
|
@@ -1,19 +0,0 @@
|
||||
{% import '@ChillMain/Workflow/macro_breadcrumb.html.twig' as m %}
|
||||
|
||||
<div class="flex-grow-1 {% if add_classes is defined %}{{ add_classes }}{% else %}h2{% endif %}">
|
||||
<div>
|
||||
{% if concerne is defined and concerne == true %}
|
||||
<span class="item-key">{{ 'Concerne'|trans }}: </span>
|
||||
{% endif %}
|
||||
|
||||
{{ 'workflow.Evaluation (n°%eval%)'|trans({'%eval%': evaluation.id}) }}
|
||||
|
||||
{% if description is defined and description == true %}
|
||||
{{ ' — ' ~ evaluation.evaluation.title|localize_translatable_string }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if breadcrumb is defined and breadcrumb == true %}
|
||||
{{ m.breadcrumb(_context) }}
|
||||
{% endif %}
|
||||
</div>
|
@@ -0,0 +1,103 @@
|
||||
<div class="flex-table accompanying_course_work-list">
|
||||
<div class="item-bloc evaluation-item bg-chill-llight-gray">
|
||||
<div class="item-row mb-2">
|
||||
<h2 class="badge-title">
|
||||
<span class="title_label"></span>
|
||||
<span class="title_action">
|
||||
{{ evaluation.accompanyingPeriodWork.socialAction|chill_entity_render_string }}
|
||||
<ul class="small_in_title columns mt-1">
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.start_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ evaluation.accompanyingPeriodWork.startDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% if evaluation.accompanyingPeriodWork.endDate %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ evaluation.accompanyingPeriodWork.endDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</span>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="item-row column">
|
||||
<table class="obj-res-eval my-3" style="font-size: 110% !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="eval">
|
||||
<h4 class="title_label">
|
||||
{{ 'Évaluation'|trans }}
|
||||
</h4>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="eval">
|
||||
<ul class="eval_title">
|
||||
<li class="my-2">
|
||||
{{ evaluation.evaluation.title|localize_translatable_string }}
|
||||
<ul class="columns pt-2">
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.start_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ evaluation.startDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% if evaluation.endDate %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ evaluation.endDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if evaluation.maxDate %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.max_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ evaluation.maxDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if evaluation.warningInterval and evaluation.warningInterval.d > 0 %}
|
||||
<li>
|
||||
{% set days = (evaluation.warningInterval.d + evaluation.warningInterval.m * 30) %}
|
||||
<span class="item-key">{{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }}</span>
|
||||
{{ 'accompanying_course_work.%days% days before max_date'|trans({'%days%': days }) }}
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
{% if evaluation.createdBy is not null %}
|
||||
<span class="item-key">créé par</span>
|
||||
<b>{{ evaluation.createdBy.username }}</b>
|
||||
{% endif %}
|
||||
{% if evaluation.createdAt is not null %}
|
||||
<span class="item-key">{{ 'le'|trans }}</span>
|
||||
<b>{{ evaluation.createdAt|format_date('short') }}</b>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
{% if evaluation.comment %}
|
||||
<blockquote class="chill-user-quote" style="margin-left: 0;">
|
||||
{{ evaluation.comment }}
|
||||
</blockquote>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="item-row">
|
||||
{% import '@ChillPerson/Macro/updatedBy.html.twig' as macro %}
|
||||
{{ macro.updatedBy(evaluation) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if display_action is defined and display_action == true %}
|
||||
{# TODO add acl #}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a class="btn btn-show" href="{{ path('chill_person_accompanying_period_work_edit', {'id': evaluation.accompanyingPeriodWork.id}) }}">
|
||||
{{ 'Show'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
Reference in New Issue
Block a user