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/** @var \action_plugin_starred $starredPlugin */ 9$starredPlugin = plugin_load('action', 'starred'); 10/** @var \helper_plugin_quicksubscribe $quickSubPlugin */ 11$quickSubPlugin = plugin_load('helper', 'quicksubscribe'); 12 13if($doPlugin !== null || $qcPlugin !== null || $starredPlugin !== null) { 14 echo '<ul class="page-attributes">'; 15} 16 17 18if($qcPlugin && $qcPlugin->shouldShow()) { 19 $qcPrefix = tpl_getLang('quality_trigger'); 20 echo '<li class="plugin_qc"><strong class="sr-out">'.$qcPrefix.':</strong><a href="#"></a></li>'; // filled by javascript 21} 22 23 24if($doPlugin !== null) { 25 $count = $doPlugin->getPageTaskCount(); 26 $num = $count['count']; 27 $title = ""; 28 29 if($num == 0) { // no tasks - does not exist do in plug-in 30 $class = "do_none"; 31 $title = tpl_getLang('tasks_page_none'); 32 } elseif($count['undone'] == 0) { // all tasks done 33 $class = 'do_done'; 34 $title = $doPlugin->getLang('title_alldone'); 35 } elseif($count['late'] == 0) { // open tasks but none late 36 $class = 'do_undone'; 37 $title = sprintf(tpl_getLang('tasks_page_intime'), $count['undone']); 38 } else { // late tasks 39 $class = 'do_late'; 40 $title = sprintf(tpl_getLang('tasks_page_late'), $count['undone'], $count['late']); 41 } 42 43 echo '<li class="plugin_do_pagetasks">'; 44 echo '<span title="'.$title.'" class="'.$class.'">'; 45 echo inlineSVG(DOKU_PLUGIN . 'do/pix/clipboard-text.svg'); 46 echo '</span>'; 47 echo '<span class="num">' . $count['undone'] . '</span>'; 48 echo '</li>'; 49} 50 51if($starredPlugin !== null) { 52 echo '<li class="plugin_starred">'; 53 $starredPlugin->tpl_starred(); 54 echo '</li>'; 55} 56 57if($quickSubPlugin !== null) { 58 echo '<li class="plugin_quicksubscribe">'; 59 echo $quickSubPlugin->tpl_subscribe(); 60 echo '</li>'; 61} 62 63if($doPlugin !== null || $qcPlugin !== null || $starredPlugin !== null) { 64 echo "</ul>"; 65} 66