Merge branch 'starred' into 'master'

SPR-940 Starred Plugin Integration

See merge request !41
This commit is contained in:
Jana Deutschländer 2017-04-24 14:06:04 +02:00
commit d80bb21849
6 changed files with 73 additions and 5 deletions

View file

@ -2,9 +2,38 @@
* This file provides styles for starred plugin
*/
.page-attributes {
li.plugin_starred {
.starred svg {
margin-top: .1em;
width: 1.6em;
height: 1.6em;
font-size: 0.82rem;
fill: @ini_nav_menu_color;
}
/* + + + + + global + + + + + */
.starred.on svg {
fill: @ini_link;
}
#dokuwiki__site {
a:hover,
a:active {
.starred svg {
fill: @ini_nav_menu_hover_bg;
}
}
}
}
nav.nav-starred {
ul {
list-style: none;
li {
margin-left: 0;
svg {
vertical-align: middle;
}
}
}
}

1
img/star-circle.svg Normal file
View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M16.23 18L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23L16.23 18M12 2C6.47 2 2 6.5 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2z"/></svg>

After

Width:  |  Height:  |  Size: 275 B

View file

@ -23,6 +23,7 @@ $lang['head_menu_status'] = 'site status';
$lang['head_breadcrumb'] = 'location indicator';
$lang['head_menu_trace'] = 'Last Visited Pages';
$lang['head_meta_box'] = 'meta data for this page';
$lang['head_menu_starred'] = 'Starred Pages';
$lang['jump_to_quicksearch'] = 'Jump to quick search';

View file

@ -105,6 +105,7 @@ css/plugins/edittable.less = all
css/plugins/extension__manager.less = all
css/plugins/folded.less = all
css/plugins/configmanager.less = all
css/plugins/starred.less = all
; _____________ print styles _____________

View file

@ -48,6 +48,35 @@
</div>
</nav>
<?php
/** @var helper_plugin_starred $plugin_starred */
$plugin_starred = plugin_load('helper', 'starred');
$stars = array();
if($plugin_starred) $stars = $plugin_starred->loadStars();
if($stars):
?>
<nav class="nav-starred">
<a class="nav" role="heading" aria-level="2">
<span class="ico"><?php echo inlineSVG(__DIR__ . '/../img/star-circle.svg') ?></span>
<span class="lbl"><?php echo tpl_getLang('head_menu_starred'); ?></span>
</a>
<div class="nav-panel level1 plugin_starred">
<ul>
<?php
foreach($stars as $pid => $time) {
echo '<li>';
echo $plugin_starred->starHtml($ID, $pid);
echo '&nbsp;';
echo html_wikilink(":$pid");
echo '</li>';
}
?>
</ul>
</div>
</nav>
<?php endif; ?>
<?php if($conf['breadcrumbs']): ?>
<nav class="nav-trace">

View file

@ -5,9 +5,10 @@ if(!defined('DOKU_INC')) die();
$doPlugin = plugin_load('helper', 'do');
/** @var \helper_plugin_qc $qcPlugin */
$qcPlugin = plugin_load('helper', 'qc');
/** @var \action_plugin_starred $starredPlugin */
$starredPlugin = plugin_load('action', 'starred');
if($doPlugin !== null || $qcPlugin !== null) {
if($doPlugin !== null || $qcPlugin !== null || $starredPlugin !== null) {
echo '<ul class="page-attributes">';
}
@ -40,6 +41,12 @@ if($doPlugin !== null) {
echo $markup;
}
if($doPlugin !== null || $qcPlugin !== null) {
if($starredPlugin !== null) {
echo '<li class="plugin_starred">';
$starredPlugin->tpl_starred();
echo '</li>';
}
if($doPlugin !== null || $qcPlugin !== null || $starredPlugin !== null) {
echo "</ul>";
}