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