Adds several options to hide elements from primary menu #659.
This commit is contained in:
parent
a95fda7c84
commit
df5d72fc8d
|
@ -15,7 +15,7 @@
|
|||
:active-route="activeRoute"
|
||||
:is-menu-compressed="isMenuCompressed"/>
|
||||
<button
|
||||
v-if="!$adminOptions.hideMenuCompressButton"
|
||||
v-if="!$adminOptions.hidePrimaryMenu && !$adminOptions.hidePrimaryMenuCompressButton"
|
||||
class="is-hidden-mobile"
|
||||
id="menu-compress-button"
|
||||
@click="isMenuCompressed = !isMenuCompressed">
|
||||
|
|
|
@ -114,6 +114,10 @@
|
|||
:aria-label="$i18n.getFrom('items','edit_item')">
|
||||
<span
|
||||
v-tooltip="{
|
||||
delay: {
|
||||
show: 500,
|
||||
hide: 100,
|
||||
},
|
||||
content: $i18n.get('edit'),
|
||||
autoHide: true,
|
||||
placement: 'auto'
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
<aside class="menu">
|
||||
|
||||
<ul class="menu-list">
|
||||
<li class="repository-label">
|
||||
<li
|
||||
v-if="!$adminOptions.hidePrimaryMenuRepositoryButton"
|
||||
class="repository-label">
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="$routerHelper.getCollectionsPath()">
|
||||
|
@ -20,7 +22,7 @@
|
|||
</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li>
|
||||
<li v-if="!$adminOptions.hidePrimaryMenuCollectionsButton">
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="$routerHelper.getCollectionsPath()"
|
||||
|
@ -31,7 +33,7 @@
|
|||
<span class="menu-text">{{ $i18n.getFrom('collections', 'name') }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li>
|
||||
<li v-if="!$adminOptions.hidePrimaryMenuItemsButton">
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="$routerHelper.getItemsPath()"
|
||||
|
@ -43,7 +45,7 @@
|
|||
</router-link>
|
||||
</li>
|
||||
<li class="separator"/>
|
||||
<li v-if="$userCaps.hasCapability('tnc_rep_edit_metadata')">
|
||||
<li v-if="$userCaps.hasCapability('tnc_rep_edit_metadata') && !$adminOptions.hidePrimaryMenuMetadataButton">
|
||||
<router-link
|
||||
tag="a"
|
||||
to="/metadata"
|
||||
|
@ -54,7 +56,7 @@
|
|||
<span class="menu-text">{{ $i18n.get('metadata') }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li v-if="$userCaps.hasCapability('tnc_rep_edit_filters')">
|
||||
<li v-if="$userCaps.hasCapability('tnc_rep_edit_filters') && !$adminOptions.hidePrimaryMenuFiltersButton">
|
||||
<router-link
|
||||
tag="a"
|
||||
to="/filters"
|
||||
|
@ -65,7 +67,7 @@
|
|||
<span class="menu-text">{{ $i18n.getFrom('filters', 'name') }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li>
|
||||
<li v-if="!$adminOptions.hidePrimaryMenuTaxonomiesButton">
|
||||
<router-link
|
||||
tag="a"
|
||||
to="/taxonomies"
|
||||
|
@ -76,7 +78,7 @@
|
|||
<span class="menu-text">{{ $i18n.getFrom('taxonomies', 'name') }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li>
|
||||
<li v-if="!$adminOptions.hidePrimaryMenuActivitiesButton">
|
||||
<router-link
|
||||
tag="a"
|
||||
to="/activities"
|
||||
|
@ -87,7 +89,7 @@
|
|||
<span class="menu-text">{{ $i18n.get('activities') }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li v-if="$userCaps.hasCapability('tnc_rep_edit_users')">
|
||||
<li v-if="$userCaps.hasCapability('tnc_rep_edit_users') && !$adminOptions.hidePrimaryMenuCapabilitiesButton">
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="this.$routerHelper.getCapabilitiesPath()"
|
||||
|
@ -98,7 +100,7 @@
|
|||
<span class="menu-text">{{ $i18n.get('capabilities') }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li>
|
||||
<li v-if="!$adminOptions.hidePrimaryMenuImportersButton">
|
||||
<router-link
|
||||
tag="a"
|
||||
to="/importers"
|
||||
|
@ -113,7 +115,7 @@
|
|||
<span class="menu-text menu-text-import">{{ $i18n.get('importers') }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li>
|
||||
<li v-if="!$adminOptions.hidePrimaryMenuExportersButton">
|
||||
<router-link
|
||||
tag="a"
|
||||
to="/exporters"
|
||||
|
|
|
@ -464,7 +464,6 @@ AdminOptionsHelperPlugin.install = function (Vue, options = {}) {
|
|||
const adminSpecialModes = {
|
||||
itemsSingleSelectionMode: {
|
||||
hideTainacanHeader: true,
|
||||
hideMenuCompressButton: true,
|
||||
hidePrimaryMenu: true,
|
||||
hideTainacanRepositorySubheader: true,
|
||||
hideTainacanCollectionSubheader: true,
|
||||
|
@ -484,7 +483,6 @@ AdminOptionsHelperPlugin.install = function (Vue, options = {}) {
|
|||
},
|
||||
itemsMultipleSelectionMode: {
|
||||
hideTainacanHeader: true,
|
||||
hideMenuCompressButton: true,
|
||||
hidePrimaryMenu: true,
|
||||
hideTainacanRepositorySubheader: true,
|
||||
hideTainacanCollectionSubheader: true,
|
||||
|
@ -504,7 +502,6 @@ AdminOptionsHelperPlugin.install = function (Vue, options = {}) {
|
|||
},
|
||||
itemsSearchSelectionMode: {
|
||||
hideTainacanHeader: true,
|
||||
hideMenuCompressButton: true,
|
||||
hidePrimaryMenu: true,
|
||||
hideTainacanRepositorySubheader: true,
|
||||
hideTainacanCollectionSubheader: true,
|
||||
|
@ -521,7 +518,6 @@ AdminOptionsHelperPlugin.install = function (Vue, options = {}) {
|
|||
},
|
||||
itemEditionMode: {
|
||||
hideTainacanHeader: true,
|
||||
hideMenuCompressButton: true,
|
||||
hidePrimaryMenu: true,
|
||||
hideTainacanRepositorySubheader: true,
|
||||
hideTainacanCollectionSubheader: true,
|
||||
|
@ -529,7 +525,6 @@ AdminOptionsHelperPlugin.install = function (Vue, options = {}) {
|
|||
},
|
||||
mobileAppMode: {
|
||||
hideTainacanHeader: true,
|
||||
hideMenuCompressButton: true,
|
||||
hidePrimaryMenu: true,
|
||||
hideTainacanRepositorySubheader: true,
|
||||
hideTainacanCollectionSubheader: true,
|
||||
|
@ -551,4 +546,42 @@ AdminOptionsHelperPlugin.install = function (Vue, options = {}) {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Possible Values:
|
||||
* hideTainacanHeader
|
||||
* hidePrimaryMenuCompressButton
|
||||
* hidePrimaryMenu
|
||||
* hidePrimaryMenuCompressButton
|
||||
* hidePrimaryMenuRepositoryButton
|
||||
* hidePrimaryMenuCollectionsButton
|
||||
* hidePrimaryMenuItemsButton
|
||||
* hidePrimaryMenuTaxonomiesButton
|
||||
* hidePrimaryMenuMetadataButton
|
||||
* hidePrimaryMenuFiltersButton
|
||||
* hidePrimaryMenuImportersButton
|
||||
* hidePrimaryMenuExportersButton
|
||||
* hidePrimaryMenuActivitiesButton
|
||||
* hidePrimaryMenuCapabilitiesButton
|
||||
* hideTainacanRepositorySubheader
|
||||
* hideTainacanCollectionSubheader
|
||||
* hideMultipleItemSelection
|
||||
* hideItemSelection
|
||||
* hideBulkActionsDropdown
|
||||
* hideContextMenu
|
||||
* hideContextMenuOpenItemOption
|
||||
* hideContextMenuOpenItemOnNewTabOption
|
||||
* hideContextMenuEditItemOption
|
||||
* hideContextMenuCopyItemOption
|
||||
* hideContextMenuDeleteItemOption
|
||||
* hideItemActionArea
|
||||
* hideItemsListPageTitle
|
||||
* hideItemCreationDropdown
|
||||
* hideExposersButton
|
||||
* hideItemsStatusStabs
|
||||
* hideFilterCreationButton
|
||||
* hideItemEditionPageBackButton
|
||||
* hideItemEditionPageTitle
|
||||
* hideBulkEditionPageTitle
|
||||
* hideCollectionNameInItemPage
|
||||
*/
|
||||
};
|
Loading…
Reference in New Issue