diff --git a/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_en.properties b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_en.properties index bed32e1623f..d79351a218e 100644 --- a/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_en.properties +++ b/webapp/src/main/resources/locale/portlet/social/SpacesAdministrationPortlet_en.properties @@ -123,3 +123,4 @@ social.spaces.administration.manageSpaces.noTemplate=No template social.spaces.administration.manageSpaces.admins.drawerTitle=Admins of {0} social.spaces.administration.manageSpaces.bindingStatus.tooltip={0} sync members social.spaces.administration.manageSpaces.noBindingStatus.tooltip=No group sync +social.spaces.administration.manageSpaces.spaceTemplates.all=All diff --git a/webapp/src/main/webapp/vue-apps/spaces-administration/components/SpacesAdministration.vue b/webapp/src/main/webapp/vue-apps/spaces-administration/components/SpacesAdministration.vue index 1bf1abc32b5..ab018ea585e 100644 --- a/webapp/src/main/webapp/vue-apps/spaces-administration/components/SpacesAdministration.vue +++ b/webapp/src/main/webapp/vue-apps/spaces-administration/components/SpacesAdministration.vue @@ -23,14 +23,16 @@ @@ -45,6 +47,7 @@ export default { spacesSize: 0, loadingSpaces: false, initialized: false, + selectedTemplateId: '0', }), methods: { spacesLoaded(spacesSize) { diff --git a/webapp/src/main/webapp/vue-apps/spaces-administration/components/main/SpacesAdministrationList.vue b/webapp/src/main/webapp/vue-apps/spaces-administration/components/main/SpacesAdministrationList.vue index f30624c6616..df9bc7439bf 100644 --- a/webapp/src/main/webapp/vue-apps/spaces-administration/components/main/SpacesAdministrationList.vue +++ b/webapp/src/main/webapp/vue-apps/spaces-administration/components/main/SpacesAdministrationList.vue @@ -104,6 +104,10 @@ export default { type: Boolean, default: false, }, + selectedTemplateId: { + type: String, + default: () => '0', + }, }, data: () => ({ actionExtensions: [], @@ -233,6 +237,13 @@ export default { this.searchSpaces(); } }, + selectedTemplateId() { + if (this.initialized) { + this.offset = 0; + this.spaces = []; + this.searchSpaces(); + } + }, }, created() { this.searchSpaces(); @@ -251,7 +262,7 @@ export default { }, searchSpaces() { this.$emit('loading-spaces', true); - return this.$spaceService.getSpaces(this.keyword, this.offset, this.pageSize, this.filter, this.expand) + return this.$spaceService.getSpaces(this.keyword, this.offset, this.pageSize, this.filter, this.expand, this.selectedTemplateId && Number(this.selectedTemplateId)) .then(data => { if (this.offset) { this.spaces.push(...data.spaces); diff --git a/webapp/src/main/webapp/vue-apps/spaces-administration/components/main/SpacesAdministrationToolbar.vue b/webapp/src/main/webapp/vue-apps/spaces-administration/components/main/SpacesAdministrationToolbar.vue index d3003a44d36..b400fa5f936 100644 --- a/webapp/src/main/webapp/vue-apps/spaces-administration/components/main/SpacesAdministrationToolbar.vue +++ b/webapp/src/main/webapp/vue-apps/spaces-administration/components/main/SpacesAdministrationToolbar.vue @@ -8,6 +8,7 @@ modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -26,28 +27,48 @@ placeholder: $t('spacesList.label.filterSpaces'), tooltip: $t('spacesList.label.filterSpaces') }" - :compact="compactDisplay || $root.isMobile" + :right-select-box="{ + hide: $root.isMobile, + selected: selectedTemplateId, + items: spaceTemplateItems, + }" + :filters-count="filtersCount" + compact class="px-1" no-text-truncate @filter-text-input-end-typing="$emit('keyword-changed', $event)" - @filter-button-click="$root.$emit('spaces-list-filter-open', filter)" + @filter-select-change="$emit('template-changed', $event)" @loading="$emit('loading', $event)" />