By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

 repo-forum.html

View raw Download
text/html • 3.35 kiB
HTML document, ASCII text
        
            
1
{% extends "repo.html" %}
2
{% set active_page = "forum" %}
3
4
{% block title %}
5
{% trans username=username, repository=repository %}Forum of {{ username }}/{{ repository }}{% endtrans %}
6
{% endblock %}
7
{% block content %}
8
<x-vbox>
9
<x-frame style="--width: 896px;" class="flexible-space">
10
<x-vbox>
11
<details class="reply-area">
12
<summary>{% trans %}Post topic{% endtrans %}</summary>
13
14
<form method="POST" action="new">
15
<x-vbox>
16
<x-vbox class="nopad">
17
<label for="subject">{% trans %}Subject{% endtrans %}</label>
18
<input id="subject" name="subject" required>
19
</x-vbox>
20
<textarea name="message" style="box-sizing: border-box;" rows="8" required></textarea>
21
<x-buttonbox>
22
<button type="submit">{% trans %}Submit{% endtrans %}</button>
23
</x-buttonbox>
24
</x-vbox>
25
</form>
26
</details>
27
<form class="hbox" action="./search">
28
<input type="text" name="q" placeholder="{% trans %}Search...{% endtrans %}" value="{{ query }}" aria-label="{% trans %}Search query{% endtrans %}">
29
<select name="state" aria-label="{% trans %}State{% endtrans %}">
30
<option value="">{% trans %}all{% endtrans %}</option>
31
<option value="0" {% if require_state == "0" %}selected{% endif %}>{% trans %}done{% endtrans %}</option>
32
<option value="1" {% if require_state == "1" %}selected{% endif %}>{% trans %}active{% endtrans %}</option>
33
</select>
34
<select name="label" aria-label="{% trans %}Label{% endtrans %}">
35
<option value="">{% trans %}all{% endtrans %}</option>
36
{% for label in repo_data.labels %}
37
<option value="{{ label.identifier }}" {% if label.identifier == require_label %}selected{% endif %}>{{ label.name }}</option>
38
{% endfor %}
39
</select>
40
<button type="submit">{% trans %}Search{% endtrans %}</button>
41
</form>
42
{% for post in posts %}
43
<article class="card card-horizontal">
44
{% if post.state == 0 %}
45
<div class="card-top state-label" style="background: var(--color-done); color: var(--color-done-text);">
46
{% trans %}done{% endtrans %}
47
</div>
48
{% elif post.state == 1 %}
49
<div class="card-top state-label" style="background: var(--color-pending); color: var(--color-pending-text);">
50
{% trans %}active{% endtrans %}
51
</div>
52
{% endif %}
53
<section class="card-main">
54
<h3><a href="{{ post.number }}">{{ post.subject }}</a> <span class="post-number">#{{ post.number }}</span> ({{ post.children | length }})</h3>
55
<p><a href="/{{ post.owner.username }}">{{ post.owner.username }}</a></p>
56
</section>
57
</article>
58
{% endfor %}
59
{% include "pagination.html" %}
60
</x-vbox>
61
</x-frame>
62
</x-vbox>
63
{% endblock %}
64