Pages, and static pages
This commit is contained in:
parent
9eb880f6d3
commit
a8101ea2f2
|
@ -36,7 +36,7 @@ $drafts = $dbPages->getDraftDB();
|
||||||
|
|
||||||
$scheduled = $dbPages->getScheduledDB();
|
$scheduled = $dbPages->getScheduledDB();
|
||||||
|
|
||||||
$fixed = $dbPages->getFixedDB();
|
$static = $dbPages->getStaticDB();
|
||||||
|
|
||||||
// Title of the page
|
// Title of the page
|
||||||
$layout['title'] .= ' - '.$Language->g('Manage Content');
|
$layout['title'] .= ' - '.$Language->g('Manage Content');
|
|
@ -58,8 +58,8 @@ $(document).ready(function() {
|
||||||
<div class="uk-offcanvas-bar">
|
<div class="uk-offcanvas-bar">
|
||||||
<ul class="uk-nav uk-nav-offcanvas">
|
<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.'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.'new-page' ?>"><?php $L->p('New page') ?></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.'manage-pages' ?>"><?php $L->p('Manage pages') ?></a></li>
|
||||||
<?php if($Login->role() == 'admin') { ?>
|
<?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.'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>
|
<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 class="uk-nav-header"><?php $L->p('Publish') ?></li>
|
||||||
<li <?php echo ($layout['view']=='new-page')?'class="uk-active"':'' ?>>
|
<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>
|
||||||
|
|
||||||
<li class="uk-nav-header"><?php $L->p('Manage') ?></li>
|
<li class="uk-nav-header"><?php $L->p('Manage') ?></li>
|
||||||
<li <?php echo ($layout['view']=='pages')?'class="uk-active"':'' ?>>
|
<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>
|
||||||
<li <?php echo ($layout['view']=='categories')?'class="uk-active"':'' ?>>
|
<li <?php echo ($layout['view']=='categories')?'class="uk-active"':'' ?>>
|
||||||
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'categories' ?>"><?php $L->p('Categories') ?></a>
|
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'categories' ?>"><?php $L->p('Categories') ?></a>
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
<div class="uk-width-medium-1-3">
|
<div class="uk-width-medium-1-3">
|
||||||
|
|
||||||
<div class="uk-panel">
|
<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>
|
<p><?php $L->p('Create a new page for your site') ?></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="uk-panel">
|
<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>
|
<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 content from your site') ?></p>
|
<p><?php $L->p('Edit or delete pages from your site') ?></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
<div class="uk-panel">
|
<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>
|
<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>
|
||||||
|
|
||||||
<div class="uk-panel">
|
<div class="uk-panel">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?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'));
|
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',
|
'class'=>'uk-width-1-1 uk-form-medium',
|
||||||
'options'=>array(
|
'options'=>array(
|
||||||
'published'=>$L->g('Published'),
|
'published'=>$L->g('Published'),
|
||||||
'fixed'=>$L->g('Fixed'),
|
'static'=>$L->g('Static'),
|
||||||
'draft'=>$L->g('Draft')
|
'draft'=>$L->g('Draft')
|
||||||
),
|
),
|
||||||
'selected'=>$page->status(),
|
'selected'=>$page->status(),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?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'));
|
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',
|
'class'=>'uk-width-1-1 uk-form-medium',
|
||||||
'options'=>array(
|
'options'=>array(
|
||||||
'published'=>$L->g('Published'),
|
'published'=>$L->g('Published'),
|
||||||
'fixed'=>$L->g('Fixed'),
|
'static'=>$L->g('Static'),
|
||||||
'draft'=>$L->g('Draft')
|
'draft'=>$L->g('Draft')
|
||||||
),
|
),
|
||||||
'selected'=>'published',
|
'selected'=>'published',
|
||||||
|
@ -161,7 +161,7 @@ echo '<div class="bl-publish-sidebar uk-width-2-10">';
|
||||||
'value'=>'1',
|
'value'=>'1',
|
||||||
'class'=>'uk-width-1-1 uk-form-medium',
|
'class'=>'uk-width-1-1 uk-form-medium',
|
||||||
'label'=>$L->g('Position'),
|
'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
|
// External Coverimage
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
<?php
|
<?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>';
|
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 '
|
echo '
|
||||||
<table class="uk-table uk-table-striped">
|
<table class="uk-table uk-table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -27,7 +26,7 @@ function table($status, $icon='arrow-circle-o-down') {
|
||||||
global $published;
|
global $published;
|
||||||
global $drafts;
|
global $drafts;
|
||||||
global $scheduled;
|
global $scheduled;
|
||||||
global $fixed;
|
global $static;
|
||||||
|
|
||||||
if ($status=='published') {
|
if ($status=='published') {
|
||||||
$list = $published;
|
$list = $published;
|
||||||
|
@ -35,8 +34,8 @@ function table($status, $icon='arrow-circle-o-down') {
|
||||||
$list = $drafts;
|
$list = $drafts;
|
||||||
} elseif ($status=='scheduled') {
|
} elseif ($status=='scheduled') {
|
||||||
$list = $scheduled;
|
$list = $scheduled;
|
||||||
} elseif ($status=='fixed') {
|
} elseif ($status=='static') {
|
||||||
$list = $fixed;
|
$list = $static;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($list)) {
|
if (!empty($list)) {
|
||||||
|
@ -67,7 +66,7 @@ function table($status, $icon='arrow-circle-o-down') {
|
||||||
if ($Url->pageNumber()==1) {
|
if ($Url->pageNumber()==1) {
|
||||||
table('draft', 'spinner');
|
table('draft', 'spinner');
|
||||||
table('scheduled', 'clock-o');
|
table('scheduled', 'clock-o');
|
||||||
table('fixed', 'thumb-tack');
|
table('static', 'thumb-tack');
|
||||||
}
|
}
|
||||||
table('published', 'check');
|
table('published', 'check');
|
||||||
|
|
||||||
|
|
|
@ -262,12 +262,12 @@ class dbPages extends dbJSON
|
||||||
return $tmp;
|
return $tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
// (array) Returns a database with the fixed pages
|
// (array) Returns a database with the static pages
|
||||||
public function getFixedDB()
|
public function getStaticDB()
|
||||||
{
|
{
|
||||||
$tmp = $this->db;
|
$tmp = $this->db;
|
||||||
foreach($tmp as $key=>$fields) {
|
foreach($tmp as $key=>$fields) {
|
||||||
if($fields['status']!='fixed') {
|
if($fields['status']!='static') {
|
||||||
unset($tmp[$key]);
|
unset($tmp[$key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -359,10 +359,10 @@ class Page {
|
||||||
return ($this->getValue('status')=='sticky');
|
return ($this->getValue('status')=='sticky');
|
||||||
}
|
}
|
||||||
|
|
||||||
// (boolean) Returns TRUE if the page is fixed, FALSE otherwise
|
// (boolean) Returns TRUE if the page is static, FALSE otherwise
|
||||||
public function fixed()
|
public function static()
|
||||||
{
|
{
|
||||||
return ($this->getValue('status')=='fixed');
|
return ($this->getValue('status')=='static');
|
||||||
}
|
}
|
||||||
|
|
||||||
// (string) Returns status of the page
|
// (string) Returns status of the page
|
||||||
|
|
|
@ -139,7 +139,7 @@
|
||||||
"profile-picture": "Profile picture",
|
"profile-picture": "Profile picture",
|
||||||
"edit-or-delete-your-categories": "Edit or delete your categories",
|
"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-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.",
|
"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 ?",
|
"do-you-want-to-disable-the-user": "Do you want to disable the user ?",
|
||||||
"new-password": "New password",
|
"new-password": "New password",
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
"there-are-no-scheduled-pages": "There are no scheduled pages",
|
"there-are-no-scheduled-pages": "There are no scheduled pages",
|
||||||
"there-are-no-draft-pages": "There are no draft pages",
|
"there-are-no-draft-pages": "There are no draft pages",
|
||||||
"order-content-by": "Order content By",
|
"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.",
|
"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-content": "Hey! look like the page doesn't exist.",
|
||||||
"page-not-found": "Page not found",
|
"page-not-found": "Page not found",
|
||||||
|
@ -203,5 +203,11 @@
|
||||||
"page-published-from-scheduler": "Page published from scheduler",
|
"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.",
|
"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",
|
"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"
|
||||||
}
|
}
|
|
@ -302,7 +302,7 @@ function install($adminPassword, $email, $timezone)
|
||||||
'description'=>$Language->get('About your site or yourself'),
|
'description'=>$Language->get('About your site or yourself'),
|
||||||
'username'=>'admin',
|
'username'=>'admin',
|
||||||
'tags'=>array(),
|
'tags'=>array(),
|
||||||
'status'=>'fixed',
|
'status'=>'static',
|
||||||
'date'=>$currentDate,
|
'date'=>$currentDate,
|
||||||
'dateModified'=>'',
|
'dateModified'=>'',
|
||||||
'allowComments'=>true,
|
'allowComments'=>true,
|
||||||
|
|
Loading…
Reference in New Issue