|
diff --git a/ui-tree.c b/ui-tree.c index 4bf372a..9876c99 100644 --- a/ ui-tree.c+++ b/ ui-tree.c |
|
@@ -87,49 +87,49 @@ static int ls_item(const unsigned char *sha1, const char *base, int baselen, |
87 | } |
87 | } |
88 | |
88 | |
89 | html("<tr><td class='ls-mode'>"); |
89 | html("<tr><td class='ls-mode'>"); |
90 | cgit_print_filemode(mode); |
90 | cgit_print_filemode(mode); |
91 | html("</td><td>"); |
91 | html("</td><td>"); |
92 | if (S_ISGITLINK(mode)) { |
92 | if (S_ISGITLINK(mode)) { |
93 | htmlf("<a class='ls-mod' href='"); |
93 | htmlf("<a class='ls-mod' href='"); |
94 | html_attr(fmt(ctx.repo->module_link, |
94 | html_attr(fmt(ctx.repo->module_link, |
95 | name, |
95 | name, |
96 | sha1_to_hex(sha1))); |
96 | sha1_to_hex(sha1))); |
97 | html("'>"); |
97 | html("'>"); |
98 | html_txt(name); |
98 | html_txt(name); |
99 | html("</a>"); |
99 | html("</a>"); |
100 | } else if (S_ISDIR(mode)) { |
100 | } else if (S_ISDIR(mode)) { |
101 | cgit_tree_link(name, NULL, "ls-dir", ctx.qry.head, |
101 | cgit_tree_link(name, NULL, "ls-dir", ctx.qry.head, |
102 | curr_rev, fullpath); |
102 | curr_rev, fullpath); |
103 | } else { |
103 | } else { |
104 | cgit_tree_link(name, NULL, "ls-blob", ctx.qry.head, |
104 | cgit_tree_link(name, NULL, "ls-blob", ctx.qry.head, |
105 | curr_rev, fullpath); |
105 | curr_rev, fullpath); |
106 | } |
106 | } |
107 | htmlf("</td><td class='ls-size'>%li</td>", size); |
107 | htmlf("</td><td class='ls-size'>%li</td>", size); |
108 | |
108 | |
109 | html("<td>"); |
109 | html("<td>"); |
110 | cgit_log_link("log", NULL, "button", ctx.qry.head, curr_rev, |
110 | cgit_log_link("log", NULL, "button", ctx.qry.head, curr_rev, |
111 | fullpath, 0, NULL, NULL); |
111 | fullpath, 0, NULL, NULL, ctx.qry.showmsg); |
112 | html("</td></tr>\n"); |
112 | html("</td></tr>\n"); |
113 | free(name); |
113 | free(name); |
114 | return 0; |
114 | return 0; |
115 | } |
115 | } |
116 | |
116 | |
117 | static void ls_head() |
117 | static void ls_head() |
118 | { |
118 | { |
119 | html("<table summary='tree listing' class='list'>\n"); |
119 | html("<table summary='tree listing' class='list'>\n"); |
120 | html("<tr class='nohover'>"); |
120 | html("<tr class='nohover'>"); |
121 | html("<th class='left'>Mode</th>"); |
121 | html("<th class='left'>Mode</th>"); |
122 | html("<th class='left'>Name</th>"); |
122 | html("<th class='left'>Name</th>"); |
123 | html("<th class='right'>Size</th>"); |
123 | html("<th class='right'>Size</th>"); |
124 | html("<th/>"); |
124 | html("<th/>"); |
125 | html("</tr>\n"); |
125 | html("</tr>\n"); |
126 | header = 1; |
126 | header = 1; |
127 | } |
127 | } |
128 | |
128 | |
129 | static void ls_tail() |
129 | static void ls_tail() |
130 | { |
130 | { |
131 | if (!header) |
131 | if (!header) |
132 | return; |
132 | return; |
133 | html("</table>\n"); |
133 | html("</table>\n"); |
134 | header = 0; |
134 | header = 0; |
135 | } |
135 | } |
|