2020-10-18 20:26:05 +00:00
|
|
|
// Code generated by qtc from "delete.qtpl". DO NOT EDIT.
|
2020-09-29 15:04:22 +00:00
|
|
|
// See https://github.com/valyala/quicktemplate for details.
|
|
|
|
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:1
|
2020-09-29 15:04:22 +00:00
|
|
|
package templates
|
|
|
|
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:1
|
|
|
|
import "net/http"
|
|
|
|
|
|
|
|
// This dialog is to be shown to a user when they try to delete a hypha.
|
|
|
|
|
|
|
|
//line templates/delete.qtpl:4
|
2020-09-29 15:04:22 +00:00
|
|
|
import (
|
|
|
|
qtio422016 "io"
|
|
|
|
|
|
|
|
qt422016 "github.com/valyala/quicktemplate"
|
|
|
|
)
|
|
|
|
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:4
|
2020-09-29 15:04:22 +00:00
|
|
|
var (
|
|
|
|
_ = qtio422016.Copy
|
|
|
|
_ = qt422016.AcquireByteBuffer
|
|
|
|
)
|
|
|
|
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:4
|
|
|
|
func StreamDeleteAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
|
|
|
|
//line templates/delete.qtpl:4
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
`)
|
2021-01-20 13:53:30 +00:00
|
|
|
//line templates/delete.qtpl:5
|
2020-11-16 15:26:03 +00:00
|
|
|
streamnavHTML(qw422016, rq, hyphaName, "delete-ask")
|
2021-01-20 13:53:30 +00:00
|
|
|
//line templates/delete.qtpl:5
|
2020-10-02 15:31:59 +00:00
|
|
|
qw422016.N().S(`
|
2021-01-20 13:53:30 +00:00
|
|
|
<main>
|
2020-10-02 15:31:59 +00:00
|
|
|
`)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:7
|
2020-09-29 15:04:22 +00:00
|
|
|
if isOld {
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:7
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<section>
|
|
|
|
<h1>Delete `)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:9
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016.E().S(hyphaName)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:9
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016.N().S(`?</h1>
|
|
|
|
<p>Do you really want to delete hypha <em>`)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:10
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016.E().S(hyphaName)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:10
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016.N().S(`</em>?</p>
|
|
|
|
<p>In this version of MycorrhizaWiki you cannot undelete a deleted hypha but the history can still be accessed.</p>
|
|
|
|
<p><a href="/delete-confirm/`)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:12
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016.E().S(hyphaName)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:12
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016.N().S(`"><strong>Confirm</strong></a></p>
|
|
|
|
<p><a href="/page/`)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:13
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016.E().S(hyphaName)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:13
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016.N().S(`">Cancel</a></p>
|
|
|
|
</section>
|
|
|
|
`)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:15
|
2020-09-29 15:04:22 +00:00
|
|
|
} else {
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:15
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
`)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:16
|
2020-09-29 15:04:22 +00:00
|
|
|
streamcannotDeleteDueToNonExistence(qw422016, hyphaName)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:16
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
`)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:17
|
2020-09-29 15:04:22 +00:00
|
|
|
}
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:17
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
</main>
|
|
|
|
`)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:19
|
2020-09-29 15:04:22 +00:00
|
|
|
}
|
|
|
|
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:19
|
|
|
|
func WriteDeleteAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
|
|
|
|
//line templates/delete.qtpl:19
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:19
|
|
|
|
StreamDeleteAskHTML(qw422016, rq, hyphaName, isOld)
|
|
|
|
//line templates/delete.qtpl:19
|
2020-09-29 15:04:22 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:19
|
2020-09-29 15:04:22 +00:00
|
|
|
}
|
|
|
|
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:19
|
|
|
|
func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
|
|
|
|
//line templates/delete.qtpl:19
|
2020-09-29 15:04:22 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:19
|
|
|
|
WriteDeleteAskHTML(qb422016, rq, hyphaName, isOld)
|
|
|
|
//line templates/delete.qtpl:19
|
2020-09-29 15:04:22 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:19
|
2020-09-29 15:04:22 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:19
|
2020-09-29 15:04:22 +00:00
|
|
|
return qs422016
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:19
|
2020-09-29 15:04:22 +00:00
|
|
|
}
|
|
|
|
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:21
|
2020-09-29 15:04:22 +00:00
|
|
|
func streamcannotDeleteDueToNonExistence(qw422016 *qt422016.Writer, hyphaName string) {
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:21
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<section>
|
|
|
|
<h1>Cannot delete `)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:23
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016.E().S(hyphaName)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:23
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016.N().S(`</h1>
|
|
|
|
<p>This hypha does not exist.</p>
|
|
|
|
<p><a href="/page/`)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:25
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016.E().S(hyphaName)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:25
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016.N().S(`">Go back</a></p>
|
|
|
|
</section>
|
|
|
|
`)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:27
|
2020-09-29 15:04:22 +00:00
|
|
|
}
|
|
|
|
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:27
|
2020-09-29 15:04:22 +00:00
|
|
|
func writecannotDeleteDueToNonExistence(qq422016 qtio422016.Writer, hyphaName string) {
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:27
|
2020-09-29 15:04:22 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:27
|
2020-09-29 15:04:22 +00:00
|
|
|
streamcannotDeleteDueToNonExistence(qw422016, hyphaName)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:27
|
2020-09-29 15:04:22 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:27
|
2020-09-29 15:04:22 +00:00
|
|
|
}
|
|
|
|
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:27
|
2020-09-29 15:04:22 +00:00
|
|
|
func cannotDeleteDueToNonExistence(hyphaName string) string {
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:27
|
2020-09-29 15:04:22 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:27
|
2020-09-29 15:04:22 +00:00
|
|
|
writecannotDeleteDueToNonExistence(qb422016, hyphaName)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:27
|
2020-09-29 15:04:22 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:27
|
2020-09-29 15:04:22 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:27
|
2020-09-29 15:04:22 +00:00
|
|
|
return qs422016
|
2020-11-16 15:26:03 +00:00
|
|
|
//line templates/delete.qtpl:27
|
2020-09-29 15:04:22 +00:00
|
|
|
}
|