diff options
author | Jonas Kohl | 2024-09-12 19:49:17 +0200 |
---|---|---|
committer | Jonas Kohl | 2024-09-12 19:49:17 +0200 |
commit | 086e2d2668784469ec114f6e6fd2b3dace3d7c3b (patch) | |
tree | b9bacedb713501d88d24085940267a7c94e69b29 /src/application/views/view_topics.php | |
parent | 34b1b391d4b03659a96f868857c230002b351514 (diff) |
Way more progress on forum
Diffstat (limited to 'src/application/views/view_topics.php')
-rw-r--r-- | src/application/views/view_topics.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/application/views/view_topics.php b/src/application/views/view_topics.php new file mode 100644 index 0000000..cb871cb --- /dev/null +++ b/src/application/views/view_topics.php @@ -0,0 +1,19 @@ +<?php + +use mystic\forum\orm\User; +use mystic\forum\orm\UserPermissions; + +if ($GLOBALS["currentUser"]?->hasPermission(UserPermissions::CREATE_OWN_TOPIC)): +?> +<p class="text-right"> +<a href="?_action=newtopic" class="btn btn-success"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> New topic</a> +</p> +<?php endif; ?> +<div class="list-group"> +<?php /** @var Topic $topic */ foreach ($topics as $topic): ?> +<a class="list-group-item" href="?_action=viewtopic&topic=<?= htmlentities(urlencode($topic->id)) ?>"> + <h4 class="list-group-item-heading"><?= htmlentities($topic->title) ?></h4> + <p class="list-group-item-text _time"><?= htmlentities($topic->creationDate->format("c")) ?></p> +</a> +<?php endforeach; ?> +</div> |