-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add reverse sorting on commitfest page #33
Conversation
@JelteF I think this should do it |
media/commitfest/js/commitfest.js
Outdated
} | ||
$("#filterform").submit(); | ||
let sortkey = $('#id_sortkey').val() | ||
if (sortkey == sortby) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic works well, but the html template should be changed here:
pgcommitfest/pgcommitfest/commitfest/templates/commitfest.html
Lines 63 to 74 in 0f23363
<th><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%}</th> | |
<th><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%}</th> | |
<th>Status</th> | |
<th>Ver</th> | |
<th>CI status</th> | |
<th><a href="#" style="color:#333333;" onclick="return sortpatches(6);">Stats</a>{%if sortkey == 6%}<div style="float:right;"><i class="glyphicon glyphicon-arrow-down"></i></div>{%endif%}</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="glyphicon glyphicon-arrow-down"></i></div>{%endif%}</th> | |
<th><a href="#" style="color:#333333;" onclick="return sortpatches(1);">Latest activity</a>{%if sortkey == 1%}<div style="float:right;"><i class="glyphicon glyphicon-arrow-down"></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="glyphicon glyphicon-arrow-down"></i></div>{%endif%}</th> |
It needs to show glyphicon-arrow-up
for the reverse sort.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
I pushed two small changes to this branch and merged it. FYI for next time it was failing the formatting/linting checks. You can run those locally using |
Thanks for the contribution. |
Implements reverse sorting in the columns of the commitfest pages. This is a cleaned up version of #28 and #32 Fixes #20 --------- Co-authored-by: Jelte Fennema-Nio <[email protected]>
Implements reverse sorting in the columns of the commitfest pages.
This is a cleaned up version of #28 and #32
Fixes #20