Implemented the hidden page flag. Closes #34. Closes #88.

This commit is contained in:
alekseybobkov 2014-07-03 17:40:44 +11:00
parent 005f2848c7
commit 7056397036
5 changed files with 24 additions and 6 deletions

View File

@ -8402,6 +8402,10 @@ label {
.custom-radio:focus label:before {
border-color: #5fb6f5;
}
.custom-checkbox p.help-block,
.custom-radio p.help-block {
margin-top: 0;
}
.custom-radio label:before {
border-radius: 8px;
}

View File

@ -326,6 +326,10 @@ label {
border-color: @color-focus;
}
}
p.help-block {
margin-top: 0;
}
}
.custom-radio label:before {

View File

@ -11,6 +11,7 @@ use Config;
use Request;
use Response;
use Exception;
use BackendAuth;
use Twig_Environment;
use Controller as BaseController;
use Cms\Twig\Loader as TwigLoader;
@ -113,7 +114,14 @@ class Controller extends BaseController
if (!strlen($url))
$url = '/';
/*
* Handle hidden pages
*/
$page = $this->router->findByUrl($url);
if ($page && $page->hidden) {
if (!BackendAuth::getUser())
$page = null;
}
/*
* Extensibility

View File

@ -24,12 +24,6 @@ fields:
tabs:
fields:
# published:
# tab: General
# span: left
# label: Published
# type: checkbox
fileName:
tab: cms::lang.editor.settings
span: left
@ -62,6 +56,12 @@ tabs:
type: textarea
size: tiny
settings[hidden]:
tab: cms::lang.editor.settings
label: cms::lang.editor.hidden
type: checkbox
comment: cms::lang.editor.hidden_comment
secondaryTabs:
stretch: true
fields:

View File

@ -93,6 +93,8 @@ return [
'markup' => 'Markup',
'code' => 'Code',
'content' => 'Content',
'hidden' => 'Hidden',
'hidden_comment' => 'Hidden pages are accessible only by logged-in back-end users.'
],
'asset' => [
'menu_label' => "Assets",