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

170 lines
5.5 KiB
Go
Raw Normal View History

2020-08-31 17:52:26 +00:00
// Code generated by qtc from "http_mutators.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.
2020-10-02 15:31:59 +00:00
//line templates/http_mutators.qtpl:1
2020-08-31 17:52:26 +00:00
package templates
2020-10-02 15:31:59 +00:00
//line templates/http_mutators.qtpl:1
import "net/http"
//line templates/http_mutators.qtpl:3
2020-08-31 17:52:26 +00:00
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
//line templates/http_mutators.qtpl:3
2020-08-31 17:52:26 +00:00
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
2020-10-02 15:31:59 +00:00
//line templates/http_mutators.qtpl:3
func StreamEditHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) {
2020-10-02 15:31:59 +00:00
//line templates/http_mutators.qtpl:3
2020-08-31 17:52:26 +00:00
qw422016.N().S(`
`)
2021-01-20 13:53:30 +00:00
//line templates/http_mutators.qtpl:4
qw422016.N().S(navHTML(rq, hyphaName, "edit"))
2021-01-20 13:53:30 +00:00
//line templates/http_mutators.qtpl:4
qw422016.N().S(`
2021-01-20 13:53:30 +00:00
<main class="edit edit_no-preview">
<h1>Edit `)
2020-10-02 15:31:59 +00:00
//line templates/http_mutators.qtpl:6
2020-08-31 17:52:26 +00:00
qw422016.E().S(hyphaName)
2020-10-02 15:31:59 +00:00
//line templates/http_mutators.qtpl:6
qw422016.N().S(`</h1>
`)
2020-10-02 15:31:59 +00:00
//line templates/http_mutators.qtpl:7
qw422016.N().S(warning)
2020-10-02 15:31:59 +00:00
//line templates/http_mutators.qtpl:7
qw422016.N().S(`
<form method="post" class="edit-form"
action="/upload-text/`)
//line templates/http_mutators.qtpl:9
2020-08-31 17:52:26 +00:00
qw422016.E().S(hyphaName)
//line templates/http_mutators.qtpl:9
qw422016.N().S(`">
<textarea name="text">`)
2020-10-02 15:31:59 +00:00
//line templates/http_mutators.qtpl:10
qw422016.E().S(textAreaFill)
//line templates/http_mutators.qtpl:10
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/`)
2021-01-16 16:42:18 +00:00
//line templates/http_mutators.qtpl:14
qw422016.E().S(hyphaName)
2021-01-16 16:42:18 +00:00
//line templates/http_mutators.qtpl:14
qw422016.N().S(`" class="edit-form__cancel">Cancel</a>
</form>
</main>
2020-08-31 17:52:26 +00:00
`)
2021-01-16 16:42:18 +00:00
//line templates/http_mutators.qtpl:17
2020-08-31 17:52:26 +00:00
}
2021-01-16 16:42:18 +00:00
//line templates/http_mutators.qtpl:17
func WriteEditHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) {
2021-01-16 16:42:18 +00:00
//line templates/http_mutators.qtpl:17
2020-08-31 17:52:26 +00:00
qw422016 := qt422016.AcquireWriter(qq422016)
2021-01-16 16:42:18 +00:00
//line templates/http_mutators.qtpl:17
StreamEditHTML(qw422016, rq, hyphaName, textAreaFill, warning)
2021-01-16 16:42:18 +00:00
//line templates/http_mutators.qtpl:17
2020-08-31 17:52:26 +00:00
qt422016.ReleaseWriter(qw422016)
2021-01-16 16:42:18 +00:00
//line templates/http_mutators.qtpl:17
2020-08-31 17:52:26 +00:00
}
2021-01-16 16:42:18 +00:00
//line templates/http_mutators.qtpl:17
func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) string {
2021-01-16 16:42:18 +00:00
//line templates/http_mutators.qtpl:17
2020-08-31 17:52:26 +00:00
qb422016 := qt422016.AcquireByteBuffer()
2021-01-16 16:42:18 +00:00
//line templates/http_mutators.qtpl:17
WriteEditHTML(qb422016, rq, hyphaName, textAreaFill, warning)
2021-01-16 16:42:18 +00:00
//line templates/http_mutators.qtpl:17
2020-08-31 17:52:26 +00:00
qs422016 := string(qb422016.B)
2021-01-16 16:42:18 +00:00
//line templates/http_mutators.qtpl:17
2020-08-31 17:52:26 +00:00
qt422016.ReleaseByteBuffer(qb422016)
2021-01-16 16:42:18 +00:00
//line templates/http_mutators.qtpl:17
2020-08-31 17:52:26 +00:00
return qs422016
2021-01-16 16:42:18 +00:00
//line templates/http_mutators.qtpl:17
}
//line templates/http_mutators.qtpl:19
func StreamPreviewHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) {
//line templates/http_mutators.qtpl:19
qw422016.N().S(`
`)
2021-01-20 13:53:30 +00:00
//line templates/http_mutators.qtpl:20
2021-01-16 16:42:18 +00:00
qw422016.N().S(navHTML(rq, hyphaName, "edit"))
2021-01-20 13:53:30 +00:00
//line templates/http_mutators.qtpl:20
2021-01-16 16:42:18 +00:00
qw422016.N().S(`
2021-01-20 13:53:30 +00:00
<main class="edit edit_with-preview">
2021-01-16 16:42:18 +00:00
<h1>Edit `)
//line templates/http_mutators.qtpl:22
qw422016.E().S(hyphaName)
//line templates/http_mutators.qtpl:22
qw422016.N().S(` (preview)</h1>
`)
//line templates/http_mutators.qtpl:23
qw422016.N().S(warning)
//line templates/http_mutators.qtpl:23
qw422016.N().S(`
<form method="post" class="edit-form"
action="/upload-text/`)
//line templates/http_mutators.qtpl:25
qw422016.E().S(hyphaName)
//line templates/http_mutators.qtpl:25
qw422016.N().S(`">
<textarea name="text">`)
//line templates/http_mutators.qtpl:26
qw422016.E().S(textAreaFill)
//line templates/http_mutators.qtpl:26
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 templates/http_mutators.qtpl:30
qw422016.E().S(hyphaName)
//line templates/http_mutators.qtpl:30
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 templates/http_mutators.qtpl:33
qw422016.N().S(renderedPage)
//line templates/http_mutators.qtpl:33
qw422016.N().S(`</section>
</main>
`)
//line templates/http_mutators.qtpl:35
}
//line templates/http_mutators.qtpl:35
func WritePreviewHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) {
//line templates/http_mutators.qtpl:35
qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/http_mutators.qtpl:35
StreamPreviewHTML(qw422016, rq, hyphaName, textAreaFill, warning, renderedPage)
//line templates/http_mutators.qtpl:35
qt422016.ReleaseWriter(qw422016)
//line templates/http_mutators.qtpl:35
}
//line templates/http_mutators.qtpl:35
func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) string {
//line templates/http_mutators.qtpl:35
qb422016 := qt422016.AcquireByteBuffer()
//line templates/http_mutators.qtpl:35
WritePreviewHTML(qb422016, rq, hyphaName, textAreaFill, warning, renderedPage)
//line templates/http_mutators.qtpl:35
qs422016 := string(qb422016.B)
//line templates/http_mutators.qtpl:35
qt422016.ReleaseByteBuffer(qb422016)
//line templates/http_mutators.qtpl:35
return qs422016
//line templates/http_mutators.qtpl:35
2020-08-31 17:52:26 +00:00
}