mirror of
https://github.com/danpros/htmly.git
synced 2026-04-19 03:56:21 +05:30
Add post draft
Add post draft feature for the blog post.
This commit is contained in:
parent
084ffb35d4
commit
4c158b82e2
8 changed files with 290 additions and 44 deletions
33
system/admin/views/user-draft.html.php
Normal file
33
system/admin/views/user-draft.html.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<h2 class="post-index"><?php echo $heading ?></h2>
|
||||
<?php if (!empty($posts)) { ?>
|
||||
<table class="post-list">
|
||||
<tr class="head">
|
||||
<th>Title</th>
|
||||
<th>Created</th>
|
||||
<th>Tag</th>
|
||||
<th>Operations</th>
|
||||
</tr>
|
||||
<?php $i = 0;
|
||||
$len = count($posts); ?>
|
||||
<?php foreach ($posts as $p): ?>
|
||||
<?php
|
||||
if ($i == 0) {
|
||||
$class = 'item first';
|
||||
} elseif ($i == $len - 1) {
|
||||
$class = 'item last';
|
||||
} else {
|
||||
$class = 'item';
|
||||
}
|
||||
$i++;
|
||||
?>
|
||||
<tr class="<?php echo $class ?>">
|
||||
<td><?php echo $p->title ?></td>
|
||||
<td><?php echo date('d F Y', $p->date) ?></td>
|
||||
<td><?php echo strip_tags($p->tag) ?></td>
|
||||
<td><a href="<?php echo $p->url ?>/edit?destination=admin/draft">Edit</a> <a href="<?php echo $p->url ?>/delete?destination=admin/draft">Delete</a></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<?php } else {
|
||||
echo 'No draft found!';
|
||||
} ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue