Skip to content
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

Merged
merged 4 commits into from
Feb 16, 2025

Conversation

destrex271
Copy link
Contributor

@destrex271 destrex271 commented Feb 16, 2025

Implements reverse sorting in the columns of the commitfest pages.

This is a cleaned up version of #28 and #32

Fixes #20

@destrex271
Copy link
Contributor Author

@JelteF I think this should do it

}
$("#filterform").submit();
let sortkey = $('#id_sortkey').val()
if (sortkey == sortby) {
Copy link
Collaborator

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:

<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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@JelteF JelteF changed the title feature: added reverse sorting Add reverse sorting on commitfest page Feb 16, 2025
@JelteF JelteF merged commit 796c427 into postgres:main Feb 16, 2025
1 check passed
@JelteF
Copy link
Collaborator

JelteF commented Feb 16, 2025

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 make fix.

@JelteF
Copy link
Collaborator

JelteF commented Feb 16, 2025

Thanks for the contribution.

JelteF added a commit that referenced this pull request Mar 4, 2025
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement reverse sorting
2 participants