mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-01 06:26:15 +00:00
add btn-wopilink button ; fix OpenWopiLink when options is null
This commit is contained in:
parent
f6e667700e
commit
08f544f6ea
@ -20,6 +20,7 @@
|
||||
{% block content %}
|
||||
<div class="document-show">
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
{{ mm.mimeIcon(document.object.type) }}
|
||||
|
||||
<dl class="chill_view_data mt-4">
|
||||
@ -54,11 +55,7 @@
|
||||
</li>
|
||||
{% if chill_document_is_editable(document.object) %}
|
||||
<li>
|
||||
{{ document.object|chill_document_edit_button({
|
||||
'changeIcon': 'fa-paragraph',
|
||||
'changeClass': 'btn-update',
|
||||
'noText': false
|
||||
}) }}
|
||||
{{ document.object|chill_document_edit_button }}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE', document) %}
|
||||
|
@ -15,6 +15,7 @@ $chill-theme-buttons: (
|
||||
"action": $chill-orange,
|
||||
"edit": $chill-orange,
|
||||
"update": $chill-orange,
|
||||
"wopilink": $chill-orange,
|
||||
"show": $chill-blue,
|
||||
"view": $chill-blue,
|
||||
"misc": $gray-300,
|
||||
@ -54,6 +55,7 @@ $chill-theme-buttons: (
|
||||
&.btn-action,
|
||||
&.btn-edit,
|
||||
&.btn-tpchild,
|
||||
&.btn-wopilink,
|
||||
&.btn-update {
|
||||
&, &:hover {
|
||||
color: $light;
|
||||
@ -66,6 +68,7 @@ $chill-theme-buttons: (
|
||||
&.btn-create::before,
|
||||
&.btn-edit::before,
|
||||
&.btn-update::before,
|
||||
&.btn-wopilink::before,
|
||||
&.btn-show::before,
|
||||
&.btn-view::before,
|
||||
&.btn-save::before,
|
||||
@ -98,6 +101,7 @@ $chill-theme-buttons: (
|
||||
&.btn-create::before { content: "\f067"; } // fa-plus
|
||||
&.btn-edit::before,
|
||||
&.btn-update::before { content: "\f040"; } // fa-pencil
|
||||
&.btn-wopilink::before { content: "\f1dd"; } // fa-paragraph
|
||||
&.btn-show::before,
|
||||
&.btn-view::before { content: "\f06e"; } // fa-eye
|
||||
&.btn-save::before { content: "\f0c7"; } // fa-floppy-o
|
||||
|
@ -17,7 +17,7 @@ window.addEventListener('DOMContentLoaded', function (e) {
|
||||
wopiUrl: el.dataset.wopiUrl,
|
||||
title: el.dataset.docTitle,
|
||||
type: el.dataset.docType,
|
||||
button: el.dataset.button ? JSON.parse(el.dataset.button) : {}
|
||||
button: el.dataset.button !== 'null' ? JSON.parse(el.dataset.button) : {}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -1,9 +1,11 @@
|
||||
<template>
|
||||
<a v-if="isOpenDocument"
|
||||
class="btn change-icon" :class="[isChangeClass ? button.changeClass : 'btn-edit']"
|
||||
class="btn" :class="[
|
||||
isChangeIcon ? 'change-icon' : '',
|
||||
isChangeClass ? button.changeClass : 'btn-wopilink' ]"
|
||||
@click="openModal">
|
||||
|
||||
<i class="fa me-2" :class="[isChangeIcon ? button.changeIcon : 'fa-pencil']"></i>
|
||||
<i v-if="isChangeIcon" class="fa me-2" :class="button.changeIcon"></i>
|
||||
|
||||
<span v-if="!noText">
|
||||
{{ $t('Update_document') }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user