1fbf9e9d6SAndreas Gohr<?php 2fbf9e9d6SAndreas Gohrif(!defined('DOKU_INC')) die(); 3fbf9e9d6SAndreas Gohr 4fbf9e9d6SAndreas Gohr/** @var \helper_plugin_do $doPlugin */ 5fbf9e9d6SAndreas Gohr$doPlugin = plugin_load('helper', 'do'); 6fbf9e9d6SAndreas Gohr/** @var \helper_plugin_qc $qcPlugin */ 7fbf9e9d6SAndreas Gohr$qcPlugin = plugin_load('helper', 'qc'); 8d4c5a424SAndreas Gohr/** @var \action_plugin_starred $starredPlugin */ 9d4c5a424SAndreas Gohr$starredPlugin = plugin_load('action', 'starred'); 10fbf9e9d6SAndreas Gohr 11d4c5a424SAndreas Gohrif($doPlugin !== null || $qcPlugin !== null || $starredPlugin !== null) { 12fbf9e9d6SAndreas Gohr echo '<ul class="page-attributes">'; 13fbf9e9d6SAndreas Gohr} 14fbf9e9d6SAndreas Gohr 15fbf9e9d6SAndreas Gohr 16fbf9e9d6SAndreas Gohrif($qcPlugin && $qcPlugin->shouldShow()) { 17fbf9e9d6SAndreas Gohr echo '<li class="plugin_qc"><a href="#">…</a></li>'; // filled by javascript 18fbf9e9d6SAndreas Gohr} 19fbf9e9d6SAndreas Gohr 20fbf9e9d6SAndreas Gohr 21fbf9e9d6SAndreas Gohrif($doPlugin !== null) { 22fbf9e9d6SAndreas Gohr $count = $doPlugin->getPageTaskCount(); 23fbf9e9d6SAndreas Gohr $num = $count['count']; 24fbf9e9d6SAndreas Gohr $title = ""; 25fbf9e9d6SAndreas Gohr 26fbf9e9d6SAndreas Gohr if($num == 0) { // no tasks - does not exist do in plug-in 27fbf9e9d6SAndreas Gohr $class = "do_none"; 28fbf9e9d6SAndreas Gohr $title = tpl_getLang('tasks_page_none'); 29fbf9e9d6SAndreas Gohr } elseif($count['undone'] == 0) { // all tasks done 30fbf9e9d6SAndreas Gohr $class = 'do_done'; 31fbf9e9d6SAndreas Gohr $title = $this->getLang('title_alldone'); 32fbf9e9d6SAndreas Gohr } elseif($count['late'] == 0) { // open tasks but none late 33fbf9e9d6SAndreas Gohr $class = 'do_undone'; 343f9d4d52SMichael Große $title = sprintf(tpl_getLang('title_intime'), $count['undone']); 35fbf9e9d6SAndreas Gohr } else { // late tasks 36fbf9e9d6SAndreas Gohr $class = 'do_late'; 373f9d4d52SMichael Große $title = sprintf(tpl_getLang('title_late'), $count['undone'], $count['late']); 38fbf9e9d6SAndreas Gohr } 39fbf9e9d6SAndreas Gohr $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>"; 40fbf9e9d6SAndreas Gohr 41fbf9e9d6SAndreas Gohr echo $markup; 42fbf9e9d6SAndreas Gohr} 43fbf9e9d6SAndreas Gohr 44d4c5a424SAndreas Gohrif($starredPlugin !== null) { 45*728071e8SAndreas Gohr echo '<li class="plugin_starred">'; 46d4c5a424SAndreas Gohr $starredPlugin->tpl_starred(); 47d4c5a424SAndreas Gohr echo '</li>'; 48d4c5a424SAndreas Gohr} 49d4c5a424SAndreas Gohr 50d4c5a424SAndreas Gohrif($doPlugin !== null || $qcPlugin !== null || $starredPlugin !== null) { 51fbf9e9d6SAndreas Gohr echo "</ul>"; 52fbf9e9d6SAndreas Gohr} 53fbf9e9d6SAndreas Gohr 54fbf9e9d6SAndreas Gohr 55fbf9e9d6SAndreas Gohr 56fbf9e9d6SAndreas Gohr/* 57fbf9e9d6SAndreas Gohr 58fbf9e9d6SAndreas Gohr 59fbf9e9d6SAndreas Gohr$out = '<div class="plugin__do_pagetasks" title="' . $title . '"><span class="' . $class . '">'; 60fbf9e9d6SAndreas Gohr$out .= $count['undone']; 61fbf9e9d6SAndreas Gohr$out .= '</span></div>'; 62fbf9e9d6SAndreas Gohr 63fbf9e9d6SAndreas Gohrif($return) return $out; 64fbf9e9d6SAndreas Gohrecho $out;*/ 65