aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2015-01-01 22:41:09 +0100
committerAlberto Bertogli <albertito@blitiri.com.ar>2015-01-11 22:18:22 +0100
commit7f2f67629f1d6b7c5046ae43c1a293137c89b4d3 (patch)
tree5181a9601ba5b139282603ab481c7099c576a956
parentac105c838396a6bd0cb13b455dc7d3562ac43360 (diff)
downloadgit-arr-fork-7f2f67629f1d6b7c5046ae43c1a293137c89b4d3.zip
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>
-rw-r--r--views/branch.html1
1 files changed, 1 insertions, 0 deletions
diff --git a/views/branch.html b/views/branch.html
index a49150e..1cc011d 100644
--- a/views/branch.html
+++ b/views/branch.html
@@ -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