bludit/admin/views/manage-posts.php

49 lines
1.4 KiB
PHP
Raw Normal View History

2015-07-04 00:36:37 +02:00
<h2 class="title"><i class="fa fa-file-text-o"></i> <?php $Language->p('Manage posts') ?></h2>
2015-05-05 03:00:01 +02:00
<?php makeNavbar('manage'); ?>
<table class="table-bordered table-stripped">
<thead>
<tr>
2015-07-04 00:36:37 +02:00
<th><?php $Language->p('Title') ?></th>
<th><?php $Language->p('Published date') ?></th>
2015-05-05 03:00:01 +02:00
</tr>
</thead>
<tbody>
<?php
foreach($posts as $Post)
{
2015-08-26 05:42:32 +02:00
$status = false;
if($Post->scheduled()) {
$status = $Language->g('Scheduled');
}
elseif(!$Post->published()) {
$status = $Language->g('Draft');
}
2015-05-05 03:00:01 +02:00
echo '<tr>';
2015-08-26 05:42:32 +02:00
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-post/'.$Post->key().'">'.($status?'<span class="label label-outline label-red smaller">'.$status.'</span>':'').($Post->title()?$Post->title():'<span class="label label-outline label-blue smaller">'.$Language->g('Empty title').'</span> ').'</a></td>';
echo '<td>'.$Post->date().'</td>';
2015-05-05 03:00:01 +02:00
echo '</tr>';
}
?>
</tbody>
2015-07-20 05:14:12 +02:00
</table>
<div id="paginator">
<ul>
<?php
if(Paginator::get('showNewer')) {
echo '<li class="left"><a href="'.HTML_PATH_ADMIN_ROOT.'manage-posts?page='.Paginator::get('prevPage').'">« '.$Language->g('Prev page').'</a></li>';
}
echo '<li class="list">'.(Paginator::get('currentPage')+1).' / '.(Paginator::get('numberOfPages')+1).'</li>';
if(Paginator::get('showOlder')) {
echo '<li class="right"><a href="'.HTML_PATH_ADMIN_ROOT.'manage-posts?page='.Paginator::get('nextPage').'">'.$Language->g('Next page').' »</a></li>';
}
?>
</ul>
</div>