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
|
@ -27,15 +27,15 @@ if($doPlugin !== null) {
|
|||
$title = tpl_getLang('tasks_page_none');
|
||||
} elseif($count['undone'] == 0) { // all tasks done
|
||||
$class = 'do_done';
|
||||
$title = $this->getLang('title_alldone');
|
||||
$title = $doPlugin->getLang('title_alldone');
|
||||
} elseif($count['late'] == 0) { // open tasks but none late
|
||||
$class = 'do_undone';
|
||||
$title = sprintf(tpl_getLang('title_intime'), $count['undone']);
|
||||
$title = sprintf(tpl_getLang('tasks_page_intime'), $count['undone']);
|
||||
} else { // late tasks
|
||||
$class = 'do_late';
|
||||
$title = sprintf(tpl_getLang('title_late'), $count['undone'], $count['late']);
|
||||
$title = sprintf(tpl_getLang('tasks_page_late'), $count['undone'], $count['late']);
|
||||
}
|
||||
$markup = "<li class=\"plugin__do_pagetasks " . $class . "\" title=\"'.$title.'\"><strong><span class=\"prefix\">" . tpl_getLang('prefix_tasks_page') . " </span><span class=\"num\">" . $num . "</span></strong></li>";
|
||||
$markup = "<li class=\"plugin__do_pagetasks $class\" title=\"$title\"><strong><span class=\"prefix\">" . tpl_getLang('prefix_tasks_page') . " </span><span class=\"num\">$num</span></strong></li>";
|
||||
|
||||
echo $markup;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue