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-search.html

View raw Download
text/html • 2.67 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
<form class="hbox">
12
<input type="text" name="q" placeholder="{% trans %}Search...{% endtrans %}" value="{{ query }}" aria-label="{% trans %}Search query{% endtrans %}">
13
<select name="state" aria-label="{% trans %}State{% endtrans %}">
14
<option value="">{% trans %}all{% endtrans %}</option>
15
<option value="0" {% if require_state == "0" %}selected{% endif %}>{% trans %}done{% endtrans %}</option>
16
<option value="1" {% if require_state == "1" %}selected{% endif %}>{% trans %}active{% endtrans %}</option>
17
</select>
18
<select name="label" aria-label="{% trans %}Label{% endtrans %}">
19
<option value="">{% trans %}all{% endtrans %}</option>
20
{% for label in repo_data.labels %}
21
<option value="{{ label.identifier }}" {% if label.identifier == require_label %}selected{% endif %}>{{ label.name }}</option>
22
{% endfor %}
23
</select>
24
<button type="submit">{% trans %}Search{% endtrans %}</button>
25
</form>
26
{% for post in results %}
27
<article class="card card-horizontal">
28
{% if post.state == 0 %}
29
<div class="card-top state-label" style="background: var(--color-done); color: var(--color-done-text);">
30
{% trans %}done{% endtrans %}
31
</div>
32
{% elif post.state == 1 %}
33
<div class="card-top state-label" style="background: var(--color-pending); color: var(--color-pending-text);">
34
{% trans %}active{% endtrans %}
35
</div>
36
{% endif %}
37
<section class="card-main">
38
<a href="/{{ username }}/{{ repository }}/forum/{{ post.number }}"><h2>{{ post.subject }}</h2></a>
39
<p class="post-details"><a href="/{{ post.owner.username }}" class="post-author">{{ post.owner.username }}</a> &bull; {{ post.date | strftime("%A, %e %B %Y, %H:%M:%S") }}</p>
40
<p>{{ post.html | safe }}</p>
41
</section>
42
</article>
43
{% endfor %}
44
</x-vbox>
45
{% include "pagination.html" %}
46
</x-frame>
47
</x-vbox>
48
{% endblock %}
49