Skip to content
Permalink
Browse files

Merge branch 'feature/bs4-utilities' into develop

  • Loading branch information...
LotarProject committed Mar 11, 2019
2 parents 6ba4f22 + 0f51da3 commit 2d846504e42ee4d1857a6a008c8c579cf43f1e73
Showing with 2,784 additions and 32 deletions.
  1. +2,707 −0 css/bs4-utilities.less
  2. +1 −0 css/style.less
  3. +1 −1 detail.php
  4. +3 −3 js/template.js
  5. +2 −2 main.php
  6. +4 −4 tpl/admin.php
  7. +1 −1 tpl/footer.php
  8. +1 −1 tpl/navbar.php
  9. +3 −2 tpl/translation.php
  10. +61 −18 tpl/user_menu.php

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -17,3 +17,4 @@
@import "plugins.less";
@import "callouts.less";
@import "replacements.less";
@import "bs4-utilities.less";
@@ -55,7 +55,7 @@
?>
</header>

<div id="dokuwiki__detail" class="dokuwiki container<?php echo (bootstrap3_is_fluid_container()) ? '-fluid' : '' ?>">
<div id="dokuwiki__detail" class="dokuwiki container<?php echo (bootstrap3_is_fluid_container()) ? '-fluid mx-5' : '' ?>">

<div id="dokuwiki__pageheader">

@@ -203,7 +203,7 @@ jQuery(document).on('bootstrap3:fluid-container', function(event) {

jQuery('.btn-fluid-container').on('click', function() {

var selectors = 'body > div, header, header nav > div, article, footer > div';
var selectors = 'body > div, header, header nav > div, footer > div';

if (! jQuery('.navbar-fixed-top').length) {
selectors = 'body > div, header, article, footer > div';
@@ -216,15 +216,15 @@ jQuery(document).on('bootstrap3:fluid-container', function(event) {

$containers
.removeClass('container')
.addClass('container-fluid');
.addClass('container-fluid mx-5');
$button.parent().addClass('active');

DokuCookie.setValue('fluidContainer', 1);

} else {

$containers
.removeClass('container-fluid')
.removeClass('container-fluid mx-5')
.addClass('container');
$button.parent().removeClass('active');

@@ -33,7 +33,7 @@
<?php tpl_flush() ?>
<body class="<?php echo bootstrap3_classes() ?>" data-page-id="<?php echo $ID ?>">

<header id="dokuwiki__header" class="dokuwiki container<?php echo (bootstrap3_is_fluid_container()) ? '-fluid' : '' ?>">
<header id="dokuwiki__header" class="dokuwiki container<?php echo (bootstrap3_is_fluid_container()) ? '-fluid mx-5' : '' ?>">
<?php
tpl_includeFile('topheader.html');
@@ -51,7 +51,7 @@
?>
</header>

<div id="dokuwiki__top" class="dokuwiki container<?php echo (bootstrap3_is_fluid_container()) ? '-fluid' : '' ?>">
<div id="dokuwiki__top" class="dokuwiki container<?php echo (bootstrap3_is_fluid_container()) ? '-fluid mx-5' : '' ?>">

<div id="dokuwiki__pageheader">

@@ -55,10 +55,10 @@
if (! $label) continue;
echo sprintf('<li class="%s"><a href="%s" title="%s" class="admin %s">%s</a></li>',
(($INPUT->str('page') == $item) ? 'active' : ''),
wl($ID, array('do' => 'admin', 'page' => $item)),
$label, $item, $label);
echo '<li class="' . (($INPUT->str('page') == $item) ? 'active' : '') . '">' .
'<a href="'. wl($ID, array('do' => 'admin', 'page' => $item)) .'" title="'. $label .'" class="admin '. $item .'">' .
$label .
'</a></li>';
}
@@ -28,7 +28,7 @@
<?php if ($wiki_info_is_enabled || $footer_page_exist || $license_is_enabled || $badges_is_enabled): ?>
<!-- footer -->
<footer id="dw__footer" class="navbar <?php echo ((bootstrap3_conf('inverseNavbar')) ? 'navbar-inverse' : 'navbar-default') ?>">
<div class="container<?php echo (bootstrap3_is_fluid_container()) ? '-fluid' : '' ?>">
<div class="container<?php echo (bootstrap3_is_fluid_container()) ? '-fluid mx-5' : '' ?>">

<div class="small navbar-text">

@@ -22,7 +22,7 @@
<!-- navbar -->
<nav id="dw__navbar" class="navbar <?php echo trim(implode(' ', $navbar_classes)) ?>" role="navigation">

<div class="container<?php echo (bootstrap3_is_fluid_navbar() ? '-fluid' : '') ?>">
<div class="container<?php echo (bootstrap3_is_fluid_navbar() ? '-fluid mx-5' : '') ?>">

<div class="navbar-header">

@@ -32,12 +32,13 @@
<a href="<?php wl($ID) ?>" class="dropdown-toggle" data-target="#" data-toggle="dropdown" title="<?php echo $trans_label ?>" role="button" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-fw fa-flag"></i> <span class="hidden-lg hidden-md hidden-sm"><?php echo $trans_label ?></span><span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<ul class="dropdown-menu" role="menu">
<li class="dropdown-header hidden-xs hidden-sm">
<i class="fa fa-fw fa-flag"></i> <?php echo $trans_label ?>
</li>
<?php echo $trans_items ?>
</ul>
</ul>
</li>
</ul>
<!-- /translation -->
<?php endif; ?>
@@ -27,6 +27,19 @@
$avatar_img = tpl_getMediaFile(array('images/avatar.png'));
}
$label_type = 'info';
$user_type = 'User';
if ($INFO['ismanager']) {
$label_type = 'warning';
$user_type = 'Manager';
}
if ($INFO['isadmin']) {
$label_type = 'danger';
$user_type = 'Admin';
}
?>
<!-- user-menu -->
<ul class="nav navbar-nav" id="dw__user_menu">
@@ -47,24 +60,9 @@
<div class="container-fluid">

<p class="text-right">
<?php
$label_type = 'info';
$user_type = 'User';
if ($INFO['ismanager']) {
$label_type = 'warning';
$user_type = 'Manager';
}
if ($INFO['isadmin']) {
$label_type = 'danger';
$user_type = 'Admin';
}
echo '<span style="cursor:help" class="label label-' . $label_type . '" title="Groups: '. join(', ', $INFO['userinfo']['grps']) .'">' . $user_type . '</span>';
?>
<span style="cursor:help" class="label label-<?php echo $label_type; ?>" title="Groups: <?php echo join(', ', $INFO['userinfo']['grps']); ?>">
<?php echo $user_type; ?>
</span>
</p>

<p class="text-center">
@@ -117,6 +115,51 @@

<li class="divider"></li>

<?php
// Add the user menu
$page = null;
$interwiki = getInterwiki();
$user_url = str_replace('{NAME}', $_SERVER['REMOTE_USER'], $interwiki['user']);
foreach (array("$user_url:usermenu", 'usermenu') as $page_id) {
$page = page_findnearest($page_id, bootstrap3_conf('useACL'));
if ($page) break;
}
if ($page) {
$html = new simple_html_dom;
$html->load(bootstrap3_lists(tpl_include_page($page, 0, 1, bootstrap3_conf('useACL'))), true, false);
foreach ($html->find('h1,h2,h3,h4,h5,h6') as $elm) {
$elm->outertext = '<li class="dropdown-header">' . $elm->innertext . '</li>';
}
foreach ($html->find('hr') as $elm) {
$elm->outertext = '<li class="divider"></li>';
}
foreach ($html->find('ul') as $elm) {
$elm->outertext = '' . $elm->innertext;
}
foreach ($html->find('div') as $elm) {
$elm->outertext = $elm->innertext;
}
$content = $html->save();
$html->clear();
unset($html);
$content = str_replace('urlextern', '', $content);
echo $content;
echo '<li class="divider"></li>';
}
?>

<?php echo bootstrap3_action_item('login', 'fa fa-fw fa-power-off text-danger'); ?>

</ul>

0 comments on commit 2d84650

Please sign in to comment.
You can’t perform that action at this time.