aboutsummaryrefslogtreecommitdiff
path: root/templates/gititemlog.qtpl
blob: a39fb777497d50df7bec71fa6d2465b3a1b56570 (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
{% import "github.com/go-git/go-git/v5/plumbing/object" %}

{% code
type GitItemLogPage struct {
    Commits []*object.Commit
}
%}

{% func (g *GitItemLogPage) Nav(name string) %}{%= GitItemNav(name, Log) %}{% endfunc %}

{% func (g *GitItemLogPage) GitContent() %}
<div class="logs">
  {% for _, c := range g.Commits %}
  <div class="row">
      <div class="col-sm-2">
       {%s TimeFormat(c.Committer.When) %}
      </div>
      <div class="col-sm-7">
       <pre>{%s c.Message %}</pre>
      </div>
      <div class="col-sm-3">
       {%s c.Committer.Name %}
      </div>
  </div>
  {% endfor %}
</div>
{% endfunc %}