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>'; echo '<li>'.$Language->g('There are no draft pages').'</li>';
} }
else { else {
$keys = array_keys($scheduledPages); $keys = array_keys($draftPages);
foreach($keys as $key) { foreach($keys as $key) {
$page = buildPage($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>'; 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)) { if (!empty($list)) {
echo '<tr> 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>
<td></td> <td></td>
</tr>'; </tr>';

View File

@ -32,7 +32,7 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
HTML::formSelect(array( HTML::formSelect(array(
'name'=>'homepage', 'name'=>'homepage',
'label'=>$L->g('Home page'), 'label'=>$L->g('Homepage'),
'options'=>$homepageOptions, 'options'=>$homepageOptions,
'selected'=>$Site->homepage(), 'selected'=>$Site->homepage(),
'class'=>'uk-width-1-3 uk-form-medium', 'class'=>'uk-width-1-3 uk-form-medium',
@ -55,7 +55,7 @@ HTML::formOpen(array('class'=>'uk-form-horizontal'));
HTML::formSelect(array( HTML::formSelect(array(
'name'=>'orderBy', 'name'=>'orderBy',
'label'=>$L->g('Order content By'), '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(), 'selected'=>$Site->orderBy(),
'class'=>'uk-width-1-3 uk-form-medium', 'class'=>'uk-width-1-3 uk-form-medium',
'tip'=>$L->g('Order the content by position to build a Website') '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() public function getStaticDB()
{ {
$tmp = $this->db; $tmp = $this->db;
foreach($tmp as $key=>$fields) { foreach ($tmp as $key=>$fields) {
if($fields['status']!='static') { if ($fields['status']!='static') {
unset($tmp[$key]); unset($tmp[$key]);
} }
} }
uasort($tmp, array($this, 'sortByPositionLowToHigh'));
return $tmp; return $tmp;
} }