X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/8f6f8c3406ad069b37da7cb90462c1e61c991859..2aef89e5da436f2bc9670d96ccbc5ff1c2b8355c:/ui-repolist.c diff --git a/ui-repolist.c b/ui-repolist.c index d341193..8724589 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -12,6 +12,7 @@ void cgit_print_repolist(struct cacheitem *item) { struct repoinfo *repo; int i; + char *last_group = NULL; cgit_print_docstart(cgit_root_title, item); cgit_print_pageheader(cgit_root_title, 0); @@ -25,12 +26,21 @@ void cgit_print_repolist(struct cacheitem *item) for (i=0; igroup != NULL) || + (last_group != NULL && repo->group == NULL) || + (last_group != NULL && repo->group!= NULL && + strcmp(repo->group, last_group))) { + html(""); + html_txt(repo->group); + html(""); + last_group = repo->group; + } html(""); html_link_open(cgit_repourl(repo->url), NULL, NULL); html_txt(repo->name); html_link_close(); html(""); - html_txt(repo->desc); + html_ntxt(cgit_max_repodesc_len, repo->desc); html(""); html_txt(repo->owner); html("");