views: branch/paginate: teach "next" link to respect 'max_pages'
Pagination link "next" does not respect 'max_pages', thus it incorrectly remains enabled on the final page capped by 'max_pages'. When clicked, the user is taken to a "404 Page not found" error page, which makes for a poor user experience. Fix this problem by teaching the "next" link to respect 'max_pages'. (As a side-effect, this also causes 'serve' mode to respect 'max_pages', which was not previously the case. This change of behavior is appropriate since it brings 'serve' mode, which is intended primarily for testing, more in line with 'generate' mode.) Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
This commit is contained in:
parent
ac105c8383
commit
7f2f67629f
@ -30,6 +30,7 @@
|
||||
% if more:
|
||||
% commits = commits[:-1]
|
||||
% end
|
||||
% more = more and offset + 1 < repo.info.max_pages
|
||||
|
||||
% include paginate more = more, offset = offset
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user