1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-10-30 11:46:16 +00:00
mycorrhiza/views/history.qtpl.go

306 lines
7.6 KiB
Go
Raw Normal View History

2021-02-20 16:50:25 +00:00
// 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 "net/http"
//line views/history.qtpl:3
import "github.com/bouncepaw/mycorrhiza/util"
//line views/history.qtpl:4
import "github.com/bouncepaw/mycorrhiza/history"
//line views/history.qtpl:6
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
//line views/history.qtpl:6
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line views/history.qtpl:6
func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int) {
//line views/history.qtpl:6
qw422016.N().S(`
<div class="layout">
<main class="main-width recent-changes">
<h1>Recent Changes</h1>
<p><a href="/"> Back</a></p>
<nav class="recent-changes__count">
See
`)
//line views/history.qtpl:14
for _, m := range []int{20, 0, 50, 0, 100} {
//line views/history.qtpl:14
qw422016.N().S(`
`)
//line views/history.qtpl:15
switch m {
//line views/history.qtpl:16
case 0:
//line views/history.qtpl:16
qw422016.N().S(`
<span aria-hidden="true">|</span>
`)
//line views/history.qtpl:18
case n:
//line views/history.qtpl:18
qw422016.N().S(`
<b>`)
//line views/history.qtpl:19
qw422016.N().D(n)
//line views/history.qtpl:19
qw422016.N().S(`</b>
`)
//line views/history.qtpl:20
default:
//line views/history.qtpl:20
qw422016.N().S(`
<a href="/recent-changes/`)
//line views/history.qtpl:21
qw422016.N().D(m)
//line views/history.qtpl:21
qw422016.N().S(`">`)
//line views/history.qtpl:21
qw422016.N().D(m)
//line views/history.qtpl:21
qw422016.N().S(`</a>
`)
//line views/history.qtpl:22
}
//line views/history.qtpl:22
qw422016.N().S(`
`)
//line views/history.qtpl:23
}
//line views/history.qtpl:23
qw422016.N().S(`
recent changes
</nav>
<p><img class="icon" width="20" height="20" src="https://upload.wikimedia.org/wikipedia/commons/4/46/Generic_Feed-icon.svg">Subscribe via <a href="/recent-changes-rss">RSS</a>, <a href="/recent-changes-atom">Atom</a> or <a href="/recent-changes-json">JSON feed</a>.</p>
`)
//line views/history.qtpl:34
qw422016.N().S(`
`)
//line views/history.qtpl:37
changes := history.RecentChanges(n)
//line views/history.qtpl:38
qw422016.N().S(`
<section class="recent-changes__list" role="feed">
`)
//line views/history.qtpl:40
if len(changes) == 0 {
//line views/history.qtpl:40
qw422016.N().S(`
<p>Could not find any recent changes.</p>
`)
//line views/history.qtpl:42
} else {
//line views/history.qtpl:42
qw422016.N().S(`
`)
//line views/history.qtpl:43
for i, entry := range changes {
//line views/history.qtpl:43
qw422016.N().S(`
<ul class="recent-changes__entry rc-entry" role="article"
aria-setsize="`)
//line views/history.qtpl:45
qw422016.N().D(n)
//line views/history.qtpl:45
qw422016.N().S(`" aria-posinset="`)
//line views/history.qtpl:45
qw422016.N().D(i)
//line views/history.qtpl:45
qw422016.N().S(`">
`)
//line views/history.qtpl:46
qw422016.N().S(recentChangesEntry(entry))
//line views/history.qtpl:46
qw422016.N().S(`
</ul>
`)
//line views/history.qtpl:48
}
//line views/history.qtpl:48
qw422016.N().S(`
`)
//line views/history.qtpl:49
}
//line views/history.qtpl:49
qw422016.N().S(`
</section>
</main>
</div>
`)
//line views/history.qtpl:53
}
//line views/history.qtpl:53
func WriteRecentChangesHTML(qq422016 qtio422016.Writer, n int) {
//line views/history.qtpl:53
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/history.qtpl:53
StreamRecentChangesHTML(qw422016, n)
//line views/history.qtpl:53
qt422016.ReleaseWriter(qw422016)
//line views/history.qtpl:53
}
//line views/history.qtpl:53
func RecentChangesHTML(n int) string {
//line views/history.qtpl:53
qb422016 := qt422016.AcquireByteBuffer()
//line views/history.qtpl:53
WriteRecentChangesHTML(qb422016, n)
//line views/history.qtpl:53
qs422016 := string(qb422016.B)
//line views/history.qtpl:53
qt422016.ReleaseByteBuffer(qb422016)
//line views/history.qtpl:53
return qs422016
//line views/history.qtpl:53
}
//line views/history.qtpl:55
func streamrecentChangesEntry(qw422016 *qt422016.Writer, rev history.Revision) {
//line views/history.qtpl:55
qw422016.N().S(`
<li class="rc-entry__time"><time>`)
//line views/history.qtpl:56
qw422016.E().S(rev.TimeString())
//line views/history.qtpl:56
qw422016.N().S(`</time></li>
<li class="rc-entry__hash">`)
//line views/history.qtpl:57
qw422016.E().S(rev.Hash)
//line views/history.qtpl:57
qw422016.N().S(`</li>
<li class="rc-entry__links">`)
//line views/history.qtpl:58
qw422016.N().S(rev.HyphaeLinksHTML())
//line views/history.qtpl:58
qw422016.N().S(`</li>
<li class="rc-entry__msg">`)
//line views/history.qtpl:59
qw422016.E().S(rev.Message)
//line views/history.qtpl:59
qw422016.N().S(` `)
//line views/history.qtpl:59
if rev.Username != "anon" {
//line views/history.qtpl:59
qw422016.N().S(`<span class="rc-entry__author">by <a href="/hypha/`)
//line views/history.qtpl:59
qw422016.E().S(util.UserHypha)
//line views/history.qtpl:59
qw422016.N().S(`/`)
//line views/history.qtpl:59
qw422016.E().S(rev.Username)
//line views/history.qtpl:59
qw422016.N().S(`" rel="author">`)
//line views/history.qtpl:59
qw422016.E().S(rev.Username)
//line views/history.qtpl:59
qw422016.N().S(`</a></span>`)
//line views/history.qtpl:59
}
//line views/history.qtpl:59
qw422016.N().S(`</li>
`)
//line views/history.qtpl:60
}
//line views/history.qtpl:60
func writerecentChangesEntry(qq422016 qtio422016.Writer, rev history.Revision) {
//line views/history.qtpl:60
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/history.qtpl:60
streamrecentChangesEntry(qw422016, rev)
//line views/history.qtpl:60
qt422016.ReleaseWriter(qw422016)
//line views/history.qtpl:60
}
//line views/history.qtpl:60
func recentChangesEntry(rev history.Revision) string {
//line views/history.qtpl:60
qb422016 := qt422016.AcquireByteBuffer()
//line views/history.qtpl:60
writerecentChangesEntry(qb422016, rev)
//line views/history.qtpl:60
qs422016 := string(qb422016.B)
//line views/history.qtpl:60
qt422016.ReleaseByteBuffer(qb422016)
//line views/history.qtpl:60
return qs422016
//line views/history.qtpl:60
}
//line views/history.qtpl:62
func StreamHistoryHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, list string) {
//line views/history.qtpl:62
qw422016.N().S(`
`)
//line views/history.qtpl:63
StreamNavHTML(qw422016, rq, hyphaName, "history")
//line views/history.qtpl:63
qw422016.N().S(`
<div class="layout">
<main class="main-width">
<article class="history">
<h1>History of `)
//line views/history.qtpl:67
qw422016.E().S(util.BeautifulName(hyphaName))
//line views/history.qtpl:67
qw422016.N().S(`</h1>
`)
//line views/history.qtpl:68
qw422016.N().S(list)
//line views/history.qtpl:68
qw422016.N().S(`
</article>
</main>
</div>
`)
//line views/history.qtpl:72
}
//line views/history.qtpl:72
func WriteHistoryHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, list string) {
//line views/history.qtpl:72
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/history.qtpl:72
StreamHistoryHTML(qw422016, rq, hyphaName, list)
//line views/history.qtpl:72
qt422016.ReleaseWriter(qw422016)
//line views/history.qtpl:72
}
//line views/history.qtpl:72
func HistoryHTML(rq *http.Request, hyphaName, list string) string {
//line views/history.qtpl:72
qb422016 := qt422016.AcquireByteBuffer()
//line views/history.qtpl:72
WriteHistoryHTML(qb422016, rq, hyphaName, list)
//line views/history.qtpl:72
qs422016 := string(qb422016.B)
//line views/history.qtpl:72
qt422016.ReleaseByteBuffer(qb422016)
//line views/history.qtpl:72
return qs422016
//line views/history.qtpl:72
}