Show more descriptive titles for the do-icons
This should also fix an occasional fatal-error when all tasks on a page are done. We remove here also the $class from the button in the usertools, since it served no apparent purpose. SPR-936
This commit is contained in:
parent
c22ee858b3
commit
1140677f44
3 changed files with 15 additions and 13 deletions
|
@ -25,12 +25,10 @@
|
|||
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;
|
||||
if ($num === 0) {
|
||||
$title = tpl_getLang('tasks_user_none');
|
||||
} else {
|
||||
$title = sprintf(tpl_getLang('tasks_user_intime'), $num);
|
||||
}
|
||||
|
||||
$doInner = "<span class=\"prefix\">".tpl_getLang('prefix_tasks_user')." </span><span class=\"num\">".count($tasks)."</span>";
|
||||
|
@ -38,9 +36,9 @@
|
|||
$userpage = $doplugin->getConf('userpage');
|
||||
if ($userpage && $_SERVER['REMOTE_USER'] && $num > 0) {
|
||||
$linktarget = sprintf($userpage, $_SERVER['REMOTE_USER']) . ':' . 'dashboard';
|
||||
echo '<li class="user-task '.$class.'"><a href="'.wl($linktarget).'">'.$doInner.'</a></li>';
|
||||
echo '<li class="user-task" title="'.$title.'"><a href="'.wl($linktarget).'">'.$doInner.'</a></li>';
|
||||
} else {
|
||||
echo '<li class="user-task '.$class.'"><strong>'.$doInner.'</strong></li>';
|
||||
echo '<li class="user-task" title="'.$title.'"><strong>'.$doInner.'</strong></li>';
|
||||
}
|
||||
} ?>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue