[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cgit
Subject:    [PATCH 1/1] ui: Show pages numbers also at the top.
From:       "<>" <calicobass () ihubbell ! com>
Date:       2018-10-09 3:00:03
Message-ID: 20181008200003.8007e1d13042103ba1a8f22c () ihubbell ! com
[Download RAW message or body]

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];
_______________________________________________
CGit mailing list
CGit@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/cgit
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic