1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-12-13 05:50:27 +00:00

Write docs for prevnext

This commit is contained in:
Timur Ismagilov 2021-09-23 12:17:50 +03:00
parent b299d10d42
commit 71b404c4f0
5 changed files with 303 additions and 278 deletions

19
help/en/prevnext.myco Normal file
View File

@ -0,0 +1,19 @@
# Previous/next
Under every hypha there is a **previous/next** section with quick links to previous and next hyphae alphabetically.
This design encourages you to name your hyphae in such a way that clicking through these links would make sense. For example, if you are storing pages of a book, you should name them //p01//, //p02//, //p03//, etc.
It is impossible to change what hyphae are linked in this section. If you want to provide a different means of sequential navigation, just place some links by yourself.
## Hotkeys
Press `n` to go to the **n**ext page, press `p` to go to the **p**revious page.
## For administrators: how to remove these links
For some wikis, these links make little or no sense. In this case, it is better to hide them.
In file `your-wiki/static/custom.css` write this:
```css
.prevnext { display: none; }
```
The section would still be there, but no one will see it. The hotkeys will still work.

View File

@ -74,6 +74,8 @@
{% endfunc %}
If `contents` == "", a helpful message is shown instead.
If you rename .prevnext, change the docs too.
{% func HyphaHTML(rq *http.Request, h *hyphae.Hypha, contents string) %}
{% code
siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name)

View File

@ -222,17 +222,19 @@ func AttachmentMenuHTML(rq *http.Request, h *hyphae.Hypha, u *user.User) string
}
// If `contents` == "", a helpful message is shown instead.
//
// If you rename .prevnext, change the docs too.
//line views/readers.qtpl:77
//line views/readers.qtpl:79
func StreamHyphaHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, contents string) {
//line views/readers.qtpl:77
//line views/readers.qtpl:79
qw422016.N().S(`
`)
//line views/readers.qtpl:79
//line views/readers.qtpl:81
siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name)
u := user.FromRequest(rq)
//line views/readers.qtpl:81
//line views/readers.qtpl:83
qw422016.N().S(`
<div class="layout">
<main class="main-width">
@ -241,265 +243,265 @@ func StreamHyphaHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hyph
<a class="jump-btn__link" href="#hypha-bottom"></a>
</div>
`)
//line views/readers.qtpl:88
//line views/readers.qtpl:90
if u.CanProceed("edit") {
//line views/readers.qtpl:88
//line views/readers.qtpl:90
qw422016.N().S(`<div class="btn edit-btn">
<a class="edit-btn__link" href="/edit/`)
//line views/readers.qtpl:89
//line views/readers.qtpl:91
qw422016.E().S(h.Name)
//line views/readers.qtpl:89
//line views/readers.qtpl:91
qw422016.N().S(`">Edit text</a>
</div>`)
//line views/readers.qtpl:90
//line views/readers.qtpl:92
}
//line views/readers.qtpl:90
//line views/readers.qtpl:92
qw422016.N().S(`
`)
//line views/readers.qtpl:91
//line views/readers.qtpl:93
qw422016.N().S(NaviTitleHTML(h))
//line views/readers.qtpl:91
//line views/readers.qtpl:93
qw422016.N().S(`
`)
//line views/readers.qtpl:92
//line views/readers.qtpl:94
if h.Exists {
//line views/readers.qtpl:92
//line views/readers.qtpl:94
qw422016.N().S(`
`)
//line views/readers.qtpl:93
//line views/readers.qtpl:95
qw422016.N().S(contents)
//line views/readers.qtpl:93
//line views/readers.qtpl:95
qw422016.N().S(`
`)
//line views/readers.qtpl:94
//line views/readers.qtpl:96
} else {
//line views/readers.qtpl:94
//line views/readers.qtpl:96
qw422016.N().S(`
`)
//line views/readers.qtpl:95
//line views/readers.qtpl:97
streamnonExistentHyphaNotice(qw422016, h, u)
//line views/readers.qtpl:95
//line views/readers.qtpl:97
qw422016.N().S(`
`)
//line views/readers.qtpl:96
//line views/readers.qtpl:98
}
//line views/readers.qtpl:96
//line views/readers.qtpl:98
qw422016.N().S(`
</article>
<section class="prevnext">
`)
//line views/readers.qtpl:99
//line views/readers.qtpl:101
if prevHyphaName != "" {
//line views/readers.qtpl:99
//line views/readers.qtpl:101
qw422016.N().S(`
<a class="prevnext__el prevnext__prev" href="/hypha/`)
//line views/readers.qtpl:100
//line views/readers.qtpl:102
qw422016.E().S(prevHyphaName)
//line views/readers.qtpl:100
//line views/readers.qtpl:102
qw422016.N().S(`" rel="prev">← `)
//line views/readers.qtpl:100
//line views/readers.qtpl:102
qw422016.E().S(util.BeautifulName(path.Base(prevHyphaName)))
//line views/readers.qtpl:100
//line views/readers.qtpl:102
qw422016.N().S(`</a>
`)
//line views/readers.qtpl:101
//line views/readers.qtpl:103
}
//line views/readers.qtpl:101
//line views/readers.qtpl:103
qw422016.N().S(`
`)
//line views/readers.qtpl:102
//line views/readers.qtpl:104
if nextHyphaName != "" {
//line views/readers.qtpl:102
//line views/readers.qtpl:104
qw422016.N().S(`
<a class="prevnext__el prevnext__next" href="/hypha/`)
//line views/readers.qtpl:103
//line views/readers.qtpl:105
qw422016.E().S(nextHyphaName)
//line views/readers.qtpl:103
//line views/readers.qtpl:105
qw422016.N().S(`" rel="next">`)
//line views/readers.qtpl:103
//line views/readers.qtpl:105
qw422016.E().S(util.BeautifulName(path.Base(nextHyphaName)))
//line views/readers.qtpl:103
//line views/readers.qtpl:105
qw422016.N().S(` </a>
`)
//line views/readers.qtpl:104
//line views/readers.qtpl:106
}
//line views/readers.qtpl:104
//line views/readers.qtpl:106
qw422016.N().S(`
</section>
`)
//line views/readers.qtpl:106
//line views/readers.qtpl:108
StreamSubhyphaeHTML(qw422016, subhyphae)
//line views/readers.qtpl:106
//line views/readers.qtpl:108
qw422016.N().S(`
<section id="hypha-bottom">
<div class="jump-btn">
<a class="jump-btn__link" href="#hypha"></a>
</div>
`)
//line views/readers.qtpl:111
//line views/readers.qtpl:113
streamhyphaInfo(qw422016, rq, h)
//line views/readers.qtpl:111
//line views/readers.qtpl:113
qw422016.N().S(`
</section>
</main>
`)
//line views/readers.qtpl:114
//line views/readers.qtpl:116
streamsiblingHyphaeHTML(qw422016, siblings)
//line views/readers.qtpl:114
//line views/readers.qtpl:116
qw422016.N().S(`
</div>
`)
//line views/readers.qtpl:116
//line views/readers.qtpl:118
streamviewScripts(qw422016)
//line views/readers.qtpl:116
//line views/readers.qtpl:118
qw422016.N().S(`
`)
//line views/readers.qtpl:117
//line views/readers.qtpl:119
}
//line views/readers.qtpl:117
//line views/readers.qtpl:119
func WriteHyphaHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, contents string) {
//line views/readers.qtpl:117
//line views/readers.qtpl:119
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/readers.qtpl:117
//line views/readers.qtpl:119
StreamHyphaHTML(qw422016, rq, h, contents)
//line views/readers.qtpl:117
//line views/readers.qtpl:119
qt422016.ReleaseWriter(qw422016)
//line views/readers.qtpl:117
//line views/readers.qtpl:119
}
//line views/readers.qtpl:117
//line views/readers.qtpl:119
func HyphaHTML(rq *http.Request, h *hyphae.Hypha, contents string) string {
//line views/readers.qtpl:117
//line views/readers.qtpl:119
qb422016 := qt422016.AcquireByteBuffer()
//line views/readers.qtpl:117
//line views/readers.qtpl:119
WriteHyphaHTML(qb422016, rq, h, contents)
//line views/readers.qtpl:117
//line views/readers.qtpl:119
qs422016 := string(qb422016.B)
//line views/readers.qtpl:117
//line views/readers.qtpl:119
qt422016.ReleaseByteBuffer(qb422016)
//line views/readers.qtpl:117
//line views/readers.qtpl:119
return qs422016
//line views/readers.qtpl:117
//line views/readers.qtpl:119
}
//line views/readers.qtpl:119
//line views/readers.qtpl:121
func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, contents, revHash string) {
//line views/readers.qtpl:119
//line views/readers.qtpl:121
qw422016.N().S(`
`)
//line views/readers.qtpl:121
//line views/readers.qtpl:123
siblings, subhyphae, _, _ := tree.Tree(h.Name)
//line views/readers.qtpl:122
//line views/readers.qtpl:124
qw422016.N().S(`
<div class="layout">
<main class="main-width">
<article>
<p>Please note that viewing attachments of hyphae is not supported in history for now.</p>
`)
//line views/readers.qtpl:127
//line views/readers.qtpl:129
qw422016.N().S(NaviTitleHTML(h))
//line views/readers.qtpl:127
//line views/readers.qtpl:129
qw422016.N().S(`
`)
//line views/readers.qtpl:128
//line views/readers.qtpl:130
qw422016.N().S(contents)
//line views/readers.qtpl:128
//line views/readers.qtpl:130
qw422016.N().S(`
</article>
`)
//line views/readers.qtpl:130
//line views/readers.qtpl:132
StreamSubhyphaeHTML(qw422016, subhyphae)
//line views/readers.qtpl:130
//line views/readers.qtpl:132
qw422016.N().S(`
</main>
`)
//line views/readers.qtpl:132
//line views/readers.qtpl:134
streamsiblingHyphaeHTML(qw422016, siblings)
//line views/readers.qtpl:132
//line views/readers.qtpl:134
qw422016.N().S(`
</div>
`)
//line views/readers.qtpl:134
//line views/readers.qtpl:136
streamviewScripts(qw422016)
//line views/readers.qtpl:134
//line views/readers.qtpl:136
qw422016.N().S(`
`)
//line views/readers.qtpl:135
//line views/readers.qtpl:137
}
//line views/readers.qtpl:135
//line views/readers.qtpl:137
func WriteRevisionHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, contents, revHash string) {
//line views/readers.qtpl:135
//line views/readers.qtpl:137
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/readers.qtpl:135
//line views/readers.qtpl:137
StreamRevisionHTML(qw422016, rq, h, contents, revHash)
//line views/readers.qtpl:135
//line views/readers.qtpl:137
qt422016.ReleaseWriter(qw422016)
//line views/readers.qtpl:135
//line views/readers.qtpl:137
}
//line views/readers.qtpl:135
//line views/readers.qtpl:137
func RevisionHTML(rq *http.Request, h *hyphae.Hypha, contents, revHash string) string {
//line views/readers.qtpl:135
//line views/readers.qtpl:137
qb422016 := qt422016.AcquireByteBuffer()
//line views/readers.qtpl:135
//line views/readers.qtpl:137
WriteRevisionHTML(qb422016, rq, h, contents, revHash)
//line views/readers.qtpl:135
//line views/readers.qtpl:137
qs422016 := string(qb422016.B)
//line views/readers.qtpl:135
//line views/readers.qtpl:137
qt422016.ReleaseByteBuffer(qb422016)
//line views/readers.qtpl:135
//line views/readers.qtpl:137
return qs422016
//line views/readers.qtpl:135
//line views/readers.qtpl:137
}
//line views/readers.qtpl:137
//line views/readers.qtpl:139
func streamviewScripts(qw422016 *qt422016.Writer) {
//line views/readers.qtpl:137
//line views/readers.qtpl:139
qw422016.N().S(`
`)
//line views/readers.qtpl:138
//line views/readers.qtpl:140
for _, scriptPath := range cfg.ViewScripts {
//line views/readers.qtpl:138
//line views/readers.qtpl:140
qw422016.N().S(`
<script src="`)
//line views/readers.qtpl:139
//line views/readers.qtpl:141
qw422016.E().S(scriptPath)
//line views/readers.qtpl:139
//line views/readers.qtpl:141
qw422016.N().S(`"></script>
`)
//line views/readers.qtpl:140
//line views/readers.qtpl:142
}
//line views/readers.qtpl:140
//line views/readers.qtpl:142
qw422016.N().S(`
`)
//line views/readers.qtpl:141
//line views/readers.qtpl:143
}
//line views/readers.qtpl:141
//line views/readers.qtpl:143
func writeviewScripts(qq422016 qtio422016.Writer) {
//line views/readers.qtpl:141
//line views/readers.qtpl:143
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/readers.qtpl:141
//line views/readers.qtpl:143
streamviewScripts(qw422016)
//line views/readers.qtpl:141
//line views/readers.qtpl:143
qt422016.ReleaseWriter(qw422016)
//line views/readers.qtpl:141
//line views/readers.qtpl:143
}
//line views/readers.qtpl:141
//line views/readers.qtpl:143
func viewScripts() string {
//line views/readers.qtpl:141
//line views/readers.qtpl:143
qb422016 := qt422016.AcquireByteBuffer()
//line views/readers.qtpl:141
//line views/readers.qtpl:143
writeviewScripts(qb422016)
//line views/readers.qtpl:141
//line views/readers.qtpl:143
qs422016 := string(qb422016.B)
//line views/readers.qtpl:141
//line views/readers.qtpl:143
qt422016.ReleaseByteBuffer(qb422016)
//line views/readers.qtpl:141
//line views/readers.qtpl:143
return qs422016
//line views/readers.qtpl:141
//line views/readers.qtpl:143
}

View File

@ -165,6 +165,7 @@ It outputs a poorly formatted JSON, but it works and is valid.
<li><a href="/help/en/mycomarkup">Mycomarkup</a></li>
<li>Interface
<ul>
<li><a href="/help/en/prevnext">Previous/next</a></li>
<li><a href="/help/en/top_bar">Top bar</a></li>
<li><a href="/help/en/sibling_hyphae_section">Sibling hyphae</a></li>
<li>...</li>

View File

@ -565,6 +565,7 @@ func streamhelpTopicsHTML(qw422016 *qt422016.Writer) {
<li><a href="/help/en/mycomarkup">Mycomarkup</a></li>
<li>Interface
<ul>
<li><a href="/help/en/prevnext">Previous/next</a></li>
<li><a href="/help/en/top_bar">Top bar</a></li>
<li><a href="/help/en/sibling_hyphae_section">Sibling hyphae</a></li>
<li>...</li>
@ -586,87 +587,87 @@ func streamhelpTopicsHTML(qw422016 *qt422016.Writer) {
</ul>
</aside>
`)
//line views/stuff.qtpl:188
//line views/stuff.qtpl:189
}
//line views/stuff.qtpl:188
//line views/stuff.qtpl:189
func writehelpTopicsHTML(qq422016 qtio422016.Writer) {
//line views/stuff.qtpl:188
//line views/stuff.qtpl:189
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/stuff.qtpl:188
//line views/stuff.qtpl:189
streamhelpTopicsHTML(qw422016)
//line views/stuff.qtpl:188
//line views/stuff.qtpl:189
qt422016.ReleaseWriter(qw422016)
//line views/stuff.qtpl:188
//line views/stuff.qtpl:189
}
//line views/stuff.qtpl:188
//line views/stuff.qtpl:189
func helpTopicsHTML() string {
//line views/stuff.qtpl:188
//line views/stuff.qtpl:189
qb422016 := qt422016.AcquireByteBuffer()
//line views/stuff.qtpl:188
//line views/stuff.qtpl:189
writehelpTopicsHTML(qb422016)
//line views/stuff.qtpl:188
//line views/stuff.qtpl:189
qs422016 := string(qb422016.B)
//line views/stuff.qtpl:188
//line views/stuff.qtpl:189
qt422016.ReleaseByteBuffer(qb422016)
//line views/stuff.qtpl:188
//line views/stuff.qtpl:189
return qs422016
//line views/stuff.qtpl:188
//line views/stuff.qtpl:189
}
//line views/stuff.qtpl:190
//line views/stuff.qtpl:191
func streamhelpTopicBadgeHTML(qw422016 *qt422016.Writer, lang, topic string) {
//line views/stuff.qtpl:190
//line views/stuff.qtpl:191
qw422016.N().S(`
<a class="help-topic-badge" href="/help/`)
//line views/stuff.qtpl:191
//line views/stuff.qtpl:192
qw422016.E().S(lang)
//line views/stuff.qtpl:191
//line views/stuff.qtpl:192
qw422016.N().S(`/`)
//line views/stuff.qtpl:191
//line views/stuff.qtpl:192
qw422016.E().S(topic)
//line views/stuff.qtpl:191
//line views/stuff.qtpl:192
qw422016.N().S(`">?</a>
`)
//line views/stuff.qtpl:192
//line views/stuff.qtpl:193
}
//line views/stuff.qtpl:192
//line views/stuff.qtpl:193
func writehelpTopicBadgeHTML(qq422016 qtio422016.Writer, lang, topic string) {
//line views/stuff.qtpl:192
//line views/stuff.qtpl:193
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/stuff.qtpl:192
//line views/stuff.qtpl:193
streamhelpTopicBadgeHTML(qw422016, lang, topic)
//line views/stuff.qtpl:192
//line views/stuff.qtpl:193
qt422016.ReleaseWriter(qw422016)
//line views/stuff.qtpl:192
//line views/stuff.qtpl:193
}
//line views/stuff.qtpl:192
//line views/stuff.qtpl:193
func helpTopicBadgeHTML(lang, topic string) string {
//line views/stuff.qtpl:192
//line views/stuff.qtpl:193
qb422016 := qt422016.AcquireByteBuffer()
//line views/stuff.qtpl:192
//line views/stuff.qtpl:193
writehelpTopicBadgeHTML(qb422016, lang, topic)
//line views/stuff.qtpl:192
//line views/stuff.qtpl:193
qs422016 := string(qb422016.B)
//line views/stuff.qtpl:192
//line views/stuff.qtpl:193
qt422016.ReleaseByteBuffer(qb422016)
//line views/stuff.qtpl:192
//line views/stuff.qtpl:193
return qs422016
//line views/stuff.qtpl:192
//line views/stuff.qtpl:193
}
//line views/stuff.qtpl:194
//line views/stuff.qtpl:195
func StreamUserListHTML(qw422016 *qt422016.Writer) {
//line views/stuff.qtpl:194
//line views/stuff.qtpl:195
qw422016.N().S(`
<div class="layout">
<main class="main-width user-list">
<h1>List of users</h1>
`)
//line views/stuff.qtpl:199
//line views/stuff.qtpl:200
var (
admins = make([]string, 0)
moderators = make([]string, 0)
@ -683,345 +684,345 @@ func StreamUserListHTML(qw422016 *qt422016.Writer) {
}
}
//line views/stuff.qtpl:214
//line views/stuff.qtpl:215
qw422016.N().S(`
<section>
<h2>Admins</h2>
<ol>`)
//line views/stuff.qtpl:217
//line views/stuff.qtpl:218
for _, name := range admins {
//line views/stuff.qtpl:217
//line views/stuff.qtpl:218
qw422016.N().S(`
<li><a href="/hypha/`)
//line views/stuff.qtpl:218
//line views/stuff.qtpl:219
qw422016.E().S(cfg.UserHypha)
//line views/stuff.qtpl:218
//line views/stuff.qtpl:219
qw422016.N().S(`/`)
//line views/stuff.qtpl:218
//line views/stuff.qtpl:219
qw422016.E().S(name)
//line views/stuff.qtpl:218
//line views/stuff.qtpl:219
qw422016.N().S(`">`)
//line views/stuff.qtpl:218
//line views/stuff.qtpl:219
qw422016.E().S(name)
//line views/stuff.qtpl:218
//line views/stuff.qtpl:219
qw422016.N().S(`</a></li>
`)
//line views/stuff.qtpl:219
//line views/stuff.qtpl:220
}
//line views/stuff.qtpl:219
//line views/stuff.qtpl:220
qw422016.N().S(`</ol>
</section>
<section>
<h2>Moderators</h2>
<ol>`)
//line views/stuff.qtpl:223
//line views/stuff.qtpl:224
for _, name := range moderators {
//line views/stuff.qtpl:223
//line views/stuff.qtpl:224
qw422016.N().S(`
<li><a href="/hypha/`)
//line views/stuff.qtpl:224
//line views/stuff.qtpl:225
qw422016.E().S(cfg.UserHypha)
//line views/stuff.qtpl:224
//line views/stuff.qtpl:225
qw422016.N().S(`/`)
//line views/stuff.qtpl:224
//line views/stuff.qtpl:225
qw422016.E().S(name)
//line views/stuff.qtpl:224
//line views/stuff.qtpl:225
qw422016.N().S(`">`)
//line views/stuff.qtpl:224
//line views/stuff.qtpl:225
qw422016.E().S(name)
//line views/stuff.qtpl:224
//line views/stuff.qtpl:225
qw422016.N().S(`</a></li>
`)
//line views/stuff.qtpl:225
//line views/stuff.qtpl:226
}
//line views/stuff.qtpl:225
//line views/stuff.qtpl:226
qw422016.N().S(`</ol>
</section>
<section>
<h2>Editors</h2>
<ol>`)
//line views/stuff.qtpl:229
//line views/stuff.qtpl:230
for _, name := range editors {
//line views/stuff.qtpl:229
//line views/stuff.qtpl:230
qw422016.N().S(`
<li><a href="/hypha/`)
//line views/stuff.qtpl:230
//line views/stuff.qtpl:231
qw422016.E().S(cfg.UserHypha)
//line views/stuff.qtpl:230
//line views/stuff.qtpl:231
qw422016.N().S(`/`)
//line views/stuff.qtpl:230
//line views/stuff.qtpl:231
qw422016.E().S(name)
//line views/stuff.qtpl:230
//line views/stuff.qtpl:231
qw422016.N().S(`">`)
//line views/stuff.qtpl:230
//line views/stuff.qtpl:231
qw422016.E().S(name)
//line views/stuff.qtpl:230
//line views/stuff.qtpl:231
qw422016.N().S(`</a></li>
`)
//line views/stuff.qtpl:231
//line views/stuff.qtpl:232
}
//line views/stuff.qtpl:231
//line views/stuff.qtpl:232
qw422016.N().S(`</ol>
</section>
</main>
</div>
`)
//line views/stuff.qtpl:235
//line views/stuff.qtpl:236
}
//line views/stuff.qtpl:235
//line views/stuff.qtpl:236
func WriteUserListHTML(qq422016 qtio422016.Writer) {
//line views/stuff.qtpl:235
//line views/stuff.qtpl:236
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/stuff.qtpl:235
//line views/stuff.qtpl:236
StreamUserListHTML(qw422016)
//line views/stuff.qtpl:235
//line views/stuff.qtpl:236
qt422016.ReleaseWriter(qw422016)
//line views/stuff.qtpl:235
//line views/stuff.qtpl:236
}
//line views/stuff.qtpl:235
//line views/stuff.qtpl:236
func UserListHTML() string {
//line views/stuff.qtpl:235
//line views/stuff.qtpl:236
qb422016 := qt422016.AcquireByteBuffer()
//line views/stuff.qtpl:235
//line views/stuff.qtpl:236
WriteUserListHTML(qb422016)
//line views/stuff.qtpl:235
//line views/stuff.qtpl:236
qs422016 := string(qb422016.B)
//line views/stuff.qtpl:235
//line views/stuff.qtpl:236
qt422016.ReleaseByteBuffer(qb422016)
//line views/stuff.qtpl:235
//line views/stuff.qtpl:236
return qs422016
//line views/stuff.qtpl:235
//line views/stuff.qtpl:236
}
//line views/stuff.qtpl:237
//line views/stuff.qtpl:238
func StreamHyphaListHTML(qw422016 *qt422016.Writer) {
//line views/stuff.qtpl:237
//line views/stuff.qtpl:238
qw422016.N().S(`
<div class="layout">
<main class="main-width">
<h1>List of hyphae</h1>
<p>This wiki has `)
//line views/stuff.qtpl:241
//line views/stuff.qtpl:242
qw422016.N().D(hyphae.Count())
//line views/stuff.qtpl:241
//line views/stuff.qtpl:242
qw422016.N().S(` hyphae.</p>
<ul class="hypha-list">
`)
//line views/stuff.qtpl:243
//line views/stuff.qtpl:244
for h := range hyphae.YieldExistingHyphae() {
//line views/stuff.qtpl:243
//line views/stuff.qtpl:244
qw422016.N().S(`
<li class="hypha-list__entry">
<a class="hypha-list__link" href="/hypha/`)
//line views/stuff.qtpl:245
//line views/stuff.qtpl:246
qw422016.E().S(h.Name)
//line views/stuff.qtpl:245
//line views/stuff.qtpl:246
qw422016.N().S(`">`)
//line views/stuff.qtpl:245
//line views/stuff.qtpl:246
qw422016.E().S(util.BeautifulName(h.Name))
//line views/stuff.qtpl:245
//line views/stuff.qtpl:246
qw422016.N().S(`</a>
`)
//line views/stuff.qtpl:246
//line views/stuff.qtpl:247
if h.BinaryPath != "" {
//line views/stuff.qtpl:246
//line views/stuff.qtpl:247
qw422016.N().S(`
<span class="hypha-list__amnt-type">`)
//line views/stuff.qtpl:247
//line views/stuff.qtpl:248
qw422016.E().S(filepath.Ext(h.BinaryPath)[1:])
//line views/stuff.qtpl:247
//line views/stuff.qtpl:248
qw422016.N().S(`</span>
`)
//line views/stuff.qtpl:248
//line views/stuff.qtpl:249
}
//line views/stuff.qtpl:248
//line views/stuff.qtpl:249
qw422016.N().S(`
</li>
`)
//line views/stuff.qtpl:250
//line views/stuff.qtpl:251
}
//line views/stuff.qtpl:250
//line views/stuff.qtpl:251
qw422016.N().S(`
</ul>
</main>
</div>
`)
//line views/stuff.qtpl:254
//line views/stuff.qtpl:255
}
//line views/stuff.qtpl:254
//line views/stuff.qtpl:255
func WriteHyphaListHTML(qq422016 qtio422016.Writer) {
//line views/stuff.qtpl:254
//line views/stuff.qtpl:255
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/stuff.qtpl:254
//line views/stuff.qtpl:255
StreamHyphaListHTML(qw422016)
//line views/stuff.qtpl:254
//line views/stuff.qtpl:255
qt422016.ReleaseWriter(qw422016)
//line views/stuff.qtpl:254
//line views/stuff.qtpl:255
}
//line views/stuff.qtpl:254
//line views/stuff.qtpl:255
func HyphaListHTML() string {
//line views/stuff.qtpl:254
//line views/stuff.qtpl:255
qb422016 := qt422016.AcquireByteBuffer()
//line views/stuff.qtpl:254
//line views/stuff.qtpl:255
WriteHyphaListHTML(qb422016)
//line views/stuff.qtpl:254
//line views/stuff.qtpl:255
qs422016 := string(qb422016.B)
//line views/stuff.qtpl:254
//line views/stuff.qtpl:255
qt422016.ReleaseByteBuffer(qb422016)
//line views/stuff.qtpl:254
//line views/stuff.qtpl:255
return qs422016
//line views/stuff.qtpl:254
//line views/stuff.qtpl:255
}
//line views/stuff.qtpl:256
//line views/stuff.qtpl:257
func StreamAboutHTML(qw422016 *qt422016.Writer) {
//line views/stuff.qtpl:256
//line views/stuff.qtpl:257
qw422016.N().S(`
<div class="layout">
<main class="main-width">
<section>
<h1>About `)
//line views/stuff.qtpl:260
//line views/stuff.qtpl:261
qw422016.E().S(cfg.WikiName)
//line views/stuff.qtpl:260
//line views/stuff.qtpl:261
qw422016.N().S(`</h1>
<ul>
<li><b><a href="https://mycorrhiza.wiki">Mycorrhiza Wiki</a> version:</b> 1.5.0</li>
`)
//line views/stuff.qtpl:263
//line views/stuff.qtpl:264
if cfg.UseAuth {
//line views/stuff.qtpl:263
//line views/stuff.qtpl:264
qw422016.N().S(` <li><b>User count:</b> `)
//line views/stuff.qtpl:264
//line views/stuff.qtpl:265
qw422016.N().DUL(user.Count())
//line views/stuff.qtpl:264
//line views/stuff.qtpl:265
qw422016.N().S(`</li>
<li><b>Home page:</b> <a href="/">`)
//line views/stuff.qtpl:265
//line views/stuff.qtpl:266
qw422016.E().S(cfg.HomeHypha)
//line views/stuff.qtpl:265
//line views/stuff.qtpl:266
qw422016.N().S(`</a></li>
<li><b>Administrators:</b>`)
//line views/stuff.qtpl:266
//line views/stuff.qtpl:267
for i, username := range user.ListUsersWithGroup("admin") {
//line views/stuff.qtpl:267
//line views/stuff.qtpl:268
if i > 0 {
//line views/stuff.qtpl:267
//line views/stuff.qtpl:268
qw422016.N().S(`<span aria-hidden="true">, </span>
`)
//line views/stuff.qtpl:268
//line views/stuff.qtpl:269
}
//line views/stuff.qtpl:268
//line views/stuff.qtpl:269
qw422016.N().S(` <a href="/hypha/`)
//line views/stuff.qtpl:269
//line views/stuff.qtpl:270
qw422016.E().S(cfg.UserHypha)
//line views/stuff.qtpl:269
//line views/stuff.qtpl:270
qw422016.N().S(`/`)
//line views/stuff.qtpl:269
//line views/stuff.qtpl:270
qw422016.E().S(username)
//line views/stuff.qtpl:269
//line views/stuff.qtpl:270
qw422016.N().S(`">`)
//line views/stuff.qtpl:269
//line views/stuff.qtpl:270
qw422016.E().S(username)
//line views/stuff.qtpl:269
//line views/stuff.qtpl:270
qw422016.N().S(`</a>`)
//line views/stuff.qtpl:269
//line views/stuff.qtpl:270
}
//line views/stuff.qtpl:269
//line views/stuff.qtpl:270
qw422016.N().S(`</li>
`)
//line views/stuff.qtpl:270
//line views/stuff.qtpl:271
} else {
//line views/stuff.qtpl:270
//line views/stuff.qtpl:271
qw422016.N().S(` <li>This wiki does not use authorization</li>
`)
//line views/stuff.qtpl:272
//line views/stuff.qtpl:273
}
//line views/stuff.qtpl:272
//line views/stuff.qtpl:273
qw422016.N().S(` </ul>
<p>See <a href="/list">/list</a> for information about hyphae on this wiki.</p>
</section>
</main>
</div>
`)
//line views/stuff.qtpl:278
//line views/stuff.qtpl:279
}
//line views/stuff.qtpl:278
//line views/stuff.qtpl:279
func WriteAboutHTML(qq422016 qtio422016.Writer) {
//line views/stuff.qtpl:278
//line views/stuff.qtpl:279
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/stuff.qtpl:278
//line views/stuff.qtpl:279
StreamAboutHTML(qw422016)
//line views/stuff.qtpl:278
//line views/stuff.qtpl:279
qt422016.ReleaseWriter(qw422016)
//line views/stuff.qtpl:278
//line views/stuff.qtpl:279
}
//line views/stuff.qtpl:278
//line views/stuff.qtpl:279
func AboutHTML() string {
//line views/stuff.qtpl:278
//line views/stuff.qtpl:279
qb422016 := qt422016.AcquireByteBuffer()
//line views/stuff.qtpl:278
//line views/stuff.qtpl:279
WriteAboutHTML(qb422016)
//line views/stuff.qtpl:278
//line views/stuff.qtpl:279
qs422016 := string(qb422016.B)
//line views/stuff.qtpl:278
//line views/stuff.qtpl:279
qt422016.ReleaseByteBuffer(qb422016)
//line views/stuff.qtpl:278
//line views/stuff.qtpl:279
return qs422016
//line views/stuff.qtpl:278
//line views/stuff.qtpl:279
}
//line views/stuff.qtpl:280
//line views/stuff.qtpl:281
func StreamCommonScripts(qw422016 *qt422016.Writer) {
//line views/stuff.qtpl:280
//line views/stuff.qtpl:281
qw422016.N().S(`
`)
//line views/stuff.qtpl:281
//line views/stuff.qtpl:282
for _, scriptPath := range cfg.CommonScripts {
//line views/stuff.qtpl:281
//line views/stuff.qtpl:282
qw422016.N().S(`
<script src="`)
//line views/stuff.qtpl:282
//line views/stuff.qtpl:283
qw422016.E().S(scriptPath)
//line views/stuff.qtpl:282
//line views/stuff.qtpl:283
qw422016.N().S(`"></script>
`)
//line views/stuff.qtpl:283
//line views/stuff.qtpl:284
}
//line views/stuff.qtpl:283
//line views/stuff.qtpl:284
qw422016.N().S(`
`)
//line views/stuff.qtpl:284
//line views/stuff.qtpl:285
}
//line views/stuff.qtpl:284
//line views/stuff.qtpl:285
func WriteCommonScripts(qq422016 qtio422016.Writer) {
//line views/stuff.qtpl:284
//line views/stuff.qtpl:285
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/stuff.qtpl:284
//line views/stuff.qtpl:285
StreamCommonScripts(qw422016)
//line views/stuff.qtpl:284
//line views/stuff.qtpl:285
qt422016.ReleaseWriter(qw422016)
//line views/stuff.qtpl:284
//line views/stuff.qtpl:285
}
//line views/stuff.qtpl:284
//line views/stuff.qtpl:285
func CommonScripts() string {
//line views/stuff.qtpl:284
//line views/stuff.qtpl:285
qb422016 := qt422016.AcquireByteBuffer()
//line views/stuff.qtpl:284
//line views/stuff.qtpl:285
WriteCommonScripts(qb422016)
//line views/stuff.qtpl:284
//line views/stuff.qtpl:285
qs422016 := string(qb422016.B)
//line views/stuff.qtpl:284
//line views/stuff.qtpl:285
qt422016.ReleaseByteBuffer(qb422016)
//line views/stuff.qtpl:284
//line views/stuff.qtpl:285
return qs422016
//line views/stuff.qtpl:284
//line views/stuff.qtpl:285
}