2021-01-24 12:52:40 +00:00
|
|
|
// Code generated by qtc from "stuff.qtpl". DO NOT EDIT.
|
2020-08-31 17:52:26 +00:00
|
|
|
// See https://github.com/valyala/quicktemplate for details.
|
|
|
|
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:1
|
2020-08-31 17:52:26 +00:00
|
|
|
package templates
|
|
|
|
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:1
|
2021-01-23 13:45:17 +00:00
|
|
|
import "github.com/bouncepaw/mycorrhiza/util"
|
|
|
|
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:2
|
2021-01-23 13:45:17 +00:00
|
|
|
import "github.com/bouncepaw/mycorrhiza/user"
|
|
|
|
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:4
|
2020-08-31 17:52:26 +00:00
|
|
|
import (
|
|
|
|
qtio422016 "io"
|
|
|
|
|
|
|
|
qt422016 "github.com/valyala/quicktemplate"
|
|
|
|
)
|
|
|
|
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:4
|
2020-08-31 17:52:26 +00:00
|
|
|
var (
|
|
|
|
_ = qtio422016.Copy
|
|
|
|
_ = qt422016.AcquireByteBuffer
|
|
|
|
)
|
|
|
|
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:4
|
2021-01-24 07:30:14 +00:00
|
|
|
func StreamBaseHTML(qw422016 *qt422016.Writer, title, body string, u *user.User, headElements ...string) {
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:4
|
2020-08-31 17:52:26 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<!doctype html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<link rel="stylesheet" type="text/css" href="/static/common.css">
|
|
|
|
<title>`)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:10
|
2020-08-31 17:52:26 +00:00
|
|
|
qw422016.E().S(title)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:10
|
2020-08-31 17:52:26 +00:00
|
|
|
qw422016.N().S(`</title>
|
2020-12-17 12:59:59 +00:00
|
|
|
`)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:11
|
2020-12-17 12:59:59 +00:00
|
|
|
for _, el := range headElements {
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:11
|
2020-12-17 12:59:59 +00:00
|
|
|
qw422016.N().S(el)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:11
|
2020-12-17 12:59:59 +00:00
|
|
|
}
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:11
|
2020-12-17 12:59:59 +00:00
|
|
|
qw422016.N().S(`
|
2020-08-31 17:52:26 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2021-01-23 19:00:58 +00:00
|
|
|
<header>
|
2021-01-25 18:37:21 +00:00
|
|
|
<nav class="header-links main-width">
|
2021-01-23 19:00:58 +00:00
|
|
|
<ul class="header-links__list">
|
|
|
|
`)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:17
|
2021-01-23 19:00:58 +00:00
|
|
|
for _, link := range util.HeaderLinks {
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:17
|
2021-01-23 19:00:58 +00:00
|
|
|
qw422016.N().S(` <li class="header-links__entry"><a class="header-links__link" href="`)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:18
|
2021-01-23 19:00:58 +00:00
|
|
|
qw422016.E().S(link.Href)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:18
|
2021-01-23 19:00:58 +00:00
|
|
|
qw422016.N().S(`">`)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:18
|
2021-01-23 19:00:58 +00:00
|
|
|
qw422016.E().S(link.Display)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:18
|
2021-01-23 19:00:58 +00:00
|
|
|
qw422016.N().S(`</a></li>
|
|
|
|
`)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:19
|
2021-01-23 19:00:58 +00:00
|
|
|
}
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:19
|
2021-01-24 07:30:14 +00:00
|
|
|
qw422016.N().S(` `)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:20
|
2021-01-24 07:30:14 +00:00
|
|
|
qw422016.N().S(userMenuHTML(u))
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:20
|
2021-01-24 07:30:14 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
</ul>
|
2021-01-23 19:00:58 +00:00
|
|
|
</nav>
|
|
|
|
</header>
|
2020-08-31 17:52:26 +00:00
|
|
|
`)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:24
|
2020-08-31 17:52:26 +00:00
|
|
|
qw422016.N().S(body)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:24
|
2020-08-31 17:52:26 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
`)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:27
|
2020-08-31 17:52:26 +00:00
|
|
|
}
|
|
|
|
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:27
|
2021-01-24 07:30:14 +00:00
|
|
|
func WriteBaseHTML(qq422016 qtio422016.Writer, title, body string, u *user.User, headElements ...string) {
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:27
|
2020-08-31 17:52:26 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:27
|
2021-01-24 07:30:14 +00:00
|
|
|
StreamBaseHTML(qw422016, title, body, u, headElements...)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:27
|
2020-08-31 17:52:26 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:27
|
2020-08-31 17:52:26 +00:00
|
|
|
}
|
|
|
|
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:27
|
2021-01-24 07:30:14 +00:00
|
|
|
func BaseHTML(title, body string, u *user.User, headElements ...string) string {
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:27
|
2020-08-31 17:52:26 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:27
|
2021-01-24 07:30:14 +00:00
|
|
|
WriteBaseHTML(qb422016, title, body, u, headElements...)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:27
|
2020-08-31 17:52:26 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:27
|
2020-08-31 17:52:26 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:27
|
2020-08-31 17:52:26 +00:00
|
|
|
return qs422016
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:27
|
2020-08-31 17:52:26 +00:00
|
|
|
}
|
|
|
|
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:29
|
2021-01-30 18:21:50 +00:00
|
|
|
func StreamUserListHTML(qw422016 *qt422016.Writer) {
|
2021-01-24 12:52:40 +00:00
|
|
|
//line templates/stuff.qtpl:29
|
2020-08-31 17:52:26 +00:00
|
|
|
qw422016.N().S(`
|
2021-01-26 05:41:57 +00:00
|
|
|
<div class="layout">
|
2021-01-30 18:21:50 +00:00
|
|
|
<main class="main-width user-list">
|
|
|
|
<h1>List of users</h1>
|
|
|
|
`)
|
|
|
|
//line templates/stuff.qtpl:34
|
|
|
|
var (
|
|
|
|
admins = make([]string, 0)
|
|
|
|
moderators = make([]string, 0)
|
|
|
|
editors = make([]string, 0)
|
|
|
|
)
|
|
|
|
for u := range user.YieldUsers() {
|
|
|
|
switch u.Group {
|
|
|
|
case "admin":
|
|
|
|
admins = append(admins, u.Name)
|
|
|
|
case "moderator":
|
|
|
|
moderators = append(moderators, u.Name)
|
|
|
|
case "editor", "trusted":
|
|
|
|
editors = append(editors, u.Name)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//line templates/stuff.qtpl:49
|
|
|
|
qw422016.N().S(`
|
|
|
|
<section>
|
|
|
|
<h2>Admins</h2>
|
|
|
|
<ol>`)
|
|
|
|
//line templates/stuff.qtpl:52
|
|
|
|
for _, name := range admins {
|
|
|
|
//line templates/stuff.qtpl:52
|
|
|
|
qw422016.N().S(`
|
|
|
|
<li><a href="/page/`)
|
|
|
|
//line templates/stuff.qtpl:53
|
|
|
|
qw422016.E().S(util.UserHypha)
|
|
|
|
//line templates/stuff.qtpl:53
|
|
|
|
qw422016.N().S(`/`)
|
|
|
|
//line templates/stuff.qtpl:53
|
|
|
|
qw422016.E().S(name)
|
|
|
|
//line templates/stuff.qtpl:53
|
|
|
|
qw422016.N().S(`">`)
|
|
|
|
//line templates/stuff.qtpl:53
|
|
|
|
qw422016.E().S(name)
|
|
|
|
//line templates/stuff.qtpl:53
|
|
|
|
qw422016.N().S(`</a></li>
|
|
|
|
`)
|
|
|
|
//line templates/stuff.qtpl:54
|
|
|
|
}
|
|
|
|
//line templates/stuff.qtpl:54
|
|
|
|
qw422016.N().S(`</ol>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<h2>Moderators</h2>
|
|
|
|
<ol>`)
|
|
|
|
//line templates/stuff.qtpl:58
|
|
|
|
for _, name := range moderators {
|
|
|
|
//line templates/stuff.qtpl:58
|
|
|
|
qw422016.N().S(`
|
|
|
|
<li><a href="/page/`)
|
|
|
|
//line templates/stuff.qtpl:59
|
|
|
|
qw422016.E().S(util.UserHypha)
|
|
|
|
//line templates/stuff.qtpl:59
|
|
|
|
qw422016.N().S(`/`)
|
|
|
|
//line templates/stuff.qtpl:59
|
|
|
|
qw422016.E().S(name)
|
|
|
|
//line templates/stuff.qtpl:59
|
|
|
|
qw422016.N().S(`">`)
|
|
|
|
//line templates/stuff.qtpl:59
|
|
|
|
qw422016.E().S(name)
|
|
|
|
//line templates/stuff.qtpl:59
|
|
|
|
qw422016.N().S(`</a></li>
|
|
|
|
`)
|
|
|
|
//line templates/stuff.qtpl:60
|
|
|
|
}
|
|
|
|
//line templates/stuff.qtpl:60
|
|
|
|
qw422016.N().S(`</ol>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<h2>Editors</h2>
|
|
|
|
<ol>`)
|
|
|
|
//line templates/stuff.qtpl:64
|
|
|
|
for _, name := range editors {
|
|
|
|
//line templates/stuff.qtpl:64
|
|
|
|
qw422016.N().S(`
|
|
|
|
<li><a href="/page/`)
|
|
|
|
//line templates/stuff.qtpl:65
|
|
|
|
qw422016.E().S(util.UserHypha)
|
|
|
|
//line templates/stuff.qtpl:65
|
|
|
|
qw422016.N().S(`/`)
|
|
|
|
//line templates/stuff.qtpl:65
|
|
|
|
qw422016.E().S(name)
|
|
|
|
//line templates/stuff.qtpl:65
|
|
|
|
qw422016.N().S(`">`)
|
|
|
|
//line templates/stuff.qtpl:65
|
|
|
|
qw422016.E().S(name)
|
|
|
|
//line templates/stuff.qtpl:65
|
|
|
|
qw422016.N().S(`</a></li>
|
|
|
|
`)
|
|
|
|
//line templates/stuff.qtpl:66
|
|
|
|
}
|
|
|
|
//line templates/stuff.qtpl:66
|
|
|
|
qw422016.N().S(`</ol>
|
|
|
|
</section>
|
|
|
|
</main>
|
|
|
|
</div>
|
|
|
|
`)
|
|
|
|
//line templates/stuff.qtpl:70
|
|
|
|
}
|
|
|
|
|
|
|
|
//line templates/stuff.qtpl:70
|
|
|
|
func WriteUserListHTML(qq422016 qtio422016.Writer) {
|
|
|
|
//line templates/stuff.qtpl:70
|
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
|
|
//line templates/stuff.qtpl:70
|
|
|
|
StreamUserListHTML(qw422016)
|
|
|
|
//line templates/stuff.qtpl:70
|
|
|
|
qt422016.ReleaseWriter(qw422016)
|
|
|
|
//line templates/stuff.qtpl:70
|
|
|
|
}
|
|
|
|
|
|
|
|
//line templates/stuff.qtpl:70
|
|
|
|
func UserListHTML() string {
|
|
|
|
//line templates/stuff.qtpl:70
|
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
|
|
|
//line templates/stuff.qtpl:70
|
|
|
|
WriteUserListHTML(qb422016)
|
|
|
|
//line templates/stuff.qtpl:70
|
|
|
|
qs422016 := string(qb422016.B)
|
|
|
|
//line templates/stuff.qtpl:70
|
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
|
|
|
//line templates/stuff.qtpl:70
|
|
|
|
return qs422016
|
|
|
|
//line templates/stuff.qtpl:70
|
|
|
|
}
|
|
|
|
|
|
|
|
//line templates/stuff.qtpl:72
|
|
|
|
func StreamHyphaListHTML(qw422016 *qt422016.Writer, tbody string, pageCount int) {
|
|
|
|
//line templates/stuff.qtpl:72
|
|
|
|
qw422016.N().S(`
|
|
|
|
<div class="layout">
|
2021-01-26 05:41:57 +00:00
|
|
|
<main class="main-width">
|
2020-08-31 18:16:22 +00:00
|
|
|
<h1>List of hyphae</h1>
|
|
|
|
<p>This wiki has `)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:76
|
2020-08-31 18:16:22 +00:00
|
|
|
qw422016.N().D(pageCount)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:76
|
2020-08-31 18:16:22 +00:00
|
|
|
qw422016.N().S(` hyphae.</p>
|
2020-08-31 17:52:26 +00:00
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2020-08-31 18:16:22 +00:00
|
|
|
<th>Full name</th>
|
|
|
|
<th>Binary part type</th>
|
2020-08-31 17:52:26 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:85
|
2020-08-31 17:52:26 +00:00
|
|
|
qw422016.N().S(tbody)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:85
|
2020-08-31 17:52:26 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</main>
|
2021-01-26 05:41:57 +00:00
|
|
|
</div>
|
2020-08-31 17:52:26 +00:00
|
|
|
`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:90
|
2020-08-31 17:52:26 +00:00
|
|
|
}
|
|
|
|
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:90
|
2020-08-31 18:16:22 +00:00
|
|
|
func WriteHyphaListHTML(qq422016 qtio422016.Writer, tbody string, pageCount int) {
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:90
|
2020-08-31 17:52:26 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:90
|
2020-08-31 18:16:22 +00:00
|
|
|
StreamHyphaListHTML(qw422016, tbody, pageCount)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:90
|
2020-08-31 17:52:26 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:90
|
2020-08-31 17:52:26 +00:00
|
|
|
}
|
|
|
|
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:90
|
2020-08-31 18:16:22 +00:00
|
|
|
func HyphaListHTML(tbody string, pageCount int) string {
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:90
|
2020-08-31 17:52:26 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:90
|
2020-08-31 18:16:22 +00:00
|
|
|
WriteHyphaListHTML(qb422016, tbody, pageCount)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:90
|
2020-08-31 18:16:22 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:90
|
2020-08-31 18:16:22 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:90
|
2020-08-31 18:16:22 +00:00
|
|
|
return qs422016
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:90
|
2020-08-31 18:16:22 +00:00
|
|
|
}
|
|
|
|
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:92
|
2020-08-31 18:16:22 +00:00
|
|
|
func StreamHyphaListRowHTML(qw422016 *qt422016.Writer, hyphaName, binaryMime string, binaryPresent bool) {
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:92
|
2020-08-31 18:16:22 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<tr>
|
|
|
|
<td><a href="/page/`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:94
|
2020-08-31 18:16:22 +00:00
|
|
|
qw422016.E().S(hyphaName)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:94
|
2020-08-31 18:16:22 +00:00
|
|
|
qw422016.N().S(`">`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:94
|
2020-08-31 18:16:22 +00:00
|
|
|
qw422016.E().S(hyphaName)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:94
|
2020-08-31 18:16:22 +00:00
|
|
|
qw422016.N().S(`</a></td>
|
|
|
|
`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:95
|
2020-08-31 18:16:22 +00:00
|
|
|
if binaryPresent {
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:95
|
2020-08-31 18:16:22 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<td>`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:96
|
2020-08-31 18:16:22 +00:00
|
|
|
qw422016.E().S(binaryMime)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:96
|
2020-08-31 18:16:22 +00:00
|
|
|
qw422016.N().S(`</td>
|
|
|
|
`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:97
|
2020-08-31 18:16:22 +00:00
|
|
|
} else {
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:97
|
2020-08-31 18:16:22 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
<td></td>
|
|
|
|
`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:99
|
2020-08-31 18:16:22 +00:00
|
|
|
}
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:99
|
2020-08-31 18:16:22 +00:00
|
|
|
qw422016.N().S(`
|
|
|
|
</tr>
|
|
|
|
`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:101
|
2020-08-31 18:16:22 +00:00
|
|
|
}
|
|
|
|
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:101
|
2020-08-31 18:16:22 +00:00
|
|
|
func WriteHyphaListRowHTML(qq422016 qtio422016.Writer, hyphaName, binaryMime string, binaryPresent bool) {
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:101
|
2020-08-31 18:16:22 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:101
|
2020-08-31 18:16:22 +00:00
|
|
|
StreamHyphaListRowHTML(qw422016, hyphaName, binaryMime, binaryPresent)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:101
|
2020-08-31 18:16:22 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:101
|
2020-08-31 18:16:22 +00:00
|
|
|
}
|
|
|
|
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:101
|
2020-08-31 18:16:22 +00:00
|
|
|
func HyphaListRowHTML(hyphaName, binaryMime string, binaryPresent bool) string {
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:101
|
2020-08-31 18:16:22 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:101
|
2020-08-31 18:16:22 +00:00
|
|
|
WriteHyphaListRowHTML(qb422016, hyphaName, binaryMime, binaryPresent)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:101
|
2021-01-23 13:45:17 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:101
|
2021-01-23 13:45:17 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:101
|
2021-01-23 13:45:17 +00:00
|
|
|
return qs422016
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:101
|
2021-01-23 13:45:17 +00:00
|
|
|
}
|
|
|
|
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:103
|
2021-01-23 13:45:17 +00:00
|
|
|
func StreamAboutHTML(qw422016 *qt422016.Writer) {
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:103
|
2021-01-23 13:45:17 +00:00
|
|
|
qw422016.N().S(`
|
2021-01-26 05:41:57 +00:00
|
|
|
<div class="layout">
|
|
|
|
<main class="main-width">
|
2021-01-23 13:45:17 +00:00
|
|
|
<section>
|
|
|
|
<h1>About `)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:107
|
2021-01-23 13:45:17 +00:00
|
|
|
qw422016.E().S(util.SiteName)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:107
|
2021-01-23 13:45:17 +00:00
|
|
|
qw422016.N().S(`</h1>
|
|
|
|
<ul>
|
2021-01-24 12:52:40 +00:00
|
|
|
<li><b><a href="https://mycorrhiza.lesarbr.es">MycorrhizaWiki</a> version:</b> β 0.13 indev</li>
|
2021-01-23 13:45:17 +00:00
|
|
|
`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:110
|
2021-01-23 13:45:17 +00:00
|
|
|
if user.AuthUsed {
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:110
|
2021-01-24 07:30:14 +00:00
|
|
|
qw422016.N().S(` <li><b>User count:</b> `)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:111
|
2021-01-23 13:45:17 +00:00
|
|
|
qw422016.N().D(user.Count())
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:111
|
2021-01-23 13:45:17 +00:00
|
|
|
qw422016.N().S(`</li>
|
|
|
|
<li><b>Home page:</b> <a href="/">`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:112
|
2021-01-23 13:45:17 +00:00
|
|
|
qw422016.E().S(util.HomePage)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:112
|
2021-01-23 13:45:17 +00:00
|
|
|
qw422016.N().S(`</a></li>
|
|
|
|
<li><b>Administrators:</b>`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:113
|
2021-01-24 07:30:14 +00:00
|
|
|
for i, username := range user.ListUsersWithGroup("admin") {
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:114
|
2021-01-23 13:45:17 +00:00
|
|
|
if i > 0 {
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:114
|
2021-01-23 13:45:17 +00:00
|
|
|
qw422016.N().S(`<span aria-hidden="true">, </span>
|
|
|
|
`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:115
|
2021-01-23 13:45:17 +00:00
|
|
|
}
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:115
|
2021-01-24 07:30:14 +00:00
|
|
|
qw422016.N().S(` <a href="/page/`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:116
|
2021-01-23 19:00:58 +00:00
|
|
|
qw422016.E().S(util.UserHypha)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:116
|
2021-01-23 13:45:17 +00:00
|
|
|
qw422016.N().S(`/`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:116
|
2021-01-23 13:45:17 +00:00
|
|
|
qw422016.E().S(username)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:116
|
2021-01-23 13:45:17 +00:00
|
|
|
qw422016.N().S(`">`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:116
|
2021-01-23 13:45:17 +00:00
|
|
|
qw422016.E().S(username)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:116
|
2021-01-23 13:45:17 +00:00
|
|
|
qw422016.N().S(`</a>`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:116
|
2021-01-23 13:45:17 +00:00
|
|
|
}
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:116
|
2021-01-23 13:45:17 +00:00
|
|
|
qw422016.N().S(`</li>
|
|
|
|
`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:117
|
2021-01-23 13:45:17 +00:00
|
|
|
} else {
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:117
|
2021-01-23 13:45:17 +00:00
|
|
|
qw422016.N().S(` <li>This wiki does not use authorization</li>
|
|
|
|
`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:119
|
2021-01-23 13:45:17 +00:00
|
|
|
}
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:119
|
2021-01-23 13:45:17 +00:00
|
|
|
qw422016.N().S(` </ul>
|
|
|
|
<p>See <a href="/list">/list</a> for information about hyphae on this wiki.</p>
|
|
|
|
</section>
|
|
|
|
</main>
|
2021-01-26 05:41:57 +00:00
|
|
|
</div>
|
2021-01-23 13:45:17 +00:00
|
|
|
`)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:125
|
2021-01-23 13:45:17 +00:00
|
|
|
}
|
|
|
|
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:125
|
2021-01-23 13:45:17 +00:00
|
|
|
func WriteAboutHTML(qq422016 qtio422016.Writer) {
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:125
|
2021-01-23 13:45:17 +00:00
|
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:125
|
2021-01-23 13:45:17 +00:00
|
|
|
StreamAboutHTML(qw422016)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:125
|
2021-01-23 13:45:17 +00:00
|
|
|
qt422016.ReleaseWriter(qw422016)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:125
|
2021-01-23 13:45:17 +00:00
|
|
|
}
|
|
|
|
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:125
|
2021-01-23 13:45:17 +00:00
|
|
|
func AboutHTML() string {
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:125
|
2021-01-23 13:45:17 +00:00
|
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:125
|
2021-01-23 13:45:17 +00:00
|
|
|
WriteAboutHTML(qb422016)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:125
|
2020-08-31 17:52:26 +00:00
|
|
|
qs422016 := string(qb422016.B)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:125
|
2020-08-31 17:52:26 +00:00
|
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:125
|
2020-08-31 17:52:26 +00:00
|
|
|
return qs422016
|
2021-01-30 18:21:50 +00:00
|
|
|
//line templates/stuff.qtpl:125
|
2020-08-31 17:52:26 +00:00
|
|
|
}
|