]> git.bts.cx Git - cx.git/blob - cx/templates/admin/pages/main.php
Added support for previewing posts when logged in
[cx.git] / cx / templates / admin / pages / main.php
1 <?php cx_template_base('base'); ?>
2
3 <h2>Posts</h2>
4 <table>
5 <?php foreach (cx_posts_get(include_drafts: true) as $post): ?>
6 <tr>
7  <td class="fill"><a href="<?= cx_url_admin('/posts/edit?id=' . $post->id); ?>"><?= $post->title ?></a></td>
8  <td class="hug"><a href="<?= cx_url_admin('/posts/edit?id=' . $post->id); ?>">Edit</a></td>
9  <td class="hug"><a href="<?= cx_url_admin('/posts/delete?id=' . $post->id); ?>">Delete</a></td>
10 </tr>
11 <?php endforeach; ?>
12 </table>
13
14 <h2>Pages</h2>
15 <table>
16 <?php foreach (cx_pages_get(navigation_only: false, include_drafts: true) as $post): ?>
17 <tr>
18  <td class="fill"><a href="<?= cx_url_admin('/posts/edit?id=' . $post->id); ?>"><?= $post->title ?></a></td>
19  <td class="hug"><a href="<?= cx_url_admin('/posts/edit?id=' . $post->id); ?>">Edit</a></td>
20  <td class="hug"><a href="<?= cx_url_admin('/posts/delete?id=' . $post->id); ?>">Delete</a></td>
21 </tr>
22 <?php endforeach; ?>
23 </table>
24
25 <h2>Images</h2>
26 <table>
27 <?php foreach (cx_images_get() as $image): ?>
28 <tr>
29  <td class="fill"><a href="<?= $image->url ?>"><?= $image->url ?></a></td>
30  <td class="hug"><a href="<?= cx_url_admin('/images/edit?id=' . $image->id); ?>">Edit</a></td>
31  <td class="hug"><a href="<?= cx_url_admin('/images/delete?id=' . $image->id); ?>">Delete</a></td>
32 </tr>
33 <?php endforeach; ?>
34 </table>