1<?php
2/**
3 * Before content template for Dokuwiki Kiwiki Theme
4 */
5
6// must be run from within DokuWiki
7if (!defined('DOKU_INC')) die();
8
9/* disable breadcrumb on login and denied pages */
10if(($ACT!="login") && ($ACT!="denied")){
11    ?><div class="before-content"><?php
12    /* BREADCRUMBS */
13        if($conf['breadcrumbs']){?>
14            <div class="breadcrumbs">
15            <?php tpl_breadcrumbs() ;?>
16            </div>
17        <?php }
18        if($conf['youarehere']){?>
19            <div class="youarehere">
20            <?php tpl_youarehere() ;?>
21            </div>
22        <?php }
23
24        ?>
25        <div id="dokuwiki__right_before">
26        <?php
27        // TRANSLATION SWITCHER
28        $translation = plugin_load('helper','translation');
29        if ($translation){
30            echo '<div class="translation-switcher">' . $translation->showTranslations() . '</div>';
31        }
32        // PAGE TOOLS
33        ?>
34
35        </div>
36        <?php
37        // PAGE TOOLS
38        if($ACT == 'show'){?>
39        <div id="dokuwiki__pagetools" role="button" aria-label="<?php echo tpl_getLang('page-tools') ?>">
40                <strong><?php echo inlineSVG(KIWIKI_IMAGES_PATH . 'preferences.svg') ?></strong>
41                <ul>
42                <!-- SITE TOOLS -->
43                <li id="sitemenu">
44                <?php
45                $items = (new \dokuwiki\Menu\SiteMenu())->getItems();
46                foreach($items as $item) {
47                    echo '<a href="'.$item->getLink().'" title="'.$item->getTitle().'">'
48                .'<span class="icon">'.inlineSVG($item->getSvg()).'</span>'
49                . '<span class="a11y">'.$item->getLabel().'</span>'
50                . '</a>';
51                }
52                ?>
53                </li>
54                <!-- PAGE TOOLS -->
55                <?php echo (new \dokuwiki\Menu\KiwikiPageMenu())->getListItems('action ', false); ?>
56                </ul>
57        </div>
58        <?php } ?>
59    </div>
60<?php } ?>
61