Skip to content

add sortable table headers in POI list view#4194

Open
jonbulz wants to merge 6 commits intodevelopfrom
feature/sort-in-poi-list-view
Open

add sortable table headers in POI list view#4194
jonbulz wants to merge 6 commits intodevelopfrom
feature/sort-in-poi-list-view

Conversation

@jonbulz
Copy link
Copy Markdown
Contributor

@jonbulz jonbulz commented Mar 12, 2026

Short description

Add sort function to POI list view

Proposed changes

  • allow sorting by Title, Street, Postal Code, Country and Category
  • because the list view features the 'Publication status', the standard render_table_header helper function could not be used. instead, the sort_link tag is used directly in the sortable table headers

Side effects

  • Because the table header cannot be rendered directly from the table_fields property, it needs to be ensured that every change in the table headers in the template is also reflected in the table_fields

Faithfulness to issue description and design

There are no intended deviations from the issue and design.

How to test

  • go to POI list view
  • check the sorting works for Title, Street, Postal Code, Country and Category

Resolved issues

Fixes: #1936


Pull Request Review Guidelines

@MizukiTemma MizukiTemma self-requested a review March 17, 2026 14:10
Copy link
Copy Markdown
Member

@MizukiTemma MizukiTemma left a comment

Choose a reason for hiding this comment

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

Thank you for the PR 😸 Generally it looks good. I found one thing :eyes

I tested with those 4 POIs
Image

Desc sorting seems to work good
Image

but asc sorting shows three times "Test-Ort" somehow.
Image

Could you check once again?

💡 and I think we can add a release note in this PR, as the changes are visible for users.

@jonbulz
Copy link
Copy Markdown
Contributor Author

jonbulz commented Mar 19, 2026

@MizukiTemma thanks for your review! I thought I had that already covered, but it turns out the way Django ORM works in this respect is more complex than I thought. I learned something new from that 😄
Anyway, I think I fixed it now :)

@jonbulz jonbulz mentioned this pull request Mar 19, 2026
Copy link
Copy Markdown
Member

@MizukiTemma MizukiTemma left a comment

Choose a reason for hiding this comment

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

Thank you for updates 👍 Works as expected, the codes look also nice 😸

@jarlhengstmengel jarlhengstmengel self-requested a review March 23, 2026 10:00
@jarlhengstmengel jarlhengstmengel self-assigned this Mar 23, 2026
@MizukiTemma MizukiTemma self-assigned this Mar 24, 2026
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.

Filter/sort function for POIs

3 participants