diff options
author | Jonas Kohl | 2024-10-17 10:56:01 +0200 |
---|---|---|
committer | Jonas Kohl | 2024-10-17 10:56:01 +0200 |
commit | fe0f414dc0211a4014581dc03fcfd514ed7ed02d (patch) | |
tree | cd86fc00cd9b7a97eabb9668e0a39e2b4b3e5357 /src/application/templates/bootstrap-3/view_topics.twig | |
parent | e0e89b9fdbf301e0ead944636023947a67aca57d (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.twig | 25 |
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&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 %} |