|
diff --git a/ui-tree.c b/ui-tree.c index d6bcec3..c22e30b 100644 --- a/ ui-tree.c+++ b/ ui-tree.c |
|
@@ -79,49 +79,49 @@ static int ls_item(const unsigned char *sha1, const char *base, int baselen, |
79 | } |
79 | } |
80 | |
80 | |
81 | html("<tr><td class='ls-mode'>"); |
81 | html("<tr><td class='ls-mode'>"); |
82 | html_filemode(mode); |
82 | html_filemode(mode); |
83 | html("</td><td>"); |
83 | html("</td><td>"); |
84 | if (S_ISGITLINK(mode)) { |
84 | if (S_ISGITLINK(mode)) { |
85 | htmlf("<a class='ls-mod' href='"); |
85 | htmlf("<a class='ls-mod' href='"); |
86 | html_attr(fmt(cgit_repo->module_link, |
86 | html_attr(fmt(cgit_repo->module_link, |
87 | name, |
87 | name, |
88 | sha1_to_hex(sha1))); |
88 | sha1_to_hex(sha1))); |
89 | html("'>"); |
89 | html("'>"); |
90 | html_txt(name); |
90 | html_txt(name); |
91 | html("</a>"); |
91 | html("</a>"); |
92 | } else if (S_ISDIR(mode)) { |
92 | } else if (S_ISDIR(mode)) { |
93 | cgit_tree_link(name, NULL, "ls-dir", cgit_query_head, |
93 | cgit_tree_link(name, NULL, "ls-dir", cgit_query_head, |
94 | curr_rev, fullpath); |
94 | curr_rev, fullpath); |
95 | } else { |
95 | } else { |
96 | cgit_tree_link(name, NULL, "ls-blob", cgit_query_head, |
96 | cgit_tree_link(name, NULL, "ls-blob", cgit_query_head, |
97 | curr_rev, fullpath); |
97 | curr_rev, fullpath); |
98 | } |
98 | } |
99 | htmlf("</td><td class='ls-size'>%li</td>", size); |
99 | htmlf("</td><td class='ls-size'>%li</td>", size); |
100 | |
100 | |
101 | html("<td>"); |
101 | html("<td>"); |
102 | cgit_log_link("log", NULL, "button", cgit_query_head, curr_rev, |
102 | cgit_log_link("log", NULL, "button", cgit_query_head, curr_rev, |
103 | fullpath, 0); |
103 | fullpath, 0, NULL, NULL); |
104 | html("</td></tr>\n"); |
104 | html("</td></tr>\n"); |
105 | free(name); |
105 | free(name); |
106 | return 0; |
106 | return 0; |
107 | } |
107 | } |
108 | |
108 | |
109 | static void ls_head() |
109 | static void ls_head() |
110 | { |
110 | { |
111 | html("<table class='list'>\n"); |
111 | html("<table class='list'>\n"); |
112 | html("<tr class='nohover'>"); |
112 | html("<tr class='nohover'>"); |
113 | html("<th class='left'>Mode</th>"); |
113 | html("<th class='left'>Mode</th>"); |
114 | html("<th class='left'>Name</th>"); |
114 | html("<th class='left'>Name</th>"); |
115 | html("<th class='right'>Size</th>"); |
115 | html("<th class='right'>Size</th>"); |
116 | html("<th/>"); |
116 | html("<th/>"); |
117 | html("</tr>\n"); |
117 | html("</tr>\n"); |
118 | header = 1; |
118 | header = 1; |
119 | } |
119 | } |
120 | |
120 | |
121 | static void ls_tail() |
121 | static void ls_tail() |
122 | { |
122 | { |
123 | if (!header) |
123 | if (!header) |
124 | return; |
124 | return; |
125 | html("</table>\n"); |
125 | html("</table>\n"); |
126 | header = 0; |
126 | header = 0; |
127 | } |
127 | } |
|