summaryrefslogtreecommitdiffstats
path: root/gitsrht/templates/summary.html
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-12-12 20:53:10 -0500
committerDrew DeVault <sir@cmpwn.com>2018-12-12 20:53:10 -0500
commitb70e717c13cbccd19f15b663821e539824218e3a (patch)
tree5aeb2b20eb46ea9a441d9819c8f2b5f3406b68e6 /gitsrht/templates/summary.html
parent40540e5d6088291af67fbb7f723200b2bcf8a12e (diff)
Link to tag release notes from summary page
Diffstat (limited to 'gitsrht/templates/summary.html')
-rw-r--r--gitsrht/templates/summary.html19
1 files changed, 13 insertions, 6 deletions
diff --git a/gitsrht/templates/summary.html b/gitsrht/templates/summary.html
index fb4273e..dad1037 100644
--- a/gitsrht/templates/summary.html
+++ b/gitsrht/templates/summary.html
@@ -39,12 +39,19 @@
{% if latest_tag %}
<dt>{{ latest_tag[0][len("refs/tags/"):] }}</dt>
<dd>
- <a href="{{url_for("repo.tree", owner=repo.owner.canonical_name,
- repo=repo.name, ref=latest_tag[0][len("refs/tags/"):])}}"
- >browse {{icon("caret-right")}}</a>
- <a href="{{url_for("repo.archive", owner=repo.owner.canonical_name,
- repo=repo.name, ref=latest_tag[0][len("refs/tags/"):])}}"
- >.tar.gz {{icon("caret-right")}}</a>
+ {% if is_annotated(latest_tag[1]) %}
+ <a href="{{url_for("repo.ref",
+ owner=repo.owner.canonical_name,
+ repo=repo.name, ref=latest_tag[1].name)}}"
+ >release notes {{icon("caret-right")}}</a>
+ {% else %}
+ <a href="{{url_for("repo.tree", owner=repo.owner.canonical_name,
+ repo=repo.name, ref=latest_tag[0][len("refs/tags/"):])}}"
+ >browse {{icon("caret-right")}}</a>
+ <a href="{{url_for("repo.archive", owner=repo.owner.canonical_name,
+ repo=repo.name, ref=latest_tag[0][len("refs/tags/"):])}}"
+ >.tar.gz {{icon("caret-right")}}</a>
+ {% endif %}
</dd>
{% endif %}
</dl>