From 44bc8e4078a09857ad86691a83e7ba7d4e3a69c4 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Sun, 7 Jul 2024 20:28:42 +0200 Subject: ref: Simplify path builder code --- templates/gititemrefs.qtpl | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'templates/gititemrefs.qtpl') diff --git a/templates/gititemrefs.qtpl b/templates/gititemrefs.qtpl index 6244082..9f4f74b 100644 --- a/templates/gititemrefs.qtpl +++ b/templates/gititemrefs.qtpl @@ -1,8 +1,9 @@ {% import "github.com/go-git/go-git/v5/plumbing" %} +{% import "git.gabrielgio.me/cerrado/pkg/git" %} {% code type GitItemRefsPage struct { - Tags []*plumbing.Reference + Tags []*git.TagReference Branches []*plumbing.Reference } %} @@ -12,26 +13,7 @@ type GitItemRefsPage struct { {% func (g *GitItemRefsPage) GitContent(name, ref string) %}
- {% if len(g.Tags) > 0 %} -
- {% for _, t := range g.Tags %} -
-
- {%s t.Name().Short() %} -
-
-
- tar.gz - tree - log -
-
-
- {% endfor %} -
- {% else %} -

No tags

- {% endif %} + {%= ListTags(name, g.Tags) %}
-- cgit v1.2.3