1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-02-07 22:50:11 +00:00
mycorrhiza/views/modal.qtpl.go

208 lines
5.4 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-07 01:46:34 +08:00
import "fmt"
//line views/modal.qtpl:2
import "net/http"
//line views/modal.qtpl:3
2021-09-07 01:46:34 +08:00
import "github.com/bouncepaw/mycorrhiza/l18n"
//line views/modal.qtpl:5
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
2021-09-07 01:46:34 +08:00
//line views/modal.qtpl:5
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
2021-09-07 01:46:34 +08:00
//line views/modal.qtpl:5
2022-06-16 14:05:30 +03:00
func StreamRemoveMediaAsk(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string) {
2021-09-07 01:46:34 +08:00
//line views/modal.qtpl:5
qw422016.N().S(`
`)
2021-09-07 01:46:34 +08:00
//line views/modal.qtpl:7
lc := l18n.FromRequest(rq)
//line views/modal.qtpl:8
qw422016.N().S(`
<main class="main-width">
2022-06-16 14:05:30 +03:00
<form class="modal" action="/remove-media/`)
//line views/modal.qtpl:10
qw422016.E().S(hyphaName)
//line views/modal.qtpl:10
qw422016.N().S(`" method="post">
<fieldset class="modal__fieldset">
<legend class="modal__title">
`)
//line views/modal.qtpl:13
2022-06-16 14:05:30 +03:00
qw422016.N().S(fmt.Sprintf(lc.Get("ui.ask_remove_media"), beautifulLink(hyphaName)))
2021-09-07 01:46:34 +08:00
//line views/modal.qtpl:13
qw422016.N().S(`
</legend>
<p class="modal__confirmation-msg">
`)
//line views/modal.qtpl:16
2022-06-14 22:40:15 +03:00
qw422016.N().S(lc.Get("ui.ask_really", &l18n.Replacements{"verb": lc.Get("ui.ask_remove_media_verb"), "name": fmt.Sprintf("<em>%s</em>", hyphaName)}))
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:16
qw422016.N().S(`
</p>
<button type="submit" value="Confirm" class="btn" autofocus>
`)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:19
qw422016.E().S(lc.Get("ui.confirm"))
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:19
qw422016.N().S(`
</button>
<a href="/hypha/`)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:21
qw422016.E().S(hyphaName)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:21
qw422016.N().S(`" class="btn btn_weak">
`)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:22
qw422016.E().S(lc.Get("ui.cancel"))
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:22
qw422016.N().S(`
</a>
</fieldset>
</form>
</main>
`)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:27
}
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:27
2022-03-21 00:24:40 +03:00
func WriteRemoveMediaAsk(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) {
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:27
qw422016 := qt422016.AcquireWriter(qq422016)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:27
2022-03-21 00:24:40 +03:00
StreamRemoveMediaAsk(qw422016, rq, hyphaName)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:27
qt422016.ReleaseWriter(qw422016)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:27
}
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:27
2022-03-21 00:24:40 +03:00
func RemoveMediaAsk(rq *http.Request, hyphaName string) string {
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:27
qb422016 := qt422016.AcquireByteBuffer()
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:27
2022-03-21 00:24:40 +03:00
WriteRemoveMediaAsk(qb422016, rq, hyphaName)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:27
qs422016 := string(qb422016.B)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:27
qt422016.ReleaseByteBuffer(qb422016)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:27
return qs422016
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:27
}
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:29
2022-03-21 00:24:40 +03:00
func StreamRenameAsk(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string) {
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:29
qw422016.N().S(`
`)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:31
2021-09-07 01:46:34 +08:00
lc := l18n.FromRequest(rq)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:32
qw422016.N().S(`
<main class="main-width">
<form class="modal" action="/rename/`)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:34
qw422016.E().S(hyphaName)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:34
qw422016.N().S(`" method="post" enctype="multipart/form-data">
<fieldset class="modal__fieldset">
2022-06-16 14:05:30 +03:00
<legend class="modal__title">
`)
//line views/modal.qtpl:37
qw422016.N().S(fmt.Sprintf(lc.Get("ui.ask_rename"), beautifulLink(hyphaName)))
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:37
qw422016.N().S(`
</legend>
2021-09-07 01:46:34 +08:00
<label for="new-name">`)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:39
2021-09-07 01:46:34 +08:00
qw422016.E().S(lc.Get("ui.rename_to"))
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:39
2021-09-07 01:46:34 +08:00
qw422016.N().S(`</label>
<input type="text" value="`)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:40
qw422016.E().S(hyphaName)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:40
qw422016.N().S(`" required autofocus id="new-name" name="new-name"/>
<input type="checkbox" id="recursive" name="recursive" value="true" checked/>
2021-09-07 01:46:34 +08:00
<label for="recursive">`)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:43
2021-09-07 01:46:34 +08:00
qw422016.E().S(lc.Get("ui.rename_recurse"))
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:43
2021-09-07 01:46:34 +08:00
qw422016.N().S(`</label>
2021-09-07 01:46:34 +08:00
<p>`)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:45
2021-09-07 01:46:34 +08:00
qw422016.E().S(lc.Get("ui.rename_tip"))
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:45
2021-09-07 01:46:34 +08:00
qw422016.N().S(`</p>
<button type="submit" value="Confirm" class="btn">
`)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:47
2021-09-07 01:46:34 +08:00
qw422016.E().S(lc.Get("ui.confirm"))
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:47
qw422016.N().S(`
</button>
<a href="/hypha/`)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:49
qw422016.E().S(hyphaName)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:49
qw422016.N().S(`" class="btn btn_weak">
`)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:50
2021-09-07 01:46:34 +08:00
qw422016.E().S(lc.Get("ui.cancel"))
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:50
qw422016.N().S(`
</a>
</fieldset>
</form>
</main>
`)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:55
}
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:55
func WriteRenameAsk(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) {
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:55
qw422016 := qt422016.AcquireWriter(qq422016)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:55
StreamRenameAsk(qw422016, rq, hyphaName)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:55
qt422016.ReleaseWriter(qw422016)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:55
}
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:55
func RenameAsk(rq *http.Request, hyphaName string) string {
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:55
qb422016 := qt422016.AcquireByteBuffer()
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:55
WriteRenameAsk(qb422016, rq, hyphaName)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:55
qs422016 := string(qb422016.B)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:55
qt422016.ReleaseByteBuffer(qb422016)
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:55
return qs422016
2022-06-16 14:05:30 +03:00
//line views/modal.qtpl:55
}