OXYGENHUB
# 7dbb41b09a99 oxygenhub / templates / issues.html
2.7 KiB · HTML · last changed Lists: filters, sort orders, pages, and counts on the tabs 1 month ago source blame history raw
1
{% extends "base.html" %}
2
{% import "repo_tabs.html" as m %}
3
{% block title %}Issues · {{ repo.owner }}/{{ repo.name }}{% endblock %}
4
{% block bodyattrs %} data-repo="{{ repo.url }}"{% endblock %}
5
{% block tabs %}{% call m::tabs(repo, "issues") %}{% endblock %}
6
{% block content %}
7
<div class="head"><h1>Issues <small>{{ counts.0 }} open · {{ counts.1 }} closed</small></h1></div>
8
<div class="bar">
9
  <form class="find" method="get" action="{{ repo.url }}/issues"><input type="search" name="q" value="{{ q }}" placeholder="Filter: text, author:bob, label:bug, assignee:andy, milestone:v1, state:closed"><input type="hidden" name="state" value="{{ state }}"><input type="hidden" name="sort" value="{{ sort }}"></form>
10
  <span class="modes">
11
    <a href="?state=open"{% if state == "open" %} class="on"{% endif %}>open</a>
12
    <a href="?state=closed"{% if state == "closed" %} class="on"{% endif %}>closed</a>
13
    <a href="?state=all"{% if state == "all" %} class="on"{% endif %}>all</a>
14
  </span>
15
  <span class="modes small" aria-label="Sort">{% for (k, label) in crate::web::issues::SORTS %}<a href="{{ pager.sorted(k) }}"{% if sort == *k %} class="on"{% endif %}>{{ label }}</a>{% endfor %}</span>
16
  <a class="go small" href="{{ repo.url }}/labels">labels</a>
17
  <a class="go small" href="{{ repo.url }}/milestones">milestones</a>
18
  {% if shell.user.is_some() %}<a class="go small" href="{{ repo.url }}/issues/new">new issue</a>{% endif %}
19
</div>
20
{% if rows.is_empty() %}<p class="empty">No issues match.</p>{% else %}
21
<ul class="rows">
22
{% for r in rows %}
23
  <li>
24
    <div>
25
      <a class="name" href="{{ repo.url }}/issue/{{ r.issue.number }}">{% if r.issue.state == "open" %}<span class="sig sig-valid">●</span>{% else %}<span class="sig sig-unsigned">●</span>{% endif %} <span class="mute">#{{ r.issue.number }}</span> <strong>{{ r.issue.title }}</strong></a>
26
      {% if r.issue.pinned %}<span class="tag">pinned</span>{% endif %}{% if r.issue.locked %}<span class="tag">locked</span>{% endif %}
27
      {% for l in r.labels %}<span class="label" style="--c: {{ l.colour }}">{{ l.name }}</span>{% endfor %}
28
      <p class="small">opened <time title="{{ r.issue.created_ms|when_i }}">{{ r.issue.created_ms|ago_i }}</time> by {{ r.issue.author }}{% if !r.assignees.is_empty() %} · assigned to {{ r.assignees.join(", ") }}{% endif %}{% if let Some(ms) = r.milestone %} · <a href="{{ repo.url }}/milestones">{{ ms }}</a>{% endif %}{% if r.comments > 0 %} · {{ r.comments|plural("comment", "comments") }}{% endif %}</p>
29
    </div>
30
    <div class="right small">updated <time title="{{ r.issue.updated_ms|when_i }}">{{ r.issue.updated_ms|ago_i }}</time></div>
31
  </li>
32
{% endfor %}
33
</ul>
34
{% include "pager.html" %}
35
{% endif %}
36
{% endblock %}