summaryrefslogtreecommitdiff
path: root/ui-summary.c
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2006-12-13 00:13:27 +0100
committerLars Hjemli <hjemli@gmail.com>2006-12-13 00:13:27 +0100
commit06fe0c2f47eaf467db8ab1443e61dfa1c280f30a (patch)
tree481164eeeeb5ca3302f7b3d38d1debbad9db9296 /ui-summary.c
parent58d04f6523b0029281d65f841859fa42d0c744ff (diff)
downloadcgit-06fe0c2f47eaf467db8ab1443e61dfa1c280f30a.tar.gz
cgit-06fe0c2f47eaf467db8ab1443e61dfa1c280f30a.tar.bz2
cgit-06fe0c2f47eaf467db8ab1443e61dfa1c280f30a.zip
Add display of tree content w/ui-tree.c
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to '')
-rw-r--r--ui-summary.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui-summary.c b/ui-summary.c
index cc918ad..29baa74 100644
--- a/ui-summary.c
+++ b/ui-summary.c
@@ -27,6 +27,11 @@ static int cgit_print_branch_cb(const char *refname, const unsigned char *sha1,
pretty_print_commit(CMIT_FMT_ONELINE, commit, ~0, buf,
sizeof(buf), 0, NULL, NULL, 0);
html_txt(buf);
+ html("</td><td><a href='");
+ html_attr(cgit_pageurl(cgit_query_repo, "tree",
+ fmt("id=%s",
+ sha1_to_hex(commit->tree->object.sha1))));
+ html("'>tree</a>");
html("</td></tr>\n");
} else {
html("<tr><td>");
@@ -41,7 +46,7 @@ static int cgit_print_branch_cb(const char *refname, const unsigned char *sha1,
static void cgit_print_branches()
{
html("<table class='list'>");
- html("<tr><th>Branch name</th><th>Head commit</th></tr>\n");
+ html("<tr><th>Branch name</th><th>Latest</th><th>Link</th></tr>\n");
for_each_branch_ref(cgit_print_branch_cb, NULL);
html("</table>");
}