aboutsummaryrefslogtreecommitdiffstats
path: root/ui-repolist.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-repolist.c')
-rw-r--r--ui-repolist.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ui-repolist.c b/ui-repolist.c
index 8e367a2..33e3e7f 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -12,6 +12,7 @@ void cgit_print_repolist(struct cacheitem *item)
12{ 12{
13 struct repoinfo *repo; 13 struct repoinfo *repo;
14 int i; 14 int i;
15 char *last_group = NULL;
15 16
16 cgit_print_docstart(cgit_root_title, item); 17 cgit_print_docstart(cgit_root_title, item);
17 cgit_print_pageheader(cgit_root_title, 0); 18 cgit_print_pageheader(cgit_root_title, 0);
@@ -30,6 +31,15 @@ void cgit_print_repolist(struct cacheitem *item)
30 31
31 for (i=0; i<cgit_repolist.count; i++) { 32 for (i=0; i<cgit_repolist.count; i++) {
32 repo = &cgit_repolist.repos[i]; 33 repo = &cgit_repolist.repos[i];
34 if ((last_group == NULL && repo->group != NULL) ||
35 (last_group != NULL && repo->group == NULL) ||
36 (last_group != NULL && repo->group!= NULL &&
37 strcmp(repo->group, last_group))) {
38 html("<tr class='nohover'><td colspan='4' class='repogroup'>");
39 html_txt(repo->group);
40 html("</td></tr>");
41 last_group = repo->group;
42 }
33 html("<tr><td>"); 43 html("<tr><td>");
34 html_link_open(cgit_repourl(repo->url), NULL, NULL); 44 html_link_open(cgit_repourl(repo->url), NULL, NULL);
35 html_txt(repo->name); 45 html_txt(repo->name);