-rw-r--r-- | ui-repolist.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ui-repolist.c b/ui-repolist.c index 2c13d50..25f076f 100644 --- a/ui-repolist.c +++ b/ui-repolist.c | |||
@@ -228,51 +228,56 @@ void cgit_print_repolist() | |||
228 | continue; | 228 | continue; |
229 | if (hits > ctx.qry.ofs + ctx.cfg.max_repo_count) | 229 | if (hits > ctx.qry.ofs + ctx.cfg.max_repo_count) |
230 | continue; | 230 | continue; |
231 | if (!header++) | 231 | if (!header++) |
232 | print_header(columns); | 232 | print_header(columns); |
233 | if (!sorted && | 233 | if (!sorted && |
234 | ((last_group == NULL && ctx.repo->group != NULL) || | 234 | ((last_group == NULL && ctx.repo->group != NULL) || |
235 | (last_group != NULL && ctx.repo->group == NULL) || | 235 | (last_group != NULL && ctx.repo->group == NULL) || |
236 | (last_group != NULL && ctx.repo->group != NULL && | 236 | (last_group != NULL && ctx.repo->group != NULL && |
237 | strcmp(ctx.repo->group, last_group)))) { | 237 | strcmp(ctx.repo->group, last_group)))) { |
238 | htmlf("<tr class='nohover'><td colspan='%d' class='repogroup'>", | 238 | htmlf("<tr class='nohover'><td colspan='%d' class='repogroup'>", |
239 | columns); | 239 | columns); |
240 | html_txt(ctx.repo->group); | 240 | html_txt(ctx.repo->group); |
241 | html("</td></tr>"); | 241 | html("</td></tr>"); |
242 | last_group = ctx.repo->group; | 242 | last_group = ctx.repo->group; |
243 | } | 243 | } |
244 | htmlf("<tr><td class='%s'>", | 244 | htmlf("<tr><td class='%s'>", |
245 | !sorted && ctx.repo->group ? "sublevel-repo" : "toplevel-repo"); | 245 | !sorted && ctx.repo->group ? "sublevel-repo" : "toplevel-repo"); |
246 | cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL); | 246 | cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL); |
247 | html("</td><td>"); | 247 | html("</td><td>"); |
248 | html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL); | 248 | html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL); |
249 | html_ntxt(ctx.cfg.max_repodesc_len, ctx.repo->desc); | 249 | html_ntxt(ctx.cfg.max_repodesc_len, ctx.repo->desc); |
250 | html_link_close(); | 250 | html_link_close(); |
251 | html("</td><td>"); | 251 | html("</td><td>"); |
252 | html_txt(ctx.repo->owner); | 252 | html_txt(ctx.repo->owner); |
253 | html("</td><td>"); | 253 | html("</td><td>"); |
254 | print_modtime(ctx.repo); | 254 | print_modtime(ctx.repo); |
255 | html("</td>"); | 255 | html("</td>"); |
256 | if (ctx.cfg.enable_index_links) { | 256 | if (ctx.cfg.enable_index_links) { |
257 | html("<td>"); | 257 | html("<td>"); |
258 | cgit_summary_link("summary", NULL, "button", NULL); | 258 | cgit_summary_link("summary", NULL, "button", NULL); |
259 | cgit_log_link("log", NULL, "button", NULL, NULL, NULL, | 259 | cgit_log_link("log", NULL, "button", NULL, NULL, NULL, |
260 | 0, NULL, NULL, ctx.qry.showmsg); | 260 | 0, NULL, NULL, ctx.qry.showmsg); |
261 | cgit_tree_link("tree", NULL, "button", NULL, NULL, NULL); | 261 | cgit_tree_link("tree", NULL, "button", NULL, NULL, NULL); |
262 | html("</td>"); | 262 | html("</td>"); |
263 | } | 263 | } |
264 | html("</tr>\n"); | 264 | html("</tr>\n"); |
265 | } | 265 | } |
266 | html("</table>"); | 266 | html("</table>"); |
267 | if (!hits) | 267 | if (!hits) |
268 | cgit_print_error("No repositories found"); | 268 | cgit_print_error("No repositories found"); |
269 | else if (hits > ctx.cfg.max_repo_count) | 269 | else if (hits > ctx.cfg.max_repo_count) |
270 | print_pager(hits, ctx.cfg.max_repo_count, ctx.qry.search); | 270 | print_pager(hits, ctx.cfg.max_repo_count, ctx.qry.search); |
271 | cgit_print_docend(); | 271 | cgit_print_docend(); |
272 | } | 272 | } |
273 | 273 | ||
274 | void cgit_print_site_readme() | 274 | void cgit_print_site_readme() |
275 | { | 275 | { |
276 | if (ctx.cfg.root_readme) | 276 | if (!ctx.cfg.root_readme) |
277 | html_include(ctx.cfg.root_readme); | 277 | return; |
278 | if (ctx.cfg.about_filter) | ||
279 | cgit_open_filter(ctx.cfg.about_filter); | ||
280 | html_include(ctx.cfg.root_readme); | ||
281 | if (ctx.cfg.about_filter) | ||
282 | cgit_close_filter(ctx.cfg.about_filter); | ||
278 | } | 283 | } |