aboutsummaryrefslogtreecommitdiffstats
path: root/ui-tag.c
diff options
context:
space:
mode:
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)
30 } 30 }
31} 31}
32 32
33void print_download_links(char *revname)
34{
35 html("<tr><th>download</th><td class='sha1'>");
36 cgit_print_snapshot_links(ctx.qry.repo, ctx.qry.head,
37 revname, ctx.repo->snapshots);
38 html("</td></tr>");
39}
40
33void cgit_print_tag(char *revname) 41void cgit_print_tag(char *revname)
34{ 42{
35 unsigned char sha1[20]; 43 unsigned char sha1[20];
@@ -76,6 +84,8 @@ void cgit_print_tag(char *revname)
76 html("<tr><td>Tagged object</td><td>"); 84 html("<tr><td>Tagged object</td><td>");
77 cgit_object_link(tag->tagged); 85 cgit_object_link(tag->tagged);
78 html("</td></tr>\n"); 86 html("</td></tr>\n");
87 if (ctx.repo->snapshots)
88 print_download_links(revname);
79 html("</table>\n"); 89 html("</table>\n");
80 print_tag_content(info->msg); 90 print_tag_content(info->msg);
81 } else { 91 } else {
@@ -86,6 +96,8 @@ void cgit_print_tag(char *revname)
86 html("<tr><td>Tagged object</td><td>"); 96 html("<tr><td>Tagged object</td><td>");
87 cgit_object_link(obj); 97 cgit_object_link(obj);
88 html("</td></tr>\n"); 98 html("</td></tr>\n");
99 if (ctx.repo->snapshots)
100 print_download_links(revname);
89 html("</table>\n"); 101 html("</table>\n");
90 } 102 }
91 return; 103 return;