ID: 6b277eceb0d23e51b8d9d9d65c18be4cb3cafa31
55 lines
—
2K —
View raw
| {% extends "mailing_list/mailing_list.html" %}
{% block page_title %}Mailing list: {{ list_address }}{% endblock %}
{% block content %}
<details class="filters" open>
<summary>Filters</summary>
<form action="" method="get">
{% for tag in tags.keys()|sort %}
<div class="tag">
<b>{{ tag }}:</b>
{% for value in tags[tag]|sort %}
{% set selected = null %}
{% if '+'+value in query_tags[tag] %}{% set selected = true %}{% endif %}
{% if '-'+value in query_tags[tag] %}{% set selected = false %}{% endif %}
<select name="{{ tag }}">
<option disabled {{ 'selected' if selected == null }}>{{ value }}</option>
<option {{ 'selected' if selected == true }}>+{{ value }}</option>
<option {{ 'selected' if selected == false }}>-{{ value }}</option>
</select>
{% endfor %}
</div>
{% endfor %}
<div class="buttons">
<input type="submit" value="Filter threads" />
<a href="{{ url('threads', repository=repository[:-10]) }}">Remove all</a>
</div>
</form>
</details>
<div class="threads">
{% for thread in threads %}
<div>
<div class="title">
<a href="{{ url('thread', repository=repository[:-10], thread_id=thread.id) }}">{{ thread.title }}</a>
</div>
<div class="subtitle">
#{{ thread.id }}
Created {{ thread.datetime|ago }}
{% if 'label' in thread['tags'] %}
{% for label in thread['tags']['label'] %}
<span class="tag">{{ label }}</span>
{% endfor %}
{% endif %}
</div>
</div>
{% endfor %}
</div>
{% endblock %}
|