
Motivation ---------- Since we do not have a dashboard it would be useful to directly see one's task on click upon the respective icon. Also this is most likely the dominating reason of the dashboard-usage. Implementation Decisions ------------------------ * Use SVG: Since we move towards using SVG everywhere in DokuWiki, I decided to use a SVG icon here as well. This makes it compatible with other templates too, without introducing an icon-font there. * Using a `<span>` instead of a `<strong>`: I do not see the semantic reason behind using a `<strong>` here. Other Changes ------------- * The styles related to the do-plugin have been moved from css/area_nav-usertools.less to css/plugins/do_tasks.less This needs the respective pull request merged from the do-plugin: https://github.com/cosmocode/do/pull/31 SPR-962
36 lines
1.3 KiB
PHP
Executable file
36 lines
1.3 KiB
PHP
Executable file
<?php
|
|
if (!defined('DOKU_INC')) die();
|
|
|
|
if ($conf['useacl']): ?>
|
|
|
|
<nav id="dokuwiki__usertools" class="nav-usertools <?php echo $navClass?>">
|
|
<h6 class="sr-only" role="heading" aria-level="2"><?php echo $lang['user_tools']; ?></h6>
|
|
<ul>
|
|
<li class="log"><?php tpl_actionlink('login'); ?></li>
|
|
|
|
<?php
|
|
if (!empty($_SERVER['REMOTE_USER'])) {
|
|
echo '<li class="user"><span class="sr-only">'.$lang['loggedinas'].' </span>'.userlink().'</li>';
|
|
}?>
|
|
|
|
<?php /* dokuwiki user tools */
|
|
tpl_toolsevent('usertools', array(
|
|
'admin' => tpl_action('admin', 1, 'li', 1),
|
|
'register' => tpl_action('register', 1, 'li', 1),
|
|
)); ?>
|
|
|
|
<?php /* tasks do Plug-In */
|
|
/** @var \helper_plugin_do $doplugin */
|
|
$doplugin = plugin_load('helper','do');
|
|
if ($doplugin !== null && isset($_SERVER['REMOTE_USER'])) {
|
|
$icon = $doplugin->tpl_getUserTasksIconHTML();
|
|
if ($icon) {
|
|
echo '<li class="user-task">' . $icon . '</li>';
|
|
}
|
|
}
|
|
?>
|
|
|
|
</ul>
|
|
</nav><!-- #dokuwiki__usertools -->
|
|
<?php endif ?>
|
|
|