Bugzilla – Bug 3750
Numeric page bar missing links
Last modified: 2008-09-15 14:39:24 UTC
r8418, Default skin. The numeric links on either end of the numeric page bar look like they're being covered up by the first/prev/netx/last buttons. When on page 1, the last page number isn't visible. When on one of the 'middle' pages, the first several page links aren't visible. Maybe not noticed by anyone else, but I have my new music set at 10,000 so that all albums appear in the list. Also, when you're on one of the middle pages the 'Last' button doesn't appear.
Created attachment 1342 [details] Screen cap
Isn't that how it's supposed to be? Can't show unlimited pages, so it shows a certain number on each side of the current page.
> Isn't that how it's supposed to be? Can't show unlimited pages, so it shows a > certain number on each side of the current page. Chris, I think you may be right. Looking at it some more I think that's what is being done, just that the logic is a little off, so it didn't make sense to me. Looks like the 'First' and 'Last' buttons only appear when the link to the first or last page isn't displayed. The bit of logic that's off is in the number of page links that are displayed. With my 16 pages, I see links for pages 1-15 when I'm on pages 1 to 8, on page 9 I get links for 2-16, 10 is 3-16, 11 is 4-16, 12 is 5-16, 13 is 6-16, 14 is 7-16, 15 is 8-16, 16 is 9-16. I'm guessing the number of links is supposed to be kept constant, probably at 15.
Default sets pagesperbar at 15. However, the starting page is only set at pagesperbar/2. There is no check for where the last page occurs. I'm testing a possible fix. adding this line, after line 188 of EN/hreftemplate should solve things: IF (pagebarstart + pagesperbar) > pageinfo.totalpages; pagebarstart = pageinfo.totalpages - pagesperbar; END; This checks if the pages displayed will stop before the proper count, and backtracks enough to cover the difference. Give that a test, it seems to work for me. I'll commit tonight, unless andy doesn't want to wait :)
Thanks, go for it. You know more about that code than I do. :)
That was Andy, not me. :)
fixxed in change 8448