improves on content views
This commit is contained in:
parent
75a7190ca0
commit
c06295a41f
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,330 @@
|
||||||
|
/*!
|
||||||
|
* Bootstrap Reboot v4.1.1 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2018 The Bootstrap Authors
|
||||||
|
* Copyright 2011-2018 Twitter, Inc.
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||||
|
*/
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-family: sans-serif;
|
||||||
|
line-height: 1.15;
|
||||||
|
-webkit-text-size-adjust: 100%;
|
||||||
|
-ms-text-size-adjust: 100%;
|
||||||
|
-ms-overflow-style: scrollbar;
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-ms-viewport {
|
||||||
|
width: device-width;
|
||||||
|
}
|
||||||
|
|
||||||
|
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 1.5;
|
||||||
|
color: #212529;
|
||||||
|
text-align: left;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
[tabindex="-1"]:focus {
|
||||||
|
outline: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
box-sizing: content-box;
|
||||||
|
height: 0;
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
abbr[title],
|
||||||
|
abbr[data-original-title] {
|
||||||
|
text-decoration: underline;
|
||||||
|
-webkit-text-decoration: underline dotted;
|
||||||
|
text-decoration: underline dotted;
|
||||||
|
cursor: help;
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
address {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
font-style: normal;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol,
|
||||||
|
ul,
|
||||||
|
dl {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol ol,
|
||||||
|
ul ul,
|
||||||
|
ol ul,
|
||||||
|
ul ol {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
dt {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd {
|
||||||
|
margin-bottom: .5rem;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
dfn {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
b,
|
||||||
|
strong {
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
small {
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub,
|
||||||
|
sup {
|
||||||
|
position: relative;
|
||||||
|
font-size: 75%;
|
||||||
|
line-height: 0;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub {
|
||||||
|
bottom: -.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
sup {
|
||||||
|
top: -.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #007bff;
|
||||||
|
text-decoration: none;
|
||||||
|
background-color: transparent;
|
||||||
|
-webkit-text-decoration-skip: objects;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not([href]):not([tabindex]) {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not([href]):not([tabindex]):focus {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre,
|
||||||
|
code,
|
||||||
|
kbd,
|
||||||
|
samp {
|
||||||
|
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
overflow: auto;
|
||||||
|
-ms-overflow-style: scrollbar;
|
||||||
|
}
|
||||||
|
|
||||||
|
figure {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
vertical-align: middle;
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
svg:not(:root) {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
caption {
|
||||||
|
padding-top: 0.75rem;
|
||||||
|
padding-bottom: 0.75rem;
|
||||||
|
color: #6c757d;
|
||||||
|
text-align: left;
|
||||||
|
caption-side: bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
text-align: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:focus {
|
||||||
|
outline: 1px dotted;
|
||||||
|
outline: 5px auto -webkit-focus-ring-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
input,
|
||||||
|
button,
|
||||||
|
select,
|
||||||
|
optgroup,
|
||||||
|
textarea {
|
||||||
|
margin: 0;
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
input {
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
select {
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
html [type="button"],
|
||||||
|
[type="reset"],
|
||||||
|
[type="submit"] {
|
||||||
|
-webkit-appearance: button;
|
||||||
|
}
|
||||||
|
|
||||||
|
button::-moz-focus-inner,
|
||||||
|
[type="button"]::-moz-focus-inner,
|
||||||
|
[type="reset"]::-moz-focus-inner,
|
||||||
|
[type="submit"]::-moz-focus-inner {
|
||||||
|
padding: 0;
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="radio"],
|
||||||
|
input[type="checkbox"] {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="date"],
|
||||||
|
input[type="time"],
|
||||||
|
input[type="datetime-local"],
|
||||||
|
input[type="month"] {
|
||||||
|
-webkit-appearance: listbox;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
overflow: auto;
|
||||||
|
resize: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
fieldset {
|
||||||
|
min-width: 0;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
legend {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
padding: 0;
|
||||||
|
margin-bottom: .5rem;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
line-height: inherit;
|
||||||
|
color: inherit;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
progress {
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type="number"]::-webkit-inner-spin-button,
|
||||||
|
[type="number"]::-webkit-outer-spin-button {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type="search"] {
|
||||||
|
outline-offset: -2px;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type="search"]::-webkit-search-cancel-button,
|
||||||
|
[type="search"]::-webkit-search-decoration {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-file-upload-button {
|
||||||
|
font: inherit;
|
||||||
|
-webkit-appearance: button;
|
||||||
|
}
|
||||||
|
|
||||||
|
output {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
summary {
|
||||||
|
display: list-item;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
template {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
[hidden] {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
File diff suppressed because one or more lines are too long
8
bl-kernel/admin/themes/booty/bootstrap-4.1.1-dist/css/bootstrap-reboot.min.css
vendored
Normal file
8
bl-kernel/admin/themes/booty/bootstrap-4.1.1-dist/css/bootstrap-reboot.min.css
vendored
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
/*!
|
||||||
|
* Bootstrap Reboot v4.1.1 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2018 The Bootstrap Authors
|
||||||
|
* Copyright 2011-2018 Twitter, Inc.
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||||
|
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
|
||||||
|
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,8 @@
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
SIDEBAR
|
SIDEBAR
|
||||||
*/
|
*/
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,196 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog'));
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- TABS -->
|
||||||
|
<ul class="nav nav-tabs" role="tablist">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link active" id="pages-tab" data-toggle="tab" href="#pages" role="tab">Pages</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" id="static-tab" data-toggle="tab" href="#static" role="tab">Static</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" id="sticky-tab" data-toggle="tab" href="#sticky" role="tab">Sticky</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" id="scheduled-tab" data-toggle="tab" href="#scheduled" role="tab">Scheduled</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" id="draft-tab" data-toggle="tab" href="#draft" role="tab">Draft</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="tab-content" id="myTabContent">
|
||||||
|
<!-- TABS PAGES -->
|
||||||
|
<div class="tab-pane show active" id="pages" role="tabpanel">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- TABS STATIC -->
|
||||||
|
<div class="tab-pane" id="static" role="tabpanel">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- TABS STICKY -->
|
||||||
|
<div class="tab-pane" id="sticky" role="tabpanel">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- TABS SCHEDULED -->
|
||||||
|
<div class="tab-pane" id="scheduled" role="tabpanel">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- TABS DRAFT -->
|
||||||
|
<div class="tab-pane" id="draft" role="tabpanel">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
HTML::title(array('title'=>$L->g('Manage content'), 'icon'=>'folder'));
|
||||||
|
|
||||||
|
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'new-content"><i class="uk-icon-plus"></i> '.$L->g('Add new content').'</a>';
|
||||||
|
|
||||||
|
echo '
|
||||||
|
<table class="uk-table uk-table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>'.$L->g('Title').'</th>
|
||||||
|
';
|
||||||
|
|
||||||
|
echo '<th class="uk-text-center">'.( (ORDER_BY=='date') ? $L->g('Date') : $L->g('Position') ).'</th>';
|
||||||
|
|
||||||
|
echo '
|
||||||
|
<th>'.$L->g('URL').'</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
';
|
||||||
|
|
||||||
|
|
||||||
|
function table($status, $icon='arrow-circle-o-down') {
|
||||||
|
global $Url;
|
||||||
|
global $Language;
|
||||||
|
global $published;
|
||||||
|
global $drafts;
|
||||||
|
global $scheduled;
|
||||||
|
global $static;
|
||||||
|
global $sticky;
|
||||||
|
|
||||||
|
if ($status=='published') {
|
||||||
|
$list = $published;
|
||||||
|
} elseif ($status=='draft') {
|
||||||
|
$list = $drafts;
|
||||||
|
} elseif ($status=='scheduled') {
|
||||||
|
$list = $scheduled;
|
||||||
|
} elseif ($status=='static') {
|
||||||
|
$list = $static;
|
||||||
|
} elseif ($status=='sticky') {
|
||||||
|
$list = $sticky;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($list)) {
|
||||||
|
echo '<tr>
|
||||||
|
<td style="color: #aaa; font-size: 0.9em; text-transform: uppercase;">'.$Language->g($status).'</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ORDER_BY=='position') {
|
||||||
|
foreach ($list as $pageKey) {
|
||||||
|
$page = buildPage($pageKey);
|
||||||
|
if ($page) {
|
||||||
|
if (!$page->isChild() || $status!='published') {
|
||||||
|
echo '<tr>
|
||||||
|
<td>
|
||||||
|
<a href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'">'
|
||||||
|
.($page->title()?$page->title():'<span>'.$Language->g('Empty title').'</span> ')
|
||||||
|
.'</a>
|
||||||
|
</td>
|
||||||
|
<td class="uk-text-center">'.$page->position().'</td>';
|
||||||
|
|
||||||
|
$friendlyURL = Text::isEmpty($Url->filters('page')) ? '/'.$page->key() : '/'.$Url->filters('page').'/'.$page->key();
|
||||||
|
echo '<td><a target="_blank" href="'.$page->permalink().'">'.$friendlyURL.'</a></td>';
|
||||||
|
echo '</tr>';
|
||||||
|
|
||||||
|
foreach ($page->children() as $child) {
|
||||||
|
if ($child->published()) {
|
||||||
|
echo '<tr>
|
||||||
|
<td>
|
||||||
|
<a href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$child->key().'">'
|
||||||
|
.($child->title()?$child->title():'<span>'.$Language->g('Empty title').'</span> ')
|
||||||
|
.'</a>
|
||||||
|
</td>';
|
||||||
|
|
||||||
|
$friendlyURL = Text::isEmpty($Url->filters('page')) ? '/'.$child->key() : '/'.$Url->filters('page').'/'.$child->key();
|
||||||
|
echo '<td><a target="_blank" href="'.$child->permalink().'">'.$friendlyURL.'</a></td>';
|
||||||
|
|
||||||
|
echo '<td>'.$child->position().'</td>';
|
||||||
|
echo '</tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
foreach ($list as $pageKey) {
|
||||||
|
$page = buildPage($pageKey);
|
||||||
|
if ($page) {
|
||||||
|
echo '<tr>';
|
||||||
|
echo '<td>
|
||||||
|
<a href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'"><i class="fa fa-'.$icon.'"></i> '
|
||||||
|
.($page->title()?$page->title():'<span class="label-empty-title">'.$Language->g('Empty title').'</span> ')
|
||||||
|
.'</a>
|
||||||
|
</td>';
|
||||||
|
|
||||||
|
echo '<td class="uk-text-center">'.( (ORDER_BY=='date') ? $page->dateRaw(ADMIN_PANEL_DATE_FORMAT) : $page->position() ).'</td>';
|
||||||
|
|
||||||
|
$friendlyURL = Text::isEmpty($Url->filters('page')) ? '/'.$page->key() : '/'.$Url->filters('page').'/'.$page->key();
|
||||||
|
echo '<td><a target="_blank" href="'.$page->permalink().'">'.$friendlyURL.'</a></td>';
|
||||||
|
echo '</tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($Url->pageNumber()==1) {
|
||||||
|
table('draft', 'spinner');
|
||||||
|
table('scheduled', 'clock-o');
|
||||||
|
table('static', 'thumb-tack');
|
||||||
|
table('sticky', 'sticky-note-o');
|
||||||
|
}
|
||||||
|
table('published', '');
|
||||||
|
|
||||||
|
echo '
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- Paginator -->
|
||||||
|
<div id="paginator">
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
// Show previus page link
|
||||||
|
if(Paginator::showPrev()) {
|
||||||
|
echo '<li><a href="'.Paginator::prevPageUrl().'" class="previous"><i class="fa fa-arrow-circle-o-left"></i> '.$Language->g('Previous').'</a></li>';
|
||||||
|
} else {
|
||||||
|
echo '<li class="disabled"><i class="fa fa-arrow-circle-o-left"></i> '.$Language->g('Previous').'</li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
for($i=1; $i<=Paginator::amountOfPages(); $i++) {
|
||||||
|
echo '<li><a href="'.Paginator::numberUrl($i).'" class="page">'.$i.'</a></li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show next page link
|
||||||
|
if(Paginator::showNext()) {
|
||||||
|
echo '<li><a href="'.Paginator::nextPageUrl().'" class="next">'.$Language->g('Next').' <i class="fa fa-arrow-circle-o-right"></i></a></li>';
|
||||||
|
} else {
|
||||||
|
echo '<li class="disabled">'.$Language->g('Next').' <i class="fa fa-arrow-circle-o-right"></i></li>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -1,28 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
HTML::title(array('title'=>$L->g('Manage content'), 'icon'=>'folder'));
|
echo Bootstrap::pageTitle(array('title'=>$L->g('Content'), 'icon'=>'cog'));
|
||||||
|
|
||||||
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'new-content"><i class="uk-icon-plus"></i> '.$L->g('Add new content').'</a>';
|
function table($status) {
|
||||||
|
|
||||||
echo '
|
|
||||||
<table class="uk-table uk-table-striped">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>'.$L->g('Title').'</th>
|
|
||||||
';
|
|
||||||
|
|
||||||
echo '<th class="uk-text-center">'.( (ORDER_BY=='date') ? $L->g('Date') : $L->g('Position') ).'</th>';
|
|
||||||
|
|
||||||
echo '
|
|
||||||
<th>'.$L->g('URL').'</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function table($status, $icon='arrow-circle-o-down') {
|
|
||||||
global $Url;
|
global $Url;
|
||||||
global $Language;
|
global $Language;
|
||||||
global $published;
|
global $published;
|
||||||
|
@ -33,23 +13,57 @@ function table($status, $icon='arrow-circle-o-down') {
|
||||||
|
|
||||||
if ($status=='published') {
|
if ($status=='published') {
|
||||||
$list = $published;
|
$list = $published;
|
||||||
|
if (empty($list)) {
|
||||||
|
echo '<p class="mt-4 text-muted">';
|
||||||
|
echo $Language->g('There are not pages in this moment.');
|
||||||
|
echo '</p>';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
} elseif ($status=='draft') {
|
} elseif ($status=='draft') {
|
||||||
$list = $drafts;
|
$list = $drafts;
|
||||||
|
if (empty($list)) {
|
||||||
|
echo '<p class="mt-4 text-muted">';
|
||||||
|
echo $Language->g('There are not draft pages in this moment.');
|
||||||
|
echo '</p>';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
} elseif ($status=='scheduled') {
|
} elseif ($status=='scheduled') {
|
||||||
$list = $scheduled;
|
$list = $scheduled;
|
||||||
|
if (empty($list)) {
|
||||||
|
echo '<p class="mt-4 text-muted">';
|
||||||
|
echo $Language->g('There are not scheduled pages in this moment.');
|
||||||
|
echo '</p>';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
} elseif ($status=='static') {
|
} elseif ($status=='static') {
|
||||||
$list = $static;
|
$list = $static;
|
||||||
|
if (empty($list)) {
|
||||||
|
echo '<p class="mt-4 text-muted">';
|
||||||
|
echo $Language->g('There are not static pages in this moment.');
|
||||||
|
echo '</p>';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
} elseif ($status=='sticky') {
|
} elseif ($status=='sticky') {
|
||||||
$list = $sticky;
|
$list = $sticky;
|
||||||
|
if (empty($list)) {
|
||||||
|
echo '<p class="mt-4 text-muted">';
|
||||||
|
echo $Language->g('There are not sticky pages in this moment.');
|
||||||
|
echo '</p>';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($list)) {
|
echo '
|
||||||
echo '<tr>
|
<table class="table mt-3">
|
||||||
<td style="color: #aaa; font-size: 0.9em; text-transform: uppercase;">'.$Language->g($status).'</td>
|
<thead>
|
||||||
<td></td>
|
<tr>
|
||||||
<td></td>
|
<th class="border-0" scope="col">'.$Language->g('Title').'</th>
|
||||||
</tr>';
|
<th class="border-0 d-none d-lg-table-cell" scope="col">'.$Language->g('URL').'</th>
|
||||||
}
|
<th class="border-0 text-center" scope="col">'.( ((ORDER_BY=='position') || ($status!='published'))?$Language->g('Position'):$Language->g('Creation date')).'</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
';
|
||||||
|
|
||||||
if (ORDER_BY=='position') {
|
if (ORDER_BY=='position') {
|
||||||
foreach ($list as $pageKey) {
|
foreach ($list as $pageKey) {
|
||||||
|
@ -58,29 +72,32 @@ function table($status, $icon='arrow-circle-o-down') {
|
||||||
if (!$page->isChild() || $status!='published') {
|
if (!$page->isChild() || $status!='published') {
|
||||||
echo '<tr>
|
echo '<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'"><i class="fa fa-'.$icon.'"></i> '
|
<a href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'">'
|
||||||
.($page->title()?$page->title():'<span class="label-empty-title">'.$Language->g('Empty title').'</span> ')
|
.($page->title()?$page->title():'<span>'.$Language->g('Empty title').'</span> ')
|
||||||
.'</a>
|
.'</a>
|
||||||
</td>
|
</td>';
|
||||||
<td class="uk-text-center">'.$page->position().'</td>';
|
|
||||||
|
|
||||||
$friendlyURL = Text::isEmpty($Url->filters('page')) ? '/'.$page->key() : '/'.$Url->filters('page').'/'.$page->key();
|
$friendlyURL = Text::isEmpty($Url->filters('page')) ? '/'.$page->key() : '/'.$Url->filters('page').'/'.$page->key();
|
||||||
echo '<td><a target="_blank" href="'.$page->permalink().'">'.$friendlyURL.'</a></td>';
|
echo '<td class="d-none d-lg-table-cell"><a target="_blank" href="'.$page->permalink().'">'.$friendlyURL.'</a></td>';
|
||||||
|
|
||||||
|
echo '<td class="text-center">'.$page->position().'</td>';
|
||||||
|
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
|
|
||||||
foreach ($page->children() as $child) {
|
foreach ($page->children() as $child) {
|
||||||
if ($child->published()) {
|
if ($child->published()) {
|
||||||
echo '<tr>
|
echo '<tr>
|
||||||
<td class="child-title">
|
<td>
|
||||||
|
<a href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$child->key().'">'
|
||||||
<a href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$child->key().'"><i class="fa fa-angle-right"></i> '
|
.($child->title()?$child->title():'<span>'.$Language->g('Empty title').'</span> ')
|
||||||
.($child->title()?$child->title():'<span class="label-empty-title">'.$Language->g('Empty title').'</span> ')
|
|
||||||
.'</a>
|
.'</a>
|
||||||
</td>
|
</td>';
|
||||||
<td class="uk-text-center">'.$child->position().'</td>';
|
|
||||||
|
|
||||||
$friendlyURL = Text::isEmpty($Url->filters('page')) ? '/'.$child->key() : '/'.$Url->filters('page').'/'.$child->key();
|
$friendlyURL = Text::isEmpty($Url->filters('page')) ? '/'.$child->key() : '/'.$Url->filters('page').'/'.$child->key();
|
||||||
echo '<td><a target="_blank" href="'.$child->permalink().'">'.$friendlyURL.'</a></td>';
|
echo '<td><a target="_blank" href="'.$child->permalink().'">'.$friendlyURL.'</a></td>';
|
||||||
|
|
||||||
|
echo '<td>'.$child->position().'</td>';
|
||||||
|
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,56 +110,70 @@ function table($status, $icon='arrow-circle-o-down') {
|
||||||
if ($page) {
|
if ($page) {
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<td>
|
echo '<td>
|
||||||
<a href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'"><i class="fa fa-'.$icon.'"></i> '
|
<a href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'">'
|
||||||
.($page->title()?$page->title():'<span class="label-empty-title">'.$Language->g('Empty title').'</span> ')
|
.($page->title()?$page->title():'<span class="label-empty-title">'.$Language->g('Empty title').'</span> ')
|
||||||
.'</a>
|
.'</a>
|
||||||
</td>';
|
</td>';
|
||||||
|
|
||||||
echo '<td class="uk-text-center">'.( (ORDER_BY=='date') ? $page->dateRaw(ADMIN_PANEL_DATE_FORMAT) : $page->position() ).'</td>';
|
|
||||||
|
|
||||||
$friendlyURL = Text::isEmpty($Url->filters('page')) ? '/'.$page->key() : '/'.$Url->filters('page').'/'.$page->key();
|
$friendlyURL = Text::isEmpty($Url->filters('page')) ? '/'.$page->key() : '/'.$Url->filters('page').'/'.$page->key();
|
||||||
echo '<td><a target="_blank" href="'.$page->permalink().'">'.$friendlyURL.'</a></td>';
|
echo '<td class="d-none d-lg-table-cell"><a target="_blank" href="'.$page->permalink().'">'.$friendlyURL.'</a></td>';
|
||||||
|
|
||||||
|
echo '<td class="text-center">'.( ((ORDER_BY=='position') || ($status!='published'))?$page->position():$page->dateRaw(ADMIN_PANEL_DATE_FORMAT) ).'</td>';
|
||||||
|
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo '
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($Url->pageNumber()==1) {
|
|
||||||
table('draft', 'spinner');
|
|
||||||
table('scheduled', 'clock-o');
|
|
||||||
table('static', 'thumb-tack');
|
|
||||||
table('sticky', 'sticky-note-o');
|
|
||||||
}
|
|
||||||
table('published', '');
|
|
||||||
|
|
||||||
echo '
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
';
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- Paginator -->
|
<!-- TABS -->
|
||||||
<div id="paginator">
|
<ul class="nav nav-tabs" role="tablist">
|
||||||
<ul>
|
<li class="nav-item">
|
||||||
<?php
|
<a class="nav-link active" id="pages-tab" data-toggle="tab" href="#pages" role="tab">Pages</a>
|
||||||
// Show previus page link
|
</li>
|
||||||
if(Paginator::showPrev()) {
|
<li class="nav-item">
|
||||||
echo '<li><a href="'.Paginator::prevPageUrl().'" class="previous"><i class="fa fa-arrow-circle-o-left"></i> '.$Language->g('Previous').'</a></li>';
|
<a class="nav-link" id="static-tab" data-toggle="tab" href="#static" role="tab">Static</a>
|
||||||
} else {
|
</li>
|
||||||
echo '<li class="disabled"><i class="fa fa-arrow-circle-o-left"></i> '.$Language->g('Previous').'</li>';
|
<li class="nav-item">
|
||||||
}
|
<a class="nav-link" id="sticky-tab" data-toggle="tab" href="#sticky" role="tab">Sticky</a>
|
||||||
|
</li>
|
||||||
for($i=1; $i<=Paginator::amountOfPages(); $i++) {
|
<li class="nav-item">
|
||||||
echo '<li><a href="'.Paginator::numberUrl($i).'" class="page">'.$i.'</a></li>';
|
<a class="nav-link" id="scheduled-tab" data-toggle="tab" href="#scheduled" role="tab">Scheduled</a>
|
||||||
}
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
// Show next page link
|
<a class="nav-link" id="draft-tab" data-toggle="tab" href="#draft" role="tab">Draft</a>
|
||||||
if(Paginator::showNext()) {
|
</li>
|
||||||
echo '<li><a href="'.Paginator::nextPageUrl().'" class="next">'.$Language->g('Next').' <i class="fa fa-arrow-circle-o-right"></i></a></li>';
|
|
||||||
} else {
|
|
||||||
echo '<li class="disabled">'.$Language->g('Next').' <i class="fa fa-arrow-circle-o-right"></i></li>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
<div class="tab-content">
|
||||||
|
<!-- TABS PAGES -->
|
||||||
|
<div class="tab-pane show active" id="pages" role="tabpanel">
|
||||||
|
<?php table('published'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- TABS STATIC -->
|
||||||
|
<div class="tab-pane" id="static" role="tabpanel">
|
||||||
|
<?php table('static'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- TABS STICKY -->
|
||||||
|
<div class="tab-pane" id="sticky" role="tabpanel">
|
||||||
|
<?php table('sticky'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- TABS SCHEDULED -->
|
||||||
|
<div class="tab-pane" id="scheduled" role="tabpanel">
|
||||||
|
<?php table('scheduled'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- TABS DRAFT -->
|
||||||
|
<div class="tab-pane" id="draft" role="tabpanel">
|
||||||
|
<?php table('draft'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
|
@ -0,0 +1,303 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
HTML::title(array('title'=>$L->g('Edit content'), 'icon'=>'file-text-o'));
|
||||||
|
|
||||||
|
HTML::formOpen(array('class'=>'uk-form-stacked'));
|
||||||
|
|
||||||
|
// Security token
|
||||||
|
HTML::formInputHidden(array(
|
||||||
|
'name'=>'tokenCSRF',
|
||||||
|
'value'=>$Security->getTokenCSRF()
|
||||||
|
));
|
||||||
|
|
||||||
|
// Key input
|
||||||
|
HTML::formInputHidden(array(
|
||||||
|
'name'=>'key',
|
||||||
|
'value'=>$page->key()
|
||||||
|
));
|
||||||
|
|
||||||
|
// LEFT SIDE
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
echo '<div class="uk-grid uk-grid-medium">';
|
||||||
|
echo '<div class="bl-publish-view uk-width-8-10">';
|
||||||
|
|
||||||
|
// Title input
|
||||||
|
HTML::formInputText(array(
|
||||||
|
'name'=>'title',
|
||||||
|
'value'=>$page->title(),
|
||||||
|
'class'=>'uk-width-1-1 uk-form-large',
|
||||||
|
'placeholder'=>$L->g('Title')
|
||||||
|
));
|
||||||
|
|
||||||
|
// Content input
|
||||||
|
HTML::formTextarea(array(
|
||||||
|
'name'=>'content',
|
||||||
|
'value'=>$page->contentRaw(false),
|
||||||
|
'class'=>'uk-width-1-1 uk-form-large',
|
||||||
|
'placeholder'=>''
|
||||||
|
));
|
||||||
|
|
||||||
|
// Form buttons
|
||||||
|
echo '<div class="uk-form-row uk-margin-bottom">';
|
||||||
|
echo '
|
||||||
|
<button class="uk-button uk-button-primary" type="submit">'.$L->g('Save').'</button>
|
||||||
|
<button class="uk-button uk-button-primary" type="button" id="jsSaveDraft">'.$L->g('Save as draft').'</button>
|
||||||
|
';
|
||||||
|
|
||||||
|
if(count($page->children())===0)
|
||||||
|
{
|
||||||
|
echo ' <button id="jsdelete" name="delete-page" class="uk-button" type="submit">'.$L->g('Delete').'</button>';
|
||||||
|
echo ' <a class="uk-button" href="'.HTML_PATH_ADMIN_ROOT.'content">'.$L->g('Cancel').'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
// RIGHT SIDE
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
echo '<div class="bl-publish-sidebar uk-width-2-10">';
|
||||||
|
|
||||||
|
echo '<ul>';
|
||||||
|
|
||||||
|
// GENERAL TAB
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
echo '<li><h2 class="sidebar-button" data-view="sidebar-general-view"><i class="uk-icon-angle-down"></i> '.$L->g('General').'</h2></li>';
|
||||||
|
echo '<li id="sidebar-general-view" class="sidebar-view">';
|
||||||
|
|
||||||
|
// Category
|
||||||
|
HTML::formSelect(array(
|
||||||
|
'name'=>'category',
|
||||||
|
'label'=>$L->g('Category'),
|
||||||
|
'class'=>'uk-width-1-1 uk-form-medium',
|
||||||
|
'options'=>$dbCategories->getKeyNameArray(),
|
||||||
|
'selected'=>$page->categoryKey(),
|
||||||
|
'tip'=>'',
|
||||||
|
'addEmptySpace'=>true
|
||||||
|
));
|
||||||
|
|
||||||
|
// Description input
|
||||||
|
HTML::formTextarea(array(
|
||||||
|
'name'=>'description',
|
||||||
|
'label'=>$L->g('description'),
|
||||||
|
'value'=>$page->description(),
|
||||||
|
'rows'=>'4',
|
||||||
|
'class'=>'uk-width-1-1 uk-form-medium',
|
||||||
|
'tip'=>$L->g('this-field-can-help-describe-the-content')
|
||||||
|
));
|
||||||
|
|
||||||
|
echo '</li>';
|
||||||
|
|
||||||
|
// IMAGES TAB
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
echo '<li><h2 class="sidebar-button" data-view="sidebar-images-view"><i class="uk-icon-angle-down"></i> '.$L->g('Images').'</h2></li>';
|
||||||
|
echo '<li id="sidebar-images-view" class="sidebar-view">';
|
||||||
|
|
||||||
|
// --- BLUDIT COVER IMAGE ---
|
||||||
|
$coverImage = $page->coverImage(false);
|
||||||
|
$externalCoverImage = '';
|
||||||
|
if (filter_var($coverImage, FILTER_VALIDATE_URL)) {
|
||||||
|
$coverImage = '';
|
||||||
|
$externalCoverImage = $page->coverImage(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
HTML::bluditCoverImage($coverImage);
|
||||||
|
|
||||||
|
// --- BLUDIT QUICK IMAGES ---
|
||||||
|
HTML::bluditQuickImages();
|
||||||
|
|
||||||
|
// --- BLUDIT IMAGES V8 ---
|
||||||
|
HTML::bluditImagesV8();
|
||||||
|
|
||||||
|
// --- BLUDIT MENU V8 ---
|
||||||
|
HTML::bluditMenuV8();
|
||||||
|
|
||||||
|
echo '</li>';
|
||||||
|
|
||||||
|
|
||||||
|
// TAGS
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
echo '<li><h2 class="sidebar-button" data-view="sidebar-tags-view"><i class="uk-icon-angle-down"></i> '.$L->g('Tags').'</h2></li>';
|
||||||
|
echo '<li id="sidebar-tags-view" class="sidebar-view">';
|
||||||
|
|
||||||
|
// Tags input
|
||||||
|
HTML::tags(array(
|
||||||
|
'name'=>'tags',
|
||||||
|
'label'=>$L->g('Tags'),
|
||||||
|
'allTags'=>$dbTags->getKeyNameArray(),
|
||||||
|
'selectedTags'=>$page->tags(true)
|
||||||
|
));
|
||||||
|
|
||||||
|
echo '</li>';
|
||||||
|
|
||||||
|
// ADVANCED TAB
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
echo '<li><h2 class="sidebar-button" data-view="sidebar-advanced-view"><i class="uk-icon-angle-down"></i> '.$L->g('Advanced').'</h2></li>';
|
||||||
|
echo '<li id="sidebar-advanced-view" class="sidebar-view">';
|
||||||
|
|
||||||
|
// Status input
|
||||||
|
HTML::formSelect(array(
|
||||||
|
'name'=>'status',
|
||||||
|
'label'=>$L->g('Status'),
|
||||||
|
'class'=>'uk-width-1-1 uk-form-medium',
|
||||||
|
'options'=>array(
|
||||||
|
'published'=>$L->g('Published'),
|
||||||
|
'static'=>$L->g('Static'),
|
||||||
|
'sticky'=>$L->g('Sticky'),
|
||||||
|
'draft'=>$L->g('Draft')
|
||||||
|
),
|
||||||
|
'selected'=>$page->status(),
|
||||||
|
'tip'=>''
|
||||||
|
));
|
||||||
|
|
||||||
|
// Date input
|
||||||
|
HTML::formInputText(array(
|
||||||
|
'name'=>'date',
|
||||||
|
'value'=>$page->dateRaw(),
|
||||||
|
'class'=>'uk-width-1-1 uk-form-medium',
|
||||||
|
'tip'=>$L->g('To schedule the content select the date and time'),
|
||||||
|
'label'=>$L->g('Date')
|
||||||
|
));
|
||||||
|
|
||||||
|
echo '<hr>';
|
||||||
|
|
||||||
|
// Parent input
|
||||||
|
// Check if the page has children
|
||||||
|
if (count($page->children())==0) {
|
||||||
|
$options = array(' '=>'- '.$L->g('No parent').' -');
|
||||||
|
$parentsList = $dbPages->getParents();
|
||||||
|
foreach ($parentsList as $pageKey) {
|
||||||
|
$parent = buildPage($pageKey);
|
||||||
|
$options[$pageKey] = $parent->title();
|
||||||
|
}
|
||||||
|
unset($options[$page->key()]);
|
||||||
|
|
||||||
|
HTML::formSelect(array(
|
||||||
|
'name'=>'parent',
|
||||||
|
'label'=>$L->g('Parent'),
|
||||||
|
'class'=>'uk-width-1-1 uk-form-medium',
|
||||||
|
'options'=>$options,
|
||||||
|
'selected'=>$page->parentKey(),
|
||||||
|
'tip'=>'',
|
||||||
|
'disabled'=>$page->status()=='static'
|
||||||
|
));
|
||||||
|
|
||||||
|
echo '<hr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Position input
|
||||||
|
HTML::formInputText(array(
|
||||||
|
'name'=>'position',
|
||||||
|
'value'=>$page->position(),
|
||||||
|
'class'=>'uk-width-1-1 uk-form-medium',
|
||||||
|
'label'=>$L->g('Position'),
|
||||||
|
'tip'=>$L->g('This field is used when you order the content by position')
|
||||||
|
));
|
||||||
|
|
||||||
|
echo '<hr>';
|
||||||
|
|
||||||
|
// External Coverimage
|
||||||
|
HTML::formInputText(array(
|
||||||
|
'name'=>'externalCoverImage',
|
||||||
|
'value'=>$externalCoverImage,
|
||||||
|
'class'=>'uk-width-1-1 uk-form-medium',
|
||||||
|
'label'=>$L->g('External Cover Image'),
|
||||||
|
'tip'=>$L->g('Full image URL')
|
||||||
|
));
|
||||||
|
|
||||||
|
echo '<hr>';
|
||||||
|
|
||||||
|
// Slug input
|
||||||
|
HTML::formInputText(array(
|
||||||
|
'name'=>'slug',
|
||||||
|
'value'=>$page->slug(),
|
||||||
|
'class'=>'uk-width-1-1 uk-form-medium',
|
||||||
|
'tip'=>$L->g('URL associated with the content'),
|
||||||
|
'label'=>$L->g('Friendly URL')
|
||||||
|
));
|
||||||
|
|
||||||
|
echo '</li>';
|
||||||
|
echo '</ul>';
|
||||||
|
|
||||||
|
Theme::plugins('adminContentSidebar');
|
||||||
|
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
HTML::formClose();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$(document).ready(function()
|
||||||
|
{
|
||||||
|
var key = $("#jskey").val();
|
||||||
|
|
||||||
|
$("#jsdate").datetimepicker({format:"<?php echo DB_DATE_FORMAT ?>"});
|
||||||
|
|
||||||
|
$("#jsslug").keyup(function() {
|
||||||
|
var text = $(this).val();
|
||||||
|
var parent = $("#jsparent").val();
|
||||||
|
|
||||||
|
generateSlug(text, parent, key, $("#jsslug"));
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#jstitle").keyup(function() {
|
||||||
|
var text = $(this).val();
|
||||||
|
var parent = $("#jsparent").val();
|
||||||
|
|
||||||
|
generateSlug(text, parent, key, $("#jsslug"));
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#jsparent").change(function() {
|
||||||
|
var parent = $(this).val();
|
||||||
|
var text = $("#jsslug").val();
|
||||||
|
|
||||||
|
if (parent=="") {
|
||||||
|
$("#jsparentExample").text("");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$("#jsparentExample").text(parent+"/");
|
||||||
|
}
|
||||||
|
|
||||||
|
generateSlug(text, parent, key, $("#jsslug"));
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#jsdelete").click(function() {
|
||||||
|
if(confirm("<?php $Language->p('confirm-delete-this-action-cannot-be-undone') ?>")==false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Button Save as draft
|
||||||
|
$("#jsSaveDraft").on("click", function() {
|
||||||
|
$("#jsstatus").val("draft");
|
||||||
|
$(".uk-form").submit();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Right sidebar
|
||||||
|
$(".sidebar-button").click(function() {
|
||||||
|
var view = "#" + $(this).data("view");
|
||||||
|
|
||||||
|
if( $(view).is(":visible") ) {
|
||||||
|
$(view).hide();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$(".sidebar-view").hide();
|
||||||
|
$(view).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#jsstatus").change(function() {
|
||||||
|
if ($(this).val()=='static') {
|
||||||
|
$("#jsparent").val(' ');
|
||||||
|
$("#jsparent").attr('disabled','disabled');
|
||||||
|
} else {
|
||||||
|
$("#jsparent").removeAttr('disabled');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
|
@ -1,303 +1,249 @@
|
||||||
<?php
|
<!-- TABS -->
|
||||||
|
<ul class="nav nav-tabs" id="dynamicTab" role="tablist">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link active" id="content-tab" data-toggle="tab" href="#content" role="tab" aria-controls="content" aria-selected="true">Content</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" id="images-tab" data-toggle="tab" href="#images" role="tab" aria-controls="images" aria-selected="false">Images</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link " id="options-tab" data-toggle="tab" href="#options" role="tab" aria-controls="options" aria-selected="false">Options</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<form class="tab-content mt-3" id="dynamicTabContent">
|
||||||
|
|
||||||
HTML::title(array('title'=>$L->g('Edit content'), 'icon'=>'file-text-o'));
|
<?php
|
||||||
|
// Token CSRF
|
||||||
HTML::formOpen(array('class'=>'uk-form-stacked'));
|
echo Bootstrap::formInputHidden(array(
|
||||||
|
'name'=>'tokenCSRF',
|
||||||
// Security token
|
'value'=>$Security->getTokenCSRF()
|
||||||
HTML::formInputHidden(array(
|
|
||||||
'name'=>'tokenCSRF',
|
|
||||||
'value'=>$Security->getTokenCSRF()
|
|
||||||
));
|
|
||||||
|
|
||||||
// Key input
|
|
||||||
HTML::formInputHidden(array(
|
|
||||||
'name'=>'key',
|
|
||||||
'value'=>$page->key()
|
|
||||||
));
|
|
||||||
|
|
||||||
// LEFT SIDE
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
echo '<div class="uk-grid uk-grid-medium">';
|
|
||||||
echo '<div class="bl-publish-view uk-width-8-10">';
|
|
||||||
|
|
||||||
// Title input
|
|
||||||
HTML::formInputText(array(
|
|
||||||
'name'=>'title',
|
|
||||||
'value'=>$page->title(),
|
|
||||||
'class'=>'uk-width-1-1 uk-form-large',
|
|
||||||
'placeholder'=>$L->g('Title')
|
|
||||||
));
|
|
||||||
|
|
||||||
// Content input
|
|
||||||
HTML::formTextarea(array(
|
|
||||||
'name'=>'content',
|
|
||||||
'value'=>$page->contentRaw(false),
|
|
||||||
'class'=>'uk-width-1-1 uk-form-large',
|
|
||||||
'placeholder'=>''
|
|
||||||
));
|
|
||||||
|
|
||||||
// Form buttons
|
|
||||||
echo '<div class="uk-form-row uk-margin-bottom">';
|
|
||||||
echo '
|
|
||||||
<button class="uk-button uk-button-primary" type="submit">'.$L->g('Save').'</button>
|
|
||||||
<button class="uk-button uk-button-primary" type="button" id="jsSaveDraft">'.$L->g('Save as draft').'</button>
|
|
||||||
';
|
|
||||||
|
|
||||||
if(count($page->children())===0)
|
|
||||||
{
|
|
||||||
echo ' <button id="jsdelete" name="delete-page" class="uk-button" type="submit">'.$L->g('Delete').'</button>';
|
|
||||||
echo ' <a class="uk-button" href="'.HTML_PATH_ADMIN_ROOT.'content">'.$L->g('Cancel').'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
echo '</div>';
|
|
||||||
|
|
||||||
echo '</div>';
|
|
||||||
|
|
||||||
// RIGHT SIDE
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
echo '<div class="bl-publish-sidebar uk-width-2-10">';
|
|
||||||
|
|
||||||
echo '<ul>';
|
|
||||||
|
|
||||||
// GENERAL TAB
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-general-view"><i class="uk-icon-angle-down"></i> '.$L->g('General').'</h2></li>';
|
|
||||||
echo '<li id="sidebar-general-view" class="sidebar-view">';
|
|
||||||
|
|
||||||
// Category
|
|
||||||
HTML::formSelect(array(
|
|
||||||
'name'=>'category',
|
|
||||||
'label'=>$L->g('Category'),
|
|
||||||
'class'=>'uk-width-1-1 uk-form-medium',
|
|
||||||
'options'=>$dbCategories->getKeyNameArray(),
|
|
||||||
'selected'=>$page->categoryKey(),
|
|
||||||
'tip'=>'',
|
|
||||||
'addEmptySpace'=>true
|
|
||||||
));
|
|
||||||
|
|
||||||
// Description input
|
|
||||||
HTML::formTextarea(array(
|
|
||||||
'name'=>'description',
|
|
||||||
'label'=>$L->g('description'),
|
|
||||||
'value'=>$page->description(),
|
|
||||||
'rows'=>'4',
|
|
||||||
'class'=>'uk-width-1-1 uk-form-medium',
|
|
||||||
'tip'=>$L->g('this-field-can-help-describe-the-content')
|
|
||||||
));
|
|
||||||
|
|
||||||
echo '</li>';
|
|
||||||
|
|
||||||
// IMAGES TAB
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-images-view"><i class="uk-icon-angle-down"></i> '.$L->g('Images').'</h2></li>';
|
|
||||||
echo '<li id="sidebar-images-view" class="sidebar-view">';
|
|
||||||
|
|
||||||
// --- BLUDIT COVER IMAGE ---
|
|
||||||
$coverImage = $page->coverImage(false);
|
|
||||||
$externalCoverImage = '';
|
|
||||||
if (filter_var($coverImage, FILTER_VALIDATE_URL)) {
|
|
||||||
$coverImage = '';
|
|
||||||
$externalCoverImage = $page->coverImage(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
HTML::bluditCoverImage($coverImage);
|
|
||||||
|
|
||||||
// --- BLUDIT QUICK IMAGES ---
|
|
||||||
HTML::bluditQuickImages();
|
|
||||||
|
|
||||||
// --- BLUDIT IMAGES V8 ---
|
|
||||||
HTML::bluditImagesV8();
|
|
||||||
|
|
||||||
// --- BLUDIT MENU V8 ---
|
|
||||||
HTML::bluditMenuV8();
|
|
||||||
|
|
||||||
echo '</li>';
|
|
||||||
|
|
||||||
|
|
||||||
// TAGS
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-tags-view"><i class="uk-icon-angle-down"></i> '.$L->g('Tags').'</h2></li>';
|
|
||||||
echo '<li id="sidebar-tags-view" class="sidebar-view">';
|
|
||||||
|
|
||||||
// Tags input
|
|
||||||
HTML::tags(array(
|
|
||||||
'name'=>'tags',
|
|
||||||
'label'=>$L->g('Tags'),
|
|
||||||
'allTags'=>$dbTags->getKeyNameArray(),
|
|
||||||
'selectedTags'=>$page->tags(true)
|
|
||||||
));
|
|
||||||
|
|
||||||
echo '</li>';
|
|
||||||
|
|
||||||
// ADVANCED TAB
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-advanced-view"><i class="uk-icon-angle-down"></i> '.$L->g('Advanced').'</h2></li>';
|
|
||||||
echo '<li id="sidebar-advanced-view" class="sidebar-view">';
|
|
||||||
|
|
||||||
// Status input
|
|
||||||
HTML::formSelect(array(
|
|
||||||
'name'=>'status',
|
|
||||||
'label'=>$L->g('Status'),
|
|
||||||
'class'=>'uk-width-1-1 uk-form-medium',
|
|
||||||
'options'=>array(
|
|
||||||
'published'=>$L->g('Published'),
|
|
||||||
'static'=>$L->g('Static'),
|
|
||||||
'sticky'=>$L->g('Sticky'),
|
|
||||||
'draft'=>$L->g('Draft')
|
|
||||||
),
|
|
||||||
'selected'=>$page->status(),
|
|
||||||
'tip'=>''
|
|
||||||
));
|
|
||||||
|
|
||||||
// Date input
|
|
||||||
HTML::formInputText(array(
|
|
||||||
'name'=>'date',
|
|
||||||
'value'=>$page->dateRaw(),
|
|
||||||
'class'=>'uk-width-1-1 uk-form-medium',
|
|
||||||
'tip'=>$L->g('To schedule the content select the date and time'),
|
|
||||||
'label'=>$L->g('Date')
|
|
||||||
));
|
|
||||||
|
|
||||||
echo '<hr>';
|
|
||||||
|
|
||||||
// Parent input
|
|
||||||
// Check if the page has children
|
|
||||||
if (count($page->children())==0) {
|
|
||||||
$options = array(' '=>'- '.$L->g('No parent').' -');
|
|
||||||
$parentsList = $dbPages->getParents();
|
|
||||||
foreach ($parentsList as $pageKey) {
|
|
||||||
$parent = buildPage($pageKey);
|
|
||||||
$options[$pageKey] = $parent->title();
|
|
||||||
}
|
|
||||||
unset($options[$page->key()]);
|
|
||||||
|
|
||||||
HTML::formSelect(array(
|
|
||||||
'name'=>'parent',
|
|
||||||
'label'=>$L->g('Parent'),
|
|
||||||
'class'=>'uk-width-1-1 uk-form-medium',
|
|
||||||
'options'=>$options,
|
|
||||||
'selected'=>$page->parentKey(),
|
|
||||||
'tip'=>'',
|
|
||||||
'disabled'=>$page->status()=='static'
|
|
||||||
));
|
));
|
||||||
|
|
||||||
echo '<hr>';
|
// Parent
|
||||||
}
|
echo Bootstrap::formInputHidden(array(
|
||||||
|
'name'=>'parent',
|
||||||
|
'value'=>$page->parent()
|
||||||
|
));
|
||||||
|
|
||||||
// Position input
|
// Status = published, draft, sticky, static
|
||||||
HTML::formInputText(array(
|
echo Bootstrap::formInputHidden(array(
|
||||||
'name'=>'position',
|
'name'=>'status',
|
||||||
'value'=>$page->position(),
|
'value'=>$page->status()
|
||||||
'class'=>'uk-width-1-1 uk-form-medium',
|
));
|
||||||
'label'=>$L->g('Position'),
|
|
||||||
'tip'=>$L->g('This field is used when you order the content by position')
|
|
||||||
));
|
|
||||||
|
|
||||||
echo '<hr>';
|
// Page current key
|
||||||
|
echo Bootstrap::formInputHidden(array(
|
||||||
|
'name'=>'key',
|
||||||
|
'value'=>$page->key()
|
||||||
|
));
|
||||||
|
?>
|
||||||
|
|
||||||
// External Coverimage
|
<!-- TABS CONTENT -->
|
||||||
HTML::formInputText(array(
|
<div class="tab-pane show active" id="content" role="tabpanel" aria-labelledby="content-tab">
|
||||||
'name'=>'externalCoverImage',
|
|
||||||
'value'=>$externalCoverImage,
|
|
||||||
'class'=>'uk-width-1-1 uk-form-medium',
|
|
||||||
'label'=>$L->g('External Cover Image'),
|
|
||||||
'tip'=>$L->g('Full image URL')
|
|
||||||
));
|
|
||||||
|
|
||||||
echo '<hr>';
|
<?php
|
||||||
|
// Title
|
||||||
|
echo Bootstrap::formInputTextBlock(array(
|
||||||
|
'name'=>'title',
|
||||||
|
'placeholder'=>'Enter title',
|
||||||
|
'class'=>'form-control-lg',
|
||||||
|
'value'=>$page->title()
|
||||||
|
));
|
||||||
|
?>
|
||||||
|
|
||||||
// Slug input
|
<div class="form-group mt-2">
|
||||||
HTML::formInputText(array(
|
<div id="jscontent" name="content"><?php echo $page->contentRaw(true) ?></div>
|
||||||
'name'=>'slug',
|
</div>
|
||||||
'value'=>$page->slug(),
|
|
||||||
'class'=>'uk-width-1-1 uk-form-medium',
|
|
||||||
'tip'=>$L->g('URL associated with the content'),
|
|
||||||
'label'=>$L->g('Friendly URL')
|
|
||||||
));
|
|
||||||
|
|
||||||
echo '</li>';
|
<div class="form-group mt-2">
|
||||||
echo '</ul>';
|
<button type="button" class="btn btn-primary">Save</button>
|
||||||
|
<button type="button" class="btn" id="jssaveAsDraft">Save as draft</button>
|
||||||
|
<button type="button" class="btn">Cancel</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
Theme::plugins('adminContentSidebar');
|
</div>
|
||||||
|
|
||||||
echo '</div>';
|
<!-- TABS IMAGES -->
|
||||||
echo '</div>';
|
<div class="tab-pane" id="images" role="tabpanel" aria-labelledby="images-tab">
|
||||||
|
|
||||||
HTML::formClose();
|
<?php
|
||||||
|
echo Bootstrap::formTitle(array('title'=>'Select images'));
|
||||||
|
?>
|
||||||
|
|
||||||
?>
|
<button type="button" class="btn" data-toggle="modal" data-target="#jsbluditMediaModal">Media Manager</button>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
echo Bootstrap::formTitle(array('title'=>'Cover image'));
|
||||||
|
|
||||||
|
$coverImage = $page->coverImage(false);
|
||||||
|
$externalCoverImage = '';
|
||||||
|
if (filter_var($coverImage, FILTER_VALIDATE_URL)) {
|
||||||
|
$coverImage = '';
|
||||||
|
$externalCoverImage = $page->coverImage(false);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<img class="img-thumbnail" alt="200x200" src="<?php echo $coverImage ?>" data-holder-rendered="true" style="width: 100px; height: 100px;">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
echo Bootstrap::formTitle(array('title'=>'External Cover image'));
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
echo Bootstrap::formInputTextBlock(array(
|
||||||
|
'name'=>'externalCoverImage',
|
||||||
|
'placeholder'=>'https://',
|
||||||
|
'value'=>$externalCoverImage,
|
||||||
|
'tip'=>'Set a cover image from external URL, such as a CDN or some server dedicate for images.'
|
||||||
|
));
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- TABS OPTIONS -->
|
||||||
|
<div class="tab-pane" id="options" role="tabpanel" aria-labelledby="options-tab">
|
||||||
|
<?php
|
||||||
|
echo Bootstrap::formTitle(array('title'=>'General'));
|
||||||
|
|
||||||
|
// Category
|
||||||
|
echo Bootstrap::formSelect(array(
|
||||||
|
'name'=>'category',
|
||||||
|
'label'=>'Category',
|
||||||
|
'selected'=>'',
|
||||||
|
'options'=>array(
|
||||||
|
''=>'- Uncategorized -',
|
||||||
|
'music'=>'Music',
|
||||||
|
'videos'=>'Videos'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
// Tags
|
||||||
|
echo Bootstrap::formInputText(array(
|
||||||
|
'name'=>'tags',
|
||||||
|
'label'=>'Tags',
|
||||||
|
'placeholder'=>'Tags separeted by comma'
|
||||||
|
));
|
||||||
|
|
||||||
|
// Description
|
||||||
|
echo Bootstrap::formTextarea(array(
|
||||||
|
'name'=>'description',
|
||||||
|
'label'=>'Description',
|
||||||
|
'placeholder'=>'Small description about the content',
|
||||||
|
'rows'=>'4'
|
||||||
|
));
|
||||||
|
|
||||||
|
echo Bootstrap::formTitle(array('title'=>'Advanced'));
|
||||||
|
|
||||||
|
// Date
|
||||||
|
echo Bootstrap::formInputText(array(
|
||||||
|
'name'=>'date',
|
||||||
|
'label'=>'Date',
|
||||||
|
'placeholder'=>'YYYY-MM-DD hh:mm:ss',
|
||||||
|
'value'=>$page->dateRaw()
|
||||||
|
));
|
||||||
|
|
||||||
|
// Type
|
||||||
|
echo Bootstrap::formSelect(array(
|
||||||
|
'name'=>'type',
|
||||||
|
'label'=>'Type',
|
||||||
|
'selected'=>'',
|
||||||
|
'options'=>array(
|
||||||
|
''=>'- Default -',
|
||||||
|
'sticky'=>'Sticky',
|
||||||
|
'static'=>'Static'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
// Parent
|
||||||
|
echo Bootstrap::formInputText(array(
|
||||||
|
'name'=>'parentTMP',
|
||||||
|
'label'=>'Parent',
|
||||||
|
'placeholder'=>'Start writing the title of the page parent'
|
||||||
|
));
|
||||||
|
|
||||||
|
// Position
|
||||||
|
echo Bootstrap::formInputText(array(
|
||||||
|
'name'=>'position',
|
||||||
|
'label'=>'Position',
|
||||||
|
'placeholder'=>'',
|
||||||
|
'value'=>$page->position()
|
||||||
|
));
|
||||||
|
|
||||||
|
// Friendly URL
|
||||||
|
echo Bootstrap::formInputText(array(
|
||||||
|
'name'=>'slug',
|
||||||
|
'label'=>'Friendly URL',
|
||||||
|
'placeholder'=>'Leave empty for automaticly complete'
|
||||||
|
));
|
||||||
|
|
||||||
|
// Template
|
||||||
|
echo Bootstrap::formInputText(array(
|
||||||
|
'name'=>'template',
|
||||||
|
'label'=>'Template',
|
||||||
|
'placeholder'=>''
|
||||||
|
));
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
$(document).ready(function()
|
|
||||||
{
|
|
||||||
var key = $("#jskey").val();
|
|
||||||
|
|
||||||
$("#jsdate").datetimepicker({format:"<?php echo DB_DATE_FORMAT ?>"});
|
|
||||||
|
|
||||||
$("#jsslug").keyup(function() {
|
|
||||||
var text = $(this).val();
|
|
||||||
var parent = $("#jsparent").val();
|
|
||||||
|
|
||||||
generateSlug(text, parent, key, $("#jsslug"));
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#jstitle").keyup(function() {
|
|
||||||
var text = $(this).val();
|
|
||||||
var parent = $("#jsparent").val();
|
|
||||||
|
|
||||||
generateSlug(text, parent, key, $("#jsslug"));
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#jsparent").change(function() {
|
|
||||||
var parent = $(this).val();
|
|
||||||
var text = $("#jsslug").val();
|
|
||||||
|
|
||||||
if (parent=="") {
|
|
||||||
$("#jsparentExample").text("");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$("#jsparentExample").text(parent+"/");
|
|
||||||
}
|
|
||||||
|
|
||||||
generateSlug(text, parent, key, $("#jsslug"));
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#jsdelete").click(function() {
|
|
||||||
if(confirm("<?php $Language->p('confirm-delete-this-action-cannot-be-undone') ?>")==false) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Button Save as draft
|
// Button Save as draft
|
||||||
$("#jsSaveDraft").on("click", function() {
|
$("#jssaveAsDraft").on("click", function() {
|
||||||
$("#jsstatus").val("draft");
|
$("#jsstatus").val("draft");
|
||||||
$(".uk-form").submit();
|
$("#dynamicTabContent").submit();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Right sidebar
|
// Type selector modiefied the status
|
||||||
$(".sidebar-button").click(function() {
|
$("#jstype").on("change", function() {
|
||||||
var view = "#" + $(this).data("view");
|
var status = $("#jstype option:selected").val();
|
||||||
|
$("#jsstatus").val(status);
|
||||||
|
});
|
||||||
|
|
||||||
if( $(view).is(":visible") ) {
|
// Template autocomplete
|
||||||
$(view).hide();
|
$('input[name="template"]').autoComplete({
|
||||||
}
|
minChars: 2,
|
||||||
else {
|
source: function(term, suggest){
|
||||||
$(".sidebar-view").hide();
|
term = term.toLowerCase();
|
||||||
$(view).show();
|
var choices = ['ActionScript', 'Acti', 'Asp'];
|
||||||
|
var matches = [];
|
||||||
|
for (i=0; i<choices.length; i++)
|
||||||
|
if (~choices[i].toLowerCase().indexOf(term)) matches.push(choices[i]);
|
||||||
|
suggest(matches);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#jsstatus").change(function() {
|
// Parent autocomplete
|
||||||
if ($(this).val()=='static') {
|
var parentsXHR;
|
||||||
$("#jsparent").val(' ');
|
var parentsList; // Keep the parent list returned to get the key by the title page
|
||||||
$("#jsparent").attr('disabled','disabled');
|
$("#jsparentTMP").autoComplete({
|
||||||
} else {
|
source: function(term, response) {
|
||||||
$("#jsparent").removeAttr('disabled');
|
// Prevent call inmediatly another ajax request
|
||||||
|
try { parentsXHR.abort(); } catch(e){}
|
||||||
|
parentsXHR = $.getJSON("<?php echo HTML_PATH_ADMIN_ROOT ?>ajax/get-parents", {query: term},
|
||||||
|
function(data) {
|
||||||
|
parentsList = data;
|
||||||
|
term = term.toLowerCase();
|
||||||
|
var matches = [];
|
||||||
|
for (var title in data) {
|
||||||
|
if (~title.toLowerCase().indexOf(term))
|
||||||
|
matches.push(title);
|
||||||
|
}
|
||||||
|
response(matches);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onSelect: function(e, term, item) {
|
||||||
|
var parentKey = parentsList[term];
|
||||||
|
$("#jsparent").attr("value", parentKey);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
</script>
|
<?php
|
||||||
|
// Include Bludit Media Manager
|
||||||
|
include(PATH_ADMIN_THEMES.'booty/html/media.php');
|
||||||
|
?>
|
|
@ -40,7 +40,8 @@
|
||||||
echo Bootstrap::formInputTextBlock(array(
|
echo Bootstrap::formInputTextBlock(array(
|
||||||
'name'=>'title',
|
'name'=>'title',
|
||||||
'placeholder'=>'Enter title',
|
'placeholder'=>'Enter title',
|
||||||
'class'=>'form-control-lg'
|
'class'=>'form-control-lg',
|
||||||
|
'value'=>''
|
||||||
));
|
));
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -79,7 +80,8 @@
|
||||||
echo Bootstrap::formInputTextBlock(array(
|
echo Bootstrap::formInputTextBlock(array(
|
||||||
'name'=>'externalCoverImage',
|
'name'=>'externalCoverImage',
|
||||||
'placeholder'=>'https://',
|
'placeholder'=>'https://',
|
||||||
'tip'=>'You can set a cover image from external URL, such as a CDN or some server dedicate for images.'
|
'value'=>'',
|
||||||
|
'tip'=>'Set a cover image from external URL, such as a CDN or some server dedicate for images.'
|
||||||
));
|
));
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -87,8 +89,9 @@
|
||||||
|
|
||||||
<!-- TABS OPTIONS -->
|
<!-- TABS OPTIONS -->
|
||||||
<div class="tab-pane" id="options" role="tabpanel" aria-labelledby="options-tab">
|
<div class="tab-pane" id="options" role="tabpanel" aria-labelledby="options-tab">
|
||||||
<h4 class="mt-4 mb-3">General</h4>
|
|
||||||
<?php
|
<?php
|
||||||
|
echo Bootstrap::formTitle(array('title'=>'General'));
|
||||||
|
|
||||||
// Category
|
// Category
|
||||||
echo Bootstrap::formSelect(array(
|
echo Bootstrap::formSelect(array(
|
||||||
'name'=>'category',
|
'name'=>'category',
|
||||||
|
@ -115,9 +118,9 @@
|
||||||
'placeholder'=>'Small description about the content',
|
'placeholder'=>'Small description about the content',
|
||||||
'rows'=>'4'
|
'rows'=>'4'
|
||||||
));
|
));
|
||||||
?>
|
|
||||||
<h4 class="mt-4 mb-3">Advanced</h4>
|
echo Bootstrap::formTitle(array('title'=>'Advanced'));
|
||||||
<?php
|
|
||||||
// Date
|
// Date
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'date',
|
'name'=>'date',
|
||||||
|
|
|
@ -158,17 +158,15 @@ class Page {
|
||||||
|
|
||||||
// Returns the raw content
|
// Returns the raw content
|
||||||
// This content is not markdown parser
|
// This content is not markdown parser
|
||||||
// (boolean) $noSanitize, TRUE returns the content without sanitized
|
// (boolean) $sanitize, TRUE returns the content sanitized
|
||||||
public function contentRaw($noSanitize=true)
|
public function contentRaw($sanitize=false)
|
||||||
{
|
{
|
||||||
// This content is not sanitized.
|
// This content is not sanitized.
|
||||||
$content = $this->getValue('contentRaw');
|
$content = $this->getValue('contentRaw');
|
||||||
|
if ($sanitize) {
|
||||||
if($noSanitize) {
|
return Sanitize::html($content);
|
||||||
return $content;
|
|
||||||
}
|
}
|
||||||
|
return $content;
|
||||||
return Sanitize::html($content);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the date according to locale settings and format settings
|
// Returns the date according to locale settings and format settings
|
||||||
|
@ -305,7 +303,7 @@ class Page {
|
||||||
$tmp['key'] = $this->key();
|
$tmp['key'] = $this->key();
|
||||||
$tmp['title'] = $this->title();
|
$tmp['title'] = $this->title();
|
||||||
$tmp['content'] = $this->content(); // Markdown parsed
|
$tmp['content'] = $this->content(); // Markdown parsed
|
||||||
$tmp['contentRaw'] = $this->contentRaw(); // No Markdown parsed
|
$tmp['contentRaw'] = $this->contentRaw(true); // No Markdown parsed
|
||||||
$tmp['description'] = $this->description();
|
$tmp['description'] = $this->description();
|
||||||
$tmp['date'] = $this->dateRaw();
|
$tmp['date'] = $this->dateRaw();
|
||||||
$tmp['dateUTC'] = Date::convertToUTC($this->dateRaw(), DB_DATE_FORMAT, DB_DATE_FORMAT);
|
$tmp['dateUTC'] = Date::convertToUTC($this->dateRaw(), DB_DATE_FORMAT, DB_DATE_FORMAT);
|
||||||
|
@ -436,6 +434,12 @@ class Page {
|
||||||
return $explode[0];
|
return $explode[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Returns the parent key, if the page doesn't have a parent returns FALSE
|
||||||
|
public function parent()
|
||||||
|
{
|
||||||
|
return $this->parentKey();
|
||||||
|
}
|
||||||
|
|
||||||
// Returns the parent key, if the page doesn't have a parent returns FALSE
|
// Returns the parent key, if the page doesn't have a parent returns FALSE
|
||||||
public function parentKey()
|
public function parentKey()
|
||||||
{
|
{
|
||||||
|
@ -443,7 +447,6 @@ class Page {
|
||||||
if (isset($explode[1])) {
|
if (isset($explode[1])) {
|
||||||
return $explode[0];
|
return $explode[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue