]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-refs.c
Extra cygwin-specific changes
[ps-cgit] / ui-refs.c
index 12533cd5f806fa522e80620ced42d18dcaf2beae..32e0429242776e7d48e7666a1d585a2dca58685a 100644 (file)
--- a/ui-refs.c
+++ b/ui-refs.c
@@ -62,11 +62,11 @@ static int print_branch(struct refinfo *ref)
        html("</td><td>");
 
        if (ref->object->type == OBJ_COMMIT) {
-               cgit_print_age(info->commit->date, -1, NULL);
+               cgit_commit_link(info->subject, NULL, NULL, name, NULL);
                html("</td><td>");
                html_txt(info->author);
-               html("</td><td>");
-               cgit_commit_link(info->subject, NULL, NULL, name, NULL);
+               html("</td><td colspan='2'>");
+               cgit_print_age(info->commit->date, -1, NULL);
        } else {
                html("</td><td></td><td>");
                cgit_object_link(ref->object);
@@ -78,9 +78,9 @@ static int print_branch(struct refinfo *ref)
 static void print_tag_header()
 {
        html("<tr class='nohover'><th class='left'>Tag</th>"
-            "<th class='left'>Age</th>"
+            "<th class='left'>Reference</th>"
             "<th class='left'>Author</th>"
-            "<th class='left'>Reference</th></tr>\n");
+            "<th class='left' colspan='2'>Age</th></tr>\n");
        header = 1;
 }
 
@@ -88,7 +88,7 @@ static int print_tag(struct refinfo *ref)
 {
        struct tag *tag;
        struct taginfo *info;
-       char *url, *name = (char *)ref->refname;
+       char *name = (char *)ref->refname;
 
        if (ref->object->type == OBJ_TAG) {
                tag = (struct tag *)ref->object;
@@ -96,26 +96,22 @@ static int print_tag(struct refinfo *ref)
                if (!tag || !info)
                        return 1;
                html("<tr><td>");
-               url = cgit_pageurl(ctx.qry.repo, "tag",
-                                  fmt("id=%s", name));
-               html_link_open(url, NULL, NULL);
-               html_txt(name);
-               html_link_close();
+               cgit_tag_link(name, NULL, NULL, ctx.qry.head, name);
                html("</td><td>");
-               if (info->tagger_date > 0)
-                       cgit_print_age(info->tagger_date, -1, NULL);
+               cgit_object_link(tag->tagged);
                html("</td><td>");
                if (info->tagger)
                        html(info->tagger);
-               html("</td><td>");
-               cgit_object_link(tag->tagged);
+               html("</td><td colspan='2'>");
+               if (info->tagger_date > 0)
+                       cgit_print_age(info->tagger_date, -1, NULL);
                html("</td></tr>\n");
        } else {
                if (!header)
                        print_tag_header();
                html("<tr><td>");
                html_txt(name);
-               html("</td><td colspan='2'/><td>");
+               html("</td><td>");
                cgit_object_link(ref->object);
                html("</td></tr>\n");
        }
@@ -135,9 +131,9 @@ void cgit_print_branches(int maxcount)
        int i;
 
        html("<tr class='nohover'><th class='left'>Branch</th>"
-            "<th class='left'>Idle</th>"
+            "<th class='left'>Commit message</th>"
             "<th class='left'>Author</th>"
-            "<th class='left'>Head commit</th></tr>\n");
+            "<th class='left' colspan='2'>Age</th></tr>\n");
 
        list.refs = NULL;
        list.alloc = list.count = 0;
@@ -196,6 +192,5 @@ void cgit_print_refs()
                html("<tr class='nohover'><td colspan='4'>&nbsp;</td></tr>");
                cgit_print_tags(0);
        }
-
        html("</table>");
 }