diff options
author | Johan Herland | 2010-06-10 01:09:30 +0200 |
---|---|---|
committer | Lars Hjemli | 2010-06-19 10:40:23 +0200 |
commit | 48f7b982d3bb52f1307df73ceb6dd4cab3fdcc80 (patch) | |
tree | e1d275b72e7e3fe47eafd44dbae3b720c895da1f /ui-tree.c | |
parent | 24fd7e54c82294efa68ecae5dd9cb8a8986c04bf (diff) | |
download | cgit-48f7b982d3bb52f1307df73ceb6dd4cab3fdcc80.tar.gz cgit-48f7b982d3bb52f1307df73ceb6dd4cab3fdcc80.tar.bz2 cgit-48f7b982d3bb52f1307df73ceb6dd4cab3fdcc80.zip |
ui-tree: Remove unnecessary path breadcrumb navigation
The path breadcrumb navigation at the top of the 'tree' page has now been
duplicated in ui-shared, which leaves the ui-tree implementation unnecessary.
This patch removes the breadcrumb navigation from ui-tree, and moves the
"(plain)" link that followed the breadcrumb when displaying blobs to the
end of the next line, following the blob SHA1.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-tree.c')
-rw-r--r-- | ui-tree.c | 15 |
1 files changed, 2 insertions, 13 deletions
@@ -102,10 +102,10 @@ static void print_object(const unsigned char *sha1, char *path, const char *base | |||
102 | return; | 102 | return; |
103 | } | 103 | } |
104 | 104 | ||
105 | html(" ("); | 105 | htmlf("blob: %s (", sha1_to_hex(sha1)); |
106 | cgit_plain_link("plain", NULL, NULL, ctx.qry.head, | 106 | cgit_plain_link("plain", NULL, NULL, ctx.qry.head, |
107 | curr_rev, path); | 107 | curr_rev, path); |
108 | htmlf(")<br/>blob: %s\n", sha1_to_hex(sha1)); | 108 | html(")\n"); |
109 | 109 | ||
110 | if (ctx.cfg.max_blob_size && size / 1024 > ctx.cfg.max_blob_size) { | 110 | if (ctx.cfg.max_blob_size && size / 1024 > ctx.cfg.max_blob_size) { |
111 | htmlf("<div class='error'>blob size (%dKB) exceeds display size limit (%dKB).</div>", | 111 | htmlf("<div class='error'>blob size (%dKB) exceeds display size limit (%dKB).</div>", |
@@ -225,17 +225,10 @@ static int walk_tree(const unsigned char *sha1, const char *base, int baselen, | |||
225 | { | 225 | { |
226 | static int state; | 226 | static int state; |
227 | static char buffer[PATH_MAX]; | 227 | static char buffer[PATH_MAX]; |
228 | char *url; | ||
229 | 228 | ||
230 | if (state == 0) { | 229 | if (state == 0) { |
231 | memcpy(buffer, base, baselen); | 230 | memcpy(buffer, base, baselen); |
232 | strcpy(buffer+baselen, pathname); | 231 | strcpy(buffer+baselen, pathname); |
233 | url = cgit_pageurl(ctx.qry.repo, "tree", | ||
234 | fmt("h=%s&path=%s", curr_rev, buffer)); | ||
235 | html("/"); | ||
236 | cgit_tree_link(xstrdup(pathname), NULL, NULL, ctx.qry.head, | ||
237 | curr_rev, buffer); | ||
238 | |||
239 | if (strcmp(match_path, buffer)) | 232 | if (strcmp(match_path, buffer)) |
240 | return READ_TREE_RECURSIVE; | 233 | return READ_TREE_RECURSIVE; |
241 | 234 | ||
@@ -278,10 +271,6 @@ void cgit_print_tree(const char *rev, char *path) | |||
278 | return; | 271 | return; |
279 | } | 272 | } |
280 | 273 | ||
281 | html("path: <a href='"); | ||
282 | html_attr(cgit_pageurl(ctx.qry.repo, "tree", fmt("h=%s", rev))); | ||
283 | html("'>root</a>"); | ||
284 | |||
285 | if (path == NULL) { | 274 | if (path == NULL) { |
286 | ls_tree(commit->tree->object.sha1, NULL); | 275 | ls_tree(commit->tree->object.sha1, NULL); |
287 | return; | 276 | return; |