Feature: [UI] use download button group in calendar list

This commit is contained in:
2023-02-28 22:37:46 +01:00
parent cf1cc937ca
commit 3db5b62d57
5 changed files with 20 additions and 30 deletions

View File

@@ -16,14 +16,14 @@ window.addEventListener('DOMContentLoaded', function (e) {
filename: string,
canEdit: string,
storedObject: string,
small: string,
buttonSmall: string,
};
const
storedObject = JSON.parse(datasets.storedObject) as StoredObject,
filename = datasets.filename,
canEdit = datasets.canEdit === '1',
small = datasets.small === '1'
small = datasets.buttonSmall === '1'
;
return { storedObject, filename, canEdit, small };

View File

@@ -1,6 +1,6 @@
<template>
<div v-if="'ready' === props.storedObject.status" class="dropdown">
<button :class="Object.assign({'btn': true, 'btn-outline-primary': true, 'dropdown-toggle': true, small: props.small})" type="button" data-bs-toggle="dropdown" aria-expanded="false">
<button :class="Object.assign({'btn': true, 'btn-outline-primary': true, 'dropdown-toggle': true, 'btn-sm': props.small})" type="button" data-bs-toggle="dropdown" aria-expanded="false">
Actions
</button>
<ul class="dropdown-menu">

View File

@@ -157,7 +157,7 @@ final class WopiEditTwigExtensionRuntime implements RuntimeExtensionInterface
'document_json' => $this->normalizer->normalize($document, 'json', [AbstractNormalizer::GROUPS => ['read']]),
'title' => $title,
'can_edit' => $canEdit,
'options' => array_merge($options, self::DEFAULT_OPTIONS_TEMPLATE_BUTTON_GROUP),
'options' => array_merge(self::DEFAULT_OPTIONS_TEMPLATE_BUTTON_GROUP, $options),
]);
}