aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/sitemap.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+github@gmail.com>2021-07-22 16:07:19 +0200
committerJan-Hendrik Willms <tleilax+github@gmail.com>2021-07-22 16:19:12 +0200
commita3da1483a9e689846179159355badfec8073dbec (patch)
tree770dcca6bdf5f6f2a11b0e7fcbbeda6919a3fc52 /app/controllers/sitemap.php
current code from svn, revision 62608
Diffstat (limited to 'app/controllers/sitemap.php')
-rw-r--r--app/controllers/sitemap.php46
1 files changed, 46 insertions, 0 deletions
diff --git a/app/controllers/sitemap.php b/app/controllers/sitemap.php
new file mode 100644
index 0000000..d48262b
--- /dev/null
+++ b/app/controllers/sitemap.php
@@ -0,0 +1,46 @@
+<?php
+# Lifter010: TODO
+/*
+ * SitemapController - Shows a global sitemap for all available pages
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * @author Michael Riehemann <michael.riehemann@uni-oldenburg.de>
+ * @license http://www.gnu.org/licenses/gpl-2.0.html GPL version 2
+ * @category Stud.IP
+ * @since 2.0
+ */
+
+/**
+ * The sitemap is only visible for logged in users, because the sitemap depends
+ * on the permissions of the user.
+ */
+class SitemapController extends AuthenticatedController
+{
+ /**
+ * The only method, loads the navigation object and displays it.
+ */
+ public function index_action()
+ {
+ PageLayout::setTitle(_('Sitemap'));
+
+ foreach (Navigation::getItem('/start') as $nav) {
+ $nav->setEnabled(false);
+ }
+
+ $this->navigation = Navigation::getItem('/');
+ $this->quicklinks = Navigation::getItem('/links');
+ $this->footer = Navigation::getItem('/footer');
+
+ // Add sidebar
+ $sidebar = Sidebar::get();
+
+ $info = new SidebarWidget();
+ $info->setTitle(_('Hinweise'));
+ $info->addElement(new WidgetElement(_('Auf dieser Seite finden Sie eine Übersicht über alle verfügbaren Seiten.')));
+ $sidebar->addWidget($info);
+ }
+}