-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathpatchsearch.html
More file actions
120 lines (114 loc) · 5.22 KB
/
patchsearch.html
File metadata and controls
120 lines (114 loc) · 5.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{%extends "base.html"%}
{%load commitfest %}
{%block contents%}
<!-- Search term input -->
<form method="GET" action="/search/" class="d-flex gap-2 mb-3">
<div class="form-group flex-grow-1">
<input type="text" class="form-control" id="searchterm" name="searchterm" value="{{searchterm}}" placeholder="Email Message-ID or keywords" required>
</div>
<button type="submit" class="btn btn-secondary">
<i class="bi bi-search"></i> Search
</button>
</form>
<!-- Filter form (same as other pages) -->
<div id="collapseFilters" class="collapse show">
<form id="filterform" method="GET" action="/search/" style="margin-bottom: 0px">
<input type="hidden" name="searchterm" value="{{searchterm}}">
<table class="table" style="margin-bottom: 0px">
<thead>
<tr>
{%for f in form%}
{%if not f.is_hidden%}
<td>{{f.label}}</td>
{%else%}
<td></td>
{%endif%}
{%endfor%}
<td></td>
</tr>
</thead>
<tbody>
<tr>
{%for f in form%}
<td>
{%if not f.name in form.selectize_fields%}{{f|field_class:"form-control"}}{%else%}{{f}}{%endif%}
</td>
{%endfor%}
<td>
<input type="submit" class="btn btn-secondary" value="Filter">
<a class="btn btn-secondary" href="/search/?searchterm={{searchterm}}">Clear</a>
</td>
</tr>
</tbody>
</table>
</form>
</div>
{% if patches %}
<p class="text-muted">Found {{patches|length}} patch{% if patches|length != 1 %}es{% endif %} matching "{{searchterm}}"</p>
{% endif %}
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th><a href="#" style="color:#333333;" onclick="return sortpatches(5);">Patch</a>{%if sortkey == 5%}<div style="float:right;"><i class="bi bi-sort-alpha-down"></i></div>{%elif sortkey == -5%}<div style="float:right;"><i class="bi bi-sort-alpha-up"></i></div>{%endif%}</th>
<th><a href="#" style="color:#333333;" onclick="return sortpatches(4);">ID</a>{%if sortkey == 4%}<div style="float:right;"><i class="bi bi-sort-numeric-down"></i></div>{%elif sortkey == -4%}<div style="float:right;"><i class="bi bi-sort-numeric-up"></i></div>{%endif%}</th>
<th>
<a href="#" style="color:#333333;" onclick="return sortpatches(8);">CF</a>
<i class="bi bi-question-circle text-muted" style="font-size: 0.8em; margin-left: 3px;" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-html="true" title="Color coding:<br>Green = In Progress<br>Blue = Open<br>Red = Closed"></i>
{%if sortkey == 8%}<div style="float:right;"><i class="bi bi-sort-numeric-down"></i></div>{%elif sortkey == -8%}<div style="float:right;"><i class="bi bi-sort-numeric-up"></i></div>{%endif%}
</th>
<th>Status</th>
<th>Tags</th>
<th>Ver</th>
<th>Author</th>
<th>Reviewers</th>
<th>Committer</th>
<th><a href="#" style="color:#333333;" onclick="return sortpatches(3);">Num cfs</a>{%if sortkey == 3%}<div style="float:right;"><i class="bi bi-sort-numeric-down-alt"></i></div>{%elif sortkey == -3%}<div style="float:right;"><i class="bi bi-sort-numeric-up-alt"></i></div>{%endif%}</th>
<th><a href="#" style="color:#333333;" onclick="return sortpatches(2);">Latest mail</a>{%if sortkey == 2%}<div style="float:right;"><i class="bi bi-sort-down"></i></div>{%elif sortkey == -2%}<div style="float:right;"><i class="bi bi-sort-up"></i></div>{%endif%}</th>
</tr>
</thead>
<tbody>
{%for p in patches %}
<tr>
<td><a href="/patch/{{p.id}}/">{{p.name}}</a></td>
<td>{{p.id}}</td>
<td>
{%with p.patchoncommitfest_set.all|first as poc%}
{%if poc%}<a href="/{{poc.commitfest.id}}/"><span class="badge bg-{{poc.commitfest.status|commitfeststatuslabel}}" title="{{poc.commitfest.status|commitfeststatusstring}}">{{poc.commitfest.name}}</span></a>{%endif%}
{%endwith%}
</td>
<td>
{%with p.patchoncommitfest_set.all|first as poc%}
{%if poc%}<span class="badge bg-{{poc.status|patchstatuslabel}}">{{poc.status|patchstatusstring}}</span>{%endif%}
{%endwith%}
</td>
<td style="width: min-content;">
{%for tag in p.tags.all%}
<a href="?searchterm={{searchterm}}&tag={{tag.id}}">
<span class="badge" style="background-color: {{tag.color}};" title="{{tag.description}}">{{tag.name}}</span>
</a>
{%endfor%}
</td>
<td>{%if p.targetversion%}<span class="badge bg-secondary">{{p.targetversion}}</span>{%endif%}</td>
<td>
{% for author in p.authors.all %}
{{author.get_full_name|default:author.username}}{% if not forloop.last %}, {% endif %}
{% endfor %}
</td>
<td>
{% for reviewer in p.reviewers.all %}
{{reviewer.get_full_name|default:reviewer.username}}{% if not forloop.last %}, {% endif %}
{% endfor %}
</td>
<td>{% if p.committer %}{{p.committer.fullname}}{% endif %}</td>
<td>{{p.patchoncommitfest_set.count}}</td>
<td style="white-space: nowrap;" title="{{p.modified}}">
{%if p.modified and userprofile.show_relative_timestamps %}{% cfwhen p.modified %}{%elif p.modified %}{{p.modified|date:"Y-m-d"}}<br/>{{p.modified|date:"H:i"}}{%endif%}
</td>
</tr>
{%endfor%}
</tbody>
</table>
{%endblock%}
{%block morescript%}
{%include "selectize_js.html" %}
{%endblock%}