Merge branch 'greebo' into 'master'

Anpassungen für DokuWiki Master / kommendes DokuWiki Greebo release

See merge request deutschlaender/sprintdoc-template!79
This commit is contained in:
Jana Deutschländer 2018-04-24 14:06:14 +02:00
commit f737ed86ff
17 changed files with 278 additions and 100 deletions

View file

@ -306,8 +306,14 @@
li { li {
&.noissue { &.noissue {
font-size: @font-size-small;
list-style-type: none; list-style-type: none;
margin-left: 0; margin-left: 0;
.li {
font-size: @font-size-small;
margin-left: .5rem;
}
} }
a { a {

View file

@ -31,7 +31,15 @@
nav#dokuwiki__pagetools { nav#dokuwiki__pagetools {
@toolbox-size: 30px; @toolbox-size: 30px;
@page-tools_svg-size: 25px;
@page-tools_svg-space: (@toolbox-size - @page-tools_svg-size) / 2;
@item-width: (@page-tools_svg-size + @page-tools_svg-space + @page-tools_svg-space);
@item-height: (@page-tools_svg-size + @page-tools_svg-space);
top: 3.05rem; top: 3.05rem;
position: absolute;
width: @item-width;
@media @screen_min-md { @media @screen_min-md {
right: -2.5rem; right: -2.5rem;
@ -44,25 +52,37 @@ nav#dokuwiki__pagetools {
@media @screen_max-xxs { @media @screen_max-xxs {
display: none; display: none;
} }
div.tools {
ul { position: fixed;
li { width: @item-width;
@page-tools_svg-size: 25px;
@page-tools_svg-space: (@toolbox-size - @page-tools_svg-size) / 2;
* {
font-size: @font-size-default;
} }
ul {
position: absolute;
right: 0;
text-align: right;
margin: 0;
padding: 0;
/* add transparent border to prevent jumping when proper border is added on hover */
border: 1px solid transparent;
li {
padding: 0;
margin: 0;
list-style: none;
a { a {
.fontello-double(); display: inline-table;
/* add transparent border to prevent jumping when proper border is added on focus */
border: 1px solid transparent;
white-space: nowrap;
vertical-align: middle;
height: @item-height;
position: relative; position: relative;
height: auto; line-height: 20px;
min-height: @toolbox-size; // for nav:hover
width: @toolbox-size; // for nav:hover
font-size: @font-size-default; font-size: @font-size-default;
padding: 2px @toolbox-size 2px 2px; padding: 2px 0 2px 2px;
@media @screen_min-md { @media @screen_min-md {
color: @ini_nav_menu_color; color: @ini_nav_menu_color;
@ -72,10 +92,6 @@ nav#dokuwiki__pagetools {
color: @ini_existing; color: @ini_existing;
} }
* {
color: inherit;
}
&::before { &::before {
display: none; display: none;
} }
@ -91,9 +107,6 @@ nav#dokuwiki__pagetools {
background-image: none; background-image: none;
background-color: @ini_background; background-color: @ini_background;
color: @ini_existing; color: @ini_existing;
padding-top: 2px;
padding-bottom: 2px;
padding-right: 0;
span { span {
position: relative; position: relative;
@ -152,7 +165,6 @@ nav#dokuwiki__pagetools {
background-image: none; background-image: none;
border-color: transparent; border-color: transparent;
color: inherit; color: inherit;
padding: 2px 0 2px 2px;
svg { svg {
border: solid 1px transparent; border: solid 1px transparent;

View file

@ -221,11 +221,35 @@
} }
} }
} // user } // user
} // li } // li
/* + + + icons + + + */ /* + + + icons + + + */
a { .menuitem, button {
padding: 2px 0 0 2px;
min-height: @toggle-size; // overrides button[type="submit"] styles
border: solid 1px @wikiicons-border; // overrides button[type="submit"] styles
.btn-hover();
&:hover svg, &:focus svg {
transition: @transition fill;
fill: @ini_nav_menu_hover_bg;
}
svg {
fill: @ini_nav_menu_hover_color;
height: @font-size-default + (@font-scale-factor * 4);
}
span {
display: none;
}
}
a { // Pre-Greebo backwards compatibility, remove after transitioning to Greebo
.fontello(); .fontello();
.hide-text-show-before(); .hide-text-show-before();
.btn-hover(); .btn-hover();

View file

@ -477,6 +477,10 @@ th {
background-color: @ini_background_alt; background-color: @ini_background_alt;
color: @ini_text_alt; color: @ini_text_alt;
text-align: left; text-align: left;
a {
color: @ini_link_alt;
}
} }
[dir=rtl] th { [dir=rtl] th {

View file

@ -332,19 +332,40 @@
.make-grid(@class) { .make-grid(@class) {
.float-grid-columns(@class); .float-grid-columns(@class);
.loop-grid-columns(@grid-columns, @class, width); .grid-columns(1, @class, width);
.grid-columns(2, @class, width);
.grid-columns(3, @class, width);
.grid-columns(4, @class, width);
.grid-columns(5, @class, width);
.grid-columns(6, @class, width);
.grid-columns(7, @class, width);
.grid-columns(8, @class, width);
.grid-columns(9, @class, width);
.grid-columns(10, @class, width);
.grid-columns(11, @class, width);
.grid-columns(12, @class, width);
} }
.float-grid-columns(@class) { .float-grid-columns(@class) {
.col-@{class}-1, .col-@{class}-2, .col-@{class}-3, .col-@{class}-4, .col-@{class}-5, .col-@{class}-6, .col-@{class}-7, .col-@{class}-8, .col-@{class}-9, .col-@{class}-10, .col-@{class}-11, .col-@{class}-12 { .col-@{class}-1,
.col-@{class}-2,
.col-@{class}-3,
.col-@{class}-4,
.col-@{class}-5,
.col-@{class}-6,
.col-@{class}-7,
.col-@{class}-8,
.col-@{class}-9,
.col-@{class}-10,
.col-@{class}-11,
.col-@{class}-12 {
float: left; float: left;
} }
} }
.loop-grid-columns(@index, @class, @type) when (@index >= 0) { // todo: no recusion - fix it !!!
.grid-columns(@index, @class, @type) {
.calc-grid-column(@index, @class, @type); .calc-grid-column(@index, @class, @type);
// next iteration
.loop-grid-columns((@index - 1), @class, @type);
} }
.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) { .calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {

View file

@ -83,7 +83,7 @@
} }
#spr__meta-box { #spr__meta-box {
z-index: 1; // put meta-box above positioned content-elements such as aggregations, edit-buttons z-index: 10; // put meta-box above positioned content-elements such as aggregations, edit-buttons
ul.meta-tabs > li.active { ul.meta-tabs > li.active {
z-index: 1; // put the active tab above the meta-content in .tab-pane.active z-index: 1; // put the active tab above the meta-content in .tab-pane.active
} }

View file

@ -18,11 +18,17 @@
line-height: @line-height-default; line-height: @line-height-default;
a { a {
color: @ini_existing; //color: @ini_existing;
line-height: @line-height-default; line-height: @line-height-default;
} }
} }
th {
a {
color: @ini_link_alt;
}
}
// search button in table (f.i. "All products") // search button in table (f.i. "All products")
table th input { table th input {
&:not(:focus) { &:not(:focus) {
@ -65,15 +71,19 @@
background-color: @ini_existing; background-color: @ini_existing;
background-image: url("svg.php?svg=file-export.svg&f=background"); background-image: url("svg.php?svg=file-export.svg&f=background");
border-color: @ini_existing; border-color: @ini_existing;
color: @ini_background; //color: @ini_background;
text-decoration: none; text-decoration: none;
} }
} }
} }
} }
#plugin__struct_output{ #plugin__struct_output {
margin-right: 0; margin-right: 0;
th {
background-color: @ini_background_alt;
}
} }
.struct_entry_form { .struct_entry_form {
@ -163,6 +173,6 @@ form {
padding-top: 1rem; padding-top: 1rem;
} }
} }
} // fieldset
} }
} } // form
}

30
css/toollist.less Normal file
View file

@ -0,0 +1,30 @@
/**
* Styles for site tools and user tools in sidebar
*
* Using BEM methodology as far as possible
*/
.toollist {
}
.toollist__listitem {
list-style: none;
a {
display: inline-flex;
flex-direction: row-reverse;
flex-wrap: nowrap;
align-items: center;
}
span {
font-size: @font-size-default;
}
svg {
width: @font-size-default;
vertical-align: middle;
fill: @ini_nav_menu_color;
margin-right: .2em;
}
}

View file

@ -11,55 +11,56 @@ $lang['direct_content_main'] = 'Hauptinhalt dieser Seite';
$lang['direct_quick_search'] = 'Schnellsuche'; $lang['direct_quick_search'] = 'Schnellsuche';
$lang['direct_content_toggle'] = 'Breite des Contents ändern'; $lang['direct_content_toggle'] = 'Breite des Contents ändern';
$lang['adjunct_start_logo_text'] = 'Logo: '; $lang['adjunct_linked_logo_text'] = ' - Link zur Startseite';
$lang['adjunct_linked_logo_text'] = '. Link zur Startseite'; $lang['a11y_sidebartoggle'] = 'Navigation anzeigen/verbergen';
$lang['a11y_sidebartoggle'] = 'Sidebar öffnen/schliessen';
$lang['nav-area-head'] = 'Navigationsmenüs und Suche'; $lang['nav-area-head'] = 'Navigationsmenüs und Suche';
$lang['head_magic_matcher'] = 'MagicMatcher'; $lang['head_magic_matcher'] = 'MagicMatcher';
$lang['head_quick_search'] = 'wikiübergreifende Schnellsuche'; $lang['head_quick_search'] = 'Wikiübergreifende Schnellsuche';
$lang['head_menu_main'] = 'Hauptmenü';
$lang['head_menu_status'] = 'Seitenstatus'; $lang['head_menu_status'] = 'Seitenstatus';
$lang['head_breadcrumb_youarehere'] = 'Standortanzeiger'; $lang['head_breadcrumb_youarehere'] = 'Standortanzeiger';
$lang['head_menu_trace'] = 'Zuletzt Angesehen'; $lang['head_menu_trace'] = 'Zuletzt Angesehen';
$lang['head_meta_box'] = 'Metainformationen zur Seite'; $lang['head_meta_box'] = 'Metainformationen zur Seite';
$lang['head_menu_starred'] = 'gemerkte Seite'; $lang['head_menu_starred'] = 'Gemerkte Seiten';
$lang['head_menu_tool-select'] = 'Werkzeuge'; $lang['head_menu_tool-select'] = 'Werkzeuge';
$lang['jump_to_quicksearch'] = 'Springe zur Schnellsuche'; $lang['jump_to_quicksearch'] = 'Springe zur Schnellsuche';
/** it will be shown from plugin lang.php:
$lang['meta_box_jira_tickets_none'] = 'Keine Jira-Tickets verknüpft'; $lang['meta_box_jira_tickets_none'] = 'Keine Jira-Tickets verknüpft';
$lang['meta_box_tags_none'] = 'Keine Tags verknüpft'; $lang['meta_box_tags_none'] = 'Keine Tags verknüpft';
$lang['js']['meta_box_toc_none'] = 'kein Inhaltsverzeichnis vorhanden'; $lang['js']['meta_box_toc_none'] = 'kein Inhaltsverzeichnis vorhanden';
$lang['prefix_tasks_user'] = 'Ihre offenen Aufgaben: ';
*/
$lang['tab_tags'] = 'Tags'; $lang['tab_tags'] = 'Tags';
$lang['tab_issues'] = 'Issues'; $lang['tab_issues'] = 'Issues';
$lang['quality_trigger'] = 'Seitenanalyse ein- bzw. ausblenden'; $lang['quality_trigger'] = 'Seitenanalyse anzeigen/verbergen';
$lang['prefix_tasks'] = 'offene Aufgaben: ';
$lang['prefix_tasks_page'] = 'offene Aufgaben auf dieser Seite: '; $lang['prefix_tasks_page'] = 'offene Aufgaben auf dieser Seite: ';
$lang['prefix_tasks_user'] = 'Ihre offenen Aufgaben: ';
$lang['tasks_page_none'] = 'keine offenen Aufgaben für diese Seite'; $lang['tasks_page_none'] = 'keine offenen Aufgaben für diese Seite';
$lang['tasks_page_intime'] = 'Es gibt %1$d offenen Aufgaben für diese Seite.'; $lang['tasks_page_intime'] = 'offenen Aufgaben für diese Seite: %1$d';
$lang['tasks_page_late'] = 'Es gibt %1$d offenen Aufgaben für diese Seite, %2$d sind zu spät.'; $lang['tasks_page_late'] = 'offenen Aufgaben für diese Seite: %1$d, zu spät: %2$d';
$lang['discussion'] = 'Diskussion'; /** is not used
$lang['back_to_article'] = 'Zurück zum Artikel'; $lang['discussion'] = 'xxx Diskussion';
$lang['userpage'] = 'Benutzer-Seite'; $lang['back_to_article'] = 'xxx Zurück zum Artikel';
$lang['userpage'] = 'xxx Benutzer-Seite';
*/
$lang['meta_data'] = 'Meta Daten des Bildes'; $lang['meta_data'] = 'Meta Daten des Bildes'; /** wird aufgerufen aber nicht ausgegeben - Fehler? */
$lang['osm_zoom_link_text'] = 'größere Karte anzeigen'; $lang['osm_zoom_link_text'] = 'größere Karte anzeigen';
$lang['osm_zoom_link_title'] = 'externer Link - öffnet in neuem Fenster'; $lang['osm_zoom_link_title'] = 'externer Link - öffnet in neuem Fenster'; /** in streetmaps - konnte ich nicht finden */
$lang['image_detail'] = 'Detailinformationen zum Bild'; $lang['image_detail'] = 'Detailinformationen zum Bild';
$lang['mode_edit'] = 'Seite bearbeiten'; $lang['mode_edit'] = 'Seite bearbeiten';
$lang['mode_detail'] = 'Details zum Bild';
/** /**
* colors * preferences colors
*/ */
$lang['__site_width__'] = 'Content - Breite (in %)'; $lang['__site_width__'] = 'Content - Breite (in %)';
@ -93,7 +94,8 @@ $lang['__button_color__'] = 'Buttons - Schriftfarbe';
$lang['__button_background__'] = 'Buttons - Hintergrundfarbe'; $lang['__button_background__'] = 'Buttons - Hintergrundfarbe';
$lang['__background_alt__'] = 'Tabellenkopf, Tabellenzeile (hover), struct Label (hover) - Hintergrundfarbe (alternativ)'; $lang['__background_alt__'] = 'Tabellenkopf, Tabellenzeile (hover), struct Label (hover) - Hintergrundfarbe (alternativ)';
$lang['__text_alt__'] = 'Tabellenkopf (unverlinkt), Tabellenzeile (hover), struct Label (hover) - Schriftfarbe (alternativ)'; $lang['__text_alt__'] = 'Tabellenkopf: unverlinkt, Tabellenzeile (hover), struct Label (hover) - Schriftfarbe (alternativ)';
$lang['__link_alt__'] = 'Tabellenkopf: verlinkt - Schriftfarbe (alternativ)';
$lang['__border__'] = 'Tabellen, Formularfelder, Zitate - Rahmenfarbe'; $lang['__border__'] = 'Tabellen, Formularfelder, Zitate - Rahmenfarbe';
$lang['__default_border_radius__'] = 'Wiki Icons, Content (oben rechts) - Borderradius'; $lang['__default_border_radius__'] = 'Wiki Icons, Content (oben rechts) - Borderradius';

View file

@ -9,16 +9,14 @@
$lang['direct_prefix'] = 'jump to'; $lang['direct_prefix'] = 'jump to';
$lang['direct_content_main'] = 'Main Content'; $lang['direct_content_main'] = 'Main Content';
$lang['direct_quick_search'] = 'Search'; $lang['direct_quick_search'] = 'Search';
$lang['direct_content_toggle'] = 'Toggle Content Width'; $lang['direct_content_toggle'] = 'Change Content Width';
$lang['adjunct_start_logo_text'] = 'Logo: '; $lang['adjunct_linked_logo_text'] = ' - homepage link';
$lang['adjunct_linked_logo_text'] = '. homepage link'; $lang['a11y_sidebartoggle'] = 'Show/Hide Navigation';
$lang['a11y_sidebartoggle'] = 'Open/Close Sidebar';
$lang['nav-area-head'] = 'menus and quick search'; $lang['nav-area-head'] = 'menus and quick search';
$lang['head_magic_matcher'] = 'MagicMatcher'; $lang['head_magic_matcher'] = 'MagicMatcher';
$lang['head_quick_search'] = 'quick search'; $lang['head_quick_search'] = 'quick search';
$lang['head_menu_main'] = 'main menu';
$lang['head_menu_status'] = 'site status'; $lang['head_menu_status'] = 'site status';
$lang['head_breadcrumb_youarehere'] = 'location indicator'; $lang['head_breadcrumb_youarehere'] = 'location indicator';
$lang['head_menu_trace'] = 'Last Visited Pages'; $lang['head_menu_trace'] = 'Last Visited Pages';
@ -28,37 +26,41 @@ $lang['head_menu_tool-select'] = 'Tools';
$lang['jump_to_quicksearch'] = 'Jump to quick search'; $lang['jump_to_quicksearch'] = 'Jump to quick search';
/** it will be shown from plugin lang.php:
$lang['meta_box_jira_tickets_none'] = 'jira associated tickets found: none'; $lang['meta_box_jira_tickets_none'] = 'jira associated tickets found: none';
$lang['meta_box_tags_none'] = 'tags found: none'; $lang['meta_box_tags_none'] = 'tags found: none';
$lang['js']['meta_box_toc_none'] = 'no Table of Contents available'; $lang['js']['meta_box_toc_none'] = 'no Table of Contents available';
$lang['prefix_tasks_user'] = 'Your open tasks: ';
*/
$lang['tab_tags'] = 'Tags'; $lang['tab_tags'] = 'Tags';
$lang['tab_issues'] = 'Issues'; $lang['tab_issues'] = 'Issues';
$lang['quality_trigger'] = 'toggle page analysis'; $lang['quality_trigger'] = 'Show/Hide page analysis';
$lang['prefix_tasks'] = 'open tasks: ';
$lang['prefix_tasks_page'] = 'open tasks for this page: '; $lang['prefix_tasks_page'] = 'open tasks for this page: ';
$lang['prefix_tasks_user'] = 'Your open tasks: ';
$lang['tasks_page_none'] = 'There are no open tasks for this page.'; $lang['tasks_page_none'] = 'no open tasks on this page';
$lang['tasks_page_intime'] = 'There are %1$d open tasks on this page.'; $lang['tasks_page_intime'] = 'open tasks on this page: %1$d';
$lang['tasks_page_late'] = 'There are %1$d open tasks on this page, %2$d are late.'; $lang['tasks_page_late'] = 'open tasks on this page: %1$d, to late: %2$d';
/** is not used
$lang['discussion'] = 'Discussion'; $lang['discussion'] = 'Discussion';
$lang['back_to_article'] = 'Back to article'; $lang['back_to_article'] = 'Back to article';
$lang['userpage'] = 'User page'; $lang['userpage'] = 'User page';
*/
$lang['meta_data'] = 'Meta Data'; $lang['meta_data'] = 'Meta Data';
$lang['osm_zoom_link_text'] = 'view larger map'; $lang['osm_zoom_link_text'] = 'view larger map';
$lang['osm_zoom_link_title'] = 'external link opens new window'; $lang['osm_zoom_link_title'] = 'external link opens new window';
$lang['image_detail'] = 'image details'; $lang['image_detail'] = 'image details';
$lang['mode_edit'] = 'Editing Page'; $lang['mode_edit'] = 'Editing Page';
$lang['mode_detail'] = 'Image Details';
/** /**
* colors * preferences colors
*/ */
$lang['__site_width__'] = 'content - width (in %)'; $lang['__site_width__'] = 'content - width (in %)';
@ -92,7 +94,8 @@ $lang['__button_color__'] = 'buttons - font color';
$lang['__button_background__'] = 'buttons - background color'; $lang['__button_background__'] = 'buttons - background color';
$lang['__background_alt__'] = 'table head, table cell (hover), struct Label (hover) - background color (alternative)'; $lang['__background_alt__'] = 'table head, table cell (hover), struct Label (hover) - background color (alternative)';
$lang['__text_alt__'] = 'table head (unlinked), table cell (hover), struct Label (hover) - font color (alternative)'; $lang['__text_alt__'] = 'table head: unlinked, table cell (hover), struct Label (hover) - font color (alternative)';
$lang['__link_alt__'] = 'table head: linked - font color (alternative)';
$lang['__border__'] = 'tables, form fields, blockquotes - border color'; $lang['__border__'] = 'tables, form fields, blockquotes - border color';
$lang['__default_border_radius__'] = 'wiki icons, content (top right) - border radius'; $lang['__default_border_radius__'] = 'wiki icons, content (top right) - border radius';

View file

@ -140,7 +140,14 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
<div class="menu-tool-select"> <div class="menu-tool-select">
<h5 class="sr-only" role="heading" aria-level="2"><?php echo tpl_getLang('head_menu_tool-select') ?></h5> <h5 class="sr-only" role="heading" aria-level="2"><?php echo tpl_getLang('head_menu_tool-select') ?></h5>
<?php tpl_actiondropdown($lang['tools'], "test"); ?> <?php
if (file_exists(DOKU_INC . 'inc/Menu/MobileMenu.php')) {
echo (new \dokuwiki\Menu\MobileMenu())->getDropdown();
} else {
//Pre-Greebo Backwards compatibility
tpl_actiondropdown($lang['tools'], "test");
}
?>
</div><!-- .menu-tool-select --> </div><!-- .menu-tool-select -->
</div><!-- .headings --> </div><!-- .headings -->
</div><!-- .col --> </div><!-- .col -->

View file

@ -39,7 +39,6 @@
../dokuwiki/css/_modal.css = screen ../dokuwiki/css/_modal.css = screen
../dokuwiki/css/_forms.css = screen ../dokuwiki/css/_forms.css = screen
../dokuwiki/css/_admin.less = screen ../dokuwiki/css/_admin.less = screen
../dokuwiki/css/pagetools.less = screen
../dokuwiki/css/content.less = screen ../dokuwiki/css/content.less = screen
@ -85,6 +84,9 @@ css/area_recent.less = all
css/template_admin.less = all css/template_admin.less = all
css/template_detail.less = all css/template_detail.less = all
; ____________ block styles ________________
css/toollist.less = all
; _____________ plugin styles _____________ ; _____________ plugin styles _____________
@ -172,6 +174,7 @@ __button_background__ = "#286DA8" ; @ini_button_background
__background_alt__ = "#F6F6F6" ; @ini_background_alt (guaranteed for every plugin) __background_alt__ = "#F6F6F6" ; @ini_background_alt (guaranteed for every plugin)
__text_alt__ = "#454545" ; @ini_text_alt (guaranteed for every plugin) __text_alt__ = "#454545" ; @ini_text_alt (guaranteed for every plugin)
__link_alt__ = "#286DA8" ; @ini_link_alt
; border color ; border color

11
svg.php
View file

@ -111,8 +111,10 @@ class SVG {
} else { } else {
// get it from material design icons // get it from material design icons
$file = getCacheName($svg, '.svg'); $file = getCacheName($svg, '.svg');
if (!file_exists($file)) {
io_download(self::CDNBASE . $svg, $file); io_download(self::CDNBASE . $svg, $file);
} }
}
} }
// check if media exists // check if media exists
@ -316,10 +318,19 @@ class SVG {
*/ */
protected function initReplacements() { protected function initReplacements() {
global $conf; global $conf;
if (!class_exists('\dokuwiki\StyleUtils')) {
// Pre-Greebo Compatibility
define('SIMPLE_TEST', 1); // hacky shit define('SIMPLE_TEST', 1); // hacky shit
include DOKU_INC . 'lib/exe/css.php'; include DOKU_INC . 'lib/exe/css.php';
$ini = css_styleini($conf['template']); $ini = css_styleini($conf['template']);
$this->replacements = $ini['replacements']; $this->replacements = $ini['replacements'];
return;
}
$stuleUtils = new \dokuwiki\StyleUtils();
$ini = $stuleUtils->cssStyleini('sprintdoc');
$this->replacements = $ini['replacements'];
} }
} }

View file

@ -10,8 +10,12 @@
<span class="lbl"><?php echo $lang['site_tools']; ?></span> <span class="lbl"><?php echo $lang['site_tools']; ?></span>
</a></div> </a></div>
<div class="nav-panel level1"> <div class="nav-panel level1">
<ul id="sidebar-site-tools"> <ul id="sidebar-site-tools" class="toollist">
<?php <?php
if (file_exists(DOKU_INC . 'inc/Menu/SiteMenu.php')) {
echo (new \dokuwiki\Menu\SiteMenu())->getListItems('toollist__listitem ');
} else {
//Pre-Greebo Backwards compatibility
tpl_toolsevent( tpl_toolsevent(
'sitetools', 'sitetools',
array( array(
@ -20,6 +24,7 @@
'index' => tpl_action('index', 1, 'li', 1), 'index' => tpl_action('index', 1, 'li', 1),
) )
); );
}
?> ?>
</ul> </ul>
</div> </div>
@ -32,8 +37,12 @@
<span class="lbl"><?php echo $lang['user_tools']; ?></span> <span class="lbl"><?php echo $lang['user_tools']; ?></span>
</a></div> </a></div>
<div class="nav-panel level1"> <div class="nav-panel level1">
<ul id="sidebar-user-tools"> <ul id="sidebar-user-tools" class="toollist">
<?php /* dokuwiki user tools */ <?php /* dokuwiki user tools */
if (file_exists(DOKU_INC . 'inc/Menu/UserMenu.php')) {
echo (new \dokuwiki\Menu\UserMenu())->getListItems('toollist__listitem ');
} else {
//Pre-Greebo Backwards compatibility
tpl_toolsevent( tpl_toolsevent(
'usertools', 'usertools',
array( array(
@ -43,6 +52,7 @@
'register' => tpl_action('register', 1, 'li', 1), 'register' => tpl_action('register', 1, 'li', 1),
) )
); );
}
?> ?>
</ul> </ul>
</div> </div>

View file

@ -14,7 +14,8 @@ if($doPlugin !== null || $qcPlugin !== null || $starredPlugin !== null) {
if($qcPlugin && $qcPlugin->shouldShow()) { if($qcPlugin && $qcPlugin->shouldShow()) {
echo '<li class="plugin_qc"><a href="#">…</a></li>'; // filled by javascript $qcPrefix = tpl_getLang('quality_trigger');
echo '<li class="plugin_qc"><strong class="sr-out">'.$qcPrefix.':</strong><a href="#"></a></li>'; // filled by javascript
} }

View file

@ -11,12 +11,16 @@ if (!defined('DOKU_INC')) {
<?php include('nav-status.php'); ?> <?php include('nav-status.php'); ?>
<ul> <ul>
<?php <?php
if (file_exists(DOKU_INC . '/inc/Menu/PageMenu.php')) {
echo (new \dokuwiki\Menu\PageMenu())->getListItems();
} else {
//Pre-Greebo Backwards compatibility
$data = dokuwiki\template\sprintdoc\tpl::assemblePageTools(); $data = dokuwiki\template\sprintdoc\tpl::assemblePageTools();
foreach ($data['items'] as $k => $html) { foreach ($data['items'] as $k => $html) {
echo $html; echo $html;
} }
}
?> ?>
</ul> </ul>
</div> </div>

View file

@ -6,7 +6,19 @@
<nav id="dokuwiki__usertools" class="nav-usertools <?php echo $navClass?>"> <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> <h6 class="sr-only" role="heading" aria-level="2"><?php echo $lang['user_tools']; ?></h6>
<ul> <ul>
<li class="log"><?php tpl_actionlink('login'); ?></li> <li class="log"><?php
if (file_exists(DOKU_INC . 'inc/Menu/Item/Login.php')) {
if (empty($_SERVER['REMOTE_USER'])) {
echo (new \dokuwiki\Menu\Item\Login())->asHtmlLink();
} else {
echo (new \dokuwiki\Menu\Item\Login())->asHtmlButton();
}
} else {
//Pre-Greebo Backwards compatibility
tpl_actionlink('login');
}
?>
</li>
<?php <?php
if (!empty($_SERVER['REMOTE_USER'])) { if (!empty($_SERVER['REMOTE_USER'])) {
@ -14,10 +26,28 @@
}?> }?>
<?php /* dokuwiki user tools */ <?php /* dokuwiki user tools */
tpl_toolsevent('usertools', array( if (file_exists(DOKU_INC . 'inc/Menu/Item/Admin.php')) {
try{
echo '<li class="admin">' . (new \dokuwiki\Menu\Item\Admin())->asHtmlLink() . '</li>';
} catch(\RuntimeException $ignored) {
// item not available
}
try{
echo '<li class="register">' . (new \dokuwiki\Menu\Item\Register())->asHtmlLink() . '</li>';
} catch(\RuntimeException $ignored) {
// item not available
}
} else {
//Pre-Greebo Backwards compatibility
tpl_toolsevent(
'usertools',
array(
'admin' => tpl_action('admin', 1, 'li', 1), 'admin' => tpl_action('admin', 1, 'li', 1),
'register' => tpl_action('register', 1, 'li', 1), 'register' => tpl_action('register', 1, 'li', 1),
)); ?> )
);
}
?>
<?php /* tasks do Plug-In */ <?php /* tasks do Plug-In */
/** @var \helper_plugin_do $doplugin */ /** @var \helper_plugin_do $doplugin */