mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2024-12-12 05:20:26 +00:00
Remove those ridiculous helper functions
This commit is contained in:
parent
2b6ee9c597
commit
66c3c1570d
@ -6,44 +6,61 @@
|
|||||||
{% code
|
{% code
|
||||||
lc := l18n.FromRequest(rq)
|
lc := l18n.FromRequest(rq)
|
||||||
%}
|
%}
|
||||||
{%= modalBegin(
|
<main class="main-width">
|
||||||
"delete",
|
<form class="modal" action="/delete/{%s hyphaName %}" method="post">
|
||||||
hyphaName,
|
<fieldset class="modal__fieldset">
|
||||||
` method="post"`,
|
<legend class="modal__title">
|
||||||
fmt.Sprintf(lc.Get("ui.ask_delete"), beautifulLink(hyphaName))) %}
|
{%s= fmt.Sprintf(lc.Get("ui.ask_delete"), beautifulLink(hyphaName)) %}
|
||||||
<p class="modal__confirmation-msg">
|
</legend>
|
||||||
{%s= lc.Get("ui.ask_really", &l18n.Replacements{"verb": lc.Get("ui.ask_delete_verb"), "name": fmt.Sprintf("<em>%s</em>", hyphaName)}) %}
|
<p class="modal__confirmation-msg">
|
||||||
</p>
|
{%s= lc.Get("ui.ask_really", &l18n.Replacements{"verb": lc.Get("ui.ask_delete_verb"), "name": fmt.Sprintf("<em>%s</em>", hyphaName)}) %}
|
||||||
<p>{%s lc.Get("ui.ask_delete_tip") %}</p>
|
</p>
|
||||||
{%= modalEnd(hyphaName, true, lc) %}
|
<p>{%s lc.Get("ui.ask_delete_tip") %}</p>
|
||||||
|
<button type="submit" value="Confirm" class="btn" autofocus>
|
||||||
|
{%s lc.Get("ui.confirm") %}
|
||||||
|
</button>
|
||||||
|
<a href="/hypha/{%s hyphaName %}" class="btn btn_weak">
|
||||||
|
{%s lc.Get("ui.cancel") %}
|
||||||
|
</a>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</main>
|
||||||
{% endfunc %}
|
{% endfunc %}
|
||||||
|
|
||||||
{% func RemoveMediaAsk(rq *http.Request, hyphaName string) %}
|
{% func RemoveMediaAsk(rq *http.Request, hyphaName string) %}
|
||||||
{% code
|
{% code
|
||||||
lc := l18n.FromRequest(rq)
|
lc := l18n.FromRequest(rq)
|
||||||
%}
|
%}
|
||||||
{%= modalBegin(
|
<main class="main-width">
|
||||||
"remove-media",
|
<form class="modal" action="/remove-media/{%s hyphaName %}" method="post">
|
||||||
hyphaName,
|
<fieldset class="modal__fieldset">
|
||||||
` method="post"`,
|
<legend class="modal__title">
|
||||||
fmt.Sprintf(lc.Get("ui.ask_remove_media"), beautifulLink(hyphaName))) %}
|
{%s= fmt.Sprintf(lc.Get("ui.ask_remove_media"), beautifulLink(hyphaName)) %}
|
||||||
<p class="modal__confirmation-msg">
|
</legend>
|
||||||
{%s= lc.Get("ui.ask_really", &l18n.Replacements{"verb": lc.Get("ui.ask_remove_media_verb"), "name": fmt.Sprintf("<em>%s</em>", hyphaName)}) %}
|
<p class="modal__confirmation-msg">
|
||||||
</p>
|
{%s= lc.Get("ui.ask_really", &l18n.Replacements{"verb": lc.Get("ui.ask_remove_media_verb"), "name": fmt.Sprintf("<em>%s</em>", hyphaName)}) %}
|
||||||
{%= modalEnd(hyphaName, true, lc) %}
|
</p>
|
||||||
|
<button type="submit" value="Confirm" class="btn" autofocus>
|
||||||
|
{%s lc.Get("ui.confirm") %}
|
||||||
|
</button>
|
||||||
|
<a href="/hypha/{%s hyphaName %}" class="btn btn_weak">
|
||||||
|
{%s lc.Get("ui.cancel") %}
|
||||||
|
</a>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</main>
|
||||||
{% endfunc %}
|
{% endfunc %}
|
||||||
|
|
||||||
bloody hell !!
|
|
||||||
|
|
||||||
{% func RenameAsk(rq *http.Request, hyphaName string) %}
|
{% func RenameAsk(rq *http.Request, hyphaName string) %}
|
||||||
{% code
|
{% code
|
||||||
lc := l18n.FromRequest(rq)
|
lc := l18n.FromRequest(rq)
|
||||||
%}
|
%}
|
||||||
{%= modalBegin(
|
<main class="main-width">
|
||||||
"rename",
|
<form class="modal" action="/rename/{%s hyphaName %}" method="post" enctype="multipart/form-data">
|
||||||
hyphaName,
|
<fieldset class="modal__fieldset">
|
||||||
` method="post" enctype="multipart/form-data"`,
|
<legend class="modal__title">
|
||||||
fmt.Sprintf(lc.Get("ui.ask_rename"), beautifulLink(hyphaName))) %}
|
{%s= fmt.Sprintf(lc.Get("ui.ask_rename"), beautifulLink(hyphaName)) %}
|
||||||
|
</legend>
|
||||||
<label for="new-name">{%s lc.Get("ui.rename_to") %}</label>
|
<label for="new-name">{%s lc.Get("ui.rename_to") %}</label>
|
||||||
<input type="text" value="{%s hyphaName %}" required autofocus id="new-name" name="new-name"/>
|
<input type="text" value="{%s hyphaName %}" required autofocus id="new-name" name="new-name"/>
|
||||||
|
|
||||||
@ -51,19 +68,12 @@ bloody hell !!
|
|||||||
<label for="recursive">{%s lc.Get("ui.rename_recurse") %}</label>
|
<label for="recursive">{%s lc.Get("ui.rename_recurse") %}</label>
|
||||||
|
|
||||||
<p>{%s lc.Get("ui.rename_tip") %}</p>
|
<p>{%s lc.Get("ui.rename_tip") %}</p>
|
||||||
{%= modalEnd(hyphaName, false, lc) %}
|
<button type="submit" value="Confirm" class="btn">
|
||||||
{% endfunc %}
|
{%s lc.Get("ui.confirm") %}
|
||||||
|
</button>
|
||||||
{% func modalBegin(path, hyphaName, formAttrs, legend string) %}
|
<a href="/hypha/{%s hyphaName %}" class="btn btn_weak">
|
||||||
<main class="main-width">
|
{%s lc.Get("ui.cancel") %}
|
||||||
<form class="modal" action="/{%s path %}/{%s hyphaName %}"{%s= formAttrs %}>
|
</a>
|
||||||
<fieldset class="modal__fieldset">
|
|
||||||
<legend class="modal__title">{%s= legend %}</legend>
|
|
||||||
{% endfunc %}
|
|
||||||
|
|
||||||
{% func modalEnd(hyphaName string, shouldFocusOnConfirm bool, lc *l18n.Localizer) %}
|
|
||||||
<button type="submit" value="Confirm" class="btn" {% if shouldFocusOnConfirm %}autofocus{% endif %}>{%s lc.Get("ui.confirm") %}</button>
|
|
||||||
<a href="/hypha/{%s hyphaName %}" class="btn btn_weak">{%s lc.Get("ui.cancel") %}</a>
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
</main>
|
</main>
|
||||||
|
@ -36,312 +36,255 @@ func StreamDeleteAsk(qw422016 *qt422016.Writer, rq *http.Request, hyphaName stri
|
|||||||
|
|
||||||
//line views/modal.qtpl:8
|
//line views/modal.qtpl:8
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
<main class="main-width">
|
||||||
//line views/modal.qtpl:9
|
<form class="modal" action="/delete/`)
|
||||||
streammodalBegin(qw422016,
|
//line views/modal.qtpl:10
|
||||||
"delete",
|
qw422016.E().S(hyphaName)
|
||||||
hyphaName,
|
//line views/modal.qtpl:10
|
||||||
` method="post"`,
|
qw422016.N().S(`" method="post">
|
||||||
fmt.Sprintf(lc.Get("ui.ask_delete"), beautifulLink(hyphaName)))
|
<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)))
|
||||||
//line views/modal.qtpl:13
|
//line views/modal.qtpl:13
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<p class="modal__confirmation-msg">
|
</legend>
|
||||||
`)
|
<p class="modal__confirmation-msg">
|
||||||
//line views/modal.qtpl:15
|
`)
|
||||||
|
//line views/modal.qtpl:16
|
||||||
qw422016.N().S(lc.Get("ui.ask_really", &l18n.Replacements{"verb": lc.Get("ui.ask_delete_verb"), "name": fmt.Sprintf("<em>%s</em>", hyphaName)}))
|
qw422016.N().S(lc.Get("ui.ask_really", &l18n.Replacements{"verb": lc.Get("ui.ask_delete_verb"), "name": fmt.Sprintf("<em>%s</em>", hyphaName)}))
|
||||||
//line views/modal.qtpl:15
|
//line views/modal.qtpl:16
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</p>
|
</p>
|
||||||
<p>`)
|
|
||||||
//line views/modal.qtpl:17
|
|
||||||
qw422016.E().S(lc.Get("ui.ask_delete_tip"))
|
|
||||||
//line views/modal.qtpl:17
|
|
||||||
qw422016.N().S(`</p>
|
|
||||||
`)
|
|
||||||
//line views/modal.qtpl:18
|
|
||||||
streammodalEnd(qw422016, hyphaName, true, lc)
|
|
||||||
//line views/modal.qtpl:18
|
|
||||||
qw422016.N().S(`
|
|
||||||
`)
|
|
||||||
//line views/modal.qtpl:19
|
|
||||||
}
|
|
||||||
|
|
||||||
//line views/modal.qtpl:19
|
|
||||||
func WriteDeleteAsk(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) {
|
|
||||||
//line views/modal.qtpl:19
|
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
||||||
//line views/modal.qtpl:19
|
|
||||||
StreamDeleteAsk(qw422016, rq, hyphaName)
|
|
||||||
//line views/modal.qtpl:19
|
|
||||||
qt422016.ReleaseWriter(qw422016)
|
|
||||||
//line views/modal.qtpl:19
|
|
||||||
}
|
|
||||||
|
|
||||||
//line views/modal.qtpl:19
|
|
||||||
func DeleteAsk(rq *http.Request, hyphaName string) string {
|
|
||||||
//line views/modal.qtpl:19
|
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
|
||||||
//line views/modal.qtpl:19
|
|
||||||
WriteDeleteAsk(qb422016, rq, hyphaName)
|
|
||||||
//line views/modal.qtpl:19
|
|
||||||
qs422016 := string(qb422016.B)
|
|
||||||
//line views/modal.qtpl:19
|
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
|
||||||
//line views/modal.qtpl:19
|
|
||||||
return qs422016
|
|
||||||
//line views/modal.qtpl:19
|
|
||||||
}
|
|
||||||
|
|
||||||
//line views/modal.qtpl:21
|
|
||||||
func StreamRemoveMediaAsk(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string) {
|
|
||||||
//line views/modal.qtpl:21
|
|
||||||
qw422016.N().S(`
|
|
||||||
`)
|
|
||||||
//line views/modal.qtpl:23
|
|
||||||
lc := l18n.FromRequest(rq)
|
|
||||||
|
|
||||||
//line views/modal.qtpl:24
|
|
||||||
qw422016.N().S(`
|
|
||||||
`)
|
|
||||||
//line views/modal.qtpl:25
|
|
||||||
streammodalBegin(qw422016,
|
|
||||||
"remove-media",
|
|
||||||
hyphaName,
|
|
||||||
` method="post"`,
|
|
||||||
fmt.Sprintf(lc.Get("ui.ask_remove_media"), beautifulLink(hyphaName)))
|
|
||||||
//line views/modal.qtpl:29
|
|
||||||
qw422016.N().S(`
|
|
||||||
<p class="modal__confirmation-msg">
|
|
||||||
`)
|
|
||||||
//line views/modal.qtpl:31
|
|
||||||
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)}))
|
|
||||||
//line views/modal.qtpl:31
|
|
||||||
qw422016.N().S(`
|
|
||||||
</p>
|
|
||||||
`)
|
|
||||||
//line views/modal.qtpl:33
|
|
||||||
streammodalEnd(qw422016, hyphaName, true, lc)
|
|
||||||
//line views/modal.qtpl:33
|
|
||||||
qw422016.N().S(`
|
|
||||||
`)
|
|
||||||
//line views/modal.qtpl:34
|
|
||||||
}
|
|
||||||
|
|
||||||
//line views/modal.qtpl:34
|
|
||||||
func WriteRemoveMediaAsk(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) {
|
|
||||||
//line views/modal.qtpl:34
|
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
||||||
//line views/modal.qtpl:34
|
|
||||||
StreamRemoveMediaAsk(qw422016, rq, hyphaName)
|
|
||||||
//line views/modal.qtpl:34
|
|
||||||
qt422016.ReleaseWriter(qw422016)
|
|
||||||
//line views/modal.qtpl:34
|
|
||||||
}
|
|
||||||
|
|
||||||
//line views/modal.qtpl:34
|
|
||||||
func RemoveMediaAsk(rq *http.Request, hyphaName string) string {
|
|
||||||
//line views/modal.qtpl:34
|
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
|
||||||
//line views/modal.qtpl:34
|
|
||||||
WriteRemoveMediaAsk(qb422016, rq, hyphaName)
|
|
||||||
//line views/modal.qtpl:34
|
|
||||||
qs422016 := string(qb422016.B)
|
|
||||||
//line views/modal.qtpl:34
|
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
|
||||||
//line views/modal.qtpl:34
|
|
||||||
return qs422016
|
|
||||||
//line views/modal.qtpl:34
|
|
||||||
}
|
|
||||||
|
|
||||||
// bloody hell !!
|
|
||||||
//
|
|
||||||
|
|
||||||
//line views/modal.qtpl:38
|
|
||||||
func StreamRenameAsk(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string) {
|
|
||||||
//line views/modal.qtpl:38
|
|
||||||
qw422016.N().S(`
|
|
||||||
`)
|
|
||||||
//line views/modal.qtpl:40
|
|
||||||
lc := l18n.FromRequest(rq)
|
|
||||||
|
|
||||||
//line views/modal.qtpl:41
|
|
||||||
qw422016.N().S(`
|
|
||||||
`)
|
|
||||||
//line views/modal.qtpl:42
|
|
||||||
streammodalBegin(qw422016,
|
|
||||||
"rename",
|
|
||||||
hyphaName,
|
|
||||||
` method="post" enctype="multipart/form-data"`,
|
|
||||||
fmt.Sprintf(lc.Get("ui.ask_rename"), beautifulLink(hyphaName)))
|
|
||||||
//line views/modal.qtpl:46
|
|
||||||
qw422016.N().S(`
|
|
||||||
<label for="new-name">`)
|
|
||||||
//line views/modal.qtpl:47
|
|
||||||
qw422016.E().S(lc.Get("ui.rename_to"))
|
|
||||||
//line views/modal.qtpl:47
|
|
||||||
qw422016.N().S(`</label>
|
|
||||||
<input type="text" value="`)
|
|
||||||
//line views/modal.qtpl:48
|
|
||||||
qw422016.E().S(hyphaName)
|
|
||||||
//line views/modal.qtpl:48
|
|
||||||
qw422016.N().S(`" required autofocus id="new-name" name="new-name"/>
|
|
||||||
|
|
||||||
<input type="checkbox" id="recursive" name="recursive" value="true" checked/>
|
|
||||||
<label for="recursive">`)
|
|
||||||
//line views/modal.qtpl:51
|
|
||||||
qw422016.E().S(lc.Get("ui.rename_recurse"))
|
|
||||||
//line views/modal.qtpl:51
|
|
||||||
qw422016.N().S(`</label>
|
|
||||||
|
|
||||||
<p>`)
|
<p>`)
|
||||||
//line views/modal.qtpl:53
|
//line views/modal.qtpl:18
|
||||||
qw422016.E().S(lc.Get("ui.rename_tip"))
|
qw422016.E().S(lc.Get("ui.ask_delete_tip"))
|
||||||
//line views/modal.qtpl:53
|
//line views/modal.qtpl:18
|
||||||
qw422016.N().S(`</p>
|
qw422016.N().S(`</p>
|
||||||
`)
|
<button type="submit" value="Confirm" class="btn" autofocus>
|
||||||
//line views/modal.qtpl:54
|
`)
|
||||||
streammodalEnd(qw422016, hyphaName, false, lc)
|
//line views/modal.qtpl:20
|
||||||
//line views/modal.qtpl:54
|
|
||||||
qw422016.N().S(`
|
|
||||||
`)
|
|
||||||
//line views/modal.qtpl:55
|
|
||||||
}
|
|
||||||
|
|
||||||
//line views/modal.qtpl:55
|
|
||||||
func WriteRenameAsk(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) {
|
|
||||||
//line views/modal.qtpl:55
|
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
||||||
//line views/modal.qtpl:55
|
|
||||||
StreamRenameAsk(qw422016, rq, hyphaName)
|
|
||||||
//line views/modal.qtpl:55
|
|
||||||
qt422016.ReleaseWriter(qw422016)
|
|
||||||
//line views/modal.qtpl:55
|
|
||||||
}
|
|
||||||
|
|
||||||
//line views/modal.qtpl:55
|
|
||||||
func RenameAsk(rq *http.Request, hyphaName string) string {
|
|
||||||
//line views/modal.qtpl:55
|
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
|
||||||
//line views/modal.qtpl:55
|
|
||||||
WriteRenameAsk(qb422016, rq, hyphaName)
|
|
||||||
//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(`
|
|
||||||
<main class="main-width">
|
|
||||||
<form class="modal" action="/`)
|
|
||||||
//line views/modal.qtpl:59
|
|
||||||
qw422016.E().S(path)
|
|
||||||
//line views/modal.qtpl:59
|
|
||||||
qw422016.N().S(`/`)
|
|
||||||
//line views/modal.qtpl:59
|
|
||||||
qw422016.E().S(hyphaName)
|
|
||||||
//line views/modal.qtpl:59
|
|
||||||
qw422016.N().S(`"`)
|
|
||||||
//line views/modal.qtpl:59
|
|
||||||
qw422016.N().S(formAttrs)
|
|
||||||
//line views/modal.qtpl:59
|
|
||||||
qw422016.N().S(`>
|
|
||||||
<fieldset class="modal__fieldset">
|
|
||||||
<legend class="modal__title">`)
|
|
||||||
//line views/modal.qtpl:61
|
|
||||||
qw422016.N().S(legend)
|
|
||||||
//line views/modal.qtpl:61
|
|
||||||
qw422016.N().S(`</legend>
|
|
||||||
`)
|
|
||||||
//line views/modal.qtpl:62
|
|
||||||
}
|
|
||||||
|
|
||||||
//line views/modal.qtpl:62
|
|
||||||
func writemodalBegin(qq422016 qtio422016.Writer, path, hyphaName, formAttrs, legend string) {
|
|
||||||
//line views/modal.qtpl:62
|
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
||||||
//line views/modal.qtpl:62
|
|
||||||
streammodalBegin(qw422016, path, hyphaName, formAttrs, legend)
|
|
||||||
//line views/modal.qtpl:62
|
|
||||||
qt422016.ReleaseWriter(qw422016)
|
|
||||||
//line views/modal.qtpl:62
|
|
||||||
}
|
|
||||||
|
|
||||||
//line views/modal.qtpl:62
|
|
||||||
func modalBegin(path, hyphaName, formAttrs, legend string) string {
|
|
||||||
//line views/modal.qtpl:62
|
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
|
||||||
//line views/modal.qtpl:62
|
|
||||||
writemodalBegin(qb422016, path, hyphaName, formAttrs, legend)
|
|
||||||
//line views/modal.qtpl:62
|
|
||||||
qs422016 := string(qb422016.B)
|
|
||||||
//line views/modal.qtpl:62
|
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
|
||||||
//line views/modal.qtpl:62
|
|
||||||
return qs422016
|
|
||||||
//line views/modal.qtpl:62
|
|
||||||
}
|
|
||||||
|
|
||||||
//line views/modal.qtpl:64
|
|
||||||
func streammodalEnd(qw422016 *qt422016.Writer, hyphaName string, shouldFocusOnConfirm bool, lc *l18n.Localizer) {
|
|
||||||
//line views/modal.qtpl:64
|
|
||||||
qw422016.N().S(`
|
|
||||||
<button type="submit" value="Confirm" class="btn" `)
|
|
||||||
//line views/modal.qtpl:65
|
|
||||||
if shouldFocusOnConfirm {
|
|
||||||
//line views/modal.qtpl:65
|
|
||||||
qw422016.N().S(`autofocus`)
|
|
||||||
//line views/modal.qtpl:65
|
|
||||||
}
|
|
||||||
//line views/modal.qtpl:65
|
|
||||||
qw422016.N().S(`>`)
|
|
||||||
//line views/modal.qtpl:65
|
|
||||||
qw422016.E().S(lc.Get("ui.confirm"))
|
qw422016.E().S(lc.Get("ui.confirm"))
|
||||||
//line views/modal.qtpl:65
|
//line views/modal.qtpl:20
|
||||||
qw422016.N().S(`</button>
|
qw422016.N().S(`
|
||||||
|
</button>
|
||||||
<a href="/hypha/`)
|
<a href="/hypha/`)
|
||||||
//line views/modal.qtpl:66
|
//line views/modal.qtpl:22
|
||||||
qw422016.E().S(hyphaName)
|
qw422016.E().S(hyphaName)
|
||||||
//line views/modal.qtpl:66
|
//line views/modal.qtpl:22
|
||||||
qw422016.N().S(`" class="btn btn_weak">`)
|
qw422016.N().S(`" class="btn btn_weak">
|
||||||
//line views/modal.qtpl:66
|
`)
|
||||||
|
//line views/modal.qtpl:23
|
||||||
qw422016.E().S(lc.Get("ui.cancel"))
|
qw422016.E().S(lc.Get("ui.cancel"))
|
||||||
//line views/modal.qtpl:66
|
//line views/modal.qtpl:23
|
||||||
qw422016.N().S(`</a>
|
qw422016.N().S(`
|
||||||
|
</a>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
</main>
|
</main>
|
||||||
`)
|
`)
|
||||||
//line views/modal.qtpl:70
|
//line views/modal.qtpl:28
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/modal.qtpl:70
|
//line views/modal.qtpl:28
|
||||||
func writemodalEnd(qq422016 qtio422016.Writer, hyphaName string, shouldFocusOnConfirm bool, lc *l18n.Localizer) {
|
func WriteDeleteAsk(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) {
|
||||||
//line views/modal.qtpl:70
|
//line views/modal.qtpl:28
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/modal.qtpl:70
|
//line views/modal.qtpl:28
|
||||||
streammodalEnd(qw422016, hyphaName, shouldFocusOnConfirm, lc)
|
StreamDeleteAsk(qw422016, rq, hyphaName)
|
||||||
//line views/modal.qtpl:70
|
//line views/modal.qtpl:28
|
||||||
qt422016.ReleaseWriter(qw422016)
|
qt422016.ReleaseWriter(qw422016)
|
||||||
//line views/modal.qtpl:70
|
//line views/modal.qtpl:28
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/modal.qtpl:70
|
//line views/modal.qtpl:28
|
||||||
func modalEnd(hyphaName string, shouldFocusOnConfirm bool, lc *l18n.Localizer) string {
|
func DeleteAsk(rq *http.Request, hyphaName string) string {
|
||||||
//line views/modal.qtpl:70
|
//line views/modal.qtpl:28
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/modal.qtpl:70
|
//line views/modal.qtpl:28
|
||||||
writemodalEnd(qb422016, hyphaName, shouldFocusOnConfirm, lc)
|
WriteDeleteAsk(qb422016, rq, hyphaName)
|
||||||
//line views/modal.qtpl:70
|
//line views/modal.qtpl:28
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/modal.qtpl:70
|
//line views/modal.qtpl:28
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/modal.qtpl:70
|
//line views/modal.qtpl:28
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/modal.qtpl:70
|
//line views/modal.qtpl:28
|
||||||
|
}
|
||||||
|
|
||||||
|
//line views/modal.qtpl:30
|
||||||
|
func StreamRemoveMediaAsk(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string) {
|
||||||
|
//line views/modal.qtpl:30
|
||||||
|
qw422016.N().S(`
|
||||||
|
`)
|
||||||
|
//line views/modal.qtpl:32
|
||||||
|
lc := l18n.FromRequest(rq)
|
||||||
|
|
||||||
|
//line views/modal.qtpl:33
|
||||||
|
qw422016.N().S(`
|
||||||
|
<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
|
||||||
|
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)}))
|
||||||
|
//line views/modal.qtpl:39
|
||||||
|
qw422016.N().S(`
|
||||||
|
</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
|
||||||
|
qw422016.N().S(`
|
||||||
|
</a>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</main>
|
||||||
|
`)
|
||||||
|
//line views/modal.qtpl:50
|
||||||
|
}
|
||||||
|
|
||||||
|
//line views/modal.qtpl:50
|
||||||
|
func WriteRemoveMediaAsk(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) {
|
||||||
|
//line views/modal.qtpl:50
|
||||||
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
|
//line views/modal.qtpl:50
|
||||||
|
StreamRemoveMediaAsk(qw422016, rq, hyphaName)
|
||||||
|
//line views/modal.qtpl:50
|
||||||
|
qt422016.ReleaseWriter(qw422016)
|
||||||
|
//line views/modal.qtpl:50
|
||||||
|
}
|
||||||
|
|
||||||
|
//line views/modal.qtpl:50
|
||||||
|
func RemoveMediaAsk(rq *http.Request, hyphaName string) string {
|
||||||
|
//line views/modal.qtpl:50
|
||||||
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
|
//line views/modal.qtpl:50
|
||||||
|
WriteRemoveMediaAsk(qb422016, rq, hyphaName)
|
||||||
|
//line views/modal.qtpl:50
|
||||||
|
qs422016 := string(qb422016.B)
|
||||||
|
//line views/modal.qtpl:50
|
||||||
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
|
//line views/modal.qtpl:50
|
||||||
|
return qs422016
|
||||||
|
//line views/modal.qtpl:50
|
||||||
|
}
|
||||||
|
|
||||||
|
//line views/modal.qtpl:52
|
||||||
|
func StreamRenameAsk(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string) {
|
||||||
|
//line views/modal.qtpl:52
|
||||||
|
qw422016.N().S(`
|
||||||
|
`)
|
||||||
|
//line views/modal.qtpl:54
|
||||||
|
lc := l18n.FromRequest(rq)
|
||||||
|
|
||||||
|
//line views/modal.qtpl:55
|
||||||
|
qw422016.N().S(`
|
||||||
|
<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>
|
||||||
|
<label for="new-name">`)
|
||||||
|
//line views/modal.qtpl:60
|
||||||
|
qw422016.E().S(lc.Get("ui.rename_to"))
|
||||||
|
//line views/modal.qtpl:60
|
||||||
|
qw422016.N().S(`</label>
|
||||||
|
<input type="text" value="`)
|
||||||
|
//line views/modal.qtpl:61
|
||||||
|
qw422016.E().S(hyphaName)
|
||||||
|
//line views/modal.qtpl:61
|
||||||
|
qw422016.N().S(`" required autofocus id="new-name" name="new-name"/>
|
||||||
|
|
||||||
|
<input type="checkbox" id="recursive" name="recursive" value="true" checked/>
|
||||||
|
<label for="recursive">`)
|
||||||
|
//line views/modal.qtpl:64
|
||||||
|
qw422016.E().S(lc.Get("ui.rename_recurse"))
|
||||||
|
//line views/modal.qtpl:64
|
||||||
|
qw422016.N().S(`</label>
|
||||||
|
|
||||||
|
<p>`)
|
||||||
|
//line views/modal.qtpl:66
|
||||||
|
qw422016.E().S(lc.Get("ui.rename_tip"))
|
||||||
|
//line views/modal.qtpl:66
|
||||||
|
qw422016.N().S(`</p>
|
||||||
|
<button type="submit" value="Confirm" class="btn">
|
||||||
|
`)
|
||||||
|
//line views/modal.qtpl:68
|
||||||
|
qw422016.E().S(lc.Get("ui.confirm"))
|
||||||
|
//line views/modal.qtpl:68
|
||||||
|
qw422016.N().S(`
|
||||||
|
</button>
|
||||||
|
<a href="/hypha/`)
|
||||||
|
//line views/modal.qtpl:70
|
||||||
|
qw422016.E().S(hyphaName)
|
||||||
|
//line views/modal.qtpl:70
|
||||||
|
qw422016.N().S(`" class="btn btn_weak">
|
||||||
|
`)
|
||||||
|
//line views/modal.qtpl:71
|
||||||
|
qw422016.E().S(lc.Get("ui.cancel"))
|
||||||
|
//line views/modal.qtpl:71
|
||||||
|
qw422016.N().S(`
|
||||||
|
</a>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</main>
|
||||||
|
`)
|
||||||
|
//line views/modal.qtpl:76
|
||||||
|
}
|
||||||
|
|
||||||
|
//line views/modal.qtpl:76
|
||||||
|
func WriteRenameAsk(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string) {
|
||||||
|
//line views/modal.qtpl:76
|
||||||
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
|
//line views/modal.qtpl:76
|
||||||
|
StreamRenameAsk(qw422016, rq, hyphaName)
|
||||||
|
//line views/modal.qtpl:76
|
||||||
|
qt422016.ReleaseWriter(qw422016)
|
||||||
|
//line views/modal.qtpl:76
|
||||||
|
}
|
||||||
|
|
||||||
|
//line views/modal.qtpl:76
|
||||||
|
func RenameAsk(rq *http.Request, hyphaName string) string {
|
||||||
|
//line views/modal.qtpl:76
|
||||||
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
|
//line views/modal.qtpl:76
|
||||||
|
WriteRenameAsk(qb422016, rq, hyphaName)
|
||||||
|
//line views/modal.qtpl:76
|
||||||
|
qs422016 := string(qb422016.B)
|
||||||
|
//line views/modal.qtpl:76
|
||||||
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
|
//line views/modal.qtpl:76
|
||||||
|
return qs422016
|
||||||
|
//line views/modal.qtpl:76
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user