Dashboard improves
This commit is contained in:
parent
648635a780
commit
c75ec1a1f1
|
@ -14,3 +14,20 @@
|
||||||
|
|
||||||
$_newPosts = $dbPosts->regenerate();
|
$_newPosts = $dbPosts->regenerate();
|
||||||
$_newPages = $dbPages->regenerate();
|
$_newPages = $dbPages->regenerate();
|
||||||
|
|
||||||
|
$_draftPosts = array();
|
||||||
|
foreach($posts as $Post)
|
||||||
|
{
|
||||||
|
if(!$Post->published()) {
|
||||||
|
array_push($_draftPosts, $Post);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$_draftPages = array();
|
||||||
|
foreach($pages as $Page)
|
||||||
|
{
|
||||||
|
if(!$Page->published()) {
|
||||||
|
array_push($_draftPages, $Page);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,10 @@ div.dashboardBox .nav {
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.dashboardBox .nav a {
|
||||||
|
padding: 0 !important;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
div.dashboardBox i.iconContent {
|
div.dashboardBox i.iconContent {
|
||||||
bottom: -1rem;
|
bottom: -1rem;
|
||||||
|
|
|
@ -33,17 +33,27 @@
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<div class="dashboardBox">
|
<div class="dashboardBox">
|
||||||
<h2><?php $Language->p('notifications') ?></h2>
|
<h2>Drafts</h2>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<nav class="nav">
|
<nav class="nav">
|
||||||
<ul>
|
<ul>
|
||||||
<li>New comment</li>
|
<?php
|
||||||
<li>Admin session started at 07:00pm</li>
|
if( empty($_draftPosts) && empty($_draftPages) )
|
||||||
<li>Failed login with username diego</li>
|
{
|
||||||
<li>Database regenerated</li>
|
echo '<li>'.$Language->g('There are no drafts').'</li>';
|
||||||
<li>New session started at 01:00pm</li>
|
}
|
||||||
<li>New post added</li>
|
else
|
||||||
<li>New page added</li>
|
{
|
||||||
|
foreach($_draftPosts as $Post)
|
||||||
|
{
|
||||||
|
echo '<li>('.$Language->g('Post').') <a href="'.HTML_PATH_ADMIN_ROOT.'edit-post/'.$Post->key().'">'.($Post->title()?$Post->title():'['.$Language->g('Empty title').'] ').'</a></li>';
|
||||||
|
}
|
||||||
|
foreach($_draftPages as $Page)
|
||||||
|
{
|
||||||
|
echo '<li>('.$Language->g('Page').') <a href="'.HTML_PATH_ADMIN_ROOT.'edit-page/'.$Page->key().'">'.($Page->title()?$Page->title():'['.$Language->g('Empty title').'] ').'</a></li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -129,5 +129,6 @@
|
||||||
"read-more": "Read more",
|
"read-more": "Read more",
|
||||||
"show-blog": "Show blog",
|
"show-blog": "Show blog",
|
||||||
"default-home-page": "Default home page",
|
"default-home-page": "Default home page",
|
||||||
"version": "Version"
|
"version": "Version",
|
||||||
|
"there-are-no-drafts": "There are no drafts."
|
||||||
}
|
}
|
Loading…
Reference in New Issue