1<?php
2/**
3 * Template header, included in the main and detail files
4 */
5
6// must be run from within DokuWiki
7if (!defined('DOKU_INC')) die();
8?>
9
10<!-- ********** HEADER ********** -->
11<div id="dokuwiki__header"><div class="pad group">
12
13    <?php tpl_includeFile('header.html') ?>
14
15    <div class="headings group">
16        <ul class="a11y skip">
17            <li><a href="#dokuwiki__content"><?php echo $lang['skip_to_content']; ?></a></li>
18        </ul>
19
20        <h1><?php
21            // get logo either out of the template images folder or data/media folder
22            $logoSize = array();
23            $logo = tpl_getMediaFile(array(':wiki:logo.png', 'images/logo.png'), false, $logoSize);
24
25            // display logo and wiki title in a link to the home page
26            tpl_link(
27                wl(),
28                '<img src="'.$logo.'" '.$logoSize[3].' alt="" /> <span>'.$conf['title'].'</span>',
29                'accesskey="h" title="[H]"'
30            );
31        ?></h1>
32        <?php if ($conf['tagline']): ?>
33            <p class="claim"><?php echo $conf['tagline']; ?></p>
34        <?php endif ?>
35    </div>
36
37    <div class="tools group">
38        <!-- USER TOOLS -->
39        <?php if ($conf['useacl']): ?>
40            <div id="dokuwiki__usertools">
41                <h3 class="a11y"><?php echo $lang['user_tools']; ?></h3>
42                <ul>
43                    <?php
44                        if ($_SERVER['REMOTE_USER']) {
45                            echo '<li class="user">';
46                            tpl_userinfo(); /* 'Logged in as ...' */
47                            echo '</li>';
48                        }
49
50                  		$items = (new \dokuwiki\Menu\UserMenu())->getItems();
51                        foreach($items as $item) {
52                            echo '<li>'
53                                .'<a href="'.$item->getLink().'" title="'.$item->getTitle().'">'
54                                .'<span class="icon">'.inlineSVG($item->getSvg()).'</span>'
55                                . '<span class="a11y">'.$item->getLabel().'</span>'
56                                . '</a></li>';
57                        }
58
59                    ?>
60                </ul>
61            </div>
62        <?php endif ?>
63
64        <!-- SITE TOOLS -->
65        <div id="dokuwiki__sitetools">
66            <h3 class="a11y"><?php echo $lang['site_tools']; ?></h3>
67            <?php tpl_searchform(); ?>
68            <div class="mobileTools">
69
70              <?php
71              //tpl_actiondropdown($lang['tools']);
72              echo (new \dokuwiki\Menu\MobileMenu())->getDropdown($lang['tools']);
73              ?>
74            </div>
75            <ul>
76                <?php
77              		// Show Site Menu
78                    $items = (new \dokuwiki\Menu\SiteMenu())->getItems();
79                    foreach($items as $item) {
80                        echo '<li>'
81                            . '<a href="'.$item->getLink().'" title="'.$item->getTitle().'">'
82                            . '<span class="icon">'.inlineSVG($item->getSvg()).' '.$item->getLabel().'</span>'
83                            . '</a></li>';
84                    }
85
86                    //tpl_action('recent', 1, 'li');
87                    //tpl_action('media', 1, 'li');
88                    //tpl_action('index', 1, 'li');
89                ?>
90            </ul>
91        </div>
92
93    </div>
94
95    <!-- BREADCRUMBS -->
96    <?php if($conf['breadcrumbs'] || $conf['youarehere']): ?>
97        <div class="breadcrumbs">
98            <?php if($conf['youarehere']): ?>
99                <div class="youarehere"><?php tpl_youarehere() ?></div>
100            <?php endif ?>
101            <?php if($conf['breadcrumbs']): ?>
102                <div class="trace"><?php tpl_breadcrumbs() ?></div>
103            <?php endif ?>
104        </div>
105    <?php endif ?>
106
107    <?php html_msgarea() ?>
108
109    <hr class="a11y" />
110</div></div><!-- /header -->
111