mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
apply changes on person document
This commit is contained in:
parent
f34847f9f6
commit
e595500cb8
@ -14,26 +14,23 @@
|
||||
{{ 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 %}
|
||||
@ -45,7 +42,7 @@
|
||||
{% 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">
|
||||
@ -75,7 +72,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block block_post_menu %}
|
||||
<div class="post-menu pt-4"></div>
|
||||
{% endblock %}
|
||||
@ -84,7 +81,4 @@
|
||||
{{ parent() }}
|
||||
{{ encore_entry_script_tags('mod_async_upload') }}
|
||||
{{ encore_entry_script_tags('mod_entity_workflow_pick') }}
|
||||
{#
|
||||
{{ encore_entry_script_tags('mod_wopi_link') }}
|
||||
#}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
@ -1,10 +1,3 @@
|
||||
{# DISABLED vue component
|
||||
<span data-module="wopi-link"
|
||||
data-wopi-url="{{ path('chill_wopi_file_edit', {'fileId': document.uuid}) }}"
|
||||
data-doc-type="{{ document.type|e('html_attr') }}"
|
||||
data-options="{{ options|json_encode }}"
|
||||
></span>
|
||||
#}
|
||||
|
||||
{# Twig way
|
||||
TODO: une route, un template avec un header CHILL et un iframe
|
||||
|
@ -1,11 +1,14 @@
|
||||
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
|
||||
|
||||
{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<div class="denomination h2">
|
||||
{{ document.title }}
|
||||
</div>
|
||||
<div>
|
||||
{{ mm.mimeIcon(document.object.type) }}
|
||||
</div>
|
||||
<div>
|
||||
<p>{{ document.category.name|localize_translatable_string }}</p>
|
||||
</div>
|
||||
|
@ -19,6 +19,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%': person|chill_entity_render_string } ) }}{% endblock %}
|
||||
|
||||
@ -29,6 +30,8 @@
|
||||
{% block personcontent %}
|
||||
<h1>{{ 'Document %title%' | trans({ '%title%': document.title }) }}</h1>
|
||||
|
||||
{{ mm.mimeIcon(document.object.type) }}
|
||||
|
||||
<dl class="chill_view_data">
|
||||
<dt>{{ 'Title'|trans }}</dt>
|
||||
<dd>{{ document.title }}</dd>
|
||||
@ -54,7 +57,7 @@
|
||||
|
||||
</dl>
|
||||
|
||||
<ul class="record_actions">
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
<a href="{{ path('person_document_index', {'person': person.id}) }}" class="btn btn-cancel">
|
||||
{{ 'Back to the list' | trans }}
|
||||
@ -65,6 +68,12 @@
|
||||
{{ m.download_button(document.object, document.title) }}
|
||||
</li>
|
||||
|
||||
{% if chill_document_is_editable(document.object) %}
|
||||
<li>
|
||||
{{ document.object|chill_document_edit_button }}
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('CHILL_PERSON_DOCUMENT_UPDATE', document) %}
|
||||
<li>
|
||||
<a href="{{ path('person_document_edit', {'id': document.id, 'person': person.id}) }}" class="btn btn-edit">
|
||||
|
@ -4,6 +4,21 @@ import {_createI18n} from "ChillMainAssets/vuejs/_js/i18n";
|
||||
|
||||
const i18n = _createI18n({});
|
||||
|
||||
|
||||
//TODO move to chillDocStore or ChillWopi
|
||||
|
||||
/*
|
||||
|
||||
tags to load module:
|
||||
|
||||
<span data-module="wopi-link"
|
||||
data-wopi-url="{{ path('chill_wopi_file_edit', {'fileId': document.uuid}) }}"
|
||||
data-doc-type="{{ document.type|e('html_attr') }}"
|
||||
data-options="{{ options|json_encode }}"
|
||||
></span>
|
||||
|
||||
*/
|
||||
|
||||
window.addEventListener('DOMContentLoaded', function (e) {
|
||||
document.querySelectorAll('span[data-module="wopi-link"]')
|
||||
.forEach(function (el) {
|
||||
@ -25,4 +40,4 @@ window.addEventListener('DOMContentLoaded', function (e) {
|
||||
;
|
||||
})
|
||||
;
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user