summaryrefslogtreecommitdiffabout
authorLars Hjemli <hjemli@gmail.com>2008-10-05 19:19:05 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2008-10-05 19:19:05 (UTC)
commit24d4bb3058e02c61ae4ea61c3a3d993564bed79b (patch) (side-by-side diff)
tree64c00d06182b6dab2046631e2c6dca25057fe06f
parentcf61ad411c41a774c9671651704bdeb78ccc1036 (diff)
downloadcgit-24d4bb3058e02c61ae4ea61c3a3d993564bed79b.zip
cgit-24d4bb3058e02c61ae4ea61c3a3d993564bed79b.tar.gz
cgit-24d4bb3058e02c61ae4ea61c3a3d993564bed79b.tar.bz2
ui-refs: use cgit_tag_link()
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ui-refs.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/ui-refs.c b/ui-refs.c
index 44c8f9a..32e0429 100644
--- a/ui-refs.c
+++ b/ui-refs.c
@@ -79,37 +79,33 @@ static void print_tag_header()
{
html("<tr class='nohover'><th class='left'>Tag</th>"
"<th class='left'>Reference</th>"
"<th class='left'>Author</th>"
"<th class='left' colspan='2'>Age</th></tr>\n");
header = 1;
}
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;
info = ref->tag;
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>");
cgit_object_link(tag->tagged);
html("</td><td>");
if (info->tagger)
html(info->tagger);
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();