Page navigator doesn't fit for long pages

Bug #1710577 reported by GunChleoc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Widelands Website
Fix Released
Undecided
Unassigned

Bug Description

For long forum threads, the page navigator will break into a second line, and not fit into the layout any more.

Proposed solution: Omit some pages from the list, e.g. if Page 20 is currently shown, have it look like this:

 ‹‹‹‹ ‹‹ 1 2 3 ... 18 19 | 20 | 21 22 ... 31 32 33 ›› ››››

Related branches

Revision history for this message
GunChleoc (gunchleoc) wrote :
description: updated
Revision history for this message
kaputtnik (franku) wrote :

The pagination for pybb is done through its own implementation which is part of the website code. So it could be adjusted to our needs.

On the other hand we have a third party pagination utility called linaro-django-pagination, which is used in several places, e.g. news, or pm's.

I have adjusted the code on the server to use also the linaro-pagination for a topic (sorry for the server errors :-D ): https://wl.widelands.org/forum/topic/2646/?page=33#post-21091

I think there should be one sort of pagination equal to all pages, so i suggest to use the implementation with linaro-django-pagination also for pybb. Of course the template could also be adjusted, e.g. having the current page number between two vertical lines ('|').

Revision history for this message
GunChleoc (gunchleoc) wrote :

Forum looks good to me like it is now.

I'm not married to the extra vertical lines, but it would be good to set the current page apart a bit more via css - a darkened box, maybe?

summary: - Page navigator doesn't fir for long pages
+ Page navigator doesn't fit for long pages
Revision history for this message
GunChleoc (gunchleoc) wrote :

Actually, with the new layout, we could have less space below the pagination.

Revision history for this message
kaputtnik (franku) wrote :

I have reverted the changes on the server now, but will soon provide a branch.

For the highlighting of the current page i ended up with having it bold, a bit larger and coloring like visited links. See attachment.

Less space is good, i look into it.

Revision history for this message
kaputtnik (franku) wrote :

The attached branch is nearly ready. I am unsure about the call to load_related in

http://bazaar.launchpad.net/~widelands-dev/widelands-website/trunk/view/head:/pybb/views.py#L122

load_related is defined in pybb.orm.py:

http://bazaar.launchpad.net/~widelands-dev/widelands-website/trunk/view/head:/pybb/orm.py

From my understanding this is used to load only the attachments related to one paginated page to speed up database querys. This function is only used when showing a topic. We are currently not using attachments at all, but there is an open bug report for this.

If one think this is needed, i have to investigate.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Formatting looks OK.

Attachments might be needed in topics if we want to signal in the topic listing that the topic contains an attachment, e.g. a little paperclip icon.

kaputtnik (franku)
Changed in widelands-website:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.