aboutsummaryrefslogtreecommitdiff
path: root/templates/gititemrefs.qtpl
blob: 56f6c2bf557e1afc0a2dc12a5f918f6f347353d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{% 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
    Branches []*plumbing.Reference
}
%}

{% func (g *GitItemRefsPage) Nav(name, ref string) %}{%= GitItemNav(name, ref, Refs) %}{% endfunc %}

{% func (g *GitItemRefsPage) GitContent() %}
<div class="row">
  <div class="col-xxl">
    <h4>Tags</h4>
    <div class="logs">
      {% for _, t := range g.Tags %}
      <div class="row">
          <div class="col-xxl-2">
           {%s TimeFormat(t.Tagger.When) %}
          </div>
          <div class="col-xxl-7">
           <pre>{%s t.Message %}</pre>
          </div>
          <div class="col-xxl-3">
           <small>{%s t.Tagger.Name %}</small>
          </div>
      </div>
      {% endfor %}
    </div>
  </div>
  <div class="col-xxl">
    <h4>Branches</h4>
    <div class="logs">
      {% for _, b := range g.Branches %}
      <div class="row">
          <div class="col-xxl">
           {%s b.Name().Short() %}
          </div>
      </div>
      {% endfor %}
    </div>
  </div>
</div>
{% endfunc %}