diff --git a/app/controllers/stock_images.php b/app/controllers/stock_images.php index b272a71e9a760b54ed1d22ff75aa3f78febe7d3b..46954343926e418ad7f5b127dafc50066a634fa0 100644 --- a/app/controllers/stock_images.php +++ b/app/controllers/stock_images.php @@ -12,9 +12,7 @@ class StockImagesController extends AuthenticatedController URLHelper::removeLinkParam('cid'); $GLOBALS['perm']->check('admin'); - if (Navigation::hasItem('/contents/stock_images')) { - Navigation::activateItem('/contents/stock_images'); - } + Navigation::activateItem('/admin/locations/stock_images'); \PageLayout::setTitle(_('Verwaltung des Bilder-Pools')); $this->setSidebar(); } diff --git a/lib/navigation/AdminNavigation.php b/lib/navigation/AdminNavigation.php index 6c9d7e3c48872fb5bd43193f9f917ae2221de1c8..fa3063730c600cab7ab15f5001a9ecf99a64b04e 100644 --- a/lib/navigation/AdminNavigation.php +++ b/lib/navigation/AdminNavigation.php @@ -161,6 +161,13 @@ class AdminNavigation extends Navigation ) ); + if ($GLOBALS['perm']->have_perm('admin')) { + $pool = new Navigation(_('Bilder-Pool'), 'dispatch.php/stock_images', []); + $pool->setImage(Icon::create('picture')); + $pool->setDescription(_('Verwalten Sie den Pool frei verfügbarer Bilder.')); + $navigation->addSubNavigation('stock_images', $pool); + } + } $this->addSubNavigation('locations', $navigation); diff --git a/lib/navigation/ContentsNavigation.php b/lib/navigation/ContentsNavigation.php index c206ef5daf658b2c145fe7aef1180f07ad0a6b07..119de6a73d0631af9943d8b17efa88d09d7680a6 100644 --- a/lib/navigation/ContentsNavigation.php +++ b/lib/navigation/ContentsNavigation.php @@ -139,13 +139,6 @@ class ContentsNavigation extends Navigation $this->addSubNavigation('my_elearning', $elearning); } - if ($GLOBALS['perm']->have_perm('admin')) { - $pool = new Navigation(_('Bilder-Pool'), 'dispatch.php/stock_images', []); - $pool->setImage(Icon::create('picture')); - $pool->setDescription(_('Verwalten Sie den Pool frei verfügbarer Bilder.')); - $this->addSubNavigation('stock_images', $pool); - } - if (!$GLOBALS['perm']->have_perm('root') && $GLOBALS['user']->getAuthenticatedUser()->hasRole('Hilfe-Administrator(in)')) { $help = new Navigation(_('Hilfe'), 'dispatch.php/help_content/admin_overview'); $help->setImage(Icon::create('question-circle')); diff --git a/resources/vue/components/stock-images/NavigationWidget.vue b/resources/vue/components/stock-images/NavigationWidget.vue deleted file mode 100644 index 4cdc12ac4ecbfcdef98c92c2e866c7eaafde2c10..0000000000000000000000000000000000000000 --- a/resources/vue/components/stock-images/NavigationWidget.vue +++ /dev/null @@ -1,31 +0,0 @@ -<template> - <SidebarWidget> - <template #content> - <ul - class="widget-list widget-links sidebar-navigation navigation-level-3" - :aria-label="$gettext('Dritte Navigationsebene')" - > - <li class="active"> - <a aria-current="page" id="nav_overview_index" class="active" :href="overviewUrl"> - {{ $gettext('Übersicht') }} - </a> - </li> - </ul> - </template> - </SidebarWidget> -</template> - -<script> -import SidebarWidget from '../SidebarWidget.vue'; - -export default { - components: { - SidebarWidget, - }, - computed: { - overviewUrl() { - return window.STUDIP.URLHelper.getURL('dispatch.php/contents/overview'); - }, - }, -}; -</script> diff --git a/resources/vue/components/stock-images/Page.vue b/resources/vue/components/stock-images/Page.vue index b7daddc75e95083e58f89967b2c0cc9e26ade30c..3d8ce54fc84491c4dc168c1f5be2dc3f554b41bb 100644 --- a/resources/vue/components/stock-images/Page.vue +++ b/resources/vue/components/stock-images/Page.vue @@ -13,7 +13,6 @@ /> </ImagesPagination> <MountingPortal mountTo="#stock-images-widget" name="sidebar-stock-images"> - <NavigationWidget /> <SearchWidget :query="query" @search="onSearch" /> <OrientationFilterWidget v-model="filters" /> <ColorFilterWidget v-model="filters" /> @@ -41,7 +40,6 @@ import ColorFilterWidget from './ColorFilterWidget.vue'; import EditDialog from './EditDialog.vue'; import ImagesList from './ImagesList.vue'; import ImagesPagination from './ImagesPagination.vue'; -import NavigationWidget from './NavigationWidget.vue'; import OrientationFilterWidget from './OrientationFilterWidget.vue'; import SearchWidget from './SearchWidget.vue'; import UploadDialog from './UploadDialog.vue'; @@ -54,7 +52,6 @@ export default { EditDialog, ImagesList, ImagesPagination, - NavigationWidget, OrientationFilterWidget, SearchWidget, UploadDialog, diff --git a/resources/vue/components/stock-images/components.js b/resources/vue/components/stock-images/components.js index 93c61d274bd0ecc60c09377fae933fe125b20377..2e1861f10f98e4ce9d83ab22bb215f141e3d4167 100644 --- a/resources/vue/components/stock-images/components.js +++ b/resources/vue/components/stock-images/components.js @@ -6,7 +6,6 @@ export { default as StockImagesImagesList } from './ImagesList.vue'; export { default as StockImagesImagesListItem } from './ImagesListItem.vue'; export { default as StockImagesImagesPagination } from './ImagesPagination.vue'; export { default as StockImagesMetadataBox } from './MetadataBox.vue'; -export { default as StockImagesNavigationWidget } from './NavigationWidget.vue'; export { default as StockImagesOrientationFilterWidget } from './OrientationFilterWidget.vue'; export { default as StockImagesPage } from './Page.vue'; export { default as StockImagesSearchWidget } from './SearchWidget.vue';