Skip to content
Snippets Groups Projects
Commit 9540c392 authored by Thomas Hackl's avatar Thomas Hackl Committed by David Siegfried
Browse files

Draft: Resolve "Bilderpool umhängen in Administration -> Standort"

Closes #2900

Merge request studip/studip!1967
parent a70a5f70
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
......
......@@ -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);
......
......@@ -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'));
......
<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>
......@@ -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,
......
......@@ -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';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment