dokuwiki-template-sprintdoc.../tpl/nav-usertools-buttons.php
Michael Große e302d67fb6
Remove references to removed options
In commit cb7cc643bf the other options
were removed, as discussed.

This commit now removes references to these options from the codebase.

SPR-754
2017-04-18 13:24:33 +02:00

55 lines
2.5 KiB
PHP
Executable file

<?php
if (!defined('DOKU_INC')) die();
if ($conf['useacl'] && $showTools): ?>
<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'])) {
$tasks = $doplugin->loadTasks(array('status' => array('undone'),'user' => $_SERVER['REMOTE_USER']));
$num = count($tasks);
switch ($num) {
case 0: $class = 'noopentasks'; break;
case 1: $class = 'opentask'; break;
default:
$class = 'opentask opentasks';
break;
}
$doInner = "<span class=\"prefix\">".tpl_getLang('prefix_tasks_user')." </span><span class=\"num\">".count($tasks)."</span>";
if($linktarget){
if (substr($linktarget, 0, 1) !== ':') {
$linktarget = 'user:' . $_SERVER['REMOTE_USER'] .':' . 'dashboard';
}
if($num == 0){
echo '<li class="user-task '.$class.'"><strong>'.$doInner.'</strong></li>';
}else{
echo '<li class="user-task '.$class.'"><a href="'.wl($linktarget).'">'.$doInner.'</a></li>';
}
}
else{
echo '<li class="user-task '.$class.'"><strong>'.$doInner.'</strong></li>';
}
} ?>
</ul>
</nav><!-- #dokuwiki__usertools -->
<?php endif ?>