Bug fixes on dashboard

This commit is contained in:
Diego Najar 2017-09-24 01:17:37 +02:00
parent ccde1e2e29
commit 9ce2492ade
4 changed files with 7 additions and 6 deletions

View File

@ -146,7 +146,7 @@
echo '<li>'.$Language->g('There are no draft pages').'</li>';
}
else {
$keys = array_keys($scheduledPages);
$keys = array_keys($draftPages);
foreach($keys as $key) {
$page = buildPage($key);
echo '<li><a href="'.HTML_PATH_ADMIN_ROOT.'edit-page/'.$page->key().'">'.($page->title()?$page->title():'['.$Language->g('Empty title').'] ').'</a></li>';

View File

@ -40,7 +40,7 @@ function table($status, $icon='arrow-circle-o-down') {
if (!empty($list)) {
echo '<tr>
<td style="color: #aaa; font-size: 0.9em; text-transform: uppercase;"><i class="fa fa-'.$icon.'" aria-hidden="true"></i> '.$status.'</td>
<td style="color: #aaa; font-size: 0.9em; text-transform: uppercase;"><i class="fa fa-'.$icon.'" aria-hidden="true"></i> '.$Language->g($status).'</td>
<td></td>
<td></td>
</tr>';

View File

@ -32,7 +32,7 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
HTML::formSelect(array(
'name'=>'homepage',
'label'=>$L->g('Home page'),
'label'=>$L->g('Homepage'),
'options'=>$homepageOptions,
'selected'=>$Site->homepage(),
'class'=>'uk-width-1-3 uk-form-medium',
@ -55,7 +55,7 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
HTML::formSelect(array(
'name'=>'orderBy',
'label'=>$L->g('Order content By'),
'options'=>array('date'=>'Date','position'=>'Position'),
'options'=>array('date'=>$L->g('Date'),'position'=>$L->g('Position')),
'selected'=>$Site->orderBy(),
'class'=>'uk-width-1-3 uk-form-medium',
'tip'=>$L->g('Order the content by position to build a Website')

View File

@ -285,11 +285,12 @@ class dbPages extends dbJSON
public function getStaticDB()
{
$tmp = $this->db;
foreach($tmp as $key=>$fields) {
if($fields['status']!='static') {
foreach ($tmp as $key=>$fields) {
if ($fields['status']!='static') {
unset($tmp[$key]);
}
}
uasort($tmp, array($this, 'sortByPositionLowToHigh'));
return $tmp;
}