Skip to content

Commit ec78e45

Browse files
committed
Allow sorting by name
It was pretty confusing that clicking the patch name header would sort by created time, grouped by topic. This makes that sort by name.
1 parent 26e7222 commit ec78e45

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pgcommitfest/commitfest/templates/commitfest.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ <h3>{{p.is_open|yesno:"Active patches,Closed patches"}}</h3>
6060
<table class="table table-striped table-bordered table-hover table-condensed">
6161
<thead>
6262
<tr>
63-
<th>{%if p.is_open%}<a href="#" style="color:#333333;" onclick="return sortpatches(0);">Patch</a>{%if sortkey == 0%}<div style="float:right;"><i class="glyphicon glyphicon-arrow-down"></i></div>{%endif%}{%endif%}</th>
63+
<th>{%if p.is_open%}<a href="#" style="color:#333333;" onclick="return sortpatches(5);">Patch</a>{%if sortkey == 5%}<div style="float:right;"><i class="glyphicon glyphicon-arrow-down"></i></div>{%endif%}{%endif%}</th>
6464
<th>{%if p.is_open%}<a href="#" style="color:#333333;" onclick="return sortpatches(4);">ID</a>{%if sortkey == 4%}<div style="float:right;"><i class="glyphicon glyphicon-arrow-down"></i></div>{%endif%}{%else%}ID{%endif%}</th>
6565
<th>Status</th>
6666
<th>Ver</th>

pgcommitfest/commitfest/views.py

+2
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ def commitfest(request, cfid):
189189
orderby_str = 'num_cfs DESC, modified, created'
190190
elif sortkey == 4:
191191
orderby_str = 'p.id'
192+
elif sortkey == 5:
193+
orderby_str = 'p.name, created'
192194
else:
193195
orderby_str = 'p.id'
194196
sortkey = 0

0 commit comments

Comments
 (0)