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

177 lines
5.2 KiB
Go
Raw Normal View History

2021-01-24 12:52:40 +00:00
// Code generated by qtc from "mutators.qtpl". DO NOT EDIT.
2020-08-31 17:52:26 +00:00
// See https://github.com/valyala/quicktemplate for details.
//line views/mutators.qtpl:1
package views
2020-08-31 17:52:26 +00:00
//line views/mutators.qtpl:1
import "net/http"
//line views/mutators.qtpl:2
2021-01-26 05:41:57 +00:00
import "github.com/bouncepaw/mycorrhiza/util"
//line views/mutators.qtpl:4
2020-08-31 17:52:26 +00:00
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
//line views/mutators.qtpl:4
2020-08-31 17:52:26 +00:00
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line views/mutators.qtpl:4
func StreamEditHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) {
//line views/mutators.qtpl:4
2020-08-31 17:52:26 +00:00
qw422016.N().S(`
`)
//line views/mutators.qtpl:5
qw422016.N().S(NavHTML(rq, hyphaName, "edit"))
//line views/mutators.qtpl:5
qw422016.N().S(`
2021-01-26 05:41:57 +00:00
<div class="layout">
<main class="main-width edit edit_no-preview">
<h1 class="edit__title">Edit `)
//line views/mutators.qtpl:8
2021-01-26 05:41:57 +00:00
qw422016.E().S(util.BeautifulName(hyphaName))
//line views/mutators.qtpl:8
qw422016.N().S(`</h1>
`)
//line views/mutators.qtpl:9
qw422016.N().S(warning)
//line views/mutators.qtpl:9
qw422016.N().S(`
<form method="post" class="edit-form"
action="/upload-text/`)
//line views/mutators.qtpl:11
2020-08-31 17:52:26 +00:00
qw422016.E().S(hyphaName)
//line views/mutators.qtpl:11
qw422016.N().S(`">
<textarea name="text">`)
//line views/mutators.qtpl:12
qw422016.E().S(textAreaFill)
//line views/mutators.qtpl:12
qw422016.N().S(`</textarea>
<br/>
2021-01-16 16:42:18 +00:00
<input type="submit" name="action" value="Save" class="edit-form__save"/>
<input type="submit" name="action" value="Preview" class="edit-form__preview">
<a href="/page/`)
//line views/mutators.qtpl:16
qw422016.E().S(hyphaName)
//line views/mutators.qtpl:16
2021-01-16 16:42:18 +00:00
qw422016.N().S(`" class="edit-form__cancel">Cancel</a>
</form>
</main>
2021-01-26 05:41:57 +00:00
</div>
2020-08-31 17:52:26 +00:00
`)
//line views/mutators.qtpl:20
2020-08-31 17:52:26 +00:00
}
//line views/mutators.qtpl:20
func WriteEditHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) {
//line views/mutators.qtpl:20
2020-08-31 17:52:26 +00:00
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/mutators.qtpl:20
StreamEditHTML(qw422016, rq, hyphaName, textAreaFill, warning)
//line views/mutators.qtpl:20
2020-08-31 17:52:26 +00:00
qt422016.ReleaseWriter(qw422016)
//line views/mutators.qtpl:20
2020-08-31 17:52:26 +00:00
}
//line views/mutators.qtpl:20
func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) string {
//line views/mutators.qtpl:20
2020-08-31 17:52:26 +00:00
qb422016 := qt422016.AcquireByteBuffer()
//line views/mutators.qtpl:20
WriteEditHTML(qb422016, rq, hyphaName, textAreaFill, warning)
//line views/mutators.qtpl:20
2020-08-31 17:52:26 +00:00
qs422016 := string(qb422016.B)
//line views/mutators.qtpl:20
2020-08-31 17:52:26 +00:00
qt422016.ReleaseByteBuffer(qb422016)
//line views/mutators.qtpl:20
2020-08-31 17:52:26 +00:00
return qs422016
//line views/mutators.qtpl:20
2021-01-16 16:42:18 +00:00
}
//line views/mutators.qtpl:22
2021-01-16 16:42:18 +00:00
func StreamPreviewHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) {
//line views/mutators.qtpl:22
2021-01-16 16:42:18 +00:00
qw422016.N().S(`
`)
//line views/mutators.qtpl:23
qw422016.N().S(NavHTML(rq, hyphaName, "edit"))
//line views/mutators.qtpl:23
2021-01-16 16:42:18 +00:00
qw422016.N().S(`
2021-01-26 05:41:57 +00:00
<div class="layout">
<main class="main-width edit edit_with-preview">
2021-01-16 16:42:18 +00:00
<h1>Edit `)
//line views/mutators.qtpl:26
qw422016.E().S(util.BeautifulName(hyphaName))
//line views/mutators.qtpl:26
2021-01-16 16:42:18 +00:00
qw422016.N().S(` (preview)</h1>
`)
//line views/mutators.qtpl:27
2021-01-16 16:42:18 +00:00
qw422016.N().S(warning)
//line views/mutators.qtpl:27
2021-01-16 16:42:18 +00:00
qw422016.N().S(`
<form method="post" class="edit-form"
action="/upload-text/`)
//line views/mutators.qtpl:29
2021-01-16 16:42:18 +00:00
qw422016.E().S(hyphaName)
//line views/mutators.qtpl:29
2021-01-16 16:42:18 +00:00
qw422016.N().S(`">
<textarea name="text">`)
//line views/mutators.qtpl:30
2021-01-16 16:42:18 +00:00
qw422016.E().S(textAreaFill)
//line views/mutators.qtpl:30
2021-01-16 16:42:18 +00:00
qw422016.N().S(`</textarea>
<br/>
<input type="submit" name="action" value="Save" class="edit-form__save"/>
<input type="submit" name="action" value="Preview" class="edit-form__preview">
<a href="/page/`)
//line views/mutators.qtpl:34
2021-01-16 16:42:18 +00:00
qw422016.E().S(hyphaName)
//line views/mutators.qtpl:34
2021-01-16 16:42:18 +00:00
qw422016.N().S(`" class="edit-form__cancel">Cancel</a>
</form>
<p class="warning">Note that the hypha is not saved yet. You can preview the changes </p>
<section class="edit__preview">`)
//line views/mutators.qtpl:37
2021-01-16 16:42:18 +00:00
qw422016.N().S(renderedPage)
//line views/mutators.qtpl:37
2021-01-16 16:42:18 +00:00
qw422016.N().S(`</section>
</main>
2021-01-26 05:41:57 +00:00
</div>
2021-01-16 16:42:18 +00:00
`)
//line views/mutators.qtpl:40
2021-01-16 16:42:18 +00:00
}
//line views/mutators.qtpl:40
2021-01-16 16:42:18 +00:00
func WritePreviewHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) {
//line views/mutators.qtpl:40
2021-01-16 16:42:18 +00:00
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/mutators.qtpl:40
2021-01-16 16:42:18 +00:00
StreamPreviewHTML(qw422016, rq, hyphaName, textAreaFill, warning, renderedPage)
//line views/mutators.qtpl:40
2021-01-16 16:42:18 +00:00
qt422016.ReleaseWriter(qw422016)
//line views/mutators.qtpl:40
2021-01-16 16:42:18 +00:00
}
//line views/mutators.qtpl:40
2021-01-16 16:42:18 +00:00
func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) string {
//line views/mutators.qtpl:40
2021-01-16 16:42:18 +00:00
qb422016 := qt422016.AcquireByteBuffer()
//line views/mutators.qtpl:40
2021-01-16 16:42:18 +00:00
WritePreviewHTML(qb422016, rq, hyphaName, textAreaFill, warning, renderedPage)
//line views/mutators.qtpl:40
2021-01-16 16:42:18 +00:00
qs422016 := string(qb422016.B)
//line views/mutators.qtpl:40
2021-01-16 16:42:18 +00:00
qt422016.ReleaseByteBuffer(qb422016)
//line views/mutators.qtpl:40
2021-01-16 16:42:18 +00:00
return qs422016
//line views/mutators.qtpl:40
2020-08-31 17:52:26 +00:00
}