2017-05-16 00:46:20 +02:00
|
|
|
<?php
|
|
|
|
|
2017-06-05 22:36:09 +02:00
|
|
|
HTML::title(array('title'=>$L->g('Manage content'), 'icon'=>'folder'));
|
2017-05-16 00:46:20 +02:00
|
|
|
|
2017-06-05 22:36:09 +02:00
|
|
|
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'new-page"><i class="uk-icon-plus"></i> '.$L->g('Add new content').'</a>';
|
2017-05-16 00:46:20 +02:00
|
|
|
|
2017-08-02 01:11:57 +02:00
|
|
|
// Fixed page list
|
2017-05-16 00:46:20 +02:00
|
|
|
echo '
|
|
|
|
<table class="uk-table uk-table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>'.$L->g('Title').'</th>
|
2017-06-09 20:30:13 +02:00
|
|
|
';
|
|
|
|
|
|
|
|
echo '<th class="uk-text-center">'.( (ORDER_BY=='date') ? $L->g('Date') : $L->g('Position') ).'</th>';
|
|
|
|
|
|
|
|
echo '
|
2017-05-16 00:46:20 +02:00
|
|
|
<th>'.$L->g('URL').'</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
';
|
|
|
|
|
2017-08-02 01:11:57 +02:00
|
|
|
function table($status, $icon='arrow-circle-o-down') {
|
|
|
|
global $pages;
|
|
|
|
global $Url;
|
2017-08-06 17:27:30 +02:00
|
|
|
global $Language;
|
|
|
|
|
2017-08-02 01:11:57 +02:00
|
|
|
$showLegend = true;
|
|
|
|
foreach ($pages as $key=>$page) {
|
|
|
|
if ($page->status()==$status) {
|
|
|
|
if ($showLegend) {
|
|
|
|
$showLegend = false;
|
|
|
|
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></td>
|
|
|
|
<td></td>
|
|
|
|
</tr>';
|
|
|
|
}
|
|
|
|
unset($pages[$key]);
|
|
|
|
echo '<tr>';
|
|
|
|
echo '<td>
|
|
|
|
<a href="'.HTML_PATH_ADMIN_ROOT.'edit-page/'.$page->key().'">'
|
|
|
|
.($page->title()?$page->title():'<span class="label-empty-title">'.$Language->g('Empty title').'</span> ')
|
|
|
|
.'</a>
|
|
|
|
</td>';
|
2017-06-09 20:30:13 +02:00
|
|
|
|
2017-08-02 01:11:57 +02:00
|
|
|
echo '<td class="uk-text-center">'.( (ORDER_BY=='date') ? $page->dateRaw() : $page->position() ).'</td>';
|
2017-06-09 20:30:13 +02:00
|
|
|
|
2017-08-02 01:11:57 +02:00
|
|
|
$friendlyURL = Text::isEmpty($Url->filters('page')) ? '/'.$page->key() : '/'.$Url->filters('page').'/'.$page->key();
|
|
|
|
echo '<td><a target="_blank" href="'.$page->permalink().'">'.$friendlyURL.'</a></td>';
|
|
|
|
echo '</tr>';
|
|
|
|
}
|
|
|
|
}
|
2017-05-16 00:46:20 +02:00
|
|
|
}
|
|
|
|
|
2017-08-02 01:11:57 +02:00
|
|
|
table('draft', 'spinner');
|
|
|
|
table('scheduled', 'clock-o');
|
|
|
|
table('fixed', 'thumb-tack');
|
|
|
|
table('sticky', 'sticky-note-o');
|
|
|
|
table('published', 'check');
|
|
|
|
|
2017-05-16 00:46:20 +02:00
|
|
|
echo '
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2017-07-07 23:38:01 +02:00
|
|
|
';
|
|
|
|
?>
|
|
|
|
|
|
|
|
<!-- Paginator -->
|
|
|
|
<div id="paginator">
|
|
|
|
<ul>
|
|
|
|
<?php
|
|
|
|
// Show previus page link
|
|
|
|
if(Paginator::showPrev()) {
|
2017-08-02 01:11:57 +02:00
|
|
|
echo '<li class="first"><a href="'.Paginator::prevPageUrl().'" class="previous"><i class="fa fa-arrow-circle-o-left"></i> Previous</a></li>';
|
2017-07-07 23:38:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
for($i=1; $i<=Paginator::amountOfPages(); $i++) {
|
2017-07-30 23:15:33 +02:00
|
|
|
echo '<li><a href="'.Paginator::numberUrl($i).'" class="page">'.$i.'</a></li>';
|
2017-07-07 23:38:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// Show next page link
|
|
|
|
if(Paginator::showNext()) {
|
2017-08-02 01:11:57 +02:00
|
|
|
echo '<li class="next"><a href="'.Paginator::nextPageUrl().'" class="next">Next <i class="fa fa-arrow-circle-o-right"></i></a></li>';
|
2017-07-07 23:38:01 +02:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</ul>
|
|
|
|
</div>
|