1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-10-30 19:56:16 +00:00
mycorrhiza/templates/http_readers.qtpl.go

233 lines
6.4 KiB
Go
Raw Normal View History

2020-08-31 17:52:26 +00:00
// Code generated by qtc from "http_readers.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.
//line templates/http_readers.qtpl:1
package templates
//line templates/http_readers.qtpl:1
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
//line templates/http_readers.qtpl:1
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line templates/http_readers.qtpl:1
func StreamHistoryHTML(qw422016 *qt422016.Writer, hyphaName, tbody string) {
//line templates/http_readers.qtpl:1
qw422016.N().S(`
2020-10-02 15:31:59 +00:00
<main>
`)
//line templates/http_readers.qtpl:3
streamnavHTML(qw422016, hyphaName, "history")
//line templates/http_readers.qtpl:3
qw422016.N().S(`
<table>
<thead>
<tr>
<th>Time</th>
<th>Hash</th>
<th>Message</th>
</tr>
</thead>
<tbody>
`)
//line templates/http_readers.qtpl:13
2020-08-31 17:52:26 +00:00
qw422016.N().S(tbody)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:13
2020-08-31 17:52:26 +00:00
qw422016.N().S(`
2020-10-02 15:31:59 +00:00
</tbody>
</table>
</main>
2020-08-31 17:52:26 +00:00
`)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:17
2020-08-31 17:52:26 +00:00
}
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:17
2020-08-31 17:52:26 +00:00
func WriteHistoryHTML(qq422016 qtio422016.Writer, hyphaName, tbody string) {
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:17
2020-08-31 17:52:26 +00:00
qw422016 := qt422016.AcquireWriter(qq422016)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:17
2020-08-31 17:52:26 +00:00
StreamHistoryHTML(qw422016, hyphaName, tbody)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:17
2020-08-31 17:52:26 +00:00
qt422016.ReleaseWriter(qw422016)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:17
2020-08-31 17:52:26 +00:00
}
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:17
2020-08-31 17:52:26 +00:00
func HistoryHTML(hyphaName, tbody string) string {
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:17
2020-08-31 17:52:26 +00:00
qb422016 := qt422016.AcquireByteBuffer()
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:17
2020-08-31 17:52:26 +00:00
WriteHistoryHTML(qb422016, hyphaName, tbody)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:17
2020-08-31 17:52:26 +00:00
qs422016 := string(qb422016.B)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:17
2020-08-31 17:52:26 +00:00
qt422016.ReleaseByteBuffer(qb422016)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:17
2020-08-31 17:52:26 +00:00
return qs422016
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:17
2020-08-31 17:52:26 +00:00
}
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:19
2020-08-31 17:52:26 +00:00
func StreamRevisionHTML(qw422016 *qt422016.Writer, hyphaName, naviTitle, contents, tree, revHash string) {
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:19
2020-08-31 17:52:26 +00:00
qw422016.N().S(`
2020-10-02 15:31:59 +00:00
<main>
`)
//line templates/http_readers.qtpl:21
streamnavHTML(qw422016, hyphaName, "revision", revHash)
//line templates/http_readers.qtpl:21
qw422016.N().S(`
<article>
<p>Please note that viewing binary parts of hyphae is not supported in history for now.</p>
`)
//line templates/http_readers.qtpl:24
2020-08-31 17:52:26 +00:00
qw422016.N().S(naviTitle)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:24
2020-08-31 17:52:26 +00:00
qw422016.N().S(`
2020-10-02 15:31:59 +00:00
`)
//line templates/http_readers.qtpl:25
2020-08-31 17:52:26 +00:00
qw422016.N().S(contents)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:25
2020-08-31 17:52:26 +00:00
qw422016.N().S(`
2020-10-02 15:31:59 +00:00
</article>
<hr/>
<aside>
`)
//line templates/http_readers.qtpl:29
2020-08-31 17:52:26 +00:00
qw422016.N().S(tree)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:29
2020-08-31 17:52:26 +00:00
qw422016.N().S(`
2020-10-02 15:31:59 +00:00
</aside>
</main>
2020-08-31 17:52:26 +00:00
`)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:32
2020-08-31 17:52:26 +00:00
}
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:32
2020-08-31 17:52:26 +00:00
func WriteRevisionHTML(qq422016 qtio422016.Writer, hyphaName, naviTitle, contents, tree, revHash string) {
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:32
2020-08-31 17:52:26 +00:00
qw422016 := qt422016.AcquireWriter(qq422016)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:32
2020-08-31 17:52:26 +00:00
StreamRevisionHTML(qw422016, hyphaName, naviTitle, contents, tree, revHash)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:32
2020-08-31 17:52:26 +00:00
qt422016.ReleaseWriter(qw422016)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:32
2020-08-31 17:52:26 +00:00
}
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:32
2020-08-31 17:52:26 +00:00
func RevisionHTML(hyphaName, naviTitle, contents, tree, revHash string) string {
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:32
2020-08-31 17:52:26 +00:00
qb422016 := qt422016.AcquireByteBuffer()
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:32
2020-08-31 17:52:26 +00:00
WriteRevisionHTML(qb422016, hyphaName, naviTitle, contents, tree, revHash)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:32
2020-08-31 17:52:26 +00:00
qs422016 := string(qb422016.B)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:32
2020-08-31 17:52:26 +00:00
qt422016.ReleaseByteBuffer(qb422016)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:32
2020-08-31 17:52:26 +00:00
return qs422016
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:32
2020-08-31 17:52:26 +00:00
}
// If `contents` == "", a helpful message is shown instead.
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:35
2020-08-31 17:52:26 +00:00
func StreamPageHTML(qw422016 *qt422016.Writer, hyphaName, naviTitle, contents, tree string) {
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:35
2020-08-31 17:52:26 +00:00
qw422016.N().S(`
2020-10-02 15:31:59 +00:00
<main>
`)
//line templates/http_readers.qtpl:37
streamnavHTML(qw422016, hyphaName, "page")
//line templates/http_readers.qtpl:37
qw422016.N().S(`
<article>
`)
//line templates/http_readers.qtpl:39
2020-08-31 17:52:26 +00:00
qw422016.N().S(naviTitle)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:39
2020-08-31 17:52:26 +00:00
qw422016.N().S(`
2020-10-02 15:31:59 +00:00
`)
//line templates/http_readers.qtpl:40
2020-08-31 17:52:26 +00:00
if contents == "" {
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:40
2020-08-31 17:52:26 +00:00
qw422016.N().S(`
2020-10-02 15:31:59 +00:00
<p>This hypha has no text. Why not <a href="/edit/`)
//line templates/http_readers.qtpl:41
2020-08-31 17:52:26 +00:00
qw422016.E().S(hyphaName)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:41
2020-08-31 17:52:26 +00:00
qw422016.N().S(`">create it</a>?</p>
2020-10-02 15:31:59 +00:00
`)
//line templates/http_readers.qtpl:42
2020-08-31 17:52:26 +00:00
} else {
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:42
2020-08-31 17:52:26 +00:00
qw422016.N().S(`
2020-10-02 15:31:59 +00:00
`)
//line templates/http_readers.qtpl:43
2020-08-31 17:52:26 +00:00
qw422016.N().S(contents)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:43
2020-08-31 17:52:26 +00:00
qw422016.N().S(`
2020-10-02 15:31:59 +00:00
`)
//line templates/http_readers.qtpl:44
2020-08-31 17:52:26 +00:00
}
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:44
2020-08-31 17:52:26 +00:00
qw422016.N().S(`
2020-10-02 15:31:59 +00:00
</article>
<hr/>
<form action="/upload-binary/`)
//line templates/http_readers.qtpl:47
2020-08-31 17:52:26 +00:00
qw422016.E().S(hyphaName)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:47
2020-08-31 17:52:26 +00:00
qw422016.N().S(`"
2020-10-02 15:31:59 +00:00
method="post" enctype="multipart/form-data">
<label for="upload-binary__input">Upload new binary part</label>
<br>
<input type="file" id="upload-binary__input" name="binary"/>
<input type="submit"/>
</form>
<hr/>
<aside>
`)
//line templates/http_readers.qtpl:56
2020-08-31 17:52:26 +00:00
qw422016.N().S(tree)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:56
2020-08-31 17:52:26 +00:00
qw422016.N().S(`
2020-10-02 15:31:59 +00:00
</aside>
</main>
2020-08-31 17:52:26 +00:00
`)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:59
2020-08-31 17:52:26 +00:00
}
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:59
2020-08-31 17:52:26 +00:00
func WritePageHTML(qq422016 qtio422016.Writer, hyphaName, naviTitle, contents, tree string) {
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:59
2020-08-31 17:52:26 +00:00
qw422016 := qt422016.AcquireWriter(qq422016)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:59
2020-08-31 17:52:26 +00:00
StreamPageHTML(qw422016, hyphaName, naviTitle, contents, tree)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:59
2020-08-31 17:52:26 +00:00
qt422016.ReleaseWriter(qw422016)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:59
2020-08-31 17:52:26 +00:00
}
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:59
2020-08-31 17:52:26 +00:00
func PageHTML(hyphaName, naviTitle, contents, tree string) string {
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:59
2020-08-31 17:52:26 +00:00
qb422016 := qt422016.AcquireByteBuffer()
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:59
2020-08-31 17:52:26 +00:00
WritePageHTML(qb422016, hyphaName, naviTitle, contents, tree)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:59
2020-08-31 17:52:26 +00:00
qs422016 := string(qb422016.B)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:59
2020-08-31 17:52:26 +00:00
qt422016.ReleaseByteBuffer(qb422016)
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:59
2020-08-31 17:52:26 +00:00
return qs422016
2020-10-02 15:31:59 +00:00
//line templates/http_readers.qtpl:59
2020-08-31 17:52:26 +00:00
}