[PATCH 1/1] ui: Show pages numbers also at the top.

calicobass at ihubbell.com calicobass at ihubbell.com
Tue Oct 9 05:00:03 CEST 2018


When the page length is long and there are a lot of repos it can be
cumbersome to scroll to the bottom of the page just to click through to
another page. This places the page links at the top also.



diff --git a/ui-repolist.c b/ui-repolist.c
index 41424c0..d9eb8c1 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -293,6 +293,8 @@ void cgit_print_repolist(void)
        else if (ctx.cfg.section_sort)
                sort_repolist("section");
 
+        if (cgit_repolist.count > ctx.cfg.max_repo_count)
+               print_pager(cgit_repolist.count, ctx.cfg.max_repo_count, ctx.qry.search, ctx.qry.sort);
        html("<table summary='repository list' class='list nowrap'>");
        for (i = 0; i < cgit_repolist.count; i++) {
                ctx.repo = &cgit_repolist.repos[i];


More information about the CGit mailing list