mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
89 lines
3.1 KiB
Twig
89 lines
3.1 KiB
Twig
{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %}
|
|
|
|
{% set activeRouteKey = '' %}
|
|
|
|
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
|
|
{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
|
|
|
|
{% block title %}
|
|
{# {{ 'Detail of document of %name%'|trans({ '%name%': accompanyingCourse|chill_entity_render_string } ) }} #}
|
|
{{ 'Document %title%' | trans({ '%title%': document.title }) }}
|
|
{% endblock %}
|
|
|
|
{% block css %}
|
|
{{ parent() }}
|
|
{{ encore_entry_link_tags('mod_async_upload') }}
|
|
{{ encore_entry_link_tags('mod_entity_workflow_pick') }}
|
|
{{ encore_entry_link_tags('mod_wopi_link') }}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="document-show">
|
|
<h1>{{ block('title') }}</h1>
|
|
{{ mm.mimeIcon(document.object.type) }}
|
|
|
|
<dl class="chill_view_data mt-4">
|
|
<dt>{{ 'Title'|trans }}</dt>
|
|
<dd>{{ document.title }}</dd>
|
|
|
|
{% if document.category is not null %}
|
|
<dt>{{ 'Category'|trans }}</dt>
|
|
<dd>{{ document.category.name|localize_translatable_string }}</dd>
|
|
{% endif %}
|
|
|
|
<dt>{{ 'Description' | trans }}</dt>
|
|
<dd>
|
|
{% if document.description is empty %}
|
|
<span class="chill-no-data-statement">{{ 'Any description'|trans }}</span>
|
|
{% else %}
|
|
<blockquote class="chill-user-quote">
|
|
{{ document.description|chill_markdown_to_html }}
|
|
</blockquote>
|
|
{% endif %}
|
|
</dd>
|
|
</dl>
|
|
|
|
<ul class="record_actions sticky-form-buttons">
|
|
<li class="cancel">
|
|
<a href="{{ path('accompanying_course_document_index', {'course': accompanyingCourse.id}) }}" class="btn btn-cancel">
|
|
{{ 'Back to the list' | trans }}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
{{ m.download_button(document.object, document.title) }}
|
|
</li>
|
|
{% if chill_document_is_editable(document.object) %}
|
|
<li>
|
|
{{ document.object|chill_document_edit_button({
|
|
'changeIcon': 'fa-paragraph',
|
|
'changeClass': 'btn-update',
|
|
'noText': false
|
|
}) }}
|
|
</li>
|
|
{% endif %}
|
|
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE', document) %}
|
|
<li>
|
|
<a href="{{ path('accompanying_course_document_edit', {'id': document.id, 'course': accompanyingCourse.id}) }}"
|
|
class="btn btn-edit" title="{{ 'Edit attributes' | trans }}"></a>
|
|
</li>
|
|
{% endif %}
|
|
{% set workflows_frame = chill_entity_workflow_list('Chill\\DocStoreBundle\\Entity\\AccompanyingCourseDocument', document.id) %}
|
|
{% if workflows_frame is not empty %}
|
|
<li>
|
|
{{ workflows_frame|raw }}
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block block_post_menu %}
|
|
<div class="post-menu pt-4"></div>
|
|
{% endblock %}
|
|
|
|
{% block js %}
|
|
{{ parent() }}
|
|
{{ encore_entry_script_tags('mod_async_upload') }}
|
|
{{ encore_entry_script_tags('mod_entity_workflow_pick') }}
|
|
{{ encore_entry_script_tags('mod_wopi_link') }}
|
|
{% endblock %} |