aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/sitemap.php
blob: d48262b9b975b79a94824312ba0e2ce9d2d587e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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);
    }
}