xref: /template/sprintdoc/tpl/main-sidebar-nav.php (revision c1e0eaa8303a36a2701cb9109f231a7ab8d2c2bf)
1*c1e0eaa8SAndreas Gohr
2*c1e0eaa8SAndreas Gohr<?php
3*c1e0eaa8SAndreas Gohrecho \dokuwiki\template\sprintdoc\Template::getInstance()->getNavigation();
46c61749bSAndreas Gohr?>
56c61749bSAndreas Gohr
66c61749bSAndreas Gohr<nav class="nav-sitetools">
7b92c574dSJana Deutschländer    <div class="nav"><a href="#sidebar-site-tools" role="heading" aria-level="2">
8fa1028adSAndreas Gohr        <span class="ico"><?php echo inlineSVG(__DIR__ . '/../img/sitemap.svg') ?></span>
9fa1028adSAndreas Gohr        <span class="lbl"><?php echo $lang['site_tools']; ?></span>
109e264cdcSAndreas Gohr    </a></div>
11373f4a8fSAndreas Gohr    <div class="nav-panel level1">
12d23a0779SMichael Große        <ul id="sidebar-site-tools" class="toollist">
136c61749bSAndreas Gohr            <?php
146b6e2bd6SMichael Große            if (file_exists(DOKU_INC . 'inc/Menu/SiteMenu.php')) {
15d23a0779SMichael Große                echo (new \dokuwiki\Menu\SiteMenu())->getListItems('toollist__listitem ');
166b6e2bd6SMichael Große            } else {
176b6e2bd6SMichael Große                //Pre-Greebo Backwards compatibility
186c61749bSAndreas Gohr                tpl_toolsevent(
196c61749bSAndreas Gohr                    'sitetools',
206c61749bSAndreas Gohr                    array(
216c61749bSAndreas Gohr                        'recent' => tpl_action('recent', 1, 'li', 1),
226c61749bSAndreas Gohr                        'media' => tpl_action('media', 1, 'li', 1),
236c61749bSAndreas Gohr                        'index' => tpl_action('index', 1, 'li', 1),
246c61749bSAndreas Gohr                    )
256c61749bSAndreas Gohr                );
266b6e2bd6SMichael Große            }
276c61749bSAndreas Gohr            ?>
286c61749bSAndreas Gohr        </ul>
296c61749bSAndreas Gohr    </div>
306c61749bSAndreas Gohr</nav>
316c61749bSAndreas Gohr
326c61749bSAndreas Gohr
336c61749bSAndreas Gohr<nav class="nav-usermenu">
34b92c574dSJana Deutschländer    <div class="nav"><a href="#sidebar-user-tools" role="heading" aria-level="2">
35fa1028adSAndreas Gohr        <span class="ico"><?php echo inlineSVG(__DIR__ . '/../img/account-settings.svg') ?></span>
36fa1028adSAndreas Gohr        <span class="lbl"><?php echo $lang['user_tools']; ?></span>
379e264cdcSAndreas Gohr    </a></div>
38373f4a8fSAndreas Gohr    <div class="nav-panel level1">
39d23a0779SMichael Große        <ul id="sidebar-user-tools" class="toollist">
406c61749bSAndreas Gohr            <?php /* dokuwiki user tools */
416b6e2bd6SMichael Große            if (file_exists(DOKU_INC . 'inc/Menu/UserMenu.php')) {
42d23a0779SMichael Große                echo (new \dokuwiki\Menu\UserMenu())->getListItems('toollist__listitem ');
436b6e2bd6SMichael Große            } else {
446b6e2bd6SMichael Große                //Pre-Greebo Backwards compatibility
456c61749bSAndreas Gohr                tpl_toolsevent(
466c61749bSAndreas Gohr                    'usertools',
476c61749bSAndreas Gohr                    array(
486c61749bSAndreas Gohr                        'login' => tpl_action('login', 1, 'li', 1),
49ef84665dSAndreas Gohr                        'profile' => tpl_action('profile', 1, 'li', 1),
506c61749bSAndreas Gohr                        'admin' => tpl_action('admin', 1, 'li', 1),
516c61749bSAndreas Gohr                        'register' => tpl_action('register', 1, 'li', 1),
526c61749bSAndreas Gohr                    )
536c61749bSAndreas Gohr                );
546b6e2bd6SMichael Große            }
556c61749bSAndreas Gohr            ?>
566c61749bSAndreas Gohr        </ul>
576c61749bSAndreas Gohr    </div>
586c61749bSAndreas Gohr</nav>
596c61749bSAndreas Gohr
601fc95e4dSAndreas Gohr<?php
611fc95e4dSAndreas Gohr/** @var helper_plugin_starred $plugin_starred */
621fc95e4dSAndreas Gohr$plugin_starred = plugin_load('helper', 'starred');
631fc95e4dSAndreas Gohr$stars = array();
641fc95e4dSAndreas Gohrif($plugin_starred) $stars = $plugin_starred->loadStars();
651fc95e4dSAndreas Gohrif($stars):
661fc95e4dSAndreas Gohr    ?>
671fc95e4dSAndreas Gohr    <nav class="nav-starred">
68b92c574dSJana Deutschländer        <div class="nav"><a href="#sidebar-menu-starred" role="heading" aria-level="2">
691fc95e4dSAndreas Gohr            <span class="ico"><?php echo inlineSVG(__DIR__ . '/../img/star-circle.svg') ?></span>
701fc95e4dSAndreas Gohr            <span class="lbl"><?php echo tpl_getLang('head_menu_starred'); ?></span>
719e264cdcSAndreas Gohr        </a></div>
721fc95e4dSAndreas Gohr        <div class="nav-panel level1 plugin_starred">
73b92c574dSJana Deutschländer            <ul id="sidebar-menu-starred">
741fc95e4dSAndreas Gohr                <?php
751fc95e4dSAndreas Gohr                foreach($stars as $pid => $time) {
761fc95e4dSAndreas Gohr                    echo '<li>';
771fc95e4dSAndreas Gohr                    echo $plugin_starred->starHtml($ID, $pid);
781fc95e4dSAndreas Gohr                    echo '&nbsp;';
791fc95e4dSAndreas Gohr                    echo html_wikilink(":$pid");
801fc95e4dSAndreas Gohr                    echo '</li>';
811fc95e4dSAndreas Gohr                }
821fc95e4dSAndreas Gohr                ?>
831fc95e4dSAndreas Gohr            </ul>
841fc95e4dSAndreas Gohr        </div>
851fc95e4dSAndreas Gohr    </nav>
861fc95e4dSAndreas Gohr<?php endif; ?>
871fc95e4dSAndreas Gohr
881fc95e4dSAndreas Gohr
896c61749bSAndreas Gohr
906c61749bSAndreas Gohr<?php if($conf['breadcrumbs']): ?>
914055de39SAndreas Gohr    <nav class="nav-trace">
92b92c574dSJana Deutschländer        <div class="nav"><a href="#sidebar-menu_trace" role="heading" aria-level="2">
93fa1028adSAndreas Gohr            <span class="ico"><?php echo inlineSVG(__DIR__ . '/../img/apple-safari.svg') ?></span>
94fa1028adSAndreas Gohr            <span class="lbl"><?php echo tpl_getLang('head_menu_trace'); ?></span>
959e264cdcSAndreas Gohr        </a></div>
96373f4a8fSAndreas Gohr        <div class="nav-panel level1">
97b92c574dSJana Deutschländer            <ul id="sidebar-menu_trace">
986c61749bSAndreas Gohr                <?php /* trace breadcrumbs as list */
996c61749bSAndreas Gohr                // FIXME move to helper class
1006c61749bSAndreas Gohr                $crumbs = breadcrumbs();
1016c61749bSAndreas Gohr                $crumbs = array_reverse($crumbs, true);
1026c61749bSAndreas Gohr                foreach($crumbs as $id => $name) {
1036c61749bSAndreas Gohr                    echo '<li>';
10483e6372cSAndreas Gohr                    tpl_link(wl($id), hsc($name), 'title="' . $id . '"');
1056c61749bSAndreas Gohr                    echo '</li>';
1066c61749bSAndreas Gohr                }
1076c61749bSAndreas Gohr                ?>
1086c61749bSAndreas Gohr            </ul>
1096c61749bSAndreas Gohr        </div>
1104055de39SAndreas Gohr    </nav>
1116c61749bSAndreas Gohr<?php endif ?>
112