FossilRepo

fossilrepo / templates / fossil / ticket_reports_list.html
1
{% extends "base.html" %}
2
{% block title %}Ticket Reports — {{ 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 items-center justify-between mb-6">
9
<h2 class="text-lg font-semibold text-gray-200">Ticket Reports</h2>
10
<div class="flex items-center gap-3">
11
<span class="search-wrap">
12
<input type="search"
13
name="search"
14
value="{{ search }}"
15
placeholder="Search reports..."
16
aria-label="Search ticket reports"
17
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"
18
hx-get="{% url 'fossil:ticket_reports' slug=project.slug %}"
19
hx-trigger="input changed delay:300ms, search"
20
hx-target="#reports-content"
21
hx-swap="innerHTML"
22
hx-push-url="true"
23
hx-indicator="closest .search-wrap" />
24
<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>
25
</span>
26
{% if can_admin %}
27
<a href="{% url 'fossil:ticket_report_create' slug=project.slug %}"
28
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">
29
Create Report
30
</a>
31
{% endif %}
32
</div>
33
</div>
34
35
<div id="reports-content">
36
{% if reports %}
37
<div class="space-y-3">
38
{% for report in reports %}
39
<div class="rounded-lg bg-gray-800 border border-gray-700">
40
<div class="px-5 py-4">
41
<div class="flex items-start justify-between gap-4">
42
<div class="flex-1 min-w-0">
43
<div class="flex items-center gap-3 mb-1">
44
<a href="{% url 'fossil:ticket_report_run' slug=project.slug pk=report.pk %}"
45
class="text-sm font-medium text-brand-light hover:text-brand">{{ report.title }}</a>
46
{% if not report.is_public %}
47
<span class="inline-flex rounded-full bg-gray-700 px-2 py-0.5 text-xs font-semibold text-gray-400">Private</span>
48
{% endif %}
49
</div>
50
{% if report.description %}
51
<p class="text-xs text-gray-500 mt-1">{{ report.description }}</p>
52
{% endif %}
53
</div>
54
<div class="flex items-center gap-2 flex-shrink-0">
55
<a href="{% url 'fossil:ticket_report_run' slug=project.slug pk=report.pk %}"
56
class="text-xs text-gray-400 hover:text-brand-light">Run</a>
57
{% if can_admin %}
58
<a href="{% url 'fossil:ticket_report_edit' slug=project.slug pk=report.pk %}"
59
class="text-xs text-gray-400 hover:text-brand-light">Edit</a>
60
{% endif %}
61
</div>
62
</div>
63
</div>
64
</div>
65
{% endfor %}
66
</div>
67
{% else %}
68
<div class="rounded-lg bg-gray-800 border border-gray-700 p-8 text-center">
69
<p class="text-sm text-gray-500">{% if search %}No reports matching "{{ search }}".{% else %}No ticket reports defined.{% endif %}</p>
70
{% if not search %}
71
<p class="text-xs text-gray-600 mt-1">Reports let you run custom SQL queries against the Fossil ticket database.</p>
72
{% if can_admin %}
73
<a href="{% url 'fossil:ticket_report_create' slug=project.slug %}"
74
class="mt-3 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">
75
Create the first report
76
</a>
77
{% endif %}
78
{% endif %}
79
</div>
80
{% endif %}
81
{% include "includes/_pagination.html" %}
82
</div>
83
{% endblock %}
84

Keyboard Shortcuts

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