side-tools, user links, admin panel
This commit is contained in:
parent
4fca1d16bb
commit
646345133d
12 changed files with 191 additions and 38 deletions
|
@ -9,6 +9,7 @@ $conf['logo_spacer'] = 'logo_spacer.png';
|
|||
|
||||
$conf['discussionPage'] = 'discussion:@ID@';
|
||||
$conf['userPage'] = 'user:@USER@:';
|
||||
$conf['user_ns'] = 'user';
|
||||
$conf['hideTools'] = 0;
|
||||
$conf['tasks_page'] = 'dashboard';
|
||||
$conf['copyright'] = 'CosmoCode 2017';
|
||||
$conf['copyright'] = 'CosmoCode 2017';
|
||||
|
|
|
@ -9,6 +9,7 @@ $conf['logo_spacer'] = array('string');
|
|||
|
||||
$meta['discussionPage'] = array('string');
|
||||
$meta['userPage'] = array('string');
|
||||
$conf['user_ns'] = array('string');
|
||||
$meta['hideTools'] = array('onoff');
|
||||
$meta['tasks_page'] = array('string');
|
||||
$meta['copyright'] = array('string');
|
||||
|
|
|
@ -5,9 +5,16 @@
|
|||
*/
|
||||
|
||||
|
||||
#dokuwiki__sitetools.nav-sitetools {
|
||||
.side-tools.main-sidebar {
|
||||
@icon-size: 2rem;
|
||||
|
||||
> nav{
|
||||
margin-top: 1rem;
|
||||
> ul{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
h6 { //background-color: pink;// hier activ !!!
|
||||
position: relative;
|
||||
width: auto;
|
||||
|
@ -15,7 +22,6 @@
|
|||
color: @color-nav;
|
||||
font-size: .88rem;
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
padding: .5rem 0 .5rem (@icon-size + 1);
|
||||
|
||||
&::before {
|
||||
|
@ -73,7 +79,7 @@
|
|||
/* min-width: 1440px */
|
||||
|
||||
@media @screen_min-xlg {
|
||||
#dokuwiki__sitetools.nav-sitetools {
|
||||
.side-tools.main-sidebar {
|
||||
li {
|
||||
font-size: 100%;
|
||||
padding-top: .1rem;
|
||||
|
@ -91,7 +97,7 @@
|
|||
/* max-width: 1199px */
|
||||
|
||||
@media @screen_max-xlg {
|
||||
#dokuwiki__sitetools.nav-sitetools {
|
||||
.site-tools.main-sidebar {
|
||||
h6 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
|
|
@ -126,14 +126,28 @@ h4 {
|
|||
margin: 0 0 1.0em;
|
||||
}
|
||||
h5 {
|
||||
font-size: .82rem;
|
||||
font-size: .88rem;
|
||||
margin: 0 0 1.1428em;
|
||||
}
|
||||
h6 {
|
||||
font-size: .75rem;
|
||||
font-size: .83rem;
|
||||
margin: 0 0 1.333em;
|
||||
}
|
||||
|
||||
p{
|
||||
font-size: .83rem;
|
||||
line-height: 135%;
|
||||
a, span, strong{
|
||||
font-size: inherit;
|
||||
}
|
||||
}
|
||||
label, legend{
|
||||
font-size: .83rem;
|
||||
a, span, strong{
|
||||
font-size: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
p,
|
||||
ul,
|
||||
|
|
|
@ -154,6 +154,16 @@
|
|||
.logo img {
|
||||
height: 60px;
|
||||
width: auto;
|
||||
border-style: solid;
|
||||
border-color: transparent;
|
||||
border-width: 0 3px;
|
||||
}
|
||||
.logo {
|
||||
a:hover, a:focus, a:active{
|
||||
img {
|
||||
border: 0 none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -165,5 +165,34 @@
|
|||
var h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;
|
||||
arrayPageSize=[w,h];
|
||||
return arrayPageSize;
|
||||
},
|
||||
useLocStorage: function(){
|
||||
return ('localStorage' in window && window.localStorage !== null);
|
||||
},
|
||||
saveLSI: function(key, data){
|
||||
if (this.useLocStorage) {
|
||||
localStorage.setItem(key, data);
|
||||
}
|
||||
},
|
||||
removeLSI: function(key){
|
||||
if (this.useLocStorage) {
|
||||
localStorage.removeItem(key);
|
||||
}
|
||||
},
|
||||
getLSI: function(key){
|
||||
if (this.useLocStorage) {
|
||||
return localStorage.getItem(key);
|
||||
}
|
||||
return '';
|
||||
|
||||
},
|
||||
showAllLSI: function() {
|
||||
if (this.useLocStorage) {
|
||||
var key = "";
|
||||
for (var i=0; i<=localStorage.length-1; i++) {
|
||||
key = localStorage.key(i);
|
||||
//console.log(key+': '+localStorage.getItem(key));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -7,3 +7,4 @@
|
|||
$lang['discussionPage'] = 'Diskussion-Seite (leer lassen, um Funktion zu deaktivieren)';
|
||||
$lang['userPage'] = 'Benutzer seite (leer lassen, um Funktion zu deaktivieren)';
|
||||
$lang['hideTools'] = 'Tools abschalten, wenn der Benutzer nicht angemeldet ist?';
|
||||
$lang['user_ns'] = 'Ort an dem Nutzerseiten gespeichert werden';
|
||||
|
|
|
@ -7,3 +7,4 @@
|
|||
$lang['discussionPage'] = 'Discussion page (leave empty to disable discussions)';
|
||||
$lang['userPage'] = 'User page (leave empty to disable user pages)';
|
||||
$lang['hideTools'] = 'Hide tools when not logged in?';
|
||||
$lang['user_ns'] = 'Where to store user pages.';
|
||||
|
|
20
main.php
20
main.php
|
@ -14,7 +14,7 @@ if (!defined('DOKU_INC')) die(); /* must be run from with
|
|||
header('X-UA-Compatible: IE=edge,chrome=1');
|
||||
|
||||
$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']) );
|
||||
$showSidebar = /*page_findnearest($conf['sidebar']) &&*/ ($ACT=='show');
|
||||
$showSidebar = true; /* */
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
|
@ -84,7 +84,7 @@ $showSidebar = /*page_findnearest($conf['sidebar']) &&*/ ($ACT=='show');
|
|||
|
||||
/* #dokuwiki__top used as anchor for "back to top" button/link links */
|
||||
?>
|
||||
<body id="dokuwiki__top" class="<?php echo tpl_classes(); ?> <?php echo ($showSidebar) ? 'showSidebar' : ''; ?>">
|
||||
<body id="dokuwiki__top" class="<?php echo tpl_classes(); ?> <?php echo ($ACT) ? 'do-'.$ACT : 'do-none'; ?> <?php echo ($showSidebar) ? 'showSidebar' : ''; ?>">
|
||||
|
||||
<div id="dokuwiki__site">
|
||||
<?php
|
||||
|
@ -194,7 +194,7 @@ $showSidebar = /*page_findnearest($conf['sidebar']) &&*/ ($ACT=='show');
|
|||
?>
|
||||
</div><!-- .menu -->
|
||||
|
||||
<div class="site-tools main-sidebar">
|
||||
<div class="side-tools main-sidebar toggle-menu">
|
||||
<?php
|
||||
|
||||
|
||||
|
@ -203,7 +203,17 @@ $showSidebar = /*page_findnearest($conf['sidebar']) &&*/ ($ACT=='show');
|
|||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
include('tpl/nav-sitetools.php');
|
||||
?>
|
||||
</div><!-- .site-tools -->
|
||||
</div><!-- .side-tools -->
|
||||
<div class="side-tools main-sidebar toggle-menu">
|
||||
<?php
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* user tools */
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
include('tpl/nav-usermenu.php');
|
||||
?>
|
||||
</div><!-- .side-tools -->
|
||||
|
||||
|
||||
<div class="sidebarfooter main-sidebar">
|
||||
|
@ -243,7 +253,7 @@ $showSidebar = /*page_findnearest($conf['sidebar']) &&*/ ($ACT=='show');
|
|||
}
|
||||
}
|
||||
|
||||
include('tpl/nav-usertools.php');
|
||||
include('tpl/nav-usertools-buttons.php');
|
||||
if($mm && $matcher !== ""){
|
||||
include('tpl/nav-magicmatcher.php');
|
||||
}
|
||||
|
|
109
mediamanager.php
109
mediamanager.php
|
@ -2,7 +2,8 @@
|
|||
/**
|
||||
* DokuWiki Media Manager Popup
|
||||
*
|
||||
* @author Andreas Gohr <andi@splitbrain.org>
|
||||
* @link FIXME
|
||||
* @author Andreas Gohr <andi@splitbrain.org>, Jana Deutschlaender <deutschlaender@cosmocode.de>
|
||||
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
||||
*/
|
||||
// must be run from within DokuWiki
|
||||
|
@ -10,39 +11,95 @@ if (!defined('DOKU_INC')) die();
|
|||
@require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */
|
||||
header('X-UA-Compatible: IE=edge,chrome=1');
|
||||
|
||||
?><!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']?>"
|
||||
lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>" class="popup no-js">
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* conditional comments for IE8 / IE9 browser detection if needed */
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
?>
|
||||
<!--[if lt IE 9]> <html class="no-js lt-ie10 lt-ie9" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>"> <![endif]-->
|
||||
<!--[if IE 9]> <html class="no-js lt-ie10 ie-9" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>"> <![endif]-->
|
||||
<!--[if gt IE 9]><!--> <html class="edge no-js" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>"> <!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>
|
||||
<?php echo hsc($lang['mediaselect'])?>
|
||||
[<?php echo strip_tags($conf['title'])?>]
|
||||
</title>
|
||||
<script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
|
||||
<?php tpl_metaheaders()?>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
<?php echo tpl_favicon(array('favicon', 'mobile')) ?>
|
||||
<?php
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* meta and link relations */
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
?>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<?php tpl_metaheaders() ?>
|
||||
<?php
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* conditional comments for HTML5 / media queries support in IE8 */
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
?>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* page title */
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
?>
|
||||
<title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
|
||||
|
||||
<script type="text/javascript">(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* favicons */
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
?>
|
||||
<?php
|
||||
echo tpl_favicon(array('favicon')); /* DokuWiki: favicon.ico */
|
||||
include('tpl/favicon_tiles.php');
|
||||
?>
|
||||
<?php
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* Include Hook: meta.html */
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
?>
|
||||
<?php tpl_includeFile('meta.html') ?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!--[if IE 8 ]><div id="IE8"><![endif]-->
|
||||
<div id="media__manager" class="<?php echo tpl_classes(); ?>">
|
||||
<?php
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* uses body markup of main.php following markup is included with tpl_content();
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
?>
|
||||
|
||||
<div id="media__manager" class="dokuwiki">
|
||||
<?php html_msgarea() ?>
|
||||
<div id="mediamgr__aside"><div class="pad">
|
||||
<h1><?php echo hsc($lang['mediaselect'])?></h1>
|
||||
<div id="mediamgr__aside">
|
||||
<div class="pad">
|
||||
<h1><?php echo hsc($lang['mediaselect'])?></h1>
|
||||
|
||||
<?php /* keep the id! additional elements are inserted via JS here */?>
|
||||
<div id="media__opts"></div>
|
||||
<?php /* keep the id! additional elements are inserted via JS here */?>
|
||||
<div id="media__opts"></div>
|
||||
|
||||
<?php tpl_mediaTree() ?>
|
||||
</div></div>
|
||||
|
||||
<div id="mediamgr__content"><div class="pad">
|
||||
<?php tpl_mediaContent() ?>
|
||||
</div></div>
|
||||
<?php tpl_mediaTree() ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mediamgr__content">
|
||||
<div class="pad">
|
||||
<?php tpl_mediaContent() ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--[if lte IE 8 ]></div><![endif]-->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
23
tpl/nav-usermenu.php
Executable file
23
tpl/nav-usermenu.php
Executable file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
if (!defined('DOKU_INC')) die();
|
||||
|
||||
if ($conf['useacl'] && $showTools): ?>
|
||||
|
||||
<nav class="nav-usermenu <?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($_SERVER['REMOTE_USER']){
|
||||
echo '<a class="profile" href="'.wl(tpl_getConf('user_ns').$_SERVER['REMOTE_USER'].':') . '">'.hsc($USERINFO['name']).'</a>';
|
||||
}?>
|
||||
|
||||
<?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 endif ?>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue