FossilRepo

fossilrepo / templates / fossil / ticket_list.html
1
{% extends "base.html" %}
2
{% block title %}Tickets — {{ project.name }} — Fossilrepo{% endblock %}
3
4
{% block content %}
5
<h1 class="text-2xl font-bold text-gray-100 mb-2">{{ project.name }}</h1>
6
{% include "fossil/_project_nav.html" %}
7
8
<div class="flex flex-wrap items-center justify-between gap-3 mb-4">
9
<div class="flex flex-wrap items-center gap-2 text-xs text-gray-500">
10
<span>Status:</span>
11
<a href="{% url 'fossil:tickets' slug=project.slug %}?status=All"
12
class="rounded-full px-2.5 py-1 {% if not status_filter %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">All</a>
13
<a href="{% url 'fossil:tickets' slug=project.slug %}?status=Open"
14
class="rounded-full px-2.5 py-1 {% if status_filter == 'Open' %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">Open</a>
15
<a href="{% url 'fossil:tickets' slug=project.slug %}?status=Fixed"
16
class="rounded-full px-2.5 py-1 {% if status_filter == 'Fixed' %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">Fixed</a>
17
<a href="{% url 'fossil:tickets' slug=project.slug %}?status=Closed"
18
class="rounded-full px-2.5 py-1 {% if status_filter == 'Closed' %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">Closed</a>
19
</div>
20
<div class="flex flex-wrap items-center gap-3">
21
<a href="{% url 'fossil:tickets_csv' slug=project.slug %}" class="text-xs text-gray-500 hover:text-brand-light">Export CSV</a>
22
{% if perms.projects.change_project %}
23
<a href="{% url 'fossil:ticket_create' slug=project.slug %}" class="inline-flex items-center rounded-md bg-brand px-3 py-1.5 text-sm font-semibold text-white shadow-sm hover:bg-brand-hover focus:outline-none focus:ring-2 focus:ring-brand focus:ring-offset-2 focus:ring-offset-gray-950 transition-colors">New Ticket</a>
24
{% endif %}
25
<span class="search-wrap">
26
<input type="search"
27
name="search"
28
value="{{ search }}"
29
placeholder="Search tickets..."
30
aria-label="Search tickets"
31
class="rounded-md border-gray-700 bg-gray-800 text-gray-100 shadow-sm focus:border-brand focus:ring-brand text-sm px-3 py-1.5"
32
hx-get="{% url 'fossil:tickets' slug=project.slug %}{% if status_filter %}?status={{ status_filter }}{% endif %}"
33
hx-trigger="input changed delay:300ms, search"
34
hx-target="#ticket-table"
35
hx-swap="outerHTML"
36
hx-push-url="true"
37
hx-indicator="closest .search-wrap" />
38
<svg class="search-spinner animate-spin h-4 w-4" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"></path></svg>
39
</span>
40
</div>
41
</div>
42
43
{% include "fossil/partials/ticket_table.html" %}
44
45
<div class="mt-4 flex flex-wrap items-center justify-between gap-3 text-sm">
46
<div class="flex flex-wrap items-center gap-3">
47
<span class="text-gray-500">{{ total }} ticket{{ total|pluralize }}</span>
48
<div class="flex items-center gap-1 text-xs">
49
<span class="text-gray-600">Show:</span>
50
{% for size in per_page_options %}
51
<a href="{% url 'fossil:tickets' slug=project.slug %}?per_page={{ size }}{% if status_filter %}&status={{ status_filter }}{% endif %}"
52
class="px-1.5 py-0.5 rounded {% if size == per_page %}bg-brand text-white{% else %}text-gray-500 hover:text-white{% endif %}">{{ size }}</a>
53
{% endfor %}
54
</div>
55
</div>
56
<div class="flex items-center gap-2">
57
{% if has_prev %}
58
<a href="{% url 'fossil:tickets' slug=project.slug %}?page={{ page|add:"-1" }}&per_page={{ per_page }}{% if status_filter %}&status={{ status_filter }}{% endif %}"
59
class="rounded-md bg-gray-800 px-3 py-1.5 text-gray-400 hover:text-white hover:bg-gray-700 border border-gray-700 transition-colors">&larr;</a>
60
{% endif %}
61
<span class="text-gray-500">{{ page }} / {{ total_pages }}</span>
62
{% if has_next %}
63
<a href="{% url 'fossil:tickets' slug=project.slug %}?page={{ page|add:"1" }}&per_page={{ per_page }}{% if status_filter %}&status={{ status_filter }}{% endif %}"
64
class="rounded-md bg-gray-800 px-3 py-1.5 text-gray-400 hover:text-white hover:bg-gray-700 border border-gray-700 transition-colors">&rarr;</a>
65
{% endif %}
66
</div>
67
</div>
68
{% endblock %}
69

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button