diff --git a/locales/default.pot b/locales/default.pot index d9fee31b3..30510c4c3 100644 --- a/locales/default.pot +++ b/locales/default.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: BEdita 4 \n" -"POT-Creation-Date: 2024-11-22 13:38:50 \n" +"POT-Creation-Date: 2024-12-02 16:33:07 \n" "MIME-Version: 1.0 \n" "Content-Transfer-Encoding: 8bit \n" "Language-Team: BEdita I18N & I10N Team \n" @@ -796,6 +796,9 @@ msgstr "" msgid "Select a project" msgstr "" +msgid "Show active positions" +msgstr "" + msgid "Sign in" msgstr "" diff --git a/locales/en_US/default.po b/locales/en_US/default.po index fab580bec..49ff32e5a 100644 --- a/locales/en_US/default.po +++ b/locales/en_US/default.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: BEdita Manager \n" -"POT-Creation-Date: 2024-11-22 13:38:50 \n" +"POT-Creation-Date: 2024-12-02 16:33:07 \n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: BEdita I18N & I10N Team \n" @@ -799,6 +799,9 @@ msgstr "" msgid "Select a project" msgstr "" +msgid "Show active positions" +msgstr "" + msgid "Sign in" msgstr "" diff --git a/locales/it_IT/default.po b/locales/it_IT/default.po index 439ad9684..1d717bab9 100644 --- a/locales/it_IT/default.po +++ b/locales/it_IT/default.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: BEdita Manager \n" -"POT-Creation-Date: 2024-11-22 13:38:50 \n" +"POT-Creation-Date: 2024-12-02 16:33:07 \n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: BEdita I18N & I10N Team \n" @@ -804,6 +804,9 @@ msgstr "Cerca" msgid "Select a project" msgstr "Seleziona un progetto" +msgid "Show active positions" +msgstr "Mostra posizioni attive" + msgid "Sign in" msgstr "Accedi" diff --git a/resources/js/app/components/property-view/property-view.js b/resources/js/app/components/property-view/property-view.js index 1e10a820f..1b0716c1e 100644 --- a/resources/js/app/components/property-view/property-view.js +++ b/resources/js/app/components/property-view/property-view.js @@ -92,6 +92,7 @@ export default { userInfoLoaded: false, fileChanged: false, searchInPosition: '', + searchInPositionActive: false, } }, @@ -125,6 +126,7 @@ export default { toggleVisibility() { this.isOpen = !this.isOpen; this.searchInPosition = ''; + this.searchInPositionActive = this.searchInPositionActive ? true : false; this.checkLoadRelated(); this.updateStorage(); }, @@ -249,5 +251,9 @@ export default { return debouncedSearchPosition(e.target.value); }, + + onSearchInPositionActive(e) { + this.searchInPositionActive = e.target.checked ? true : false; + }, } } diff --git a/resources/js/app/components/tree-view/tree-view.vue b/resources/js/app/components/tree-view/tree-view.vue index 2b7afd3e9..b2013225b 100644 --- a/resources/js/app/components/tree-view/tree-view.vue +++ b/resources/js/app/components/tree-view/tree-view.vue @@ -82,7 +82,8 @@ :user-roles="userRoles" :has-permissions="hasPermissions" :show-forbidden="showForbidden" - :search="search"> + :search="search" + :search-in-position-active="searchInPositionActive"> @@ -171,6 +172,10 @@ export default { type: String, default: '', }, + searchInPositionActive: { + type: Boolean, + default: false, + }, }, data() { @@ -329,6 +334,10 @@ export default { return false; } + if (this.searchInPositionActive && !this.isParent && !this.node.children) { + return false; + } + if (!this.hasPermissions) { return true; } diff --git a/templates/Element/Form/trees.twig b/templates/Element/Form/trees.twig index 35856ce2a..427034483 100644 --- a/templates/Element/Form/trees.twig +++ b/templates/Element/Form/trees.twig @@ -33,6 +33,13 @@ +
+ +
+

{{ __('Data is filtered') }} @@ -46,7 +53,8 @@ :multiple-choice={{ options.multiple }} :user-roles="{{ user.roles|json_encode }}" :has-permissions="{{ hasPermissions|json_encode }}" - :search="searchInPosition"> + :search="searchInPosition" + :search-in-position-active="searchInPositionActive"> {% do Form.unlockField('relations.' ~ relationName ~ '.replaceRelated') %}