",
- repo->group ? "sublevel-repo" : "toplevel-repo");
- html_link_open(cgit_repourl(repo->url), repo->desc, NULL);
- html_txt(repo->name);
+ cgit_repo->group ? "sublevel-repo" : "toplevel-repo");
+ html_link_open(cgit_repourl(cgit_repo->url), NULL, NULL);
+ html_txt(cgit_repo->name);
html_link_close();
html(" | ");
- html_ntxt(cgit_max_repodesc_len, repo->desc);
+ html_ntxt(cgit_max_repodesc_len, cgit_repo->desc);
html(" | ");
- html_txt(repo->owner);
+ html_txt(cgit_repo->owner);
html(" | ");
- print_modtime(repo);
+ print_modtime(cgit_repo);
html(" | ");
- html_link_open(cgit_repourl(repo->url),
+ html_link_open(cgit_repourl(cgit_repo->url),
"Summary", "button");
html("S");
- html_link_open(cgit_pageurl(repo->name, "log", NULL),
+ html_link_open(cgit_pageurl(cgit_repo->name, "log", NULL),
"Log", "button");
html("L");
- html_link_open(cgit_pageurl(repo->name, "tree", NULL),
- "Files", "button");
- html("F");
+ cgit_tree_link("F", "Files", "button", NULL, NULL, NULL);
html(" |
\n");
}
html("");
diff --git a/ui-shared.c b/ui-shared.c
index aba93e8..9ab6409 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -87,6 +87,70 @@ char *cgit_currurl()
return fmt("%s/", cgit_virtual_root);
}
+static char *repolink(char *title, char *class, char *page, char *head,
+ char *path)
+{
+ char *delim = "?";
+
+ html("");
html_filemode(mode);
html(" | module_link,
name,
sha1_to_hex(sha1)));
+ html("'>");
+ html_txt(name);
+ html("");
} else if (S_ISDIR(mode)) {
- html("class='ls-dir'>");
+ cgit_tree_link(name, NULL, NULL, cgit_query_head,
+ curr_rev, fullpath);
} else {
- html("class='ls-blob'>");
+ cgit_tree_link(name, NULL, NULL, cgit_query_head,
+ curr_rev, fullpath);
}
- htmlf("'>%s | ", name);
- htmlf("%li | ", size);
+ htmlf("%li | ", size);
html("");
- html_txt(xstrdup(pathname));
- html("");
+ html("/");
+ cgit_tree_link(xstrdup(pathname), NULL, NULL, cgit_query_head,
+ curr_rev, buffer);
if (strcmp(match_path, buffer))
return READ_TREE_RECURSIVE;
|