diff options
author | Lars Hjemli <hjemli@gmail.com> | 2012-03-19 05:59:36 (JST) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2012-03-19 05:59:36 (JST) |
commit | 2b9fab8d30420d935745c4d84ea22412ab2485e5 (patch) | |
tree | 664ebc3d061fd7e89393af67bfbc406f3b600be0 /ui-tree.c | |
parent | 08352c7a02f057f6cbaf817ca7e53c53be590a62 (diff) | |
parent | 3fbaf097153b239b092d11a178ace96671f9f3ec (diff) | |
download | cgit-2b9fab8d30420d935745c4d84ea22412ab2485e5.zip cgit-2b9fab8d30420d935745c4d84ea22412ab2485e5.tar.gz |
Merge branch 'lh/module-links'
Diffstat (limited to 'ui-tree.c')
-rw-r--r-- | ui-tree.c | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -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; |