blob: a762f8ca9ba8b1ef6393d8b85d8b1928c838db3c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<?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">
<?php if ($topic->isLocked): ?>
<span class="glyphicon glyphicon-lock text-muted" aria-hidden="true"></span>
<?php endif; ?>
<?= htmlentities($topic->title) ?>
</h4>
<p class="list-group-item-text _time"><?= htmlentities($topic->creationDate->format("c")) ?></p>
</a>
<?php endforeach; ?>
</div>
|