aboutsummaryrefslogtreecommitdiff
path: root/ui-summary.c
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
Diffstat (limited to 'ui-summary.c')
-rw-r--r--ui-summary.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/ui-summary.c b/ui-summary.c
index 38639ce..b4fdd57 100644
--- a/ui-summary.c
+++ b/ui-summary.c
@@ -17,22 +17,15 @@ 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) {
- htmlf("<tr class='nohover'><td colspan='%d'>&nbsp;</td></tr>", columns);
- htmlf("<tr><th class='left' colspan='%d'>Clone</th></tr>\n", columns);
+ html("<tr class='nohover'><td colspan='4'>&nbsp;</td></tr>");
+ html("<tr><th class='left' colspan='4'>Clone</th></tr>\n");
}
if (suffix && *suffix)
base = fmt("%s/%s", base, suffix);
- htmlf("<tr><td colspan='%d'><a href='", columns);
+ html("<tr><td colspan='4'><a href='");
html_url_path(base);
html("'>");
html_txt(base);
@@ -59,19 +52,12 @@ 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("<table summary='repository info' class='list nowrap'>");
cgit_print_branches(ctx.cfg.summary_branches);
- htmlf("<tr class='nohover'><td colspan='%d'>&nbsp;</td></tr>", columns);
+ html("<tr class='nohover'><td colspan='4'>&nbsp;</td></tr>");
cgit_print_tags(ctx.cfg.summary_tags);
if (ctx.cfg.summary_log > 0) {
- htmlf("<tr class='nohover'><td colspan='%d'>&nbsp;</td></tr>", columns);
+ html("<tr class='nohover'><td colspan='4'>&nbsp;</td></tr>");
cgit_print_log(ctx.qry.head, 0, ctx.cfg.summary_log, NULL,
NULL, NULL, 0, 0, 0);
}