summaryrefslogtreecommitdiff
path: root/src/application/templates/bootstrap-3/view_topics.twig
diff options
context:
space:
mode:
authorJonas Kohl2024-10-17 10:56:01 +0200
committerJonas Kohl2024-10-17 10:56:01 +0200
commitfe0f414dc0211a4014581dc03fcfd514ed7ed02d (patch)
treecd86fc00cd9b7a97eabb9668e0a39e2b4b3e5357 /src/application/templates/bootstrap-3/view_topics.twig
parente0e89b9fdbf301e0ead944636023947a67aca57d (diff)
Transition templating to Twig
Diffstat (limited to 'src/application/templates/bootstrap-3/view_topics.twig')
-rw-r--r--src/application/templates/bootstrap-3/view_topics.twig25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/application/templates/bootstrap-3/view_topics.twig b/src/application/templates/bootstrap-3/view_topics.twig
new file mode 100644
index 0000000..899ebe7
--- /dev/null
+++ b/src/application/templates/bootstrap-3/view_topics.twig
@@ -0,0 +1,25 @@
+{% extends "base.twig" %}
+
+{% block content %}
+
+{% if currentUser.hasPermission(permission("CREATE_OWN_TOPIC")) %}
+ <p class="text-right">
+ <a href="?_action=newtopic" class="btn btn-success"><span class="fa fa-plus" aria-hidden="true"></span> {{ __("New topic") }}</a>
+ </p>
+{% endif %}
+
+<div class="list-group">
+ {% for topic in ctx.topics %}
+ <a class="list-group-item" href="?_action=viewtopic&amp;topic={{ topic.id|url_encode }}">
+ <h4 class="list-group-item-heading">
+ {% if topic.isLocked %}
+ <span class="fa fa-lock text-muted" aria-hidden="true"></span>
+ {% endif %}
+ {{ topic.title }}
+ </h4>
+ <p class="list-group-item-text _time">{{ topic.creationDate.format("c") }}</p>
+ </a>
+ {% endfor %}
+</div>
+
+{% endblock %}