$L->g('Manage pages'), 'icon'=>'folder'));
echo ' '.$L->g('Add new page').'';
echo '
'.$L->g('Title').' |
';
echo ''.( (ORDER_BY=='date') ? $L->g('Date') : $L->g('Position') ).' | ';
echo '
'.$L->g('URL').' |
';
function table($status, $icon='arrow-circle-o-down') {
global $Url;
global $Language;
global $published;
global $drafts;
global $scheduled;
global $static;
if ($status=='published') {
$list = $published;
} elseif ($status=='draft') {
$list = $drafts;
} elseif ($status=='scheduled') {
$list = $scheduled;
} elseif ($status=='static') {
$list = $static;
}
if (!empty($list)) {
echo '
'.$status.' |
|
|
';
}
foreach($list as $pageKey=>$fields) {
$page = buildPage($pageKey);
echo '';
echo '
'
.($page->title()?$page->title():''.$Language->g('Empty title').' ')
.'
| ';
echo ''.( (ORDER_BY=='date') ? $page->dateRaw() : $page->position() ).' | ';
$friendlyURL = Text::isEmpty($Url->filters('page')) ? '/'.$page->key() : '/'.$Url->filters('page').'/'.$page->key();
echo ''.$friendlyURL.' | ';
echo '
';
}
}
if ($Url->pageNumber()==1) {
table('draft', 'spinner');
table('scheduled', 'clock-o');
table('static', 'thumb-tack');
}
table('published', 'check');
echo '
';
?>
Previous';
} else {
echo '- Previous
';
}
for($i=1; $i<=Paginator::amountOfPages(); $i++) {
echo '- '.$i.'
';
}
// Show next page link
if(Paginator::showNext()) {
echo '- Next
';
} else {
echo '- Next
';
}
?>