2021-02-22 18:11:37 +00:00
|
|
|
// 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
|
2021-02-22 18:11:37 +00:00
|
|
|
import "net/http"
|
|
|
|
|
2021-08-08 19:38:41 +00:00
|
|
|
//line views/modal.qtpl:3
|
2021-09-06 17:46:34 +00:00
|
|
|
import "github.com/bouncepaw/mycorrhiza/l18n"
|
|
|
|
|
|
|
|
//line views/modal.qtpl:5
|
2021-02-22 18:11:37 +00:00
|
|
|
import (
|
|
|
|
qtio422016 "io"
|
|
|
|
|
|
|
|
qt422016 "github.com/valyala/quicktemplate"
|
|
|
|
)
|
|
|
|
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/modal.qtpl:5
|
2021-02-22 18:11:37 +00:00
|
|
|
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
|
2021-02-22 18:11:37 +00:00
|
|
|
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(`
|
2022-06-16 10:40:37 +00:00
|
|
|
<main class="main-width">
|
|
|
|
<form class="modal" action="/delete/`)
|
|
|
|
//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
|
|
|
|
qw422016.N().S(fmt.Sprintf(lc.Get("ui.ask_delete"), beautifulLink(hyphaName)))
|
2021-09-06 17:46:34 +00:00
|
|
|
//line views/modal.qtpl:13
|
2021-02-22 18:11:37 +00:00
|
|
|
qw422016.N().S(`
|
2022-06-16 10:40:37 +00:00
|
|
|
</legend>
|
|
|
|
<p class="modal__confirmation-msg">
|
|
|
|
`)
|
|
|
|
//line views/modal.qtpl:16
|
2022-06-14 19:40:15 +00:00
|
|
|
qw422016.N().S(lc.Get("ui.ask_really", &l18n.Replacements{"verb": lc.Get("ui.ask_delete_verb"), "name": fmt.Sprintf("<em>%s</em>", hyphaName)}))
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:16
|
2022-06-14 19:40:15 +00:00
|
|
|
qw422016.N().S(`
|
2022-06-16 10:40:37 +00:00
|
|
|
</p>
|
|
|
|
<p>`)
|
2022-06-14 19:40:15 +00:00
|
|
|
//line views/modal.qtpl:18
|
2022-06-16 10:40:37 +00:00
|
|
|
qw422016.E().S(lc.Get("ui.ask_delete_tip"))
|
2022-06-14 19:40:15 +00:00
|
|
|
//line views/modal.qtpl:18
|
2022-06-16 10:40:37 +00:00
|
|
|
qw422016.N().S(`</p>
|
|
|
|
<button type="submit" value="Confirm" class="btn" autofocus>
|
|
|
|
`)
|
|
|
|
//line views/modal.qtpl:20
|
|
|
|
qw422016.E().S(lc.Get("ui.confirm"))
|
|
|
|
//line views/modal.qtpl:20
|
|
|
|
qw422016.N().S(`
|
|
|
|
</button>
|
|
|
|
<a href="/hypha/`)
|
|
|
|
//line views/modal.qtpl:22
|
|
|
|
qw422016.E().S(hyphaName)
|
|
|
|
//line views/modal.qtpl:22
|
|
|
|
qw422016.N().S(`" class="btn btn_weak">
|
|
|
|
`)
|
|
|
|
//line views/modal.qtpl:23
|
|
|
|
qw422016.E().S(lc.Get("ui.cancel"))
|
|
|
|
//line views/modal.qtpl:23
|
2021-02-22 18:11:37 +00:00
|
|
|
qw422016.N().S(`
|
2022-06-16 10:40:37 +00:00
|
|
|
</a>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
</main>
|
2021-02-22 18:11:37 +00:00
|
|
|
`)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:28
|
2021-02-22 18:11:37 +00:00
|
|
|
}
|
|
|
|
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:28
|
2022-03-20 21:24:40 +00:00
|
|
|
func WriteDeleteAsk(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) {
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:28
|
2021-02-22 18:11:37 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:28
|
2022-03-20 21:24:40 +00:00
|
|
|
StreamDeleteAsk(qw422016, rq, hyphaName)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:28
|
2021-02-22 18:11:37 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:28
|
2021-02-22 18:11:37 +00:00
|
|
|
}
|
|
|
|
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:28
|
2022-03-20 21:24:40 +00:00
|
|
|
func DeleteAsk(rq *http.Request, hyphaName string) string {
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:28
|
2021-02-22 18:11:37 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:28
|
2022-03-20 21:24:40 +00:00
|
|
|
WriteDeleteAsk(qb422016, rq, hyphaName)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:28
|
2021-02-22 18:11:37 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:28
|
2021-02-22 18:11:37 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:28
|
2021-02-22 18:11:37 +00:00
|
|
|
return qs422016
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:28
|
2021-02-22 18:11:37 +00:00
|
|
|
}
|
|
|
|
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:30
|
2022-03-20 21:24:40 +00:00
|
|
|
func StreamRemoveMediaAsk(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string) {
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:30
|
2021-02-22 18:11:37 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
`)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:32
|
2021-09-06 17:46:34 +00:00
|
|
|
lc := l18n.FromRequest(rq)
|
|
|
|
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:33
|
2021-02-22 18:11:37 +00:00
|
|
|
qw422016.N().S(`
|
2022-06-16 10:40:37 +00:00
|
|
|
<main class="main-width">
|
|
|
|
<form class="modal" action="/remove-media/`)
|
|
|
|
//line views/modal.qtpl:35
|
|
|
|
qw422016.E().S(hyphaName)
|
|
|
|
//line views/modal.qtpl:35
|
|
|
|
qw422016.N().S(`" method="post">
|
|
|
|
<fieldset class="modal__fieldset">
|
|
|
|
<legend class="modal__title">`)
|
|
|
|
//line views/modal.qtpl:37
|
|
|
|
qw422016.N().S(fmt.Sprintf(lc.Get("ui.ask_remove_media"), beautifulLink(hyphaName)))
|
|
|
|
//line views/modal.qtpl:37
|
|
|
|
qw422016.N().S(`</legend>
|
|
|
|
<p class="modal__confirmation-msg">
|
|
|
|
`)
|
|
|
|
//line views/modal.qtpl:39
|
2022-06-14 19:40:15 +00: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 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:39
|
2021-02-22 18:11:37 +00:00
|
|
|
qw422016.N().S(`
|
2022-06-16 10:40:37 +00:00
|
|
|
</p>
|
|
|
|
<button type="submit" value="Confirm" class="btn" autofocus>
|
|
|
|
`)
|
|
|
|
//line views/modal.qtpl:42
|
|
|
|
qw422016.E().S(lc.Get("ui.confirm"))
|
|
|
|
//line views/modal.qtpl:42
|
|
|
|
qw422016.N().S(`
|
|
|
|
</button>
|
|
|
|
<a href="/hypha/`)
|
|
|
|
//line views/modal.qtpl:44
|
|
|
|
qw422016.E().S(hyphaName)
|
|
|
|
//line views/modal.qtpl:44
|
|
|
|
qw422016.N().S(`" class="btn btn_weak">
|
|
|
|
`)
|
|
|
|
//line views/modal.qtpl:45
|
|
|
|
qw422016.E().S(lc.Get("ui.cancel"))
|
|
|
|
//line views/modal.qtpl:45
|
2021-02-22 18:11:37 +00:00
|
|
|
qw422016.N().S(`
|
2022-06-16 10:40:37 +00:00
|
|
|
</a>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
</main>
|
2021-02-22 18:11:37 +00:00
|
|
|
`)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:50
|
2021-02-22 18:11:37 +00:00
|
|
|
}
|
|
|
|
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:50
|
2022-03-20 21:24:40 +00:00
|
|
|
func WriteRemoveMediaAsk(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) {
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:50
|
2021-02-22 18:11:37 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:50
|
2022-03-20 21:24:40 +00:00
|
|
|
StreamRemoveMediaAsk(qw422016, rq, hyphaName)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:50
|
2021-02-22 18:11:37 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:50
|
2021-02-22 18:11:37 +00:00
|
|
|
}
|
|
|
|
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:50
|
2022-03-20 21:24:40 +00:00
|
|
|
func RemoveMediaAsk(rq *http.Request, hyphaName string) string {
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:50
|
2021-02-22 18:11:37 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:50
|
2022-03-20 21:24:40 +00:00
|
|
|
WriteRemoveMediaAsk(qb422016, rq, hyphaName)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:50
|
2021-02-22 18:11:37 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:50
|
2021-02-22 18:11:37 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:50
|
2021-02-22 18:11:37 +00:00
|
|
|
return qs422016
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:50
|
2021-02-22 18:11:37 +00:00
|
|
|
}
|
|
|
|
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:52
|
2022-03-20 21:24:40 +00:00
|
|
|
func StreamRenameAsk(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string) {
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:52
|
2021-02-22 18:11:37 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
`)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:54
|
2021-09-06 17:46:34 +00:00
|
|
|
lc := l18n.FromRequest(rq)
|
|
|
|
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:55
|
2021-02-22 18:11:37 +00:00
|
|
|
qw422016.N().S(`
|
2022-06-16 10:40:37 +00:00
|
|
|
<main class="main-width">
|
|
|
|
<form class="modal" action="/rename/`)
|
|
|
|
//line views/modal.qtpl:57
|
|
|
|
qw422016.E().S(hyphaName)
|
|
|
|
//line views/modal.qtpl:57
|
|
|
|
qw422016.N().S(`" method="post" enctype="multipart/form-data">
|
|
|
|
<fieldset class="modal__fieldset">
|
|
|
|
<legend class="modal__title">`)
|
|
|
|
//line views/modal.qtpl:59
|
|
|
|
qw422016.N().S(fmt.Sprintf(lc.Get("ui.ask_rename"), beautifulLink(hyphaName)))
|
|
|
|
//line views/modal.qtpl:59
|
|
|
|
qw422016.N().S(`</legend>
|
2021-09-06 17:46:34 +00:00
|
|
|
<label for="new-name">`)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:60
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.E().S(lc.Get("ui.rename_to"))
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:60
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.N().S(`</label>
|
2021-02-22 18:11:37 +00:00
|
|
|
<input type="text" value="`)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:61
|
2021-02-22 18:11:37 +00:00
|
|
|
qw422016.E().S(hyphaName)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:61
|
2021-02-22 18:11:37 +00:00
|
|
|
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">`)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:64
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.E().S(lc.Get("ui.rename_recurse"))
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:64
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.N().S(`</label>
|
2021-02-22 18:11:37 +00:00
|
|
|
|
2021-09-06 17:46:34 +00:00
|
|
|
<p>`)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:66
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.E().S(lc.Get("ui.rename_tip"))
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:66
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.N().S(`</p>
|
2022-06-16 10:40:37 +00:00
|
|
|
<button type="submit" value="Confirm" class="btn">
|
|
|
|
`)
|
|
|
|
//line views/modal.qtpl:68
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.E().S(lc.Get("ui.confirm"))
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:68
|
|
|
|
qw422016.N().S(`
|
|
|
|
</button>
|
2021-02-22 18:11:37 +00:00
|
|
|
<a href="/hypha/`)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:70
|
2021-02-22 18:11:37 +00:00
|
|
|
qw422016.E().S(hyphaName)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:70
|
|
|
|
qw422016.N().S(`" class="btn btn_weak">
|
|
|
|
`)
|
|
|
|
//line views/modal.qtpl:71
|
2021-09-06 17:46:34 +00:00
|
|
|
qw422016.E().S(lc.Get("ui.cancel"))
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:71
|
|
|
|
qw422016.N().S(`
|
|
|
|
</a>
|
2021-02-22 18:11:37 +00:00
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
</main>
|
|
|
|
`)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:76
|
2021-02-22 18:11:37 +00:00
|
|
|
}
|
|
|
|
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:76
|
|
|
|
func WriteRenameAsk(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) {
|
|
|
|
//line views/modal.qtpl:76
|
2021-02-22 18:11:37 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:76
|
|
|
|
StreamRenameAsk(qw422016, rq, hyphaName)
|
|
|
|
//line views/modal.qtpl:76
|
2021-02-22 18:11:37 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:76
|
2021-02-22 18:11:37 +00:00
|
|
|
}
|
|
|
|
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:76
|
|
|
|
func RenameAsk(rq *http.Request, hyphaName string) string {
|
|
|
|
//line views/modal.qtpl:76
|
2021-02-22 18:11:37 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:76
|
|
|
|
WriteRenameAsk(qb422016, rq, hyphaName)
|
|
|
|
//line views/modal.qtpl:76
|
2021-02-22 18:11:37 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:76
|
2021-02-22 18:11:37 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:76
|
2021-02-22 18:11:37 +00:00
|
|
|
return qs422016
|
2022-06-16 10:40:37 +00:00
|
|
|
//line views/modal.qtpl:76
|
2021-02-22 18:11:37 +00:00
|
|
|
}
|