From 8cdccac758d976a8a92cc39b1581832a889e2058 Mon Sep 17 00:00:00 2001 From: Alexey Nezhdanov Date: Sun, 27 Sep 2009 23:00:29 +0400 Subject: ui-tag: add snapshot links Signed-off-by: Alexey Nezhdanov Signed-off-by: Lars Hjemli --- ui-tag.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ui-tag.c') diff --git a/ui-tag.c b/ui-tag.c index c2d72af..cd353c2 100644 --- a/ui-tag.c +++ b/ui-tag.c @@ -30,6 +30,14 @@ static void print_tag_content(char *buf) } } +void print_download_links(char *revname) +{ + html("download"); + cgit_print_snapshot_links(ctx.qry.repo, ctx.qry.head, + revname, ctx.repo->snapshots); + html(""); +} + void cgit_print_tag(char *revname) { unsigned char sha1[20]; @@ -76,6 +84,8 @@ void cgit_print_tag(char *revname) html("Tagged object"); cgit_object_link(tag->tagged); html("\n"); + if (ctx.repo->snapshots) + print_download_links(revname); html("\n"); print_tag_content(info->msg); } else { @@ -86,6 +96,8 @@ void cgit_print_tag(char *revname) html("Tagged object"); cgit_object_link(obj); html("\n"); + if (ctx.repo->snapshots) + print_download_links(revname); html("\n"); } return; -- cgit v1.2.3-70-g09d2