diff options
author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-06-15 18:15:22 +0200 |
---|---|---|
committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-06-15 18:21:55 +0200 |
commit | d2c4023832e26d3fe3f77c9fa8581588ea812cc2 (patch) | |
tree | 6e9b5665d80128597fb078b1f945b2ce349389a8 /templates/gititemrefs.qtpl | |
parent | 519af559f94aab1bd1446cc01144cbf2640fcc6a (diff) | |
download | cerrado-d2c4023832e26d3fe3f77c9fa8581588ea812cc2.tar.gz cerrado-d2c4023832e26d3fe3f77c9fa8581588ea812cc2.tar.bz2 cerrado-d2c4023832e26d3fe3f77c9fa8581588ea812cc2.zip |
fix: Add support lightweight tags
For now all tags are read as reference. That cause tags to not carry its
message body by default but it will be added in the future. For now
simple tags will do.
Diffstat (limited to 'templates/gititemrefs.qtpl')
-rw-r--r-- | templates/gititemrefs.qtpl | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/templates/gititemrefs.qtpl b/templates/gititemrefs.qtpl index 47a69e3..09d7446 100644 --- a/templates/gititemrefs.qtpl +++ b/templates/gititemrefs.qtpl @@ -1,9 +1,8 @@ {% import "github.com/go-git/go-git/v5/plumbing" %} -{% import "github.com/go-git/go-git/v5/plumbing/object" %} {% code type GitItemRefsPage struct { - Tags []*object.Tag + Tags []*plumbing.Reference Branches []*plumbing.Reference } %} @@ -13,21 +12,25 @@ type GitItemRefsPage struct { {% func (g *GitItemRefsPage) GitContent(name, ref string) %} <div class="row"> <div class="col-md-8"> + {% if len(g.Tags) > 0 %} <div class="event-list"> {% for _, t := range g.Tags %} - <div class="row event"> - <div class="col-xxl-2"> - {%s TimeFormat(t.Tagger.When) %} - </div> - <div class="col-xxl-7"> - <pre>{%s t.Message %}</pre> + <div class="row event me-md-2"> + <div class="col-4"> + {%s t.Name().Short() %} </div> - <div class="col-xxl-3"> - <small>{%s t.Tagger.Name %}</small> + <div class="col-8"> + <div class="float-end"> + <a href="/{%s name %}/tree/{%s t.Name().Short() %}">tree</a> + <a href="/{%s name %}/log/{%s t.Name().Short() %}">log</a> + </div> </div> </div> {% endfor %} </div> + {% else %} + <p> No tags </p> + {% endif %} </div> <div class="col-md-4"> <div class="event-list"> |