X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/e16f1783346a090e4ea1194dcaae7f03e813f6a2..f072bc55b08675db93b2f892016e83d9f975dea2:/ui-repolist.c diff --git a/ui-repolist.c b/ui-repolist.c index 7c7aa9b..0a0b6ca 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -94,7 +94,7 @@ int is_in_url(struct cgit_repo *repo) void print_sort_header(const char *title, const char *sort) { - htmlf(""); for (i=0; isection; + if (section && !strcmp(section, "")) + section = NULL; if (!sorted && - ((last_group == NULL && ctx.repo->group != NULL) || - (last_group != NULL && ctx.repo->group == NULL) || - (last_group != NULL && ctx.repo->group != NULL && - strcmp(ctx.repo->group, last_group)))) { - htmlf("", + ((last_section == NULL && section != NULL) || + (last_section != NULL && section == NULL) || + (last_section != NULL && section != NULL && + strcmp(section, last_section)))) { + htmlf("", columns); - html_txt(ctx.repo->group); + html_txt(section); html(""); - last_group = ctx.repo->group; + last_section = section; } htmlf("", - !sorted && ctx.repo->group ? "sublevel-repo" : "toplevel-repo"); + !sorted && section ? "sublevel-repo" : "toplevel-repo"); cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL); html(""); html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL);