document: add macro mapping forkawesome icon from mime type

This commit is contained in:
2022-02-02 19:39:17 +01:00
parent 06b3d63133
commit b8d43f36eb
3 changed files with 42 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
{% 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 } ) }} #}
@@ -19,8 +20,9 @@
{% block content %}
<div class="document-show">
<h1>{{ block('title') }}</h1>
{{ mm.mimeIcon(document.object.type) }}
<dl class="chill_view_data">
<dl class="chill_view_data mt-4">
<dt>{{ 'Title'|trans }}</dt>
<dd>{{ document.title }}</dd>
@@ -62,7 +64,7 @@
{% 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' | trans }}"></a>
class="btn btn-edit" title="{{ 'Edit attributes' | trans }}"></a>
</li>
{% endif %}
{% set workflows_frame = chill_entity_workflow_list('Chill\\DocStoreBundle\\Entity\\AccompanyingCourseDocument', document.id) %}