1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-12-15 06:20:27 +00:00
mycorrhiza/views/modal.qtpl.go

385 lines
10 KiB
Go
Raw Normal View History

// Code generated by qtc from "modal.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.
//line views/modal.qtpl:1
package views
//line views/modal.qtpl:1
2021-09-06 17:46:34 +00:00
import "fmt"
//line views/modal.qtpl:2
import "net/http"
//line views/modal.qtpl:3
2021-09-06 17:46:34 +00:00
import "github.com/bouncepaw/mycorrhiza/l18n"
//line views/modal.qtpl:5
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:5
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:5
2022-03-20 21:24:40 +00:00
func StreamDeleteAsk(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string) {
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:5
qw422016.N().S(`
`)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:7
lc := l18n.FromRequest(rq)
//line views/modal.qtpl:8
qw422016.N().S(`
`)
//line views/modal.qtpl:9
streammodalBegin(qw422016,
"delete",
hyphaName,
2022-03-08 20:12:35 +00:00
` method="post"`,
2021-09-06 17:46:34 +00:00
fmt.Sprintf(lc.Get("ui.ask_delete"), beautifulLink(hyphaName)))
//line views/modal.qtpl:13
qw422016.N().S(`
`)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:14
streammodalReallyWant(qw422016, hyphaName, lc.Get("ui.ask_delete_verb"), lc)
//line views/modal.qtpl:14
qw422016.N().S(`
2021-09-06 17:46:34 +00:00
<p>`)
//line views/modal.qtpl:15
qw422016.E().S(lc.Get("ui.ask_delete_tip"))
//line views/modal.qtpl:15
qw422016.N().S(`</p>
`)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:16
streammodalEnd(qw422016, hyphaName, true, lc)
//line views/modal.qtpl:16
qw422016.N().S(`
`)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:17
}
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:17
2022-03-20 21:24:40 +00:00
func WriteDeleteAsk(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) {
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:17
qw422016 := qt422016.AcquireWriter(qq422016)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:17
2022-03-20 21:24:40 +00:00
StreamDeleteAsk(qw422016, rq, hyphaName)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:17
qt422016.ReleaseWriter(qw422016)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:17
}
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:17
2022-03-20 21:24:40 +00:00
func DeleteAsk(rq *http.Request, hyphaName string) string {
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:17
qb422016 := qt422016.AcquireByteBuffer()
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:17
2022-03-20 21:24:40 +00:00
WriteDeleteAsk(qb422016, rq, hyphaName)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:17
qs422016 := string(qb422016.B)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:17
qt422016.ReleaseByteBuffer(qb422016)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:17
return qs422016
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:17
}
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:19
2022-03-20 21:24:40 +00:00
func StreamRemoveMediaAsk(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string) {
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:19
qw422016.N().S(`
`)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:21
lc := l18n.FromRequest(rq)
//line views/modal.qtpl:22
qw422016.N().S(`
`)
//line views/modal.qtpl:23
streammodalBegin(qw422016,
"remove-media",
hyphaName,
2022-03-08 20:12:35 +00:00
` method="post"`,
fmt.Sprintf(lc.Get("ui.ask_remove_media"), beautifulLink(hyphaName)))
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:27
qw422016.N().S(`
`)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:28
streammodalReallyWant(qw422016, hyphaName, lc.Get("ui.ask_remove_media_verb"), lc)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:28
qw422016.N().S(`
`)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:29
streammodalEnd(qw422016, hyphaName, true, lc)
//line views/modal.qtpl:29
qw422016.N().S(`
`)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:30
}
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:30
2022-03-20 21:24:40 +00:00
func WriteRemoveMediaAsk(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) {
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:30
qw422016 := qt422016.AcquireWriter(qq422016)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:30
2022-03-20 21:24:40 +00:00
StreamRemoveMediaAsk(qw422016, rq, hyphaName)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:30
qt422016.ReleaseWriter(qw422016)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:30
}
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:30
2022-03-20 21:24:40 +00:00
func RemoveMediaAsk(rq *http.Request, hyphaName string) string {
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:30
qb422016 := qt422016.AcquireByteBuffer()
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:30
2022-03-20 21:24:40 +00:00
WriteRemoveMediaAsk(qb422016, rq, hyphaName)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:30
qs422016 := string(qb422016.B)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:30
qt422016.ReleaseByteBuffer(qb422016)
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:30
return qs422016
2021-09-06 17:46:34 +00:00
//line views/modal.qtpl:30
}
// bloody hell !!
//
//line views/modal.qtpl:34
2022-03-20 21:24:40 +00:00
func StreamRenameAsk(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string) {
//line views/modal.qtpl:34
qw422016.N().S(`
`)
//line views/modal.qtpl:36
2021-09-06 17:46:34 +00:00
lc := l18n.FromRequest(rq)
//line views/modal.qtpl:37
2021-09-06 17:46:34 +00:00
qw422016.N().S(`
`)
//line views/modal.qtpl:38
streammodalBegin(qw422016,
"rename",
hyphaName,
` method="post" enctype="multipart/form-data"`,
2021-09-06 17:46:34 +00:00
fmt.Sprintf(lc.Get("ui.ask_rename"), beautifulLink(hyphaName)))
//line views/modal.qtpl:42
qw422016.N().S(`
2021-09-06 17:46:34 +00:00
<label for="new-name">`)
//line views/modal.qtpl:43
2021-09-06 17:46:34 +00:00
qw422016.E().S(lc.Get("ui.rename_to"))
//line views/modal.qtpl:43
2021-09-06 17:46:34 +00:00
qw422016.N().S(`</label>
<input type="text" value="`)
//line views/modal.qtpl:44
qw422016.E().S(hyphaName)
//line views/modal.qtpl:44
qw422016.N().S(`" required autofocus id="new-name" name="new-name"/>
<input type="checkbox" id="recursive" name="recursive" value="true" checked/>
2021-09-06 17:46:34 +00:00
<label for="recursive">`)
//line views/modal.qtpl:47
2021-09-06 17:46:34 +00:00
qw422016.E().S(lc.Get("ui.rename_recurse"))
//line views/modal.qtpl:47
2021-09-06 17:46:34 +00:00
qw422016.N().S(`</label>
2021-09-06 17:46:34 +00:00
<p>`)
//line views/modal.qtpl:49
2021-09-06 17:46:34 +00:00
qw422016.E().S(lc.Get("ui.rename_tip"))
//line views/modal.qtpl:49
2021-09-06 17:46:34 +00:00
qw422016.N().S(`</p>
`)
//line views/modal.qtpl:50
2021-09-06 17:46:34 +00:00
streammodalEnd(qw422016, hyphaName, false, lc)
//line views/modal.qtpl:50
qw422016.N().S(`
`)
//line views/modal.qtpl:51
}
//line views/modal.qtpl:51
2022-03-20 21:24:40 +00:00
func WriteRenameAsk(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) {
//line views/modal.qtpl:51
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/modal.qtpl:51
2022-03-20 21:24:40 +00:00
StreamRenameAsk(qw422016, rq, hyphaName)
//line views/modal.qtpl:51
qt422016.ReleaseWriter(qw422016)
//line views/modal.qtpl:51
}
//line views/modal.qtpl:51
2022-03-20 21:24:40 +00:00
func RenameAsk(rq *http.Request, hyphaName string) string {
//line views/modal.qtpl:51
qb422016 := qt422016.AcquireByteBuffer()
//line views/modal.qtpl:51
2022-03-20 21:24:40 +00:00
WriteRenameAsk(qb422016, rq, hyphaName)
//line views/modal.qtpl:51
qs422016 := string(qb422016.B)
//line views/modal.qtpl:51
qt422016.ReleaseByteBuffer(qb422016)
//line views/modal.qtpl:51
return qs422016
//line views/modal.qtpl:51
}
//line views/modal.qtpl:53
2021-09-06 17:46:34 +00:00
func streammodalReallyWant(qw422016 *qt422016.Writer, hyphaName, verb string, lc *l18n.Localizer) {
//line views/modal.qtpl:53
qw422016.N().S(`
2021-09-06 17:46:34 +00:00
<p class="modal__confirmation-msg">`)
//line views/modal.qtpl:54
2021-09-06 17:46:34 +00:00
qw422016.N().S(lc.Get("ui.ask_really", &l18n.Replacements{"verb": verb, "name": fmt.Sprintf("<em>%s</em>", hyphaName)}))
//line views/modal.qtpl:54
2021-09-06 17:46:34 +00:00
qw422016.N().S(`</p>
`)
//line views/modal.qtpl:55
}
//line views/modal.qtpl:55
2021-09-06 17:46:34 +00:00
func writemodalReallyWant(qq422016 qtio422016.Writer, hyphaName, verb string, lc *l18n.Localizer) {
//line views/modal.qtpl:55
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/modal.qtpl:55
2021-09-06 17:46:34 +00:00
streammodalReallyWant(qw422016, hyphaName, verb, lc)
//line views/modal.qtpl:55
qt422016.ReleaseWriter(qw422016)
//line views/modal.qtpl:55
}
//line views/modal.qtpl:55
2021-09-06 17:46:34 +00:00
func modalReallyWant(hyphaName, verb string, lc *l18n.Localizer) string {
//line views/modal.qtpl:55
qb422016 := qt422016.AcquireByteBuffer()
//line views/modal.qtpl:55
2021-09-06 17:46:34 +00:00
writemodalReallyWant(qb422016, hyphaName, verb, lc)
//line views/modal.qtpl:55
qs422016 := string(qb422016.B)
//line views/modal.qtpl:55
qt422016.ReleaseByteBuffer(qb422016)
//line views/modal.qtpl:55
return qs422016
//line views/modal.qtpl:55
}
//line views/modal.qtpl:57
func streammodalBegin(qw422016 *qt422016.Writer, path, hyphaName, formAttrs, legend string) {
//line views/modal.qtpl:57
qw422016.N().S(`
<div class="layout">
<main class="main-width">
<form class="modal" action="/`)
//line views/modal.qtpl:60
qw422016.E().S(path)
//line views/modal.qtpl:60
qw422016.N().S(`/`)
//line views/modal.qtpl:60
qw422016.E().S(hyphaName)
//line views/modal.qtpl:60
qw422016.N().S(`"`)
//line views/modal.qtpl:60
qw422016.N().S(formAttrs)
//line views/modal.qtpl:60
qw422016.N().S(`>
<fieldset class="modal__fieldset">
<legend class="modal__title">`)
//line views/modal.qtpl:62
qw422016.N().S(legend)
//line views/modal.qtpl:62
qw422016.N().S(`</legend>
`)
//line views/modal.qtpl:63
}
//line views/modal.qtpl:63
func writemodalBegin(qq422016 qtio422016.Writer, path, hyphaName, formAttrs, legend string) {
//line views/modal.qtpl:63
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/modal.qtpl:63
streammodalBegin(qw422016, path, hyphaName, formAttrs, legend)
//line views/modal.qtpl:63
qt422016.ReleaseWriter(qw422016)
//line views/modal.qtpl:63
}
//line views/modal.qtpl:63
func modalBegin(path, hyphaName, formAttrs, legend string) string {
//line views/modal.qtpl:63
qb422016 := qt422016.AcquireByteBuffer()
//line views/modal.qtpl:63
writemodalBegin(qb422016, path, hyphaName, formAttrs, legend)
//line views/modal.qtpl:63
qs422016 := string(qb422016.B)
//line views/modal.qtpl:63
qt422016.ReleaseByteBuffer(qb422016)
//line views/modal.qtpl:63
return qs422016
//line views/modal.qtpl:63
}
//line views/modal.qtpl:65
2021-09-06 17:46:34 +00:00
func streammodalEnd(qw422016 *qt422016.Writer, hyphaName string, shouldFocusOnConfirm bool, lc *l18n.Localizer) {
//line views/modal.qtpl:65
qw422016.N().S(`
2021-09-06 17:46:34 +00:00
<button type="submit" value="Confirm" class="btn" `)
//line views/modal.qtpl:66
if shouldFocusOnConfirm {
//line views/modal.qtpl:66
qw422016.N().S(`autofocus`)
//line views/modal.qtpl:66
}
//line views/modal.qtpl:66
2021-09-06 17:46:34 +00:00
qw422016.N().S(`>`)
//line views/modal.qtpl:66
2021-09-06 17:46:34 +00:00
qw422016.E().S(lc.Get("ui.confirm"))
//line views/modal.qtpl:66
2021-09-06 17:46:34 +00:00
qw422016.N().S(`</button>
<a href="/hypha/`)
//line views/modal.qtpl:67
qw422016.E().S(hyphaName)
//line views/modal.qtpl:67
2021-09-06 17:46:34 +00:00
qw422016.N().S(`" class="btn btn_weak">`)
//line views/modal.qtpl:67
2021-09-06 17:46:34 +00:00
qw422016.E().S(lc.Get("ui.cancel"))
//line views/modal.qtpl:67
2021-09-06 17:46:34 +00:00
qw422016.N().S(`</a>
</fieldset>
</form>
</main>
</div>
`)
//line views/modal.qtpl:72
}
//line views/modal.qtpl:72
2021-09-06 17:46:34 +00:00
func writemodalEnd(qq422016 qtio422016.Writer, hyphaName string, shouldFocusOnConfirm bool, lc *l18n.Localizer) {
//line views/modal.qtpl:72
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/modal.qtpl:72
2021-09-06 17:46:34 +00:00
streammodalEnd(qw422016, hyphaName, shouldFocusOnConfirm, lc)
//line views/modal.qtpl:72
qt422016.ReleaseWriter(qw422016)
//line views/modal.qtpl:72
}
//line views/modal.qtpl:72
2021-09-06 17:46:34 +00:00
func modalEnd(hyphaName string, shouldFocusOnConfirm bool, lc *l18n.Localizer) string {
//line views/modal.qtpl:72
qb422016 := qt422016.AcquireByteBuffer()
//line views/modal.qtpl:72
2021-09-06 17:46:34 +00:00
writemodalEnd(qb422016, hyphaName, shouldFocusOnConfirm, lc)
//line views/modal.qtpl:72
qs422016 := string(qb422016.B)
//line views/modal.qtpl:72
qt422016.ReleaseByteBuffer(qb422016)
//line views/modal.qtpl:72
return qs422016
//line views/modal.qtpl:72
}