added closedwiki option
This hides most of the wiki tools including the sidebar and search until the user has logged in.
This commit is contained in:
parent
621124b325
commit
da9591f0b6
5 changed files with 19 additions and 9 deletions
|
@ -7,3 +7,4 @@
|
|||
$conf['sidebar_sections'] = 'h1,h2,h3,h4,h5';
|
||||
$conf['header_layout'] = 'header-default';
|
||||
$conf['autocollapse'] = 1;
|
||||
$conf['closedwiki'] = 0;
|
||||
|
|
|
@ -19,3 +19,4 @@ $meta['header_layout'] = array(
|
|||
);
|
||||
|
||||
$meta['autocollapse'] = array('onoff');
|
||||
$meta['closedwiki'] = array('onoff');
|
||||
|
|
|
@ -16,3 +16,4 @@ $lang['header_layout_o_default'] = 'generous header layout for long wiki titel
|
|||
$lang['header_layout_o_compact'] = 'compact header layout for short wiki title and hidden tagline';
|
||||
|
||||
$lang['autocollapse'] = 'Automatically collapse the sidebar when viewing non-content pages for more screen estate.';
|
||||
$lang['closedwiki'] = 'This is a closed wiki. Hide most wiki functionality before user has logged in.';
|
||||
|
|
23
main.php
23
main.php
|
@ -113,11 +113,13 @@ $classWideContent = (Template::getInstance())->fullWidthClass();
|
|||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="claim main-sidebar">
|
||||
<div class="menu-togglelink mobile-only">
|
||||
<a href="#">
|
||||
<span class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php if(!tpl_getConf('closedwiki') || $INPUT->server->has('REMOTE_USER')) { ?>
|
||||
<div class="menu-togglelink mobile-only">
|
||||
<a href="#">
|
||||
<span class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle'); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
|
||||
|
@ -190,7 +192,8 @@ $classWideContent = (Template::getInstance())->fullWidthClass();
|
|||
<h5 class="sr-only" role="heading" aria-level="1"><?php echo tpl_getLang('nav-area-head') ?></h5>
|
||||
</div><!-- .nav-area-head -->
|
||||
|
||||
<div class="tools">
|
||||
<?php if(!tpl_getConf('closedwiki') || $INPUT->server->has('REMOTE_USER')) { ?>
|
||||
<div class="tools">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
|
@ -248,7 +251,7 @@ $classWideContent = (Template::getInstance())->fullWidthClass();
|
|||
</div><!-- .row -->
|
||||
</div><!-- .container -->
|
||||
</div><!-- .tools -->
|
||||
|
||||
<?php } // closed wiki check?>
|
||||
|
||||
<div class="top-header">
|
||||
<div class="container">
|
||||
|
@ -292,9 +295,11 @@ $classWideContent = (Template::getInstance())->fullWidthClass();
|
|||
|
||||
<div class="breadcrumbs" data-do="<?php echo $ACT?>">
|
||||
|
||||
<?php if(!tpl_getConf('closedwiki') || $INPUT->server->has('REMOTE_USER')) { ?>
|
||||
<div class="togglelink page_main-content">
|
||||
<a id="spr__toggle-content" href="#"><span class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle')?></span></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<h6 class="sr-only" role="heading" aria-level="2"><?php echo tpl_getLang('head_menu_status') ?></h6>
|
||||
|
||||
|
@ -321,7 +326,9 @@ $classWideContent = (Template::getInstance())->fullWidthClass();
|
|||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* page tools */
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
include('tpl/nav-page-tools.php');
|
||||
if(!tpl_getConf('closedwiki') || $INPUT->server->has('REMOTE_USER')) {
|
||||
include('tpl/nav-page-tools.php');
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -16,7 +16,7 @@ if ($conf['useacl']): ?>
|
|||
try {
|
||||
$item = new Login();
|
||||
if ($item->visibleInContext(AbstractItem::CTX_DESKTOP))
|
||||
echo '<li class="log">' . $item->asHtmlButton() . '</li>';
|
||||
echo '<li class="log">' . $item->asHtmlLink() . '</li>';
|
||||
} catch (RuntimeException $ignored) {
|
||||
// item not available
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue