mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
83 lines
3.9 KiB
Twig
83 lines
3.9 KiB
Twig
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
|
|
{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
|
|
{% import '@ChillPerson/Macro/updatedBy.html.twig' as mmm %}
|
|
|
|
{% set w = document.accompanyingPeriodWorkEvaluation.accompanyingPeriodWork %}
|
|
|
|
<div class="item-row">
|
|
<div class="item-col" style="width: unset">
|
|
{% if document.storedObject.isPending %}
|
|
<div class="badge text-bg-info" data-docgen-is-pending="{{ document.storedObject.id }}">{{ 'docgen.Doc generation is pending'|trans }}</div>
|
|
{% elseif document.storedObject.isFailure %}
|
|
<div class="badge text-bg-warning">{{ 'docgen.Doc generation failed'|trans }}</div>
|
|
{% endif %}
|
|
<div>
|
|
{% if context == 'person' %}
|
|
<span class="badge bg-primary">
|
|
<i class="fa fa-random"></i> {{ w.accompanyingPeriod.id }}
|
|
</span>
|
|
{% endif %}
|
|
<div class="badge-accompanying-work-type">
|
|
<span class="title_label"></span>
|
|
<span class="title_action">{{ w.socialAction|chill_entity_render_string }} > {{ document.accompanyingPeriodWorkEvaluation.evaluation.title|localize_translatable_string }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="denomination h2">
|
|
{{ document.title|chill_print_or_message("No title") }}
|
|
</div>
|
|
{% if document.storedObject.type is not empty %}
|
|
<div>
|
|
{{ mm.mimeIcon(document.storedObject.type) }}
|
|
</div>
|
|
{% endif %}
|
|
{% if document.storedObject.hasTemplate %}
|
|
<div>
|
|
<p>{{ document.storedObject.template.name|localize_translatable_string }}</p>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="item-col">
|
|
<div class="container">
|
|
<div class="dates row text-end">
|
|
<span>{{ document.storedObject.createdAt|format_date('short') }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% if show_actions %}
|
|
<div class="item-row separator">
|
|
<div class="item-col item-meta">
|
|
{{ mmm.createdBy(document) }}
|
|
</div>
|
|
<ul class="item-col record_actions flex-shrink-1">
|
|
<li>
|
|
{{ chill_entity_workflow_list('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument', document.id) }}
|
|
</li>
|
|
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_EVALUATION_DOCUMENT_SHOW', document) %}
|
|
<li>
|
|
{{ document.storedObject|chill_document_button_group(document.title, is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', document.accompanyingPeriodWorkEvaluation.accompanyingPeriodWork)) }}
|
|
</li>
|
|
{% endif %}
|
|
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w) %}
|
|
<li>
|
|
<form method="post" action="{{ chill_path_add_return_path('chill_person_accompanying_period_work_evaluation_document_duplicate', {id: document.id}) }}">
|
|
<button type="submit" class="btn btn-duplicate" title="{{ 'crud.view.link_duplicate'|trans }}"></button>
|
|
</form>
|
|
</li>
|
|
{% endif %}
|
|
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w) %}
|
|
<li>
|
|
<a href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', {'id': w.id, 'docId': document.id}) }}" class="btn btn-edit"></a>
|
|
</li>
|
|
{% endif %}
|
|
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_SEE', w)%}
|
|
<li>
|
|
<a href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_show', {'id': w.id, 'docId': document.id}) }}" class="btn btn-show"></a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|