Adds hide toggle to hide unavailable compositions (#12776)

* feat: Added hide toggle to hide unavailable compositions

* fix: Fixed - being .

* chore: Move toggle to top
This commit is contained in:
Nikolaj Brask-Nielsen
2023-08-16 16:44:05 +02:00
committed by GitHub
parent 767bd1bcc0
commit 3a7e388547
6 changed files with 15 additions and 1 deletions

View File

@@ -56,6 +56,7 @@
<key alias="createblueprint">Opret indholdsskabelon</key>
<key alias="resendInvite">Gensend invitation</key>
<key alias="defaultValue">Standardværdi</key>
<key alias="toggleHideUnavalible">Skjul utilgængelige kompositioner</key>
</area>
<area alias="actionCategories">
<key alias="content">Indhold</key>

View File

@@ -55,6 +55,7 @@
<key alias="unlock">Unlock</key>
<key alias="createblueprint">Create Content Template</key>
<key alias="resendInvite">Resend Invitation</key>
<key alias="toggleHideUnavalible">Hide unavailable options</key>
</area>
<area alias="actionCategories">
<key alias="content">Content</key>

View File

@@ -57,6 +57,7 @@
<key alias="unlock">Unlock</key>
<key alias="createblueprint">Create Content Template</key>
<key alias="resendInvite">Resend Invitation</key>
<key alias="toggleHideUnavalible">Hide unavailable options</key>
</area>
<area alias="actionCategories">
<key alias="content">Content</key>

View File

@@ -31,6 +31,10 @@
font-weight: bold;
}
.umb-checkbox-list__item.-hidden {
display: none;
}
.umb-checkbox-list__item-checkbox {
display: flex;
justify-content: center;

View File

@@ -8,6 +8,7 @@
vm.showConfirmSubmit = false;
vm.loadingAlias = null;
vm.hideUnavailable = false;
vm.isSelected = isSelected;
vm.openContentType = openContentType;

View File

@@ -35,6 +35,12 @@
auto-focus="true">
</umb-search-filter>
<umb-checkbox model="vm.hideUnavailable"
label-key="actions_toggleHideUnavalible"
class="mt2" style="display: block;">
</umb-checkbox>
</div>
</div>
@@ -72,7 +78,7 @@
</li>
<li class="umb-checkbox-list__item"
ng-repeat="compositeContentType in group.compositeContentTypes | orderBy:'contentType.name' | filter:vm.searchTerm"
ng-class="{'-disabled': (compositeContentType.allowed === false && !compositeContentType.selected) || compositeContentType.inherited, '-selected': compositeContentType.selected}">
ng-class="{'-hidden': ((compositeContentType.allowed === false && !compositeContentType.selected) || compositeContentType.inherited) && vm.hideUnavailable, '-disabled': (compositeContentType.allowed === false && !compositeContentType.selected) || compositeContentType.inherited, '-selected': compositeContentType.selected}">
<div class="umb-checkbox-list__item-checkbox" ng-class="{'-selected': compositeContentType.selected }">
<umb-checkbox input-id="umb-overlay-comp-{{compositeContentType.contentType.key}}"