{% extends "base.html" %}
{% block title %}Fissue · 条目{% endblock %}
{% block content %}
<h2>条目</h2>
<form method="get" action="/items" style="display:flex; gap:8px; margin-bottom:12px;">
<input name="repo" value="{{ repo_filter }}" placeholder="owner/name" style="padding:6px; flex:1;">
<select name="status" style="padding:6px;">
<option value="">全部状态</option>
{% for choice in statuses %}
<option value="{{ choice.value }}" {% if status_filter == choice.value %}selected{% endif %}>{{ choice.label }}</option>
{% endfor %}
</select>
<button type="submit">筛选</button>
</form>
{% if rows.is_empty() %}
<p class="muted">没有匹配的条目。</p>
{% else %}
<table>
<thead><tr><th>条目</th><th>状态</th><th>分类</th><th>优先级</th><th>标签</th></tr></thead>
<tbody>
{% for item in rows %}
<tr>
<td><a href="/item?key={{ item.key }}">{{ item.title }}</a><div class="muted">{{ item.repo }} #{{ item.number }}</div></td>
<td>{{ item.status }}</td><td>{{ item.category }}</td><td>{{ item.priority }}</td><td>{{ item.labels }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if pager.show %}
<p class="muted" style="margin-top:12px;">
{{ pager.span }}
{% if !pager.prev_url.is_empty() %}<a href="{{ pager.prev_url }}">上一页</a>{% endif %}
{% for link in pager.links %}
{% if link.gap %}
<span class="muted">…</span>
{% elif link.current %}
<span class="badge">{{ link.number }}</span>
{% else %}
<a href="{{ link.url }}">{{ link.number }}</a>
{% endif %}
{% endfor %}
{% if !pager.next_url.is_empty() %}<a href="{{ pager.next_url }}">下一页</a>{% endif %}
</p>
{% endif %}
{% endblock %}