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

266 lines
6.5 KiB
Go
Raw Normal View History

2021-02-20 16:14:33 +00:00
// Code generated by qtc from "nav.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.
//line views/nav.qtpl:1
package views
//line views/nav.qtpl:1
import "net/http"
//line views/nav.qtpl:2
import "strings"
//line views/nav.qtpl:3
import "github.com/bouncepaw/mycorrhiza/user"
2021-02-20 16:14:33 +00:00
//line views/nav.qtpl:4
import "github.com/bouncepaw/mycorrhiza/hyphae"
2021-02-20 16:14:33 +00:00
//line views/nav.qtpl:6
2021-02-20 16:14:33 +00:00
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
//line views/nav.qtpl:6
2021-02-20 16:14:33 +00:00
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line views/nav.qtpl:6
func streamhyphaInfoEntry(qw422016 *qt422016.Writer, h *hyphae.Hypha, u *user.User, action, displayText string) {
//line views/nav.qtpl:6
qw422016.N().S(`
`)
//line views/nav.qtpl:7
if u.CanProceed(action) {
//line views/nav.qtpl:7
qw422016.N().S(`
<li class="hypha-info__entry hypha-info__entry_`)
//line views/nav.qtpl:8
qw422016.E().S(action)
//line views/nav.qtpl:8
qw422016.N().S(`">
<a class="hypha-info__link" href="/`)
//line views/nav.qtpl:9
qw422016.E().S(action)
//line views/nav.qtpl:9
qw422016.N().S(`/`)
//line views/nav.qtpl:9
qw422016.E().S(h.Name)
//line views/nav.qtpl:9
qw422016.N().S(`">`)
//line views/nav.qtpl:9
qw422016.E().S(displayText)
//line views/nav.qtpl:9
qw422016.N().S(`</a>
</li>
`)
//line views/nav.qtpl:11
}
//line views/nav.qtpl:11
qw422016.N().S(`
`)
//line views/nav.qtpl:12
2021-02-20 16:14:33 +00:00
}
//line views/nav.qtpl:12
func writehyphaInfoEntry(qq422016 qtio422016.Writer, h *hyphae.Hypha, u *user.User, action, displayText string) {
//line views/nav.qtpl:12
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/nav.qtpl:12
streamhyphaInfoEntry(qw422016, h, u, action, displayText)
//line views/nav.qtpl:12
qt422016.ReleaseWriter(qw422016)
//line views/nav.qtpl:12
2021-02-20 16:14:33 +00:00
}
//line views/nav.qtpl:12
func hyphaInfoEntry(h *hyphae.Hypha, u *user.User, action, displayText string) string {
//line views/nav.qtpl:12
qb422016 := qt422016.AcquireByteBuffer()
//line views/nav.qtpl:12
writehyphaInfoEntry(qb422016, h, u, action, displayText)
//line views/nav.qtpl:12
qs422016 := string(qb422016.B)
//line views/nav.qtpl:12
qt422016.ReleaseByteBuffer(qb422016)
//line views/nav.qtpl:12
return qs422016
//line views/nav.qtpl:12
}
//line views/nav.qtpl:14
func streamhyphaInfo(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha) {
//line views/nav.qtpl:14
2021-02-20 16:14:33 +00:00
qw422016.N().S(`
`)
//line views/nav.qtpl:16
2021-02-20 16:14:33 +00:00
u := user.FromRequest(rq)
//line views/nav.qtpl:17
2021-02-20 16:14:33 +00:00
qw422016.N().S(`
<nav class="hypha-info">
<ul class="hypha-info__list">
`)
//line views/nav.qtpl:20
streamhyphaInfoEntry(qw422016, h, u, "history", "View history")
//line views/nav.qtpl:20
qw422016.N().S(`
`)
//line views/nav.qtpl:21
streamhyphaInfoEntry(qw422016, h, u, "rename-ask", "Rename")
//line views/nav.qtpl:21
qw422016.N().S(`
`)
//line views/nav.qtpl:22
streamhyphaInfoEntry(qw422016, h, u, "delete-ask", "Delete")
//line views/nav.qtpl:22
qw422016.N().S(`
`)
//line views/nav.qtpl:23
streamhyphaInfoEntry(qw422016, h, u, "text", "View markup")
//line views/nav.qtpl:23
qw422016.N().S(`
`)
//line views/nav.qtpl:24
streamhyphaInfoEntry(qw422016, h, u, "attachment", "Manage attachment")
//line views/nav.qtpl:24
qw422016.N().S(`
`)
//line views/nav.qtpl:25
streamhyphaInfoEntry(qw422016, h, u, "backlinks", "Backlinks")
//line views/nav.qtpl:25
qw422016.N().S(`
</ul>
</nav>
2021-02-20 16:14:33 +00:00
`)
//line views/nav.qtpl:28
2021-02-20 16:14:33 +00:00
}
//line views/nav.qtpl:28
func writehyphaInfo(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha) {
//line views/nav.qtpl:28
2021-02-20 16:14:33 +00:00
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/nav.qtpl:28
streamhyphaInfo(qw422016, rq, h)
//line views/nav.qtpl:28
2021-02-20 16:14:33 +00:00
qt422016.ReleaseWriter(qw422016)
//line views/nav.qtpl:28
2021-02-20 16:14:33 +00:00
}
//line views/nav.qtpl:28
func hyphaInfo(rq *http.Request, h *hyphae.Hypha) string {
//line views/nav.qtpl:28
2021-02-20 16:14:33 +00:00
qb422016 := qt422016.AcquireByteBuffer()
//line views/nav.qtpl:28
writehyphaInfo(qb422016, rq, h)
//line views/nav.qtpl:28
2021-02-20 16:14:33 +00:00
qs422016 := string(qb422016.B)
//line views/nav.qtpl:28
2021-02-20 16:14:33 +00:00
qt422016.ReleaseByteBuffer(qb422016)
//line views/nav.qtpl:28
2021-02-20 16:14:33 +00:00
return qs422016
//line views/nav.qtpl:28
2021-02-20 16:14:33 +00:00
}
//line views/nav.qtpl:30
2021-07-12 15:23:25 +00:00
func streamsiblingHyphaeHTML(qw422016 *qt422016.Writer, siblings string) {
//line views/nav.qtpl:30
2021-02-20 16:14:33 +00:00
qw422016.N().S(`
2021-07-12 15:23:25 +00:00
<aside class="sibling-hyphae layout-card">
<h2 class="sibling-hyphae__title layout-card__title">Sibling hyphae</h2>
2021-02-20 16:14:33 +00:00
`)
//line views/nav.qtpl:33
2021-07-12 15:23:25 +00:00
qw422016.N().S(siblings)
//line views/nav.qtpl:33
2021-02-20 16:14:33 +00:00
qw422016.N().S(`
</aside>
`)
//line views/nav.qtpl:35
2021-02-20 16:14:33 +00:00
}
//line views/nav.qtpl:35
2021-07-12 15:23:25 +00:00
func writesiblingHyphaeHTML(qq422016 qtio422016.Writer, siblings string) {
//line views/nav.qtpl:35
2021-02-20 16:14:33 +00:00
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/nav.qtpl:35
2021-07-12 15:23:25 +00:00
streamsiblingHyphaeHTML(qw422016, siblings)
//line views/nav.qtpl:35
2021-02-20 16:14:33 +00:00
qt422016.ReleaseWriter(qw422016)
//line views/nav.qtpl:35
2021-02-20 16:14:33 +00:00
}
//line views/nav.qtpl:35
2021-07-12 15:23:25 +00:00
func siblingHyphaeHTML(siblings string) string {
//line views/nav.qtpl:35
2021-02-20 16:14:33 +00:00
qb422016 := qt422016.AcquireByteBuffer()
//line views/nav.qtpl:35
2021-07-12 15:23:25 +00:00
writesiblingHyphaeHTML(qb422016, siblings)
//line views/nav.qtpl:35
2021-02-20 16:14:33 +00:00
qs422016 := string(qb422016.B)
//line views/nav.qtpl:35
2021-02-20 16:14:33 +00:00
qt422016.ReleaseByteBuffer(qb422016)
//line views/nav.qtpl:35
2021-02-20 16:14:33 +00:00
return qs422016
//line views/nav.qtpl:35
2021-02-20 16:14:33 +00:00
}
//line views/nav.qtpl:37
2021-02-20 16:14:33 +00:00
func StreamSubhyphaeHTML(qw422016 *qt422016.Writer, subhyphae string) {
//line views/nav.qtpl:37
2021-02-20 16:14:33 +00:00
qw422016.N().S(`
`)
//line views/nav.qtpl:38
2021-02-20 16:14:33 +00:00
if strings.TrimSpace(subhyphae) != "" {
//line views/nav.qtpl:38
2021-02-20 16:14:33 +00:00
qw422016.N().S(`
<section class="subhyphae">
<h2 class="subhyphae__title">Subhyphae</h2>
<nav class="subhyphae__nav">
<ul class="subhyphae__list">
`)
//line views/nav.qtpl:43
2021-02-20 16:14:33 +00:00
qw422016.N().S(subhyphae)
//line views/nav.qtpl:43
2021-02-20 16:14:33 +00:00
qw422016.N().S(`
</ul>
</nav>
</section>
`)
//line views/nav.qtpl:47
2021-02-20 16:14:33 +00:00
}
//line views/nav.qtpl:47
2021-02-20 16:14:33 +00:00
qw422016.N().S(`
`)
//line views/nav.qtpl:48
2021-02-20 16:14:33 +00:00
}
//line views/nav.qtpl:48
2021-02-20 16:14:33 +00:00
func WriteSubhyphaeHTML(qq422016 qtio422016.Writer, subhyphae string) {
//line views/nav.qtpl:48
2021-02-20 16:14:33 +00:00
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/nav.qtpl:48
2021-02-20 16:14:33 +00:00
StreamSubhyphaeHTML(qw422016, subhyphae)
//line views/nav.qtpl:48
2021-02-20 16:14:33 +00:00
qt422016.ReleaseWriter(qw422016)
//line views/nav.qtpl:48
2021-02-20 16:14:33 +00:00
}
//line views/nav.qtpl:48
2021-02-20 16:14:33 +00:00
func SubhyphaeHTML(subhyphae string) string {
//line views/nav.qtpl:48
2021-02-20 16:14:33 +00:00
qb422016 := qt422016.AcquireByteBuffer()
//line views/nav.qtpl:48
2021-02-20 16:14:33 +00:00
WriteSubhyphaeHTML(qb422016, subhyphae)
//line views/nav.qtpl:48
2021-02-20 16:14:33 +00:00
qs422016 := string(qb422016.B)
//line views/nav.qtpl:48
2021-02-20 16:14:33 +00:00
qt422016.ReleaseByteBuffer(qb422016)
//line views/nav.qtpl:48
2021-02-20 16:14:33 +00:00
return qs422016
//line views/nav.qtpl:48
2021-02-20 16:14:33 +00:00
}