+
+
+
-
+
-
+ v-for="template in filteredTemplates"
+ :key="template.id"
+ class="attachmentsTemplateItem">
+
+
+
+
+ {{ activeExtension }}
+
-
- {{ activeExtension }}
-
+
+
+
+ far fa-clone
+ {{ $t('attachments.drawer.templates.noMatch') }}
(template.categoryIds || []).some(id => String(id) === selected));
+ }
+ const query = (this.templateSearch || '').trim().toLowerCase();
+ if (query) {
+ list = list.filter(template => (template.name || '').toLowerCase().includes(query));
+ }
+ return list;
+ },
+ // Only surface the filter row once there are enough templates to warrant it —
+ // small sets are fully visible, and the category chip bar self-hides anyway
+ // when the templates aren't categorized.
+ showTemplateFilters() {
+ return this.templates.length > 3;
+ },
// Drive-root-relative path of the current target folder (blank-create target).
// '' targets the drive root. Defensive against a path passed as an object.
destinationRelativePath() {
@@ -335,6 +400,7 @@ export default {
this.$refs.createDocumentDrawer.open();
},
close() {
+ this.drawerExpanded = false;
this.$refs.createDocumentDrawer.close();
},
refreshNewDocumentsActions() {
@@ -425,6 +491,11 @@ export default {
this.createNewDoc();
}
},
+ // exo-drawer built-in header filter (use-filter) → the typed query, applied
+ // client-side over the loaded templates.
+ onTemplateFilter(text) {
+ this.templateSearch = text || '';
+ },
resetNewDocInput() {
this.NewDocInputHidden = true;
this.newDocTitleInput = '';
@@ -469,6 +540,8 @@ export default {
this.templatesFolderExists = false;
this.rootFolderId = null;
this.canCreateTemplatesFolder = false;
+ this.selectedTemplateCategoryId = null;
+ this.templateSearch = '';
const ownerId = this.templatesOwnerId;
if (!ownerId) {
return;
diff --git a/documents-webapp/src/main/webapp/vue-app/documents/components/body/views/FolderTreeViewDrawer.vue b/documents-webapp/src/main/webapp/vue-app/documents/components/body/views/FolderTreeViewDrawer.vue
index f722e32cb..e98c612b7 100644
--- a/documents-webapp/src/main/webapp/vue-app/documents/components/body/views/FolderTreeViewDrawer.vue
+++ b/documents-webapp/src/main/webapp/vue-app/documents/components/body/views/FolderTreeViewDrawer.vue
@@ -17,17 +17,35 @@
*
-->
-
- {{ $t('documents.drawer.tree') }}
+
+
+
+ fa-arrow-left
+
+ {{ $t('documents.drawer.tree') }}
+
@@ -47,6 +65,7 @@ export default {
pageSize: 20,
drivesLimit: 20,
drivesOffset: 0,
+ treeSearch: '',
}),
created(){
this.$root.$on('openTreeFolderDrawer', this.open);
@@ -74,6 +93,11 @@ export default {
close() {
this.$refs.treeViewDrawer?.close();
},
+ // exo-drawer's built-in header filter → v-treeview's built-in search, which
+ // filters the loaded tree (drives + expanded folders) by name client-side.
+ onFilterDrives(query) {
+ this.treeSearch = query || '';
+ },
async retrieveDocumentTree() {
this.items = [];
this.loading = true;
diff --git a/documents-webapp/src/main/webapp/vue-app/documents/components/body/views/TreeView.vue b/documents-webapp/src/main/webapp/vue-app/documents/components/body/views/TreeView.vue
index fc446bf1a..4713448e4 100644
--- a/documents-webapp/src/main/webapp/vue-app/documents/components/body/views/TreeView.vue
+++ b/documents-webapp/src/main/webapp/vue-app/documents/components/body/views/TreeView.vue
@@ -22,6 +22,7 @@
:open.sync="openNodes"
:active.sync="activeNodes"
:items="items"
+ :search="search"
:load-children="fetchChildren"
class="treeView-item my-2"
item-key="id"
@@ -92,6 +93,12 @@ export default {
showHidden: {
type: Boolean,
default: false
+ },
+ // Free-text filter fed to v-treeview's built-in search (matches node names of
+ // the loaded tree — drives and any expanded folders).
+ search: {
+ type: String,
+ default: ''
}
},