diff --git a/documents-webapp/src/main/resources/locale/portlet/Documents_en.properties b/documents-webapp/src/main/resources/locale/portlet/Documents_en.properties index 347fc2b4a..96b93ec31 100644 --- a/documents-webapp/src/main/resources/locale/portlet/Documents_en.properties +++ b/documents-webapp/src/main/resources/locale/portlet/Documents_en.properties @@ -121,6 +121,7 @@ documents.label.spaceHomeDocuments=Documents documents.label.access=Access documents.label.parentFolders=Parent folders documents.drawer.tree=Folder tree +documents.drawer.tree.searchDrives=Search drives documents.label.extension.visibility=Access documents.label.visibility.specific.collaborator=Only hosts and designated collaborators can view and edit documents.label.visibility.all=All space member can edit diff --git a/documents-webapp/src/main/resources/locale/portlet/attachments_en.properties b/documents-webapp/src/main/resources/locale/portlet/attachments_en.properties index 9d6bdcc40..b2f6e9b9c 100644 --- a/documents-webapp/src/main/resources/locale/portlet/attachments_en.properties +++ b/documents-webapp/src/main/resources/locale/portlet/attachments_en.properties @@ -160,6 +160,8 @@ attachments.drawer.templates.empty.canCreate=No templates yet. Create a Template attachments.drawer.templates.createFolder=Create a Templates folder attachments.drawer.templates.createFolder.success=Templates folder created. Add documents to it to offer them as templates. attachments.drawer.templates.createFolder.error=Couldn’t create the Templates folder. +attachments.drawer.templates.search=Search templates +attachments.drawer.templates.noMatch=No template matches your filter documents.attach.image.alt=Preview of {0} attachments.drawer.done=Done attachments.drawer.removeAll=Remove all diff --git a/documents-webapp/src/main/webapp/WEB-INF/gatein-resources.xml b/documents-webapp/src/main/webapp/WEB-INF/gatein-resources.xml index 3de1df863..c026e81c1 100644 --- a/documents-webapp/src/main/webapp/WEB-INF/gatein-resources.xml +++ b/documents-webapp/src/main/webapp/WEB-INF/gatein-resources.xml @@ -290,6 +290,9 @@ documentsPreviewExtension + + categoryVueComponents + diff --git a/documents-webapp/src/main/webapp/skin/less/attachmentsApp.less b/documents-webapp/src/main/webapp/skin/less/attachmentsApp.less index b5a0600e6..988efb39c 100644 --- a/documents-webapp/src/main/webapp/skin/less/attachmentsApp.less +++ b/documents-webapp/src/main/webapp/skin/less/attachmentsApp.less @@ -255,18 +255,34 @@ color: @greyColorLighten1Default; } - /* Full-width, stacked template cards (each nearly the whole drawer width). - The editable name field appears right under the selected card. */ + /* Category chip row (search lives in the title bar, standard drawer pattern). */ + .attachmentsTemplatesFilters { + .attachmentsTemplateCategories { + min-width: 0; + } + } + + /* Responsive template grid: one full-width card per row in the normal (narrow) + drawer, flowing to several columns when the drawer is expanded — driven purely + by the container width via CSS grid auto-fill (no expand-state needed). The + editable name field appears right under the selected card. */ .attachmentsTemplatesGrid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); + gap: 12px; + align-items: start; + .attachmentsTemplateItem { - width: 100%; + min-width: 0; } .attachmentsTemplateCard { width: 100%; max-width: 100%; outline: none; - border-radius: 8px; + /* Match the reused card's own 4px radius so the selected ring hugs its + corners instead of bowing out. */ + border-radius: 4px; transition: box-shadow .2s ease; /* Selected template = a clear primary ring around the card. */ @@ -298,6 +314,27 @@ background-color: transparent !important; } +/* Templates show the reused card's title band permanently (show-details) with the + file icon + name; also keep the info button visible without hovering (the card + otherwise only reveals it on hover). */ +.attachmentsTemplateCard #attachment-info { + display: inline-flex !important; +} + +/* ...but suppress the docs card-view selection checkbox and 3-dots actions menu — + neither makes sense when picking a template. */ +.attachmentsTemplateCard .v-simple-checkbox, +.attachmentsTemplateCard .v-btn:has(.mdi-dots-vertical) { + display: none !important; +} + +/* Expanded (full-screen) drawer: centre the content with side margins — like the + notification / favorite drawers — instead of spanning edge to edge. */ +.createDocumentDrawerContent--expanded { + max-width: 1200px; + margin-inline: auto; +} + .driveExplorerDrawer { .serverFiles { .contentHeader { diff --git a/documents-webapp/src/main/webapp/vue-app/attachment/components/attachment-document-creator/AttachmentCreateDocumentDrawer.vue b/documents-webapp/src/main/webapp/vue-app/attachment/components/attachment-document-creator/AttachmentCreateDocumentDrawer.vue index 2cd90d4ff..3fc02ae49 100644 --- a/documents-webapp/src/main/webapp/vue-app/attachment/components/attachment-document-creator/AttachmentCreateDocumentDrawer.vue +++ b/documents-webapp/src/main/webapp/vue-app/attachment/components/attachment-document-creator/AttachmentCreateDocumentDrawer.vue @@ -27,8 +27,17 @@ + right + allow-expand + :use-filter="showTemplateFilters" + :filter-placeholder="$t('attachments.drawer.templates.search')" + @filter-updated="onTemplateFilter" + @expand-updated="drawerExpanded = $event">