xref: /template/sprintdoc/tpl/main-sidebar-nav.php (revision 6b6e2bd6f7c3480955ad930b85c690650a3228ff)
16c61749bSAndreas Gohr<nav class="nav-main">
26c61749bSAndreas Gohr    <?php /* main navigation, loaded from sidebar, fixed up by javascript */
36c61749bSAndreas Gohr    tpl_include_page($conf['sidebar'], 1, 1);
46c61749bSAndreas Gohr    ?>
56c61749bSAndreas Gohr</nav>
66c61749bSAndreas Gohr
76c61749bSAndreas Gohr<nav class="nav-sitetools">
8b92c574dSJana Deutschländer    <div class="nav"><a href="#sidebar-site-tools" role="heading" aria-level="2">
9fa1028adSAndreas Gohr        <span class="ico"><?php echo inlineSVG(__DIR__ . '/../img/sitemap.svg') ?></span>
10fa1028adSAndreas Gohr        <span class="lbl"><?php echo $lang['site_tools']; ?></span>
119e264cdcSAndreas Gohr    </a></div>
12373f4a8fSAndreas Gohr    <div class="nav-panel level1">
13b92c574dSJana Deutschländer        <ul id="sidebar-site-tools">
146c61749bSAndreas Gohr            <?php
15*6b6e2bd6SMichael Große            if (file_exists(DOKU_INC . 'inc/Menu/SiteMenu.php')) {
16*6b6e2bd6SMichael Große                echo (new \dokuwiki\Menu\SiteMenu())->getListItems();
17*6b6e2bd6SMichael Große            } else {
18*6b6e2bd6SMichael Große                //Pre-Greebo Backwards compatibility
196c61749bSAndreas Gohr                tpl_toolsevent(
206c61749bSAndreas Gohr                    'sitetools',
216c61749bSAndreas Gohr                    array(
226c61749bSAndreas Gohr                        'recent' => tpl_action('recent', 1, 'li', 1),
236c61749bSAndreas Gohr                        'media' => tpl_action('media', 1, 'li', 1),
246c61749bSAndreas Gohr                        'index' => tpl_action('index', 1, 'li', 1),
256c61749bSAndreas Gohr                    )
266c61749bSAndreas Gohr                );
27*6b6e2bd6SMichael Große            }
286c61749bSAndreas Gohr            ?>
296c61749bSAndreas Gohr        </ul>
306c61749bSAndreas Gohr    </div>
316c61749bSAndreas Gohr</nav>
326c61749bSAndreas Gohr
336c61749bSAndreas Gohr
346c61749bSAndreas Gohr<nav class="nav-usermenu">
35b92c574dSJana Deutschländer    <div class="nav"><a href="#sidebar-user-tools" role="heading" aria-level="2">
36fa1028adSAndreas Gohr        <span class="ico"><?php echo inlineSVG(__DIR__ . '/../img/account-settings.svg') ?></span>
37fa1028adSAndreas Gohr        <span class="lbl"><?php echo $lang['user_tools']; ?></span>
389e264cdcSAndreas Gohr    </a></div>
39373f4a8fSAndreas Gohr    <div class="nav-panel level1">
40b92c574dSJana Deutschländer        <ul id="sidebar-user-tools">
416c61749bSAndreas Gohr            <?php /* dokuwiki user tools */
42*6b6e2bd6SMichael Große            if (file_exists(DOKU_INC . 'inc/Menu/UserMenu.php')) {
43*6b6e2bd6SMichael Große                echo (new \dokuwiki\Menu\UserMenu())->getListItems();
44*6b6e2bd6SMichael Große            } else {
45*6b6e2bd6SMichael Große                //Pre-Greebo Backwards compatibility
466c61749bSAndreas Gohr                tpl_toolsevent(
476c61749bSAndreas Gohr                    'usertools',
486c61749bSAndreas Gohr                    array(
496c61749bSAndreas Gohr                        'login' => tpl_action('login', 1, 'li', 1),
50ef84665dSAndreas Gohr                        'profile' => tpl_action('profile', 1, 'li', 1),
516c61749bSAndreas Gohr                        'admin' => tpl_action('admin', 1, 'li', 1),
526c61749bSAndreas Gohr                        'register' => tpl_action('register', 1, 'li', 1),
536c61749bSAndreas Gohr                    )
546c61749bSAndreas Gohr                );
55*6b6e2bd6SMichael Große            }
566c61749bSAndreas Gohr            ?>
576c61749bSAndreas Gohr        </ul>
586c61749bSAndreas Gohr    </div>
596c61749bSAndreas Gohr</nav>
606c61749bSAndreas Gohr
611fc95e4dSAndreas Gohr<?php
621fc95e4dSAndreas Gohr/** @var helper_plugin_starred $plugin_starred */
631fc95e4dSAndreas Gohr$plugin_starred = plugin_load('helper', 'starred');
641fc95e4dSAndreas Gohr$stars = array();
651fc95e4dSAndreas Gohrif($plugin_starred) $stars = $plugin_starred->loadStars();
661fc95e4dSAndreas Gohrif($stars):
671fc95e4dSAndreas Gohr    ?>
681fc95e4dSAndreas Gohr    <nav class="nav-starred">
69b92c574dSJana Deutschländer        <div class="nav"><a href="#sidebar-menu-starred" role="heading" aria-level="2">
701fc95e4dSAndreas Gohr            <span class="ico"><?php echo inlineSVG(__DIR__ . '/../img/star-circle.svg') ?></span>
711fc95e4dSAndreas Gohr            <span class="lbl"><?php echo tpl_getLang('head_menu_starred'); ?></span>
729e264cdcSAndreas Gohr        </a></div>
731fc95e4dSAndreas Gohr        <div class="nav-panel level1 plugin_starred">
74b92c574dSJana Deutschländer            <ul id="sidebar-menu-starred">
751fc95e4dSAndreas Gohr                <?php
761fc95e4dSAndreas Gohr                foreach($stars as $pid => $time) {
771fc95e4dSAndreas Gohr                    echo '<li>';
781fc95e4dSAndreas Gohr                    echo $plugin_starred->starHtml($ID, $pid);
791fc95e4dSAndreas Gohr                    echo '&nbsp;';
801fc95e4dSAndreas Gohr                    echo html_wikilink(":$pid");
811fc95e4dSAndreas Gohr                    echo '</li>';
821fc95e4dSAndreas Gohr                }
831fc95e4dSAndreas Gohr                ?>
841fc95e4dSAndreas Gohr            </ul>
851fc95e4dSAndreas Gohr        </div>
861fc95e4dSAndreas Gohr    </nav>
871fc95e4dSAndreas Gohr<?php endif; ?>
881fc95e4dSAndreas Gohr
891fc95e4dSAndreas Gohr
906c61749bSAndreas Gohr
916c61749bSAndreas Gohr<?php if($conf['breadcrumbs']): ?>
924055de39SAndreas Gohr    <nav class="nav-trace">
93b92c574dSJana Deutschländer        <div class="nav"><a href="#sidebar-menu_trace" role="heading" aria-level="2">
94fa1028adSAndreas Gohr            <span class="ico"><?php echo inlineSVG(__DIR__ . '/../img/apple-safari.svg') ?></span>
95fa1028adSAndreas Gohr            <span class="lbl"><?php echo tpl_getLang('head_menu_trace'); ?></span>
969e264cdcSAndreas Gohr        </a></div>
97373f4a8fSAndreas Gohr        <div class="nav-panel level1">
98b92c574dSJana Deutschländer            <ul id="sidebar-menu_trace">
996c61749bSAndreas Gohr                <?php /* trace breadcrumbs as list */
1006c61749bSAndreas Gohr                // FIXME move to helper class
1016c61749bSAndreas Gohr                $crumbs = breadcrumbs();
1026c61749bSAndreas Gohr                $crumbs = array_reverse($crumbs, true);
1036c61749bSAndreas Gohr                foreach($crumbs as $id => $name) {
1046c61749bSAndreas Gohr                    echo '<li>';
10583e6372cSAndreas Gohr                    tpl_link(wl($id), hsc($name), 'title="' . $id . '"');
1066c61749bSAndreas Gohr                    echo '</li>';
1076c61749bSAndreas Gohr                }
1086c61749bSAndreas Gohr                ?>
1096c61749bSAndreas Gohr            </ul>
1106c61749bSAndreas Gohr        </div>
1114055de39SAndreas Gohr    </nav>
1126c61749bSAndreas Gohr<?php endif ?>
113