mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
70 lines
2.7 KiB
Twig
70 lines
2.7 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 c = document.calendar %}
|
|
|
|
<div class="item-bloc">
|
|
<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 class="denomination h2">
|
|
{{ document.storedObject.title }}
|
|
</div>
|
|
<div>
|
|
{{ 'chill_calendar.Document'|trans }}
|
|
</div>
|
|
{% 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>
|
|
|
|
<div class="item-row separator">
|
|
<div class="item-col">
|
|
<p class="date-label">
|
|
{% if c.endDate.diff(c.startDate).days >= 1 %}
|
|
{{ c.startDate|format_datetime('short', 'short') }}
|
|
- {{ c.endDate|format_datetime('short', 'short') }}
|
|
{% else %}
|
|
{{ c.startDate|format_datetime('short', 'short') }}
|
|
- {{ c.endDate|format_datetime('none', 'short') }}
|
|
{% endif %}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="item-row separator">
|
|
<div class="item-col item-meta">
|
|
{{ mmm.createdBy(document) }}
|
|
</div>
|
|
<ul class="item-col record_actions flex-shrink-1">
|
|
{% if is_granted('CHILL_CALENDAR_DOC_SEE', document) %}
|
|
<li>
|
|
{{ document.storedObject|chill_document_button_group(document.storedObject.title, is_granted('CHILL_CALENDAR_CALENDAR_EDIT', c)) }}
|
|
</li>
|
|
{% endif %}
|
|
{% if is_granted('CHILL_CALENDAR_CALENDAR_EDIT', c) %}
|
|
<li>
|
|
<a href="{{ chill_path_add_return_path('chill_calendar_calendar_edit', {'id': c.id, 'docId': document.id}) }}" class="btn btn-edit"></a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
|
|
</div>
|
|
</div>
|