PageRenderTime 28ms CodeModel.GetById 17ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/halogy/application/modules/blog/views/admin/index.php

https://bitbucket.org/haloweb/halogy-1.0/
PHP | 84 lines | 76 code | 8 blank | 0 comment | 7 complexity | 48f1bdd57d5a4b1b318519bcd2d79c14 MD5 | raw file
 1<!-- [Content] start -->
 2<div class="content wide">
 3
 4<h1 id="blog">Blog Admininistration</h1>
 5 
 6<ul class="manage">
 7	<li><a href="<?=site_url('admin/blog/create')?>">Write Post</a></li>
 8	<li><a href="<?=site_url('admin/blog/comments')?>">Comments</a></li>
 9	<li><a href="<?=site_url('admin/blog/tags')?>">Tags</a></li>
10	<li><a href="<?=site_url('admin/blog/settings')?>">Blog Settings</a></li>
11	<li><a href="<?=site_url('admin')?>" class="last">Cancel</a></li>
12</ul>
13		
14<br class="clearfloat" />
15
16<hr />
17
18<?php if ($notice = $this->session->flashdata('notification')):?>
19<p class="notice"><?=$notice;?></p>
20<?php endif;?>
21<div id="latest_comments">
22	<h2>Latest Comments<?php if ($comments_pending > 0):?> <a href="<?=site_url('admin/blog/comments/moderate')?>">(<?=$comments_pending?> in Moderation)</a><?php endif;?> &raquo;</h2>
23	<?php if (!empty($comments)): ?>
24	<ul>
25	<?php foreach ($comments as $comment): ?>
26		<li>
27			<a href="<?php echo (!empty($comment['website'])) ? $comment['website'] : 'mailto:'.$comment['email']?>"><?php echo $comment['author']?></a> on <a href="<?php echo site_url('blog/'.date('Y/m', $comment['post_date_posted']).'/'.$comment['post_uri'])?>"><?php echo $comment['post_title']?></a> (<a href="<?php echo site_url('admin/blog/comments/edit/'.$comment['id'])?>">edit</a>)
28		</li>
29	<?php endforeach; ?>
30	</ul>
31	<?php else:?>
32		None
33	<?php endif; ?>
34</div>
35
36<div id="latest_trackbacks">
37	<h2>Latest Trackbacks <?php if ($trackbacks_pending > 0):?> <a href="<?=site_url('admin/blog/trackbacks/moderate')?>">(<?=$trackbacks_pending?> in Moderation)</a><?php endif;?>&raquo;</h2>
38	<ul>
39		<?php if (!empty($trackbacks)): ?>
40		<ul>
41		<?php foreach ($trackbacks as $trackback): ?>
42			<li>
43				<a href="<?php echo $trackback['urk']?>"><?php echo $trackback['title']?></a> on <a href="<?php echo site_url('blog/'.date('Y/m', $trackback['post_date_posted']).'/'.$trackback['post_uri'])?>"><?php echo $trackback['post_title']?></a> (<a href="<?php echo site_url('admin/blog/trackbacks/edit/'.$trackback['id'])?>">edit</a>)
44			</li>
45		<?php endforeach; ?>
46		</ul>
47		<?php else:?>
48			None
49		<?php endif; ?>
50	</ul>
51</div>
52
53<h2>Posts</h2>
54<table class="page-list">
55	<thead>
56		<tr>
57				<th width="3%" class="center">#</th>
58				<th width="27%">Title</th>
59				<th width="27%">URI</th>
60				<th width="10%">Post status</th>
61				<th width="10%">View post</th>
62				<th width="10%">Edit post</th>
63				<th width="10%">Delete post</th>
64				<th width="3%" class="last center">ID</th>
65		</tr>
66	</thead>
67	<tbody>
68<?php $i = 1; foreach ($posts as $post): ?>
69<?php if ($i % 2 != 0): $rowClass = 'odd'; else: $rowClass = 'even'; endif;?>
70		<tr class="<?=$rowClass?>">
71				<td class="center"><?=$i?></td>
72				<td><?=$post['title']?></td>
73				<td><?=$post['uri']?></td>
74				<td><?=ucfirst($post['status'])?></td>
75				<td><a href="<?=site_url('blog/'.date('Y/m', $post['date_posted']).'/'.$post['uri'])?>" rel="external">View</a></td>
76				<td><a href="<?=site_url('admin/'.$module.'/edit/'.$post['id'])?>">Edit</a></td>
77				<td><a href="<?=site_url('admin/'.$module.'/delete/'.$post['id'])?>">Delete</a></td>
78				<td class="center"><?=$post['id']?></td>
79		</tr>
80<?php $i++; endforeach;?>
81	</tbody>
82</table>
83
84</div>