summaryrefslogtreecommitdiffstatshomepage
path: root/ui-refs.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-refs.c')
-rw-r--r--ui-refs.c40
1 files changed, 23 insertions, 17 deletions
diff --git a/ui-refs.c b/ui-refs.c
index caddfbc..9e50a18 100644
--- a/ui-refs.c
+++ b/ui-refs.c
@@ -79,7 +79,7 @@ static int print_branch(struct refinfo *ref)
cgit_commit_link(info->subject, NULL, NULL, name, NULL, NULL, 0);
html("</td><td>");
html_txt(info->author);
- html("</td><td colspan='2'>");
+ html("</td><td>");
cgit_print_age(info->commit->date, -1, NULL);
} else {
html("</td><td></td><td>");
@@ -91,10 +91,10 @@ static int print_branch(struct refinfo *ref)
static void print_tag_header()
{
- html("<tr class='nohover'><th class='left'>Tag</th>"
- "<th class='left'>Download</th>"
- "<th class='left'>Author</th>"
- "<th class='left' colspan='2'>Age</th></tr>\n");
+ html("<tr class='nohover'><th class='left span1'>Tag</th>"
+ "<th class='left span7'>Download</th>"
+ "<th class='left span2'>Author</th>"
+ "<th class='left span2'>Age</th></tr>\n");
header = 1;
}
@@ -144,7 +144,7 @@ static int print_tag(struct refinfo *ref)
html("</td><td>");
if (info->tagger)
html(info->tagger);
- html("</td><td colspan='2'>");
+ html("</td><td>");
if (info->tagger_date > 0)
cgit_print_age(info->tagger_date, -1, NULL);
html("</td></tr>\n");
@@ -181,10 +181,10 @@ void cgit_print_branches(int maxcount)
struct reflist list;
int i;
- html("<tr class='nohover'><th class='left'>Branch</th>"
- "<th class='left'>Commit message</th>"
- "<th class='left'>Author</th>"
- "<th class='left' colspan='2'>Age</th></tr>\n");
+ html("<tr class='nohover'><th class='left span2'>Branch</th>"
+ "<th class='left span6'>Commit message</th>"
+ "<th class='left span2'>Author</th>"
+ "<th class='left span2'>Age</th></tr>\n");
list.refs = NULL;
list.alloc = list.count = 0;
@@ -218,6 +218,9 @@ void cgit_print_tags(int maxcount)
for_each_tag_ref(cgit_refs_cb, &list);
if (list.count == 0)
return;
+
+ html("<h2>Tags</h2>");
+ html("<table summary='repository info' class='table table-striped'>");
qsort(list.refs, list.count, sizeof(*list.refs), cmp_tag_age);
if (!maxcount)
maxcount = list.count;
@@ -229,21 +232,24 @@ void cgit_print_tags(int maxcount)
if (maxcount < list.count)
print_refs_link("tags");
+ html("</table>");
}
void cgit_print_refs()
{
-
- html("<table class='list nowrap'>");
-
- if (ctx.qry.path && !strncmp(ctx.qry.path, "heads", 5))
+ if (ctx.qry.path && !strncmp(ctx.qry.path, "heads", 5)) {
+ html("<h2>Branches</h2>\n");
+ html("<table class='list nowrap table'>");
cgit_print_branches(0);
+ html("</table>");
+ }
else if (ctx.qry.path && !strncmp(ctx.qry.path, "tags", 4))
cgit_print_tags(0);
else {
+ html("<h2>Branches</h2>\n");
+ html("<table class='list nowrap table'>");
cgit_print_branches(0);
- html("<tr class='nohover'><td colspan='4'>&nbsp;</td></tr>");
- cgit_print_tags(0);
+ html("</table>");
+ cgit_print_tags(0);
}
- html("</table>");
}