- "<th class='left'>Owner</th></tr>\n");
- while ((de = readdir(d)) != NULL) {
- if (de->d_name[0] == '.')
- continue;
- if (stat(de->d_name, &st) < 0)
+ "<th class='left'>Owner</th>"
+ "<th class='left'>Idle</th>");
+ if (ctx.cfg.enable_index_links)
+ html("<th class='left'>Links</th>");
+ html("</tr>\n");
+}
+
+
+void print_pager(int items, int pagelen, char *search)
+{
+ int i;
+ html("<div class='pager'>");
+ for(i = 0; i * pagelen < items; i++)
+ cgit_index_link(fmt("[%d]", i+1), fmt("Page %d", i+1), NULL,
+ search, i * pagelen);
+ html("</div>");
+}
+
+void cgit_print_repolist()
+{
+ int i, columns = 4, hits = 0, header = 0;
+ char *last_group = NULL;
+
+ if (ctx.cfg.enable_index_links)
+ columns++;
+
+ ctx.page.title = ctx.cfg.root_title;
+ cgit_print_http_headers(&ctx);
+ cgit_print_docstart(&ctx);
+ cgit_print_pageheader(&ctx);
+
+ if (ctx.cfg.index_header)
+ html_include(ctx.cfg.index_header);
+
+ html("<table summary='repository list' class='list nowrap'>");
+ for (i=0; i<cgit_repolist.count; i++) {
+ ctx.repo = &cgit_repolist.repos[i];
+ if (!(is_match(ctx.repo) && is_in_url(ctx.repo)))