$L->g('Settings'), 'icon'=>'cog'));
?>
?>
$L->g('Manage content'), 'icon'=>'folder'));
echo ' '.$L->g('Add new content').'';
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;
global $sticky;
if ($status=='published') {
$list = $published;
} elseif ($status=='draft') {
$list = $drafts;
} elseif ($status=='scheduled') {
$list = $scheduled;
} elseif ($status=='static') {
$list = $static;
} elseif ($status=='sticky') {
$list = $sticky;
}
if (!empty($list)) {
echo '
'.$Language->g($status).' |
|
|
';
}
if (ORDER_BY=='position') {
foreach ($list as $pageKey) {
$page = buildPage($pageKey);
if ($page) {
if (!$page->isChild() || $status!='published') {
echo '
'
.($page->title()?$page->title():''.$Language->g('Empty title').' ')
.'
|
'.$page->position().' | ';
$friendlyURL = Text::isEmpty($Url->filters('page')) ? '/'.$page->key() : '/'.$Url->filters('page').'/'.$page->key();
echo ''.$friendlyURL.' | ';
echo '
';
foreach ($page->children() as $child) {
if ($child->published()) {
echo '
'
.($child->title()?$child->title():''.$Language->g('Empty title').' ')
.'
| ';
$friendlyURL = Text::isEmpty($Url->filters('page')) ? '/'.$child->key() : '/'.$Url->filters('page').'/'.$child->key();
echo ''.$friendlyURL.' | ';
echo ''.$child->position().' | ';
echo '
';
}
}
}
}
}
} else {
foreach ($list as $pageKey) {
$page = buildPage($pageKey);
if ($page) {
echo '';
echo '
'
.($page->title()?$page->title():''.$Language->g('Empty title').' ')
.'
| ';
echo ''.( (ORDER_BY=='date') ? $page->dateRaw(ADMIN_PANEL_DATE_FORMAT) : $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('sticky', 'sticky-note-o');
}
table('published', '');
echo '
';
?>