mirror of
https://git.zx2c4.com/cgit
synced 2024-11-22 16:38:42 +00:00
ui-tag: add snapshot links
Signed-off-by: Alexey Nezhdanov <snakeru@gmail.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
121898e73d
commit
8cdccac758
12
ui-tag.c
12
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;
|
||||
|
Loading…
Reference in New Issue
Block a user