summaryrefslogtreecommitdiff
path: root/src/application/templates/modern/view_topics.twig
blob: 1f2486324309b250aaf1f092482a1fafa96051ba (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
25
26
27
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&amp;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 %}