// Code generated by qtc from "history.qtpl". DO NOT EDIT. // See https://github.com/valyala/quicktemplate for details. //line views/history.qtpl:1 package views //line views/history.qtpl:1 import "fmt" //line views/history.qtpl:2 import "net/http" //line views/history.qtpl:3 import "time" //line views/history.qtpl:5 import "github.com/bouncepaw/mycorrhiza/cfg" //line views/history.qtpl:6 import "github.com/bouncepaw/mycorrhiza/user" //line views/history.qtpl:7 import "github.com/bouncepaw/mycorrhiza/hyphae" //line views/history.qtpl:8 import "github.com/bouncepaw/mycorrhiza/history" //line views/history.qtpl:11 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) //line views/history.qtpl:11 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) //line views/history.qtpl:11 func StreamPrimitiveDiffHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) { //line views/history.qtpl:11 qw422016.N().S(` `) //line views/history.qtpl:13 text, err := history.PrimitiveDiffAtRevision(h.TextPartPath(), hash) if err != nil { text = err.Error() } //line views/history.qtpl:17 qw422016.N().S(`

Diff `) //line views/history.qtpl:21 qw422016.N().S(beautifulLink(h.Name)) //line views/history.qtpl:21 qw422016.N().S(` at `) //line views/history.qtpl:21 qw422016.E().S(hash) //line views/history.qtpl:21 qw422016.N().S(`

`)
//line views/history.qtpl:22
	qw422016.E().S(text)
//line views/history.qtpl:22
	qw422016.N().S(`
`) //line views/history.qtpl:26 } //line views/history.qtpl:26 func WritePrimitiveDiffHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) { //line views/history.qtpl:26 qw422016 := qt422016.AcquireWriter(qq422016) //line views/history.qtpl:26 StreamPrimitiveDiffHTML(qw422016, rq, h, u, hash) //line views/history.qtpl:26 qt422016.ReleaseWriter(qw422016) //line views/history.qtpl:26 } //line views/history.qtpl:26 func PrimitiveDiffHTML(rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) string { //line views/history.qtpl:26 qb422016 := qt422016.AcquireByteBuffer() //line views/history.qtpl:26 WritePrimitiveDiffHTML(qb422016, rq, h, u, hash) //line views/history.qtpl:26 qs422016 := string(qb422016.B) //line views/history.qtpl:26 qt422016.ReleaseByteBuffer(qb422016) //line views/history.qtpl:26 return qs422016 //line views/history.qtpl:26 } //line views/history.qtpl:28 func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int) { //line views/history.qtpl:28 qw422016.N().S(`

Recent Changes

Subscribe via RSS, Atom or JSON feed.

`) //line views/history.qtpl:55 qw422016.N().S(` `) //line views/history.qtpl:58 changes := history.RecentChanges(n) var year, day int var month time.Month //line views/history.qtpl:61 qw422016.N().S(`
`) //line views/history.qtpl:63 if len(changes) == 0 { //line views/history.qtpl:63 qw422016.N().S(`

Could not find any recent changes.

`) //line views/history.qtpl:65 } else { //line views/history.qtpl:65 qw422016.N().S(` `) //line views/history.qtpl:66 for i, entry := range changes { //line views/history.qtpl:66 qw422016.N().S(` `) //line views/history.qtpl:68 y, m, d := entry.Time.UTC().Date() //line views/history.qtpl:68 qw422016.N().S(` `) //line views/history.qtpl:69 if d != day || m != month || y != year { //line views/history.qtpl:69 qw422016.N().S(`

`) //line views/history.qtpl:71 qw422016.E().S(fmt.Sprintf("%04d-%02d-%02d", y, m, d)) //line views/history.qtpl:71 qw422016.N().S(`

`) //line views/history.qtpl:73 year, month, day = y, m, d //line views/history.qtpl:73 qw422016.N().S(` `) //line views/history.qtpl:74 } //line views/history.qtpl:74 qw422016.N().S(`
`) //line views/history.qtpl:78 qw422016.N().S(recentChangesEntry(entry)) //line views/history.qtpl:78 qw422016.N().S(`
`) //line views/history.qtpl:81 } //line views/history.qtpl:81 qw422016.N().S(` `) //line views/history.qtpl:82 } //line views/history.qtpl:82 qw422016.N().S(` `) //line views/history.qtpl:83 qw422016.N().S(helpTopicBadgeHTML("en", "recent_changes")) //line views/history.qtpl:83 qw422016.N().S(`
`) //line views/history.qtpl:87 } //line views/history.qtpl:87 func WriteRecentChangesHTML(qq422016 qtio422016.Writer, n int) { //line views/history.qtpl:87 qw422016 := qt422016.AcquireWriter(qq422016) //line views/history.qtpl:87 StreamRecentChangesHTML(qw422016, n) //line views/history.qtpl:87 qt422016.ReleaseWriter(qw422016) //line views/history.qtpl:87 } //line views/history.qtpl:87 func RecentChangesHTML(n int) string { //line views/history.qtpl:87 qb422016 := qt422016.AcquireByteBuffer() //line views/history.qtpl:87 WriteRecentChangesHTML(qb422016, n) //line views/history.qtpl:87 qs422016 := string(qb422016.B) //line views/history.qtpl:87 qt422016.ReleaseByteBuffer(qb422016) //line views/history.qtpl:87 return qs422016 //line views/history.qtpl:87 } //line views/history.qtpl:89 func streamrecentChangesEntry(qw422016 *qt422016.Writer, rev history.Revision) { //line views/history.qtpl:89 qw422016.N().S(`
`) //line views/history.qtpl:94 qw422016.E().S(rev.Hash) //line views/history.qtpl:94 qw422016.N().S(` `) //line views/history.qtpl:96 if rev.Username != "anon" { //line views/history.qtpl:96 qw422016.N().S(` `) //line views/history.qtpl:100 } //line views/history.qtpl:100 qw422016.N().S(`
`) //line views/history.qtpl:104 qw422016.N().S(rev.HyphaeLinksHTML()) //line views/history.qtpl:104 qw422016.N().S(` `) //line views/history.qtpl:107 qw422016.E().S(rev.Message) //line views/history.qtpl:107 qw422016.N().S(`
`) //line views/history.qtpl:110 } //line views/history.qtpl:110 func writerecentChangesEntry(qq422016 qtio422016.Writer, rev history.Revision) { //line views/history.qtpl:110 qw422016 := qt422016.AcquireWriter(qq422016) //line views/history.qtpl:110 streamrecentChangesEntry(qw422016, rev) //line views/history.qtpl:110 qt422016.ReleaseWriter(qw422016) //line views/history.qtpl:110 } //line views/history.qtpl:110 func recentChangesEntry(rev history.Revision) string { //line views/history.qtpl:110 qb422016 := qt422016.AcquireByteBuffer() //line views/history.qtpl:110 writerecentChangesEntry(qb422016, rev) //line views/history.qtpl:110 qs422016 := string(qb422016.B) //line views/history.qtpl:110 qt422016.ReleaseByteBuffer(qb422016) //line views/history.qtpl:110 return qs422016 //line views/history.qtpl:110 } //line views/history.qtpl:112 func StreamHistoryHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, list string) { //line views/history.qtpl:112 qw422016.N().S(`

History of `) //line views/history.qtpl:116 qw422016.N().S(beautifulLink(hyphaName)) //line views/history.qtpl:116 qw422016.N().S(`

`) //line views/history.qtpl:117 qw422016.N().S(list) //line views/history.qtpl:117 qw422016.N().S(`
`) //line views/history.qtpl:121 } //line views/history.qtpl:121 func WriteHistoryHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, list string) { //line views/history.qtpl:121 qw422016 := qt422016.AcquireWriter(qq422016) //line views/history.qtpl:121 StreamHistoryHTML(qw422016, rq, hyphaName, list) //line views/history.qtpl:121 qt422016.ReleaseWriter(qw422016) //line views/history.qtpl:121 } //line views/history.qtpl:121 func HistoryHTML(rq *http.Request, hyphaName, list string) string { //line views/history.qtpl:121 qb422016 := qt422016.AcquireByteBuffer() //line views/history.qtpl:121 WriteHistoryHTML(qb422016, rq, hyphaName, list) //line views/history.qtpl:121 qs422016 := string(qb422016.B) //line views/history.qtpl:121 qt422016.ReleaseByteBuffer(qb422016) //line views/history.qtpl:121 return qs422016 //line views/history.qtpl:121 }