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