1<?php 2if(!defined('DOKU_INC')) die(); 3 4/** @var \helper_plugin_do $doPlugin */ 5$doPlugin = plugin_load('helper', 'do'); 6/** @var \helper_plugin_qc $qcPlugin */ 7$qcPlugin = plugin_load('helper', 'qc'); 8 9 10if($doPlugin !== null || $qcPlugin !== null) { 11 echo '<ul class="page-attributes">'; 12} 13 14 15if($qcPlugin && $qcPlugin->shouldShow()) { 16 echo '<li class="plugin_qc"><a href="#">…</a></li>'; // filled by javascript 17} 18 19 20if($doPlugin !== null) { 21 $count = $doPlugin->getPageTaskCount(); 22 $num = $count['count']; 23 $title = ""; 24 25 if($num == 0) { // no tasks - does not exist do in plug-in 26 $class = "do_none"; 27 $title = tpl_getLang('tasks_page_none'); 28 } elseif($count['undone'] == 0) { // all tasks done 29 $class = 'do_done'; 30 $title = $doPlugin->getLang('title_alldone'); 31 } elseif($count['late'] == 0) { // open tasks but none late 32 $class = 'do_undone'; 33 $title = sprintf(tpl_getLang('tasks_page_intime'), $count['undone']); 34 } else { // late tasks 35 $class = 'do_late'; 36 $title = sprintf(tpl_getLang('tasks_page_late'), $count['undone'], $count['late']); 37 } 38 $markup = "<li class=\"plugin_do_pagetasks $class\" title=\"$title\"><strong><span class=\"num\">{$count['undone']}</span><span class=\"prefix\">" . tpl_getLang('prefix_tasks_page') . " </span></strong></li>"; 39 40 echo $markup; 41} 42 43if($doPlugin !== null || $qcPlugin !== null) { 44 echo "</ul>"; 45} 46