mirror of
https://git.zx2c4.com/cgit
synced 2025-06-21 01:25:46 +02:00
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 <cgit@cryptocrack.de>
This commit is contained in:
parent
6d7e3596eb
commit
ef8a97d9c6
3 changed files with 28 additions and 14 deletions
24
ui-summary.c
24
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("<tr class='nohover'><td colspan='4'> </td></tr>");
|
||||
html("<tr><th class='left' colspan='4'>Clone</th></tr>\n");
|
||||
htmlf("<tr class='nohover'><td colspan='%d'> </td></tr>", columns);
|
||||
htmlf("<tr><th class='left' colspan='%d'>Clone</th></tr>\n", columns);
|
||||
}
|
||||
if (suffix && *suffix)
|
||||
base = fmt("%s/%s", base, suffix);
|
||||
html("<tr><td colspan='4'><a href='");
|
||||
htmlf("<tr><td colspan='%d'><a href='", columns);
|
||||
html_url_path(base);
|
||||
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("<table summary='repository info' class='list nowrap'>");
|
||||
cgit_print_branches(ctx.cfg.summary_branches);
|
||||
html("<tr class='nohover'><td colspan='4'> </td></tr>");
|
||||
htmlf("<tr class='nohover'><td colspan='%d'> </td></tr>", columns);
|
||||
cgit_print_tags(ctx.cfg.summary_tags);
|
||||
if (ctx.cfg.summary_log > 0) {
|
||||
html("<tr class='nohover'><td colspan='4'> </td></tr>");
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue