1// Code generated by qtc from "gititemlog.qtpl". DO NOT EDIT.
2// See https://github.com/valyala/quicktemplate for details.
3
4//line templates/gititemlog.qtpl:1
5package templates
6
7//line templates/gititemlog.qtpl:1
8import "git.gabrielgio.me/cerrado/pkg/git"
9
10//line templates/gititemlog.qtpl:2
11import "github.com/go-git/go-git/v5/plumbing/object"
12
13//line templates/gititemlog.qtpl:4
14import (
15 qtio422016 "io"
16
17 qt422016 "github.com/valyala/quicktemplate"
18)
19
20//line templates/gititemlog.qtpl:4
21var (
22 _ = qtio422016.Copy
23 _ = qt422016.AcquireByteBuffer
24)
25
26//line templates/gititemlog.qtpl:5
27type GitItemLogPage struct {
28 Commits []*git.CommitReference
29 Next *object.Commit
30}
31
32//line templates/gititemlog.qtpl:11
33func (g *GitItemLogPage) StreamNav(qw422016 *qt422016.Writer, name, ref string) {
34//line templates/gititemlog.qtpl:11
35 StreamGitItemNav(qw422016, name, ref, Log)
36//line templates/gititemlog.qtpl:11
37}
38
39//line templates/gititemlog.qtpl:11
40func (g *GitItemLogPage) WriteNav(qq422016 qtio422016.Writer, name, ref string) {
41//line templates/gititemlog.qtpl:11
42 qw422016 := qt422016.AcquireWriter(qq422016)
43//line templates/gititemlog.qtpl:11
44 g.StreamNav(qw422016, name, ref)
45//line templates/gititemlog.qtpl:11
46 qt422016.ReleaseWriter(qw422016)
47//line templates/gititemlog.qtpl:11
48}
49
50//line templates/gititemlog.qtpl:11
51func (g *GitItemLogPage) Nav(name, ref string) string {
52//line templates/gititemlog.qtpl:11
53 qb422016 := qt422016.AcquireByteBuffer()
54//line templates/gititemlog.qtpl:11
55 g.WriteNav(qb422016, name, ref)
56//line templates/gititemlog.qtpl:11
57 qs422016 := string(qb422016.B)
58//line templates/gititemlog.qtpl:11
59 qt422016.ReleaseByteBuffer(qb422016)
60//line templates/gititemlog.qtpl:11
61 return qs422016
62//line templates/gititemlog.qtpl:11
63}
64
65//line templates/gititemlog.qtpl:13
66func (g *GitItemLogPage) StreamGitContent(qw422016 *qt422016.Writer, name, ref string) {
67//line templates/gititemlog.qtpl:13
68 qw422016.N().S(`
69<div class="event-list">
70 `)
71//line templates/gititemlog.qtpl:15
72 for _, c := range g.Commits {
73//line templates/gititemlog.qtpl:15
74 qw422016.N().S(`
75 `)
76//line templates/gititemlog.qtpl:16
77 StreamCommit(qw422016, name, c, false)
78//line templates/gititemlog.qtpl:16
79 qw422016.N().S(`
80 `)
81//line templates/gititemlog.qtpl:17
82 }
83//line templates/gititemlog.qtpl:17
84 qw422016.N().S(`
85 `)
86//line templates/gititemlog.qtpl:18
87 if g.Next != nil {
88//line templates/gititemlog.qtpl:18
89 qw422016.N().S(`
90 <a href="/`)
91//line templates/gititemlog.qtpl:19
92 qw422016.E().S(name)
93//line templates/gititemlog.qtpl:19
94 qw422016.N().S(`/log/`)
95//line templates/gititemlog.qtpl:19
96 qw422016.E().S(ref)
97//line templates/gititemlog.qtpl:19
98 qw422016.N().S(`/?from=`)
99//line templates/gititemlog.qtpl:19
100 qw422016.E().S(g.Next.Hash.String())
101//line templates/gititemlog.qtpl:19
102 qw422016.N().S(`" class="btn btn-primary">Next</a>
103 `)
104//line templates/gititemlog.qtpl:20
105 }
106//line templates/gititemlog.qtpl:20
107 qw422016.N().S(`
108
109</div>
110`)
111//line templates/gititemlog.qtpl:23
112}
113
114//line templates/gititemlog.qtpl:23
115func (g *GitItemLogPage) WriteGitContent(qq422016 qtio422016.Writer, name, ref string) {
116//line templates/gititemlog.qtpl:23
117 qw422016 := qt422016.AcquireWriter(qq422016)
118//line templates/gititemlog.qtpl:23
119 g.StreamGitContent(qw422016, name, ref)
120//line templates/gititemlog.qtpl:23
121 qt422016.ReleaseWriter(qw422016)
122//line templates/gititemlog.qtpl:23
123}
124
125//line templates/gititemlog.qtpl:23
126func (g *GitItemLogPage) GitContent(name, ref string) string {
127//line templates/gititemlog.qtpl:23
128 qb422016 := qt422016.AcquireByteBuffer()
129//line templates/gititemlog.qtpl:23
130 g.WriteGitContent(qb422016, name, ref)
131//line templates/gititemlog.qtpl:23
132 qs422016 := string(qb422016.B)
133//line templates/gititemlog.qtpl:23
134 qt422016.ReleaseByteBuffer(qb422016)
135//line templates/gititemlog.qtpl:23
136 return qs422016
137//line templates/gititemlog.qtpl:23
138}