aboutsummaryrefslogtreecommitdiffstats
path: root/ui-tag.c
diff options
context:
space:
mode:
authorAlexey Nezhdanov <snakeru@gmail.com>2009-09-27 23:00:29 +0400
committerLars Hjemli <hjemli@gmail.com>2009-10-06 19:26:06 +0200
commit8cdccac758d976a8a92cc39b1581832a889e2058 (patch)
tree49dddea4e0a025a834f62218668f257212908b85 /ui-tag.c
parent121898e73d6e28656c2d451effc6d9907ebdc5ba (diff)
downloadcgit-8cdccac758d976a8a92cc39b1581832a889e2058.tar.gz
cgit-8cdccac758d976a8a92cc39b1581832a889e2058.tar.bz2
cgit-8cdccac758d976a8a92cc39b1581832a889e2058.zip
ui-tag: add snapshot links
Signed-off-by: Alexey Nezhdanov <snakeru@gmail.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-tag.c')
-rw-r--r--ui-tag.c12
1 files changed, 12 insertions, 0 deletions
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("<tr><th>download</th><td class='sha1'>");
+ cgit_print_snapshot_links(ctx.qry.repo, ctx.qry.head,
+ revname, ctx.repo->snapshots);
+ html("</td></tr>");
+}
+
void cgit_print_tag(char *revname)
{
unsigned char sha1[20];
@@ -76,6 +84,8 @@ void cgit_print_tag(char *revname)
html("<tr><td>Tagged object</td><td>");
cgit_object_link(tag->tagged);
html("</td></tr>\n");
+ if (ctx.repo->snapshots)
+ print_download_links(revname);
html("</table>\n");
print_tag_content(info->msg);
} else {
@@ -86,6 +96,8 @@ void cgit_print_tag(char *revname)
html("<tr><td>Tagged object</td><td>");
cgit_object_link(obj);
html("</td></tr>\n");
+ if (ctx.repo->snapshots)
+ print_download_links(revname);
html("</table>\n");
}
return;