List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH 1/1] ui: Show pages numbers also at the top.
@ 2018-10-09  3:00 calicobass
  0 siblings, 0 replies; only message in thread
From: calicobass @ 2018-10-09  3:00 UTC (permalink / raw)


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];


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-10-09  3:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-09  3:00 [PATCH 1/1] ui: Show pages numbers also at the top calicobass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).