aboutsummaryrefslogtreecommitdiff
path: root/templates/footer.php
blob: 77c406a521cfa97f4c67282944033d3d2261fbbf (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
<? if (PageLayout::isFooterEnabled()): ?>
    <!-- Beginn Footer -->
    <?php SkipLinks::addIndex(_('Fußzeile'), 'main-footer', 900, false) ?>
    <footer id="main-footer" aria-label="<?= _('Fußzeile') ?>">
        <? if (is_object($GLOBALS['user']) && $GLOBALS['user']->id != 'nobody') : ?>
            <div id="main-footer-info">
                <?= studip_interpolate(_('Sie sind angemeldet als %{username} (%{perms})'),
                        [
                            'username' => htmlReady($GLOBALS['user']->username),
                            'perms'    =>htmlReady($GLOBALS['user']->perms)
                        ]
                    ); ?>
                |
                <?= strftime('%x, %X') ?>
            </div>
        <? endif ?>
        <? if (Navigation::hasItem('/footer')): ?>
            <nav id="main-footer-navigation" aria-label="<?= _('Fußzeilennavigation') ?>">
                <ul>
                    <? if (is_object($GLOBALS['user']) && $GLOBALS['user']->id !== 'nobody') : ?>
                        <li>
                            <?= Studip\VueApp::create('short-urls/ShortUrlLink')
                                ->withProps(['isInContext' => Context::isCourse() && Context::get()->hasCourseSet()]) ?>
                        </li>
                    <? endif ?>
                    <? foreach (Navigation::getItem('/footer') as $nav): ?>
                        <? if ($nav->isVisible()): ?>
                            <li>
                                <a <? if (is_internal_url($url = $nav->getURL())): ?>
                                    href="<?= URLHelper::getLink($url, $link_params ?? null) ?>" <? else: ?>
                                    href="<?= htmlReady($url) ?>" target="_blank" rel="noopener noreferrer" <? endif ?>
                                    <?= arrayToHtmlAttributes($nav->getLinkAttributes()) ?>><?= htmlReady($nav->getTitle()) ?></a>
                            </li>
                        <? endif ?>
                    <? endforeach ?>
                </ul>
            </nav>
        <? endif ?>
    </footer>
<? endif ?>
<!-- Ende Footer -->