|
diff --git a/ui-tree.c b/ui-tree.c index dee8309..db63e13 100644 --- a/ ui-tree.c+++ b/ ui-tree.c |
|
@@ -10,5 +10,6 @@ |
10 | |
10 | |
| |
11 | char *curr_rev; |
11 | |
12 | |
12 | static int print_entry(const unsigned char *sha1, const char *base, |
13 | static int print_entry(const unsigned char *sha1, const char *base, |
13 | int baselen, const char *pathname, unsigned int mode, |
14 | int baselen, const char *pathname, unsigned int mode, |
14 | int stage) |
15 | int stage) |
@@ -37,4 +38,5 @@ static int print_entry(const unsigned char *sha1, const char *base, |
37 | html("class='ls-dir'><a href='"); |
38 | html("class='ls-dir'><a href='"); |
38 | html_attr(cgit_pageurl(cgit_query_repo, "tree", |
39 | html_attr(cgit_pageurl(cgit_query_repo, "tree", |
39 | fmt("id=%s&path=%s%s/", |
40 | fmt("h=%s&id=%s&path=%s%s/", |
| |
41 | curr_rev, |
40 | sha1_to_hex(sha1), |
42 | sha1_to_hex(sha1), |
@@ -45,3 +47,4 @@ static int print_entry(const unsigned char *sha1, const char *base, |
45 | html_attr(cgit_pageurl(cgit_query_repo, "view", |
47 | html_attr(cgit_pageurl(cgit_query_repo, "view", |
46 | fmt("id=%s&path=%s%s", sha1_to_hex(sha1), |
48 | fmt("h=%s&id=%s&path=%s%s", curr_rev, |
| |
49 | sha1_to_hex(sha1), |
47 | cgit_query_path ? cgit_query_path : "", |
50 | cgit_query_path ? cgit_query_path : "", |
@@ -51,2 +54,10 @@ static int print_entry(const unsigned char *sha1, const char *base, |
51 | htmlf("<td class='filesize'>%li</td>", size); |
54 | htmlf("<td class='filesize'>%li</td>", size); |
| |
55 | |
| |
56 | html("<td class='links'><a href='"); |
| |
57 | html_attr(cgit_pageurl(cgit_query_repo, "log", |
| |
58 | fmt("h=%s&path=%s%s", |
| |
59 | curr_rev, |
| |
60 | cgit_query_path ? cgit_query_path : "", |
| |
61 | pathname))); |
| |
62 | html("'>history</a></td>"); |
52 | html("</tr>\n"); |
63 | html("</tr>\n"); |
@@ -56,3 +67,3 @@ static int print_entry(const unsigned char *sha1, const char *base, |
56 | |
67 | |
57 | void cgit_print_tree(const char *hex, char *path) |
68 | void cgit_print_tree(const char *rev, const char *hex, char *path) |
58 | { |
69 | { |
@@ -61,2 +72,3 @@ void cgit_print_tree(const char *hex, char *path) |
61 | |
72 | |
| |
73 | curr_rev = xstrdup(rev); |
62 | if (get_sha1_hex(hex, sha1)) { |
74 | if (get_sha1_hex(hex, sha1)) { |
@@ -77,2 +89,3 @@ void cgit_print_tree(const char *hex, char *path) |
77 | html("<th class='right'>Size</th>"); |
89 | html("<th class='right'>Size</th>"); |
| |
90 | html("<th/>"); |
78 | html("</tr>\n"); |
91 | html("</tr>\n"); |
|