From ef8a97d9c6983e4fc3710bdbe771edd4e3550dba Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 5 Mar 2013 15:42:14 +0100 Subject: Fix colspan values This fixes a couple of minor oversights in previous commits and adjusts all cells using colspan to use the correct width. Signed-off-by: Lukas Fleischer --- ui-summary.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'ui-summary.c') diff --git a/ui-summary.c b/ui-summary.c index b4fdd57..38639ce 100644 --- a/ui-summary.c +++ b/ui-summary.c @@ -17,15 +17,22 @@ int urls = 0; static void print_url(char *base, char *suffix) { + int columns = 3; + + if (ctx.repo->enable_log_filecount) + columns++; + if (ctx.repo->enable_log_linecount) + columns++; + if (!base || !*base) return; if (urls++ == 0) { - html(" "); - html("Clone\n"); + htmlf(" ", columns); + htmlf("Clone\n", columns); } if (suffix && *suffix) base = fmt("%s/%s", base, suffix); - html(""); html_txt(base); @@ -52,12 +59,19 @@ static void print_urls(char *txt, char *suffix) void cgit_print_summary() { + int columns = 3; + + if (ctx.repo->enable_log_filecount) + columns++; + if (ctx.repo->enable_log_linecount) + columns++; + html(""); cgit_print_branches(ctx.cfg.summary_branches); - html(""); + htmlf("", columns); cgit_print_tags(ctx.cfg.summary_tags); if (ctx.cfg.summary_log > 0) { - html(""); + htmlf("", columns); cgit_print_log(ctx.qry.head, 0, ctx.cfg.summary_log, NULL, NULL, NULL, 0, 0, 0); } -- cgit v1.2.3-70-g09d2