1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-10-30 11:46:16 +00:00
mycorrhiza/templates/rename.qtpl.go
2020-10-02 20:31:59 +05:00

147 lines
4.2 KiB
Go

// Code generated by qtc from "rename.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.
// This dialog is to be shown to a user when they try to rename a hypha.
//line templates/rename.qtpl:2
package templates
//line templates/rename.qtpl:2
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
//line templates/rename.qtpl:2
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line templates/rename.qtpl:2
func StreamRenameAskHTML(qw422016 *qt422016.Writer, hyphaName string, isOld bool) {
//line templates/rename.qtpl:2
qw422016.N().S(`
<main>
`)
//line templates/rename.qtpl:4
streamnavHTML(qw422016, hyphaName, "rename-ask")
//line templates/rename.qtpl:4
qw422016.N().S(`
`)
//line templates/rename.qtpl:5
if isOld {
//line templates/rename.qtpl:5
qw422016.N().S(` <section>
<h1>Rename `)
//line templates/rename.qtpl:7
qw422016.E().S(hyphaName)
//line templates/rename.qtpl:7
qw422016.N().S(`</h1>
<form action="/rename-confirm/`)
//line templates/rename.qtpl:8
qw422016.E().S(hyphaName)
//line templates/rename.qtpl:8
qw422016.N().S(`" method="post" enctype="multipart/form-data">
<label for="new-name">New name:</label>
<input type="text" value="`)
//line templates/rename.qtpl:10
qw422016.E().S(hyphaName)
//line templates/rename.qtpl:10
qw422016.N().S(`" required autofocus id="new-name" name="new-name"/>
<input type="submit"/>
</form>
<p>If you rename this hypha, all incoming links and all relative outcoming links will break. You will also lose all history for the new name. Rename carefully.</p>
</section>
`)
//line templates/rename.qtpl:15
} else {
//line templates/rename.qtpl:15
qw422016.N().S(` `)
//line templates/rename.qtpl:16
streamcannotRenameDueToNonExistence(qw422016, hyphaName)
//line templates/rename.qtpl:16
qw422016.N().S(`
`)
//line templates/rename.qtpl:17
}
//line templates/rename.qtpl:17
qw422016.N().S(`</main>
`)
//line templates/rename.qtpl:19
}
//line templates/rename.qtpl:19
func WriteRenameAskHTML(qq422016 qtio422016.Writer, hyphaName string, isOld bool) {
//line templates/rename.qtpl:19
qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/rename.qtpl:19
StreamRenameAskHTML(qw422016, hyphaName, isOld)
//line templates/rename.qtpl:19
qt422016.ReleaseWriter(qw422016)
//line templates/rename.qtpl:19
}
//line templates/rename.qtpl:19
func RenameAskHTML(hyphaName string, isOld bool) string {
//line templates/rename.qtpl:19
qb422016 := qt422016.AcquireByteBuffer()
//line templates/rename.qtpl:19
WriteRenameAskHTML(qb422016, hyphaName, isOld)
//line templates/rename.qtpl:19
qs422016 := string(qb422016.B)
//line templates/rename.qtpl:19
qt422016.ReleaseByteBuffer(qb422016)
//line templates/rename.qtpl:19
return qs422016
//line templates/rename.qtpl:19
}
//line templates/rename.qtpl:21
func streamcannotRenameDueToNonExistence(qw422016 *qt422016.Writer, hyphaName string) {
//line templates/rename.qtpl:21
qw422016.N().S(`
<section>
<h1>Cannot rename `)
//line templates/rename.qtpl:23
qw422016.E().S(hyphaName)
//line templates/rename.qtpl:23
qw422016.N().S(`</h1>
<p>This hypha does not exist.</p>
<p><a href="/page/`)
//line templates/rename.qtpl:25
qw422016.E().S(hyphaName)
//line templates/rename.qtpl:25
qw422016.N().S(`">Go back</a></p>
</section>
`)
//line templates/rename.qtpl:27
}
//line templates/rename.qtpl:27
func writecannotRenameDueToNonExistence(qq422016 qtio422016.Writer, hyphaName string) {
//line templates/rename.qtpl:27
qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/rename.qtpl:27
streamcannotRenameDueToNonExistence(qw422016, hyphaName)
//line templates/rename.qtpl:27
qt422016.ReleaseWriter(qw422016)
//line templates/rename.qtpl:27
}
//line templates/rename.qtpl:27
func cannotRenameDueToNonExistence(hyphaName string) string {
//line templates/rename.qtpl:27
qb422016 := qt422016.AcquireByteBuffer()
//line templates/rename.qtpl:27
writecannotRenameDueToNonExistence(qb422016, hyphaName)
//line templates/rename.qtpl:27
qs422016 := string(qb422016.B)
//line templates/rename.qtpl:27
qt422016.ReleaseByteBuffer(qb422016)
//line templates/rename.qtpl:27
return qs422016
//line templates/rename.qtpl:27
}