summaryrefslogtreecommitdiff
path: root/ui-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-tree.c')
-rw-r--r--ui-tree.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/ui-tree.c b/ui-tree.c
index 54dcdbe..ed9f05e 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -29,11 +29,16 @@ static int print_entry(const unsigned char *sha1, const char *base,
if (S_ISDIR(mode)) {
html("<div class='ls-dir'><a href='");
html_attr(cgit_pageurl(cgit_query_repo, "tree",
- fmt("id=%s", sha1_to_hex(sha1))));
+ fmt("id=%s&path=%s%s/",
+ sha1_to_hex(sha1),
+ cgit_query_path ? cgit_query_path : "",
+ pathname)));
} else {
html("<div class='ls-blob'><a href='");
html_attr(cgit_pageurl(cgit_query_repo, "view",
- fmt("id=%s", sha1_to_hex(sha1))));
+ fmt("id=%s&path=%s%s", sha1_to_hex(sha1),
+ cgit_query_path ? cgit_query_path : "",
+ pathname)));
}
html("'>");
html_txt(name);
@@ -46,7 +51,7 @@ static int print_entry(const unsigned char *sha1, const char *base,
return 0;
}
-void cgit_print_tree(const char *hex)
+void cgit_print_tree(const char *hex, char *path)
{
struct tree *tree;
unsigned char sha1[20];
@@ -62,6 +67,7 @@ void cgit_print_tree(const char *hex)
}
html("<h2>Tree content</h2>\n");
+ html_txt(path);
html("<table class='list'>\n");
html("<tr>");
html("<th class='left'>Mode</th>");
&follow=1'> r617@Devoty: necoro | 2008-01-14 19:12:59 +0100Necoro2-10/+10 2008-01-14 r609@Devoty: necoro | 2008-01-14 17:04:38 +0100Necoro9-394/+477 2008-01-14 r605@Devoty: necoro | 2008-01-14 11:43:34 +0100Necoro2-26/+129 2008-01-14 r603@Devoty: necoro | 2008-01-14 11:30:26 +0100Necoro4-26/+38 2008-01-11 r598@Devoty: necoro | 2008-01-10 16:36:29 +0100Necoro4-10/+50 2008-01-11 r597@Devoty: necoro | 2008-01-10 14:12:35 +0100Necoro1-3/+3 2008-01-10 r595@Devoty: necoro | 2008-01-10 04:04:15 +0100Necoro1-52/+3 2008-01-09 r586@Devoty: necoro | 2008-01-09 14:54:18 +0100Necoro1-1/+1 2007-12-06 r577@Devoty: necoro | 2007-12-06 20:37:36 +0100Necoro1-1/+1 2007-12-06 r572@Devoty: necoro | 2007-11-28 08:48:15 +0100Necoro1-0/+1 2007-11-27 r570@Devoty: necoro | 2007-11-27 02:08:21 +0100Necoro3-84/+108