X-Git-Url: https://git.cameronkatri.com/cgit.git/blobdiff_plain/33998c51be27c466fa8d0ccead587ff0b36c0021..195742572681d6c2583de392131d1be86ef52f48:/ui-tag.c diff --git a/ui-tag.c b/ui-tag.c index c2d72af..39e4cb8 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]; @@ -56,16 +64,16 @@ void cgit_print_tag(char *revname) return; } html("\n"); - htmlf("\n", sha1_to_hex(sha1)); if (info->tagger_date > 0) { - html("\n"); } if (info->tagger) { - html("\n"); } - html("\n"); + if (ctx.repo->snapshots) + print_download_links(revname); html("
Tag name"); + htmlf("
tag name"); html_txt(revname); htmlf(" (%s)
Tag date"); + html("
tag date"); cgit_print_date(info->tagger_date, FMT_LONGDATE, ctx.cfg.local_time); html("
Tagged by"); + html("
tagged by"); html_txt(info->tagger); if (info->tagger_email && !ctx.cfg.noplainemail) { html(" "); @@ -73,19 +81,23 @@ void cgit_print_tag(char *revname) } html("
Tagged object"); + html("
tagged object"); cgit_object_link(tag->tagged); html("
\n"); print_tag_content(info->msg); } else { html("\n"); - htmlf("\n"); - html("\n"); + if (ctx.repo->snapshots) + print_download_links(revname); html("
Tag name"); + htmlf("
tag name"); html_txt(revname); html("
Tagged object"); + html("
Tagged object"); cgit_object_link(obj); html("
\n"); } return;