Merge branch 'master' into pageattributes
Adjusted some more files to account for changes in the over 100 commits in master since the creation of this branch. SPR-869
This commit is contained in:
commit
3f9d4d521a
85 changed files with 4162 additions and 1910 deletions
|
@ -1,13 +1,6 @@
|
|||
<?php
|
||||
if(!defined('DOKU_INC')) die();
|
||||
|
||||
echo '<div class="menu-togglelink mobile-only">';
|
||||
echo '<a href="#">';
|
||||
echo inlineSVG(__DIR__ . '/../img/menu.svg');
|
||||
echo '<span class="sr-out">'.tpl_getLang('a11y_sidebartoggle').'</span>';
|
||||
echo '</a>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div class="logo">';
|
||||
\dokuwiki\template\sprintdoc\Template::getInstance()->mainLogo();
|
||||
echo '<hr class="structure" />';
|
||||
|
|
|
@ -9,6 +9,9 @@ $tabs = \dokuwiki\template\sprintdoc\Template::getInstance()->getMetaBoxTabs();
|
|||
<li class="a11y"> </li>
|
||||
<?php
|
||||
foreach($tabs as $tab) {
|
||||
if (empty($tab['tab']) || trim($tab['tab']) === '') {
|
||||
continue;
|
||||
}
|
||||
echo '<li class="' . $tab['id'] . '">';
|
||||
echo '<a href="#' . $tab['id'] . '" aria-expanded="false">';
|
||||
echo '<span class="prefix">';
|
||||
|
@ -27,6 +30,9 @@ $tabs = \dokuwiki\template\sprintdoc\Template::getInstance()->getMetaBoxTabs();
|
|||
<div class="box-content">
|
||||
<?php
|
||||
foreach($tabs as $tab) {
|
||||
if (empty($tab['tab']) || trim($tab['tab']) === '') {
|
||||
continue;
|
||||
}
|
||||
echo '<div id="' . $tab['id'] . '" class="tab-pane" aria-hidden="true">';
|
||||
echo $tab['tab'];
|
||||
echo '</div>';
|
||||
|
|
|
@ -30,10 +30,10 @@ if($doPlugin !== null) {
|
|||
$title = $this->getLang('title_alldone');
|
||||
} elseif($count['late'] == 0) { // open tasks but none late
|
||||
$class = 'do_undone';
|
||||
$title = sprintf($this->getLang('title_intime'), $count['undone']);
|
||||
$title = sprintf(tpl_getLang('title_intime'), $count['undone']);
|
||||
} else { // late tasks
|
||||
$class = 'do_late';
|
||||
$title = sprintf($this->getLang('title_late'), $count['undone'], $count['late']);
|
||||
$title = sprintf(tpl_getLang('title_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>";
|
||||
|
||||
|
|
|
@ -7,16 +7,87 @@
|
|||
<div class="tools">
|
||||
|
||||
<?php include('nav-status.php');?>
|
||||
<ul>
|
||||
<?php tpl_toolsevent('pagetools', array(
|
||||
'edit' => tpl_action('edit', 1, 'li', 1),
|
||||
'revisions' => tpl_action('revisions', 1, 'li', 1),
|
||||
'backlink' => tpl_action('backlink', 1, 'li', 1),
|
||||
'subscribe' => tpl_action('subscribe', 1, 'li', 1),
|
||||
'revert' => tpl_action('revert', 1, 'li', 1),
|
||||
'top' => tpl_action('top', 1, 'li', 1),
|
||||
)); ?>
|
||||
</ul>
|
||||
<ul>
|
||||
<?php
|
||||
$data = array(
|
||||
'view' => 'main-svg',
|
||||
'items' => array(
|
||||
'edit' => dokuwiki\template\sprintdoc\tpl::pageToolAction('edit'),
|
||||
'revert' => dokuwiki\template\sprintdoc\tpl::pageToolAction('revert'),
|
||||
'revisions' => dokuwiki\template\sprintdoc\tpl::pageToolAction('revisions'),
|
||||
'backlink' => dokuwiki\template\sprintdoc\tpl::pageToolAction('backlink'),
|
||||
'subscribe' => dokuwiki\template\sprintdoc\tpl::pageToolAction('subscribe'),
|
||||
'top' => dokuwiki\template\sprintdoc\tpl::pageToolAction('top'),
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
foreach ($data['items'] as $k => $html) {
|
||||
if ($html) {
|
||||
echo "<li>$html</li>";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
* Begin shims as a temporary solution until the svg-approach is mainlined and the plugins have adapted
|
||||
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
*/
|
||||
global $ACT;
|
||||
if (act_clean($ACT) === 'show') {
|
||||
/** @var action_plugin_move_rename $move */
|
||||
$move = plugin_load('action', 'move_rename');
|
||||
if ($move && $move->getConf('pagetools_integration')) {
|
||||
$attr = array(
|
||||
'style' => 'background-image: none;',
|
||||
);
|
||||
$item = \dokuwiki\template\sprintdoc\tpl::pageToolItem('', $move->getLang('renamepage'), __DIR__ . '/../images/tools/41-format-paint.svg', $attr);
|
||||
echo '<li class="plugin_move_page">' . $item . '</li>';
|
||||
}
|
||||
|
||||
/** @var action_plugin_odt_export $odt */
|
||||
$odt = plugin_load('action', 'odt_export');
|
||||
if ($odt && $odt->getConf('showexportbutton')) {
|
||||
global $ID, $REV;
|
||||
$params = array('do' => 'export_odt');
|
||||
if ($REV) {
|
||||
$params['rev'] = $REV;
|
||||
}
|
||||
$attr = array(
|
||||
'class' => 'action export_pdf',
|
||||
'style' => 'background-image: none;',
|
||||
);
|
||||
$svg = __DIR__ . '/../images/tools/43-file-delimeted.svg';
|
||||
$item = \dokuwiki\template\sprintdoc\tpl::pageToolItem(wl($ID, $params, false, '&'), $odt->getLang('export_odt_button'), $svg, $attr);
|
||||
echo '<li>' . $item . '</li>';
|
||||
}
|
||||
|
||||
/** @var action_plugin_dw2pdf $dw2pdf */
|
||||
$dw2pdf = plugin_load('action', 'dw2pdf');
|
||||
if ($dw2pdf && $dw2pdf->getConf('showexportbutton')) {
|
||||
global $ID, $REV;
|
||||
|
||||
$params = array('do' => 'export_pdf');
|
||||
if ($REV) {
|
||||
$params['rev'] = $REV;
|
||||
}
|
||||
$attr = array(
|
||||
'class' => 'action export_pdf',
|
||||
'style' => 'background-image: none;',
|
||||
);
|
||||
$svg = __DIR__ . '/../images/tools/40-pdf-file.svg';
|
||||
$item = \dokuwiki\template\sprintdoc\tpl::pageToolItem(wl($ID, $params, false, '&'), $dw2pdf->getLang('export_pdf_button'), $svg, $attr);
|
||||
echo '<li>' . $item . '</li>';
|
||||
}
|
||||
}
|
||||
/**
|
||||
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
* End of shims
|
||||
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
*/
|
||||
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -3,52 +3,53 @@
|
|||
|
||||
if ($conf['useacl'] && $showTools): ?>
|
||||
|
||||
<nav id="dokuwiki__usertools" class="nav-usertools <?php echo $navClass?>">
|
||||
<h6 class="sr-only" role="heading" aria-level="2"><?php echo $lang['user_tools']; ?></h6>
|
||||
<ul>
|
||||
<li class="log"><?php tpl_actionlink('login'); ?></li>
|
||||
<?php
|
||||
if (!empty($_SERVER['REMOTE_USER'])) {
|
||||
echo '<li class="user"><span class="sr-only">'.$lang['loggedinas'].' </span>'.userlink().'</li>';
|
||||
}?>
|
||||
<nav id="dokuwiki__usertools" class="nav-usertools <?php echo $navClass?>">
|
||||
<h6 class="sr-only" role="heading" aria-level="2"><?php echo $lang['user_tools']; ?></h6>
|
||||
<ul>
|
||||
<li class="log"><?php tpl_actionlink('login'); ?></li>
|
||||
|
||||
<?php /* tasks do Plug-In */
|
||||
/** @var \helper_plugin_do $doplugin */
|
||||
$doplugin = plugin_load('helper','do');
|
||||
if ($doplugin !== null && isset($_SERVER['REMOTE_USER'])) {
|
||||
$tasks = $doplugin->loadTasks(array('status' => array('undone'),'user' => $_SERVER['REMOTE_USER']));
|
||||
$num = count($tasks);
|
||||
switch ($num) {
|
||||
case 0: $class = 'noopentasks'; break;
|
||||
case 1: $class = 'opentask'; break;
|
||||
default:
|
||||
$class = 'opentask opentasks';
|
||||
break;
|
||||
}
|
||||
$linktarget = tpl_getConf('tasks_page');
|
||||
$doInner = "<span class=\"prefix\">".tpl_getLang('prefix_tasks_user')." </span><span class=\"num\">".count($tasks)."</span>";
|
||||
if($linktarget){
|
||||
if (substr($linktarget, 0, 1) !== ':') {
|
||||
$linktarget = tpl_getConf('user_ns'). $_SERVER['REMOTE_USER'] .':' . $linktarget;
|
||||
}
|
||||
if($num == 0){
|
||||
echo '<li class="user-task '.$class.'"><strong>'.$doInner.'</strong></li>';
|
||||
}else{
|
||||
echo '<li class="user-task '.$class.'"><a href="'.wl($linktarget).'">'.$doInner.'</a></li>';
|
||||
}
|
||||
}
|
||||
else{
|
||||
echo '<li class="user-task '.$class.'"><strong>'.$doInner.'</strong></li>';
|
||||
}
|
||||
} ?>
|
||||
<?php
|
||||
if (!empty($_SERVER['REMOTE_USER'])) {
|
||||
echo '<li class="user"><span class="sr-only">'.$lang['loggedinas'].' </span>'.userlink().'</li>';
|
||||
}?>
|
||||
|
||||
<?php /* dokuwiki user tools */
|
||||
tpl_toolsevent('usertools', array(
|
||||
'admin' => tpl_action('admin', 1, 'li', 1),
|
||||
'register' => tpl_action('register', 1, 'li', 1),
|
||||
)); ?>
|
||||
<?php /* dokuwiki user tools */
|
||||
tpl_toolsevent('usertools', array(
|
||||
'admin' => tpl_action('admin', 1, 'li', 1),
|
||||
'register' => tpl_action('register', 1, 'li', 1),
|
||||
)); ?>
|
||||
|
||||
</ul>
|
||||
</nav><!-- #dokuwiki__usertools -->
|
||||
<?php /* tasks do Plug-In */
|
||||
/** @var \helper_plugin_do $doplugin */
|
||||
$doplugin = plugin_load('helper','do');
|
||||
if ($doplugin !== null && isset($_SERVER['REMOTE_USER'])) {
|
||||
$tasks = $doplugin->loadTasks(array('status' => array('undone'),'user' => $_SERVER['REMOTE_USER']));
|
||||
$num = count($tasks);
|
||||
switch ($num) {
|
||||
case 0: $class = 'noopentasks'; break;
|
||||
case 1: $class = 'opentask'; break;
|
||||
default:
|
||||
$class = 'opentask opentasks';
|
||||
break;
|
||||
}
|
||||
$linktarget = tpl_getConf('tasks_page');
|
||||
$doInner = "<span class=\"prefix\">".tpl_getLang('prefix_tasks_user')." </span><span class=\"num\">".count($tasks)."</span>";
|
||||
if($linktarget){
|
||||
if (substr($linktarget, 0, 1) !== ':') {
|
||||
$linktarget = tpl_getConf('user_ns'). $_SERVER['REMOTE_USER'] .':' . $linktarget;
|
||||
}
|
||||
if($num == 0){
|
||||
echo '<li class="user-task '.$class.'"><strong>'.$doInner.'</strong></li>';
|
||||
}else{
|
||||
echo '<li class="user-task '.$class.'"><a href="'.wl($linktarget).'">'.$doInner.'</a></li>';
|
||||
}
|
||||
}
|
||||
else{
|
||||
echo '<li class="user-task '.$class.'"><strong>'.$doInner.'</strong></li>';
|
||||
}
|
||||
} ?>
|
||||
|
||||
</ul>
|
||||
</nav><!-- #dokuwiki__usertools -->
|
||||
<?php endif ?>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue