- "<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)
- continue;
- if (!S_ISDIR(st.st_mode))
- continue;
-
- cgit_repo_name = cgit_repo_desc = cgit_repo_owner = NULL;
- name = fmt("%s/info/cgit", de->d_name);
- if (cgit_read_config(name, cgit_repo_config_cb))
- continue;
-
- html("<tr><td>");
- html_link_open(cgit_repourl(de->d_name), NULL, NULL);
- html_txt(cgit_repo_name);
+ "<th class='left'>Owner</th>"
+ "<th class='left'>Idle</th>"
+ "<th>Links</th></tr>\n");
+
+ for (i=0; i<cgit_repolist.count; i++) {
+ cgit_repo = &cgit_repolist.repos[i];
+ if ((last_group == NULL && cgit_repo->group != NULL) ||
+ (last_group != NULL && cgit_repo->group == NULL) ||
+ (last_group != NULL && cgit_repo->group != NULL &&
+ strcmp(cgit_repo->group, last_group))) {
+ html("<tr class='nohover'><td colspan='4' class='repogroup'>");
+ html_txt(cgit_repo->group);
+ html("</td></tr>");
+ last_group = cgit_repo->group;
+ }
+ htmlf("<tr><td class='%s'>",
+ cgit_repo->group ? "sublevel-repo" : "toplevel-repo");
+ html_link_open(cgit_repourl(cgit_repo->url), NULL, NULL);
+ html_txt(cgit_repo->name);