Pages, and static pages

This commit is contained in:
Diego Najar 2017-09-20 23:00:03 +02:00
parent 9eb880f6d3
commit a8101ea2f2
10 changed files with 35 additions and 30 deletions

View File

@ -36,7 +36,7 @@ $drafts = $dbPages->getDraftDB();
$scheduled = $dbPages->getScheduledDB();
$fixed = $dbPages->getFixedDB();
$static = $dbPages->getStaticDB();
// Title of the page
$layout['title'] .= ' - '.$Language->g('Manage Content');

View File

@ -58,8 +58,8 @@ $(document).ready(function() {
<div class="uk-offcanvas-bar">
<ul class="uk-nav uk-nav-offcanvas">
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>"><?php $L->p('Dashboard') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-page' ?>"><?php $L->p('New content') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-pages' ?>"><?php $L->p('Manage content') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-page' ?>"><?php $L->p('New page') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'manage-pages' ?>"><?php $L->p('Manage pages') ?></a></li>
<?php if($Login->role() == 'admin') { ?>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'categories' ?>"><?php $L->p('Manage categories') ?></a></li>
<li><a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>"><?php $L->p('Manage users') ?></a></li>
@ -103,12 +103,12 @@ $(document).ready(function() {
<li class="uk-nav-header"><?php $L->p('Publish') ?></li>
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-page' ?>"><?php $L->p('New content') ?></a>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-page' ?>"><?php $L->p('New page') ?></a>
</li>
<li class="uk-nav-header"><?php $L->p('Manage') ?></li>
<li <?php echo ($layout['view']=='pages')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'pages' ?>"><?php $L->p('Content') ?></a>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'pages' ?>"><?php $L->p('Pages') ?></a>
</li>
<li <?php echo ($layout['view']=='categories')?'class="uk-active"':'' ?>>
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'categories' ?>"><?php $L->p('Categories') ?></a>

View File

@ -4,13 +4,13 @@
<div class="uk-width-medium-1-3">
<div class="uk-panel">
<h4><a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-page' ?>"><i class="uk-icon-pencil"></i> <?php $L->p('New content') ?></a></h4>
<h4><a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-page' ?>"><i class="uk-icon-pencil"></i> <?php $L->p('New page') ?></a></h4>
<p><?php $L->p('Create a new page for your site') ?></p>
</div>
<div class="uk-panel">
<h4><a href="<?php echo HTML_PATH_ADMIN_ROOT.'pages' ?>"><i class="uk-icon-folder-o"></i> <?php $L->p('Manage content') ?></a></h4>
<p><?php $L->p('Edit or delete content from your site') ?></p>
<h4><a href="<?php echo HTML_PATH_ADMIN_ROOT.'pages' ?>"><i class="uk-icon-folder-o"></i> <?php $L->p('Manage pages') ?></a></h4>
<p><?php $L->p('Edit or delete pages from your site') ?></p>
</div>
</div>
@ -19,7 +19,7 @@
<div class="uk-panel">
<h4><a href="<?php echo HTML_PATH_ADMIN_ROOT.'new-category' ?>"><i class="uk-icon-file-text-o"></i> <?php $L->p('New category') ?></a></h4>
<p><?php $L->p('Create a new category to organize your content') ?></p>
<p><?php $L->p('Create a new category to organize your pages') ?></p>
</div>
<div class="uk-panel">

View File

@ -1,6 +1,6 @@
<?php
HTML::title(array('title'=>$L->g('Edit content'), 'icon'=>'file-text-o'));
HTML::title(array('title'=>$L->g('Edit page'), 'icon'=>'file-text-o'));
HTML::formOpen(array('class'=>'uk-form-stacked'));
@ -142,7 +142,7 @@ echo '<div class="bl-publish-sidebar uk-width-2-10">';
'class'=>'uk-width-1-1 uk-form-medium',
'options'=>array(
'published'=>$L->g('Published'),
'fixed'=>$L->g('Fixed'),
'static'=>$L->g('Static'),
'draft'=>$L->g('Draft')
),
'selected'=>$page->status(),

View File

@ -1,6 +1,6 @@
<?php
HTML::title(array('title'=>$L->g('New content'), 'icon'=>'file-text-o'));
HTML::title(array('title'=>$L->g('New page'), 'icon'=>'file-text-o'));
HTML::formOpen(array('class'=>'uk-form-stacked'));
@ -120,7 +120,7 @@ echo '<div class="bl-publish-sidebar uk-width-2-10">';
'class'=>'uk-width-1-1 uk-form-medium',
'options'=>array(
'published'=>$L->g('Published'),
'fixed'=>$L->g('Fixed'),
'static'=>$L->g('Static'),
'draft'=>$L->g('Draft')
),
'selected'=>'published',
@ -161,7 +161,7 @@ echo '<div class="bl-publish-sidebar uk-width-2-10">';
'value'=>'1',
'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')
'tip'=>$L->g('This field is used when you order the page by position')
));
// External Coverimage

View File

@ -1,10 +1,9 @@
<?php
HTML::title(array('title'=>$L->g('Manage content'), 'icon'=>'folder'));
HTML::title(array('title'=>$L->g('Manage pages'), 'icon'=>'folder'));
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'new-page"><i class="uk-icon-plus"></i> '.$L->g('Add new content').'</a>';
// Fixed page list
echo '
<table class="uk-table uk-table-striped">
<thead>
@ -27,7 +26,7 @@ function table($status, $icon='arrow-circle-o-down') {
global $published;
global $drafts;
global $scheduled;
global $fixed;
global $static;
if ($status=='published') {
$list = $published;
@ -35,8 +34,8 @@ function table($status, $icon='arrow-circle-o-down') {
$list = $drafts;
} elseif ($status=='scheduled') {
$list = $scheduled;
} elseif ($status=='fixed') {
$list = $fixed;
} elseif ($status=='static') {
$list = $static;
}
if (!empty($list)) {
@ -67,7 +66,7 @@ function table($status, $icon='arrow-circle-o-down') {
if ($Url->pageNumber()==1) {
table('draft', 'spinner');
table('scheduled', 'clock-o');
table('fixed', 'thumb-tack');
table('static', 'thumb-tack');
}
table('published', 'check');

View File

@ -262,12 +262,12 @@ class dbPages extends dbJSON
return $tmp;
}
// (array) Returns a database with the fixed pages
public function getFixedDB()
// (array) Returns a database with the static pages
public function getStaticDB()
{
$tmp = $this->db;
foreach($tmp as $key=>$fields) {
if($fields['status']!='fixed') {
if($fields['status']!='static') {
unset($tmp[$key]);
}
}

View File

@ -359,10 +359,10 @@ class Page {
return ($this->getValue('status')=='sticky');
}
// (boolean) Returns TRUE if the page is fixed, FALSE otherwise
public function fixed()
// (boolean) Returns TRUE if the page is static, FALSE otherwise
public function static()
{
return ($this->getValue('status')=='fixed');
return ($this->getValue('status')=='static');
}
// (string) Returns status of the page

View File

@ -139,7 +139,7 @@
"profile-picture": "Profile picture",
"edit-or-delete-your-categories": "Edit or delete your categories",
"create-a-new-page-for-your-site": "Create a new page for your site",
"create-a-new-category-to-organize-your-content": "Create a new category to organize your content",
"confirm-delete-this-action-cannot-be-undone": "Confirm delete, this action cannot be undone.",
"do-you-want-to-disable-the-user": "Do you want to disable the user ?",
"new-password": "New password",
@ -152,7 +152,7 @@
"there-are-no-scheduled-pages": "There are no scheduled pages",
"there-are-no-draft-pages": "There are no draft pages",
"order-content-by": "Order content By",
"edit-or-delete-content-from-your-site": "Edit or delete content from your site",
"order-the-content-by-position-to-build-a-website": "Order the content by position to build a Website or order the content by date to build a Blog.",
"page-not-found-content": "Hey! look like the page doesn't exist.",
"page-not-found": "Page not found",
@ -203,5 +203,11 @@
"page-published-from-scheduler": "Page published from scheduler",
"installer-page-about-content": "The about page is an important and powerful for potential clients and partners. For those who wonder who is behind the website, your About page is the first source of information.",
"blog": "Blog",
"complete-all-fields": "Complete all fields"
"complete-all-fields": "Complete all fields",
"static": "Static",
"manage-pages": "Manage pages",
"new-page": "New page",
"edit-page": "Edit page",
"create-a-new-category-to-organize-your-pages": "Create a new category to organize your pages",
"edit-or-delete-pages-from-your-site": "Edit or delete pages from your site"
}

View File

@ -302,7 +302,7 @@ function install($adminPassword, $email, $timezone)
'description'=>$Language->get('About your site or yourself'),
'username'=>'admin',
'tags'=>array(),
'status'=>'fixed',
'status'=>'static',
'date'=>$currentDate,
'dateModified'=>'',
'allowComments'=>true,