diff options
author | Jonas Kohl | 2024-10-19 12:38:45 +0200 |
---|---|---|
committer | Jonas Kohl | 2024-10-19 12:38:45 +0200 |
commit | f490626b8a2ff360c4a914615484ea6e5bf8cdee (patch) | |
tree | 96cbbcea2a63283b44186a32fcf6528f692f6523 /src/application/templates/modern/view_topics.twig | |
parent | 3c8f4f695f1b9ec7a188b85e0ce38bc69c697008 (diff) |
Add modern theme
Diffstat (limited to 'src/application/templates/modern/view_topics.twig')
-rw-r--r-- | src/application/templates/modern/view_topics.twig | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/application/templates/modern/view_topics.twig b/src/application/templates/modern/view_topics.twig new file mode 100644 index 0000000..1f24863 --- /dev/null +++ b/src/application/templates/modern/view_topics.twig @@ -0,0 +1,28 @@ +{% extends "base.twig" %} + +{% block content %} + +{% if currentUser.hasPermission(permission("CREATE_OWN_TOPIC")) %} + <div class="actions"> + <a href="?_action=newtopic" class="btn"> + <svg viewBox="0 0 24 24" class="icon"><path d="m5 19-2 2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2"/><path d="M9 10h6"/><path d="M12 7v6"/><path d="M9 17h6"/></svg> + <span>{{ __("New topic") }}</span> + </a> + </div> +{% endif %} + +<div class="post-list"> + {% for topic in ctx.topics %} + <a class="_item" href="?_action=viewtopic&topic={{ topic.id|url_encode }}"> + <h4 class="_heading"> + {% if topic.isLocked %} + <svg viewBox="0 0 24 24" class="icon text-muted"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg> + {% endif %} + {{ topic.title }} + </h4> + <p class="_text _time">{{ topic.creationDate.format("c") }}</p> + </a> + {% endfor %} +</div> + +{% endblock %} |