diff options
Diffstat (limited to 'ui-summary.c')
| -rw-r--r-- | ui-summary.c | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/ui-summary.c b/ui-summary.c index 3ee4c3f..988c927 100644 --- a/ui-summary.c +++ b/ui-summary.c @@ -51,13 +51,6 @@ void cgit_print_summary(void) cgit_print_layout_start(); - // insert readme - if (ctx.cfg.root_readme) { - cgit_open_filter(ctx.cfg.about_filter, ctx.cfg.root_readme); - html_include(ctx.cfg.root_readme); - cgit_close_filter(ctx.cfg.about_filter); - } - html("<table summary='repository info' class='list nowrap'>"); cgit_print_branches(ctx.cfg.summary_branches); htmlf("<tr class='nohover'><td colspan='%d'> </td></tr>", columns); @@ -109,9 +102,21 @@ static char* append_readme_path(const char *filename, const char *ref, const cha void cgit_print_repo_readme(const char *path) { + cgit_print_layout_end(); + + char *filename, *ref, *mimetype; int free_filename = 0; + // summary {{{ + int columns = 3; + + if (ctx.repo->enable_log_filecount) + columns++; + if (ctx.repo->enable_log_linecount) + columns++; + // }}} + mimetype = get_mimetype_for_filename(path); if (mimetype && (!strncmp(mimetype, "image/", 6) || !strncmp(mimetype, "video/", 6))) { ctx.page.mimetype = mimetype; @@ -151,6 +156,21 @@ void cgit_print_repo_readme(const char *path) if (free_filename) free(filename); + // summary {{{ + html("<table summary='repository info' class='list nowrap'>"); + cgit_print_branches(ctx.cfg.summary_branches); + htmlf("<tr class='nohover'><td colspan='%d'> </td></tr>", columns); + cgit_print_tags(ctx.cfg.summary_tags); + if (ctx.cfg.summary_log > 0) { + htmlf("<tr class='nohover'><td colspan='%d'> </td></tr>", columns); + cgit_print_log(ctx.qry.head, 0, ctx.cfg.summary_log, NULL, + NULL, NULL, 0, 0, 0); + } + urls = 0; + cgit_add_clone_urls(print_url); + html("</table>"); + // }}} + done: cgit_print_layout_end(); } |
