aboutsummaryrefslogtreecommitdiffstats
path: root/ui-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-tree.c')
-rw-r--r--ui-tree.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/ui-tree.c b/ui-tree.c
index 442b6be..b1adcc7 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -150,13 +150,7 @@ static int ls_item(const unsigned char *sha1, const char *base, int baselen,
150 cgit_print_filemode(mode); 150 cgit_print_filemode(mode);
151 html("</td><td>"); 151 html("</td><td>");
152 if (S_ISGITLINK(mode)) { 152 if (S_ISGITLINK(mode)) {
153 htmlf("<a class='ls-mod' href='"); 153 cgit_submodule_link("ls-mod", fullpath, sha1_to_hex(sha1));
154 html_attr(fmt(ctx.repo->module_link,
155 name,
156 sha1_to_hex(sha1)));
157 html("'>");
158 html_txt(name);
159 html("</a>");
160 } else if (S_ISDIR(mode)) { 154 } else if (S_ISDIR(mode)) {
161 cgit_tree_link(name, NULL, "ls-dir", ctx.qry.head, 155 cgit_tree_link(name, NULL, "ls-dir", ctx.qry.head,
162 curr_rev, fullpath); 156 curr_rev, fullpath);
@@ -177,8 +171,9 @@ static int ls_item(const unsigned char *sha1, const char *base, int baselen,
177 if (ctx.repo->max_stats) 171 if (ctx.repo->max_stats)
178 cgit_stats_link("stats", NULL, "button", ctx.qry.head, 172 cgit_stats_link("stats", NULL, "button", ctx.qry.head,
179 fullpath); 173 fullpath);
180 cgit_plain_link("plain", NULL, "button", ctx.qry.head, curr_rev, 174 if (!S_ISGITLINK(mode))
181 fullpath); 175 cgit_plain_link("plain", NULL, "button", ctx.qry.head, curr_rev,
176 fullpath);
182 html("</td></tr>\n"); 177 html("</td></tr>\n");
183 free(name); 178 free(name);
184 return 0; 179 return 0;