put login tools in sidebar

This commit is contained in:
prx 2023-12-06 15:57:58 +01:00
parent a0c22f7d9c
commit d0fc1e5b27
1 changed files with 15 additions and 19 deletions

View File

@ -29,24 +29,6 @@ $buffer = ob_get_clean();
<?php html_msgarea() /* occasional error and info messages on top of the page */ ?>
<?php tpl_includeFile('header.html') ?>
<!-- USER TOOLS -->
<?php if ($conf['useacl'] && $showTools): ?>
<nav id="dokuwiki__usertools" aria-labelledby="dokuwiki__sitetools_heading">
<h3 class="a11y" id="dokuwiki__usertools_heading"><?php echo $lang['user_tools'] ?></h3>
<ul>
<?php if (!empty($_SERVER['REMOTE_USER'])) {
echo '<li class="user">';
tpl_userinfo(); /* 'Logged in as ...' */
echo '</li>';
} ?>
<?php if (file_exists(DOKU_INC . 'inc/Menu/UserMenu.php')) {
/* the first parameter is for an additional class, the second for if SVGs should be added */
echo (new \dokuwiki\Menu\UserMenu())->getListItems('action ', false);
} ?>
</ul>
</nav>
<?php endif ?>
<?php
// get logo either out of the template images folder or data/media folder
$logoSize = array();
@ -70,13 +52,14 @@ $buffer = ob_get_clean();
<?php tpl_searchform() ?>
</div>
<!-- TOC AND TOOLS IN SIDENAV -->
<a id="dokuwiki__sidebar_show_btn" class="button" href="#dokuwiki__sidebar" class="button" ></a>
<div id="dokuwiki__sidebar" aria-labelledby="dokuwiki__sitetools_heading">
<div id="dokuwiki__sidebar_header">
<a href="#dokuwiki__sidebar_close" id="dokuwiki__sidebar_close_btn" class="button" aria-label="Close">&times;</a>
</div>
<div id="dokuwiki__sidebar_content">
<?php if ($showSidebar): ?>
<?php tpl_includeFile('sidebarheader.html') ?>
@ -88,6 +71,19 @@ $buffer = ob_get_clean();
<details id="dokuwiki__pagetools" aria-labelledby="dokuwiki__pagetools_heading">
<summary id="dokuwiki__pagetools_heading"><?php echo $lang['tools'] ?></summary>
<ul>
<!-- USER TOOLS -->
<?php if ($conf['useacl'] && $showTools): ?>
<?php if (!empty($_SERVER['REMOTE_USER'])) {
echo '<li class="user">';
tpl_userinfo(); /* 'Logged in as ...' */
echo '</li>';
} ?>
<?php if (file_exists(DOKU_INC . 'inc/Menu/UserMenu.php')) {
/* the first parameter is for an additional class, the second for if SVGs should be added */
echo (new \dokuwiki\Menu\UserMenu())->getListItems('action ', false);
} ?>
<?php endif ?>
<?php if (file_exists(DOKU_INC . 'inc/Menu/PageMenu.php')) {
echo (new \dokuwiki\Menu\PageMenu())->getListItems('action ', false);
} else {