mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-01-21 07:46:52 +00:00
Merge l18n with master updates
This commit is contained in:
commit
bca1c23d36
4
go.mod
4
go.mod
@ -3,7 +3,7 @@ module github.com/bouncepaw/mycorrhiza
|
||||
go 1.16
|
||||
|
||||
require (
|
||||
github.com/bouncepaw/mycomarkup/v2 v2.0.3
|
||||
github.com/bouncepaw/mycomarkup/v2 v2.1.0
|
||||
github.com/go-ini/ini v1.62.0
|
||||
github.com/gorilla/feeds v1.1.1
|
||||
github.com/gorilla/mux v1.8.0
|
||||
@ -19,7 +19,7 @@ require (
|
||||
)
|
||||
|
||||
// Use this trick to test mycomarkup:
|
||||
// replace github.com/bouncepaw/mycomarkup/v2 v2.0.0 => "/Users/bouncepaw/GolandProjects/mycomarkup"
|
||||
// replace github.com/bouncepaw/mycomarkup/v2 v2.1.0 => "/Users/bouncepaw/GolandProjects/mycomarkup"
|
||||
|
||||
// Use this utility every time Mycomarkup gets broken:
|
||||
// https://github.com/marwan-at-work/mod
|
||||
|
6
go.sum
6
go.sum
@ -1,10 +1,8 @@
|
||||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
|
||||
github.com/bouncepaw/mycomarkup/v2 v2.0.2 h1:BT7waogdo7KH7PVqksfmj60j8MFCcmu998oKaPnTfh0=
|
||||
github.com/bouncepaw/mycomarkup/v2 v2.0.2/go.mod h1:sIvtvJFGG61ZeSUC+fNBrFmrQ2xBpTMZezk/QtxiQbk=
|
||||
github.com/bouncepaw/mycomarkup/v2 v2.0.3 h1:qIO69XA9lZA87HbMPXhk9R4OL0aF0JJQcKOTx3ZjMIo=
|
||||
github.com/bouncepaw/mycomarkup/v2 v2.0.3/go.mod h1:sIvtvJFGG61ZeSUC+fNBrFmrQ2xBpTMZezk/QtxiQbk=
|
||||
github.com/bouncepaw/mycomarkup/v2 v2.1.0 h1:9ZtgiovBaL9xXLGLoXQG8Jgb1VtZ3mlyU5qPn3BGx+4=
|
||||
github.com/bouncepaw/mycomarkup/v2 v2.1.0/go.mod h1:sIvtvJFGG61ZeSUC+fNBrFmrQ2xBpTMZezk/QtxiQbk=
|
||||
github.com/go-ini/ini v1.62.0 h1:7VJT/ZXjzqSrvtraFp4ONq80hTcRQth1c9ZnQ3uNQvU=
|
||||
github.com/go-ini/ini v1.62.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
|
||||
|
19
help/en/prevnext.myco
Normal file
19
help/en/prevnext.myco
Normal 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.
|
19
help/ru/prevnext.myco
Normal file
19
help/ru/prevnext.myco
Normal file
@ -0,0 +1,19 @@
|
||||
# Назад/далее
|
||||
Под каждой гифой есть раздел **«назад/далее»** с быстрыми ссылками на предыдущую и следующую гифы по алфавитному порядку.
|
||||
|
||||
Эта функция подталкивает вас именовать гифы так, чтобы использование этих ссылок имело смысл. Например, если вы храните страницы книги, вам стоит проименовать их //p01//, //p02//, //p03// и т.д.
|
||||
|
||||
Невозможно изменить гифы, на которую ведут ссылки этого раздела. Если вы хотите предоставить другой способ последовательной навигации, проставьте собственные ссылки.
|
||||
|
||||
## Горячие клавиши
|
||||
Нажмите `n` (**n**ext), чтобы перейти на следующую страницу. Для перехода на предыдущую, нажмите `p` (**p**revious).
|
||||
|
||||
## Для администраторов: как убрать эти ссылки
|
||||
Для некоторых вики эти ссылки несут мало смысла или не несут вовсе. В таком случае лучше их скрыть.
|
||||
|
||||
В файле `your-wiki/static/custom.css` пропишите следующее:
|
||||
```css
|
||||
.prevnext { display: none; }
|
||||
```
|
||||
|
||||
Раздел останется на месте, но никто его не увидит. Горячие клавиши всё ещё будут работать.
|
@ -2,8 +2,8 @@
|
||||
package hyphae
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"sort"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// YieldExistingHyphae iterates over all hyphae and yields all existing ones.
|
||||
@ -48,14 +48,22 @@ func PathographicSort(src chan string) <-chan string {
|
||||
// Classic lexicographical sort with a twist
|
||||
c := 0
|
||||
for {
|
||||
if c == len(raw[i]) { return true }
|
||||
if c == len(raw[j]) { return false }
|
||||
if c == len(raw[i]) {
|
||||
return true
|
||||
}
|
||||
if c == len(raw[j]) {
|
||||
return false
|
||||
}
|
||||
if raw[i][c] == raw[j][c] {
|
||||
c++
|
||||
} else {
|
||||
// The twist: subhyphae-awareness is about pushing slash upwards
|
||||
if raw[i][c] == slash { return true }
|
||||
if raw[j][c] == slash { return false }
|
||||
if raw[i][c] == slash {
|
||||
return true
|
||||
}
|
||||
if raw[j][c] == slash {
|
||||
return false
|
||||
}
|
||||
return raw[i][c] < raw[j][c]
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Code generated by go-localize; DO NOT EDIT.
|
||||
// This file was generated by robots at
|
||||
// 2021-09-27 16:30:27.741694276 +0800 +08 m=+0.002576981
|
||||
// 2021-09-27 16:59:07.562882425 +0800 +08 m=+0.002415944
|
||||
|
||||
package l18n
|
||||
|
||||
@ -109,6 +109,7 @@ var localizations = map[string]string{
|
||||
"en.help.lock": "Lock",
|
||||
"en.help.main": "Main",
|
||||
"en.help.mycomarkup": "Mycomarkup",
|
||||
"en.help.prevnext": "Previous/next",
|
||||
"en.help.recent_changes": "Recent changes",
|
||||
"en.help.sibling_hyphae": "Sibling hyphae",
|
||||
"en.help.special_pages": "Special pages",
|
||||
@ -210,6 +211,7 @@ var localizations = map[string]string{
|
||||
"en.ui.rename_recurse": "Rename subhyphae too",
|
||||
"en.ui.rename_tip": "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.",
|
||||
"en.ui.rename_to": "New name",
|
||||
"en.ui.revision_link": "Get Mycomarkup source of this revision",
|
||||
"en.ui.revision_no_text": "This hypha had no text at this revision.",
|
||||
"en.ui.revision_title": "{{.name}} at {{.rev}}",
|
||||
"en.ui.revision_warning": "Please note that viewing attachments of hyphae is not supported in history for now.",
|
||||
@ -322,6 +324,7 @@ var localizations = map[string]string{
|
||||
"ru.help.lock": "Блокировка",
|
||||
"ru.help.main": "Введение",
|
||||
"ru.help.mycomarkup": "Микоразметка",
|
||||
"ru.help.prevnext": "Назад/далее",
|
||||
"ru.help.recent_changes": "Недавние изменения",
|
||||
"ru.help.sibling_hyphae": "Гифы-сиблинги",
|
||||
"ru.help.special_pages": "Специальные страницы",
|
||||
@ -427,6 +430,7 @@ var localizations = map[string]string{
|
||||
"ru.ui.rename_recurse": "Также переименовать подгифы",
|
||||
"ru.ui.rename_tip": "Если вы переименуете эту гифу, сломаются все ссылки, ведущие на неё, а также исходящие относительные ссылки. Также вы потеряете всю текущую историю для нового названия. Переименовывайте аккуратно.",
|
||||
"ru.ui.rename_to": "Новое название",
|
||||
"ru.ui.revision_link": "Посмотреть код микоразметки для этой ревизии",
|
||||
"ru.ui.revision_no_text": "В этой ревизии гифы не было текста.",
|
||||
"ru.ui.revision_title": "{{.name}} из {{.rev}}",
|
||||
"ru.ui.revision_warning": "Обратите внимание, просмотр вложений в истории гифы пока что недоступен.",
|
||||
|
@ -13,6 +13,7 @@
|
||||
"attachment": "Attachment",
|
||||
"mycomarkup": "Mycomarkup",
|
||||
"interface": "Interface",
|
||||
"prevnext": "Previous/next",
|
||||
"top_bar": "Top bar",
|
||||
"sibling_hyphae": "Sibling hyphae",
|
||||
"special_pages": "Special pages",
|
||||
|
@ -67,6 +67,7 @@
|
||||
|
||||
"revision_title": "{{.name}} at {{.rev}}",
|
||||
"revision_warning": "Please note that viewing attachments of hyphae is not supported in history for now.",
|
||||
"revision_link": "Get Mycomarkup source of this revision",
|
||||
"revision_no_text": "This hypha had no text at this revision.",
|
||||
|
||||
"about_title": "About {{.name}}",
|
||||
|
@ -13,6 +13,7 @@
|
||||
"attachment": "Вложение",
|
||||
"mycomarkup": "Микоразметка",
|
||||
"interface": "Интерфейс",
|
||||
"prevnext": "Назад/далее",
|
||||
"top_bar": "Верхняя панель",
|
||||
"sibling_hyphae": "Гифы-сиблинги",
|
||||
"special_pages": "Специальные страницы",
|
||||
|
@ -70,6 +70,7 @@
|
||||
|
||||
"revision_title": "{{.name}} из {{.rev}}",
|
||||
"revision_warning": "Обратите внимание, просмотр вложений в истории гифы пока что недоступен.",
|
||||
"revision_link": "Посмотреть код микоразметки для этой ревизии",
|
||||
"revision_no_text": "В этой ревизии гифы не было текста.",
|
||||
|
||||
"about_title": "О вики «{{.name}}»",
|
||||
|
@ -1,4 +1,3 @@
|
||||
// TODO: l18n
|
||||
{% import "fmt" %}
|
||||
{% import "net/http" %}
|
||||
{% import "time" %}
|
||||
|
@ -1,454 +1,452 @@
|
||||
// Code generated by qtc from "history.qtpl". DO NOT EDIT.
|
||||
// See https://github.com/valyala/quicktemplate for details.
|
||||
|
||||
// TODO: l18n
|
||||
|
||||
//line views/history.qtpl:2
|
||||
//line views/history.qtpl:1
|
||||
package views
|
||||
|
||||
//line views/history.qtpl:2
|
||||
//line views/history.qtpl:1
|
||||
import "fmt"
|
||||
|
||||
//line views/history.qtpl:3
|
||||
//line views/history.qtpl:2
|
||||
import "net/http"
|
||||
|
||||
//line views/history.qtpl:4
|
||||
//line views/history.qtpl:3
|
||||
import "time"
|
||||
|
||||
//line views/history.qtpl:6
|
||||
//line views/history.qtpl:5
|
||||
import "github.com/bouncepaw/mycorrhiza/cfg"
|
||||
|
||||
//line views/history.qtpl:7
|
||||
//line views/history.qtpl:6
|
||||
import "github.com/bouncepaw/mycorrhiza/l18n"
|
||||
|
||||
//line views/history.qtpl:8
|
||||
//line views/history.qtpl:7
|
||||
import "github.com/bouncepaw/mycorrhiza/user"
|
||||
|
||||
//line views/history.qtpl:9
|
||||
//line views/history.qtpl:8
|
||||
import "github.com/bouncepaw/mycorrhiza/hyphae"
|
||||
|
||||
//line views/history.qtpl:10
|
||||
//line views/history.qtpl:9
|
||||
import "github.com/bouncepaw/mycorrhiza/history"
|
||||
|
||||
//line views/history.qtpl:13
|
||||
//line views/history.qtpl:12
|
||||
import (
|
||||
qtio422016 "io"
|
||||
|
||||
qt422016 "github.com/valyala/quicktemplate"
|
||||
)
|
||||
|
||||
//line views/history.qtpl:13
|
||||
//line views/history.qtpl:12
|
||||
var (
|
||||
_ = qtio422016.Copy
|
||||
_ = qt422016.AcquireByteBuffer
|
||||
)
|
||||
|
||||
//line views/history.qtpl:13
|
||||
//line views/history.qtpl:12
|
||||
func StreamPrimitiveDiffHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) {
|
||||
//line views/history.qtpl:13
|
||||
//line views/history.qtpl:12
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:15
|
||||
//line views/history.qtpl:14
|
||||
lc := l18n.FromRequest(rq)
|
||||
text, err := history.PrimitiveDiffAtRevision(h.TextPartPath(), hash)
|
||||
if err != nil {
|
||||
text = err.Error()
|
||||
}
|
||||
|
||||
//line views/history.qtpl:20
|
||||
//line views/history.qtpl:19
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<article>
|
||||
<h1>`)
|
||||
//line views/history.qtpl:24
|
||||
//line views/history.qtpl:23
|
||||
qw422016.N().S(lc.Get("ui.diff_title", &l18n.Replacements{"name": beautifulLink(h.Name), "rev": hash}))
|
||||
//line views/history.qtpl:24
|
||||
//line views/history.qtpl:23
|
||||
qw422016.N().S(`</h1>
|
||||
<pre class="codeblock"><code>`)
|
||||
//line views/history.qtpl:25
|
||||
//line views/history.qtpl:24
|
||||
qw422016.E().S(text)
|
||||
//line views/history.qtpl:25
|
||||
//line views/history.qtpl:24
|
||||
qw422016.N().S(`</code></pre>
|
||||
</article>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/history.qtpl:29
|
||||
//line views/history.qtpl:28
|
||||
}
|
||||
|
||||
//line views/history.qtpl:29
|
||||
//line views/history.qtpl:28
|
||||
func WritePrimitiveDiffHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) {
|
||||
//line views/history.qtpl:29
|
||||
//line views/history.qtpl:28
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/history.qtpl:29
|
||||
//line views/history.qtpl:28
|
||||
StreamPrimitiveDiffHTML(qw422016, rq, h, u, hash)
|
||||
//line views/history.qtpl:29
|
||||
//line views/history.qtpl:28
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/history.qtpl:29
|
||||
//line views/history.qtpl:28
|
||||
}
|
||||
|
||||
//line views/history.qtpl:29
|
||||
//line views/history.qtpl:28
|
||||
func PrimitiveDiffHTML(rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) string {
|
||||
//line views/history.qtpl:29
|
||||
//line views/history.qtpl:28
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/history.qtpl:29
|
||||
//line views/history.qtpl:28
|
||||
WritePrimitiveDiffHTML(qb422016, rq, h, u, hash)
|
||||
//line views/history.qtpl:29
|
||||
//line views/history.qtpl:28
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/history.qtpl:29
|
||||
//line views/history.qtpl:28
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/history.qtpl:29
|
||||
//line views/history.qtpl:28
|
||||
return qs422016
|
||||
//line views/history.qtpl:29
|
||||
//line views/history.qtpl:28
|
||||
}
|
||||
|
||||
//line views/history.qtpl:31
|
||||
//line views/history.qtpl:30
|
||||
func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int, lc *l18n.Localizer) {
|
||||
//line views/history.qtpl:31
|
||||
//line views/history.qtpl:30
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width recent-changes">
|
||||
<h1>`)
|
||||
//line views/history.qtpl:34
|
||||
//line views/history.qtpl:33
|
||||
qw422016.E().S(lc.Get("ui.recent_heading"))
|
||||
//line views/history.qtpl:34
|
||||
//line views/history.qtpl:33
|
||||
qw422016.N().S(`</h1>
|
||||
|
||||
<nav class="recent-changes__count">
|
||||
`)
|
||||
//line views/history.qtpl:37
|
||||
//line views/history.qtpl:36
|
||||
qw422016.E().S(lc.Get("ui.recent_count_pre"))
|
||||
//line views/history.qtpl:37
|
||||
//line views/history.qtpl:36
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:38
|
||||
//line views/history.qtpl:37
|
||||
for i, m := range []int{20, 50, 100} {
|
||||
//line views/history.qtpl:38
|
||||
//line views/history.qtpl:37
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:39
|
||||
//line views/history.qtpl:38
|
||||
if i > 0 {
|
||||
//line views/history.qtpl:39
|
||||
//line views/history.qtpl:38
|
||||
qw422016.N().S(`
|
||||
<span aria-hidden="true">|</span>
|
||||
`)
|
||||
//line views/history.qtpl:41
|
||||
//line views/history.qtpl:40
|
||||
}
|
||||
//line views/history.qtpl:41
|
||||
//line views/history.qtpl:40
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:42
|
||||
//line views/history.qtpl:41
|
||||
if m == n {
|
||||
//line views/history.qtpl:42
|
||||
//line views/history.qtpl:41
|
||||
qw422016.N().S(`
|
||||
<b>`)
|
||||
//line views/history.qtpl:43
|
||||
//line views/history.qtpl:42
|
||||
qw422016.N().D(m)
|
||||
//line views/history.qtpl:43
|
||||
//line views/history.qtpl:42
|
||||
qw422016.N().S(`</b>
|
||||
`)
|
||||
//line views/history.qtpl:44
|
||||
//line views/history.qtpl:43
|
||||
} else {
|
||||
//line views/history.qtpl:44
|
||||
//line views/history.qtpl:43
|
||||
qw422016.N().S(`
|
||||
<a href="/recent-changes/`)
|
||||
//line views/history.qtpl:45
|
||||
//line views/history.qtpl:44
|
||||
qw422016.N().D(m)
|
||||
//line views/history.qtpl:45
|
||||
//line views/history.qtpl:44
|
||||
qw422016.N().S(`">`)
|
||||
//line views/history.qtpl:45
|
||||
//line views/history.qtpl:44
|
||||
qw422016.N().D(m)
|
||||
//line views/history.qtpl:45
|
||||
//line views/history.qtpl:44
|
||||
qw422016.N().S(`</a>
|
||||
`)
|
||||
//line views/history.qtpl:46
|
||||
//line views/history.qtpl:45
|
||||
}
|
||||
//line views/history.qtpl:46
|
||||
//line views/history.qtpl:45
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:47
|
||||
//line views/history.qtpl:46
|
||||
}
|
||||
//line views/history.qtpl:47
|
||||
//line views/history.qtpl:46
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:48
|
||||
//line views/history.qtpl:47
|
||||
qw422016.E().S(lc.Get("ui.recent_count_post"))
|
||||
//line views/history.qtpl:48
|
||||
//line views/history.qtpl:47
|
||||
qw422016.N().S(`
|
||||
</nav>
|
||||
|
||||
<p><img class="icon" width="20" height="20" src="/static/icon/feed.svg">`)
|
||||
//line views/history.qtpl:51
|
||||
//line views/history.qtpl:50
|
||||
qw422016.N().S(lc.Get("ui.recent_subscribe", &l18n.Replacements{"rss": "<a href=\"/recent-changes-rss\">RSS</a>", "atom": "<a href=\"/recent-changes-atom\">Atom</a>", "json": fmt.Sprintf("<a href=\"/recent-changes-json\">%s</a>", lc.Get("ui.recent_subscribe_json"))}))
|
||||
//line views/history.qtpl:51
|
||||
//line views/history.qtpl:50
|
||||
qw422016.N().S(`</p>
|
||||
|
||||
`)
|
||||
//line views/history.qtpl:58
|
||||
//line views/history.qtpl:57
|
||||
qw422016.N().S(`
|
||||
|
||||
`)
|
||||
//line views/history.qtpl:61
|
||||
//line views/history.qtpl:60
|
||||
changes := history.RecentChanges(n)
|
||||
var year, day int
|
||||
var month time.Month
|
||||
|
||||
//line views/history.qtpl:64
|
||||
//line views/history.qtpl:63
|
||||
qw422016.N().S(`
|
||||
<section class="recent-changes__list" role="feed">
|
||||
`)
|
||||
//line views/history.qtpl:66
|
||||
//line views/history.qtpl:65
|
||||
if len(changes) == 0 {
|
||||
//line views/history.qtpl:66
|
||||
//line views/history.qtpl:65
|
||||
qw422016.N().S(`
|
||||
<p>`)
|
||||
//line views/history.qtpl:67
|
||||
//line views/history.qtpl:66
|
||||
qw422016.E().S(lc.Get("ui.recent_empty"))
|
||||
//line views/history.qtpl:67
|
||||
//line views/history.qtpl:66
|
||||
qw422016.N().S(`</p>
|
||||
`)
|
||||
//line views/history.qtpl:68
|
||||
//line views/history.qtpl:67
|
||||
} else {
|
||||
//line views/history.qtpl:68
|
||||
//line views/history.qtpl:67
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:69
|
||||
//line views/history.qtpl:68
|
||||
for i, entry := range changes {
|
||||
//line views/history.qtpl:69
|
||||
//line views/history.qtpl:68
|
||||
qw422016.N().S(`
|
||||
|
||||
`)
|
||||
//line views/history.qtpl:71
|
||||
//line views/history.qtpl:70
|
||||
y, m, d := entry.Time.UTC().Date()
|
||||
|
||||
//line views/history.qtpl:71
|
||||
//line views/history.qtpl:70
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:72
|
||||
//line views/history.qtpl:71
|
||||
if d != day || m != month || y != year {
|
||||
//line views/history.qtpl:72
|
||||
//line views/history.qtpl:71
|
||||
qw422016.N().S(`
|
||||
<h2 class="recent-changes__heading">
|
||||
`)
|
||||
//line views/history.qtpl:74
|
||||
//line views/history.qtpl:73
|
||||
qw422016.E().S(fmt.Sprintf("%04d-%02d-%02d", y, m, d))
|
||||
//line views/history.qtpl:74
|
||||
//line views/history.qtpl:73
|
||||
qw422016.N().S(`
|
||||
</h2>
|
||||
`)
|
||||
//line views/history.qtpl:76
|
||||
//line views/history.qtpl:75
|
||||
year, month, day = y, m, d
|
||||
|
||||
//line views/history.qtpl:76
|
||||
//line views/history.qtpl:75
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:77
|
||||
//line views/history.qtpl:76
|
||||
}
|
||||
//line views/history.qtpl:77
|
||||
//line views/history.qtpl:76
|
||||
qw422016.N().S(`
|
||||
|
||||
<div class="recent-changes__entry" role="article"
|
||||
aria-setsize="`)
|
||||
//line views/history.qtpl:80
|
||||
//line views/history.qtpl:79
|
||||
qw422016.N().D(n)
|
||||
//line views/history.qtpl:80
|
||||
//line views/history.qtpl:79
|
||||
qw422016.N().S(`" aria-posinset="`)
|
||||
//line views/history.qtpl:80
|
||||
//line views/history.qtpl:79
|
||||
qw422016.N().D(i)
|
||||
//line views/history.qtpl:80
|
||||
//line views/history.qtpl:79
|
||||
qw422016.N().S(`">
|
||||
`)
|
||||
//line views/history.qtpl:81
|
||||
//line views/history.qtpl:80
|
||||
qw422016.N().S(recentChangesEntry(entry))
|
||||
//line views/history.qtpl:81
|
||||
//line views/history.qtpl:80
|
||||
qw422016.N().S(`
|
||||
</div>
|
||||
|
||||
`)
|
||||
//line views/history.qtpl:84
|
||||
//line views/history.qtpl:83
|
||||
}
|
||||
//line views/history.qtpl:84
|
||||
//line views/history.qtpl:83
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:85
|
||||
//line views/history.qtpl:84
|
||||
}
|
||||
//line views/history.qtpl:85
|
||||
//line views/history.qtpl:84
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:86
|
||||
//line views/history.qtpl:85
|
||||
qw422016.N().S(helpTopicBadgeHTML(lc.Locale, "recent_changes"))
|
||||
//line views/history.qtpl:86
|
||||
//line views/history.qtpl:85
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/history.qtpl:90
|
||||
//line views/history.qtpl:89
|
||||
}
|
||||
|
||||
//line views/history.qtpl:90
|
||||
//line views/history.qtpl:89
|
||||
func WriteRecentChangesHTML(qq422016 qtio422016.Writer, n int, lc *l18n.Localizer) {
|
||||
//line views/history.qtpl:90
|
||||
//line views/history.qtpl:89
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/history.qtpl:90
|
||||
//line views/history.qtpl:89
|
||||
StreamRecentChangesHTML(qw422016, n, lc)
|
||||
//line views/history.qtpl:90
|
||||
//line views/history.qtpl:89
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/history.qtpl:90
|
||||
//line views/history.qtpl:89
|
||||
}
|
||||
|
||||
//line views/history.qtpl:90
|
||||
//line views/history.qtpl:89
|
||||
func RecentChangesHTML(n int, lc *l18n.Localizer) string {
|
||||
//line views/history.qtpl:90
|
||||
//line views/history.qtpl:89
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/history.qtpl:90
|
||||
//line views/history.qtpl:89
|
||||
WriteRecentChangesHTML(qb422016, n, lc)
|
||||
//line views/history.qtpl:90
|
||||
//line views/history.qtpl:89
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/history.qtpl:90
|
||||
//line views/history.qtpl:89
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/history.qtpl:90
|
||||
//line views/history.qtpl:89
|
||||
return qs422016
|
||||
//line views/history.qtpl:90
|
||||
//line views/history.qtpl:89
|
||||
}
|
||||
|
||||
//line views/history.qtpl:92
|
||||
//line views/history.qtpl:91
|
||||
func streamrecentChangesEntry(qw422016 *qt422016.Writer, rev history.Revision) {
|
||||
//line views/history.qtpl:92
|
||||
//line views/history.qtpl:91
|
||||
qw422016.N().S(`
|
||||
<div>
|
||||
<time class="recent-changes__entry__time">
|
||||
`)
|
||||
//line views/history.qtpl:95
|
||||
//line views/history.qtpl:94
|
||||
qw422016.E().S(rev.Time.UTC().Format("15:04 UTC"))
|
||||
//line views/history.qtpl:95
|
||||
//line views/history.qtpl:94
|
||||
qw422016.N().S(`
|
||||
</time>
|
||||
<span class="recent-changes__entry__message">`)
|
||||
//line views/history.qtpl:97
|
||||
//line views/history.qtpl:96
|
||||
qw422016.E().S(rev.Hash)
|
||||
//line views/history.qtpl:97
|
||||
//line views/history.qtpl:96
|
||||
qw422016.N().S(`</span>
|
||||
|
||||
`)
|
||||
//line views/history.qtpl:99
|
||||
//line views/history.qtpl:98
|
||||
if rev.Username != "anon" {
|
||||
//line views/history.qtpl:99
|
||||
//line views/history.qtpl:98
|
||||
qw422016.N().S(`
|
||||
<span class="recent-changes__entry__author">
|
||||
— <a href="/hypha/`)
|
||||
//line views/history.qtpl:101
|
||||
//line views/history.qtpl:100
|
||||
qw422016.E().S(cfg.UserHypha)
|
||||
//line views/history.qtpl:101
|
||||
//line views/history.qtpl:100
|
||||
qw422016.N().S(`/`)
|
||||
//line views/history.qtpl:101
|
||||
//line views/history.qtpl:100
|
||||
qw422016.E().S(rev.Username)
|
||||
//line views/history.qtpl:101
|
||||
//line views/history.qtpl:100
|
||||
qw422016.N().S(`" rel="author">`)
|
||||
//line views/history.qtpl:101
|
||||
//line views/history.qtpl:100
|
||||
qw422016.E().S(rev.Username)
|
||||
//line views/history.qtpl:101
|
||||
//line views/history.qtpl:100
|
||||
qw422016.N().S(`</a>
|
||||
</span>
|
||||
`)
|
||||
//line views/history.qtpl:103
|
||||
//line views/history.qtpl:102
|
||||
}
|
||||
//line views/history.qtpl:103
|
||||
//line views/history.qtpl:102
|
||||
qw422016.N().S(`
|
||||
</div>
|
||||
<div>
|
||||
<span class="recent-changes__entry__links">
|
||||
`)
|
||||
//line views/history.qtpl:107
|
||||
//line views/history.qtpl:106
|
||||
qw422016.N().S(rev.HyphaeLinksHTML())
|
||||
//line views/history.qtpl:107
|
||||
//line views/history.qtpl:106
|
||||
qw422016.N().S(`
|
||||
</span>
|
||||
<span class="recent-changes__entry__message">
|
||||
`)
|
||||
//line views/history.qtpl:110
|
||||
//line views/history.qtpl:109
|
||||
qw422016.E().S(rev.Message)
|
||||
//line views/history.qtpl:110
|
||||
//line views/history.qtpl:109
|
||||
qw422016.N().S(`
|
||||
</span>
|
||||
</div>
|
||||
`)
|
||||
//line views/history.qtpl:113
|
||||
//line views/history.qtpl:112
|
||||
}
|
||||
|
||||
//line views/history.qtpl:113
|
||||
//line views/history.qtpl:112
|
||||
func writerecentChangesEntry(qq422016 qtio422016.Writer, rev history.Revision) {
|
||||
//line views/history.qtpl:113
|
||||
//line views/history.qtpl:112
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/history.qtpl:113
|
||||
//line views/history.qtpl:112
|
||||
streamrecentChangesEntry(qw422016, rev)
|
||||
//line views/history.qtpl:113
|
||||
//line views/history.qtpl:112
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/history.qtpl:113
|
||||
//line views/history.qtpl:112
|
||||
}
|
||||
|
||||
//line views/history.qtpl:113
|
||||
//line views/history.qtpl:112
|
||||
func recentChangesEntry(rev history.Revision) string {
|
||||
//line views/history.qtpl:113
|
||||
//line views/history.qtpl:112
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/history.qtpl:113
|
||||
//line views/history.qtpl:112
|
||||
writerecentChangesEntry(qb422016, rev)
|
||||
//line views/history.qtpl:113
|
||||
//line views/history.qtpl:112
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/history.qtpl:113
|
||||
//line views/history.qtpl:112
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/history.qtpl:113
|
||||
//line views/history.qtpl:112
|
||||
return qs422016
|
||||
//line views/history.qtpl:113
|
||||
//line views/history.qtpl:112
|
||||
}
|
||||
|
||||
//line views/history.qtpl:115
|
||||
//line views/history.qtpl:114
|
||||
func StreamHistoryHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, list string, lc *l18n.Localizer) {
|
||||
//line views/history.qtpl:115
|
||||
//line views/history.qtpl:114
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<article class="history">
|
||||
<h1>`)
|
||||
//line views/history.qtpl:119
|
||||
//line views/history.qtpl:118
|
||||
qw422016.N().S(fmt.Sprintf(lc.Get("ui.history_title"), beautifulLink(hyphaName)))
|
||||
//line views/history.qtpl:119
|
||||
//line views/history.qtpl:118
|
||||
qw422016.N().S(`</h1>
|
||||
`)
|
||||
//line views/history.qtpl:120
|
||||
//line views/history.qtpl:119
|
||||
qw422016.N().S(list)
|
||||
//line views/history.qtpl:120
|
||||
//line views/history.qtpl:119
|
||||
qw422016.N().S(`
|
||||
</article>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/history.qtpl:124
|
||||
//line views/history.qtpl:123
|
||||
}
|
||||
|
||||
//line views/history.qtpl:124
|
||||
//line views/history.qtpl:123
|
||||
func WriteHistoryHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, list string, lc *l18n.Localizer) {
|
||||
//line views/history.qtpl:124
|
||||
//line views/history.qtpl:123
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/history.qtpl:124
|
||||
//line views/history.qtpl:123
|
||||
StreamHistoryHTML(qw422016, rq, hyphaName, list, lc)
|
||||
//line views/history.qtpl:124
|
||||
//line views/history.qtpl:123
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/history.qtpl:124
|
||||
//line views/history.qtpl:123
|
||||
}
|
||||
|
||||
//line views/history.qtpl:124
|
||||
//line views/history.qtpl:123
|
||||
func HistoryHTML(rq *http.Request, hyphaName, list string, lc *l18n.Localizer) string {
|
||||
//line views/history.qtpl:124
|
||||
//line views/history.qtpl:123
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/history.qtpl:124
|
||||
//line views/history.qtpl:123
|
||||
WriteHistoryHTML(qb422016, rq, hyphaName, list, lc)
|
||||
//line views/history.qtpl:124
|
||||
//line views/history.qtpl:123
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/history.qtpl:124
|
||||
//line views/history.qtpl:123
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/history.qtpl:124
|
||||
//line views/history.qtpl:123
|
||||
return qs422016
|
||||
//line views/history.qtpl:124
|
||||
//line views/history.qtpl:123
|
||||
}
|
||||
|
@ -78,6 +78,8 @@
|
||||
{% endfunc %}
|
||||
|
||||
If `contents` == "", a helpful message is shown instead.
|
||||
|
||||
If you rename .prevnext, change the docs too.
|
||||
{% func HyphaHTML(rq *http.Request, lc *l18n.Localizer, h *hyphae.Hypha, contents string) %}
|
||||
{% code
|
||||
siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name)
|
||||
@ -127,7 +129,7 @@ If `contents` == "", a helpful message is shown instead.
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<article>
|
||||
<p>{%s lc.Get("ui.revision_warning") %}</p>
|
||||
<p>{%s lc.Get("ui.revision_warning") %} <a href="/rev-text/{%s revHash %}/{%s h.Name %}">{%s lc.Get("ui.revision_link") %}</a></p>
|
||||
{%s= NaviTitleHTML(h) %}
|
||||
{%s= contents %}
|
||||
</article>
|
||||
|
@ -299,17 +299,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:81
|
||||
//line views/readers.qtpl:83
|
||||
func StreamHyphaHTML(qw422016 *qt422016.Writer, rq *http.Request, lc *l18n.Localizer, h *hyphae.Hypha, contents string) {
|
||||
//line views/readers.qtpl:81
|
||||
//line views/readers.qtpl:83
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:83
|
||||
//line views/readers.qtpl:85
|
||||
siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name)
|
||||
u := user.FromRequest(rq)
|
||||
|
||||
//line views/readers.qtpl:85
|
||||
//line views/readers.qtpl:87
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
@ -318,273 +320,285 @@ func StreamHyphaHTML(qw422016 *qt422016.Writer, rq *http.Request, lc *l18n.Local
|
||||
<a class="jump-btn__link" href="#hypha-bottom">↓</a>
|
||||
</div>
|
||||
`)
|
||||
//line views/readers.qtpl:92
|
||||
//line views/readers.qtpl:94
|
||||
if u.CanProceed("edit") {
|
||||
//line views/readers.qtpl:92
|
||||
//line views/readers.qtpl:94
|
||||
qw422016.N().S(`<div class="btn edit-btn">
|
||||
<a class="edit-btn__link" href="/edit/`)
|
||||
//line views/readers.qtpl:93
|
||||
//line views/readers.qtpl:95
|
||||
qw422016.E().S(h.Name)
|
||||
//line views/readers.qtpl:93
|
||||
//line views/readers.qtpl:95
|
||||
qw422016.N().S(`">`)
|
||||
//line views/readers.qtpl:93
|
||||
//line views/readers.qtpl:95
|
||||
qw422016.E().S(lc.Get("ui.edit_link"))
|
||||
//line views/readers.qtpl:93
|
||||
//line views/readers.qtpl:95
|
||||
qw422016.N().S(`</a>
|
||||
</div>`)
|
||||
//line views/readers.qtpl:94
|
||||
//line views/readers.qtpl:96
|
||||
}
|
||||
//line views/readers.qtpl:94
|
||||
//line views/readers.qtpl:96
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:95
|
||||
//line views/readers.qtpl:97
|
||||
qw422016.N().S(NaviTitleHTML(h))
|
||||
//line views/readers.qtpl:95
|
||||
//line views/readers.qtpl:97
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:96
|
||||
//line views/readers.qtpl:98
|
||||
if h.Exists {
|
||||
//line views/readers.qtpl:96
|
||||
//line views/readers.qtpl:98
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:97
|
||||
//line views/readers.qtpl:99
|
||||
qw422016.N().S(contents)
|
||||
//line views/readers.qtpl:97
|
||||
//line views/readers.qtpl:99
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:98
|
||||
//line views/readers.qtpl:100
|
||||
} else {
|
||||
//line views/readers.qtpl:98
|
||||
//line views/readers.qtpl:100
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:99
|
||||
//line views/readers.qtpl:101
|
||||
streamnonExistentHyphaNotice(qw422016, h, u, lc)
|
||||
//line views/readers.qtpl:99
|
||||
//line views/readers.qtpl:101
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:100
|
||||
//line views/readers.qtpl:102
|
||||
}
|
||||
//line views/readers.qtpl:100
|
||||
//line views/readers.qtpl:102
|
||||
qw422016.N().S(`
|
||||
</article>
|
||||
<section class="prevnext">
|
||||
`)
|
||||
//line views/readers.qtpl:103
|
||||
//line views/readers.qtpl:105
|
||||
if prevHyphaName != "" {
|
||||
//line views/readers.qtpl:103
|
||||
//line views/readers.qtpl:105
|
||||
qw422016.N().S(`
|
||||
<a class="prevnext__el prevnext__prev" href="/hypha/`)
|
||||
//line views/readers.qtpl:104
|
||||
//line views/readers.qtpl:106
|
||||
qw422016.E().S(prevHyphaName)
|
||||
//line views/readers.qtpl:104
|
||||
//line views/readers.qtpl:106
|
||||
qw422016.N().S(`" rel="prev">← `)
|
||||
//line views/readers.qtpl:104
|
||||
//line views/readers.qtpl:106
|
||||
qw422016.E().S(util.BeautifulName(path.Base(prevHyphaName)))
|
||||
//line views/readers.qtpl:104
|
||||
//line views/readers.qtpl:106
|
||||
qw422016.N().S(`</a>
|
||||
`)
|
||||
//line views/readers.qtpl:105
|
||||
//line views/readers.qtpl:107
|
||||
}
|
||||
//line views/readers.qtpl:105
|
||||
//line views/readers.qtpl:107
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:106
|
||||
//line views/readers.qtpl:108
|
||||
if nextHyphaName != "" {
|
||||
//line views/readers.qtpl:106
|
||||
//line views/readers.qtpl:108
|
||||
qw422016.N().S(`
|
||||
<a class="prevnext__el prevnext__next" href="/hypha/`)
|
||||
//line views/readers.qtpl:107
|
||||
//line views/readers.qtpl:109
|
||||
qw422016.E().S(nextHyphaName)
|
||||
//line views/readers.qtpl:107
|
||||
//line views/readers.qtpl:109
|
||||
qw422016.N().S(`" rel="next">`)
|
||||
//line views/readers.qtpl:107
|
||||
//line views/readers.qtpl:109
|
||||
qw422016.E().S(util.BeautifulName(path.Base(nextHyphaName)))
|
||||
//line views/readers.qtpl:107
|
||||
//line views/readers.qtpl:109
|
||||
qw422016.N().S(` →</a>
|
||||
`)
|
||||
//line views/readers.qtpl:108
|
||||
//line views/readers.qtpl:110
|
||||
}
|
||||
//line views/readers.qtpl:108
|
||||
//line views/readers.qtpl:110
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
`)
|
||||
//line views/readers.qtpl:110
|
||||
//line views/readers.qtpl:112
|
||||
StreamSubhyphaeHTML(qw422016, subhyphae, lc)
|
||||
//line views/readers.qtpl:110
|
||||
//line views/readers.qtpl:112
|
||||
qw422016.N().S(`
|
||||
<section id="hypha-bottom">
|
||||
<div class="jump-btn">
|
||||
<a class="jump-btn__link" href="#hypha">↑</a>
|
||||
</div>
|
||||
`)
|
||||
//line views/readers.qtpl:115
|
||||
//line views/readers.qtpl:117
|
||||
streamhyphaInfo(qw422016, rq, h)
|
||||
//line views/readers.qtpl:115
|
||||
//line views/readers.qtpl:117
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
</main>
|
||||
`)
|
||||
//line views/readers.qtpl:118
|
||||
//line views/readers.qtpl:120
|
||||
streamsiblingHyphaeHTML(qw422016, siblings, lc)
|
||||
//line views/readers.qtpl:118
|
||||
//line views/readers.qtpl:120
|
||||
qw422016.N().S(`
|
||||
</div>
|
||||
`)
|
||||
//line views/readers.qtpl:120
|
||||
//line views/readers.qtpl:122
|
||||
streamviewScripts(qw422016)
|
||||
//line views/readers.qtpl:120
|
||||
//line views/readers.qtpl:122
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:121
|
||||
//line views/readers.qtpl:123
|
||||
}
|
||||
|
||||
//line views/readers.qtpl:121
|
||||
//line views/readers.qtpl:123
|
||||
func WriteHyphaHTML(qq422016 qtio422016.Writer, rq *http.Request, lc *l18n.Localizer, h *hyphae.Hypha, contents string) {
|
||||
//line views/readers.qtpl:121
|
||||
//line views/readers.qtpl:123
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/readers.qtpl:121
|
||||
//line views/readers.qtpl:123
|
||||
StreamHyphaHTML(qw422016, rq, lc, h, contents)
|
||||
//line views/readers.qtpl:121
|
||||
//line views/readers.qtpl:123
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/readers.qtpl:121
|
||||
//line views/readers.qtpl:123
|
||||
}
|
||||
|
||||
//line views/readers.qtpl:121
|
||||
//line views/readers.qtpl:123
|
||||
func HyphaHTML(rq *http.Request, lc *l18n.Localizer, h *hyphae.Hypha, contents string) string {
|
||||
//line views/readers.qtpl:121
|
||||
//line views/readers.qtpl:123
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/readers.qtpl:121
|
||||
//line views/readers.qtpl:123
|
||||
WriteHyphaHTML(qb422016, rq, lc, h, contents)
|
||||
//line views/readers.qtpl:121
|
||||
//line views/readers.qtpl:123
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/readers.qtpl:121
|
||||
//line views/readers.qtpl:123
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/readers.qtpl:121
|
||||
//line views/readers.qtpl:123
|
||||
return qs422016
|
||||
//line views/readers.qtpl:121
|
||||
//line views/readers.qtpl:123
|
||||
}
|
||||
|
||||
//line views/readers.qtpl:123
|
||||
//line views/readers.qtpl:125
|
||||
func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, lc *l18n.Localizer, h *hyphae.Hypha, contents, revHash string) {
|
||||
//line views/readers.qtpl:123
|
||||
//line views/readers.qtpl:125
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:125
|
||||
//line views/readers.qtpl:127
|
||||
siblings, subhyphae, _, _ := tree.Tree(h.Name)
|
||||
|
||||
//line views/readers.qtpl:126
|
||||
//line views/readers.qtpl:128
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<article>
|
||||
<p>`)
|
||||
//line views/readers.qtpl:130
|
||||
//line views/readers.qtpl:132
|
||||
qw422016.E().S(lc.Get("ui.revision_warning"))
|
||||
//line views/readers.qtpl:130
|
||||
qw422016.N().S(`</p>
|
||||
//line views/readers.qtpl:132
|
||||
qw422016.N().S(` <a href="/rev-text/`)
|
||||
//line views/readers.qtpl:132
|
||||
qw422016.E().S(revHash)
|
||||
//line views/readers.qtpl:132
|
||||
qw422016.N().S(`/`)
|
||||
//line views/readers.qtpl:132
|
||||
qw422016.E().S(h.Name)
|
||||
//line views/readers.qtpl:132
|
||||
qw422016.N().S(`">`)
|
||||
//line views/readers.qtpl:132
|
||||
qw422016.E().S(lc.Get("ui.revision_link"))
|
||||
//line views/readers.qtpl:132
|
||||
qw422016.N().S(`</a></p>
|
||||
`)
|
||||
//line views/readers.qtpl:131
|
||||
//line views/readers.qtpl:133
|
||||
qw422016.N().S(NaviTitleHTML(h))
|
||||
//line views/readers.qtpl:131
|
||||
//line views/readers.qtpl:133
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:132
|
||||
//line views/readers.qtpl:134
|
||||
qw422016.N().S(contents)
|
||||
//line views/readers.qtpl:132
|
||||
//line views/readers.qtpl:134
|
||||
qw422016.N().S(`
|
||||
</article>
|
||||
`)
|
||||
//line views/readers.qtpl:134
|
||||
//line views/readers.qtpl:136
|
||||
StreamSubhyphaeHTML(qw422016, subhyphae, lc)
|
||||
//line views/readers.qtpl:134
|
||||
//line views/readers.qtpl:136
|
||||
qw422016.N().S(`
|
||||
</main>
|
||||
`)
|
||||
//line views/readers.qtpl:136
|
||||
//line views/readers.qtpl:138
|
||||
streamsiblingHyphaeHTML(qw422016, siblings, lc)
|
||||
//line views/readers.qtpl:136
|
||||
//line views/readers.qtpl:138
|
||||
qw422016.N().S(`
|
||||
</div>
|
||||
`)
|
||||
//line views/readers.qtpl:138
|
||||
//line views/readers.qtpl:140
|
||||
streamviewScripts(qw422016)
|
||||
//line views/readers.qtpl:138
|
||||
//line views/readers.qtpl:140
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:139
|
||||
//line views/readers.qtpl:141
|
||||
}
|
||||
|
||||
//line views/readers.qtpl:139
|
||||
//line views/readers.qtpl:141
|
||||
func WriteRevisionHTML(qq422016 qtio422016.Writer, rq *http.Request, lc *l18n.Localizer, h *hyphae.Hypha, contents, revHash string) {
|
||||
//line views/readers.qtpl:139
|
||||
//line views/readers.qtpl:141
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/readers.qtpl:139
|
||||
//line views/readers.qtpl:141
|
||||
StreamRevisionHTML(qw422016, rq, lc, h, contents, revHash)
|
||||
//line views/readers.qtpl:139
|
||||
//line views/readers.qtpl:141
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/readers.qtpl:139
|
||||
//line views/readers.qtpl:141
|
||||
}
|
||||
|
||||
//line views/readers.qtpl:139
|
||||
//line views/readers.qtpl:141
|
||||
func RevisionHTML(rq *http.Request, lc *l18n.Localizer, h *hyphae.Hypha, contents, revHash string) string {
|
||||
//line views/readers.qtpl:139
|
||||
//line views/readers.qtpl:141
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/readers.qtpl:139
|
||||
//line views/readers.qtpl:141
|
||||
WriteRevisionHTML(qb422016, rq, lc, h, contents, revHash)
|
||||
//line views/readers.qtpl:139
|
||||
//line views/readers.qtpl:141
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/readers.qtpl:139
|
||||
//line views/readers.qtpl:141
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/readers.qtpl:139
|
||||
//line views/readers.qtpl:141
|
||||
return qs422016
|
||||
//line views/readers.qtpl:139
|
||||
//line views/readers.qtpl:141
|
||||
}
|
||||
|
||||
//line views/readers.qtpl:141
|
||||
//line views/readers.qtpl:143
|
||||
func streamviewScripts(qw422016 *qt422016.Writer) {
|
||||
//line views/readers.qtpl:141
|
||||
//line views/readers.qtpl:143
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:142
|
||||
//line views/readers.qtpl:144
|
||||
for _, scriptPath := range cfg.ViewScripts {
|
||||
//line views/readers.qtpl:142
|
||||
//line views/readers.qtpl:144
|
||||
qw422016.N().S(`
|
||||
<script src="`)
|
||||
//line views/readers.qtpl:143
|
||||
//line views/readers.qtpl:145
|
||||
qw422016.E().S(scriptPath)
|
||||
//line views/readers.qtpl:143
|
||||
//line views/readers.qtpl:145
|
||||
qw422016.N().S(`"></script>
|
||||
`)
|
||||
//line views/readers.qtpl:144
|
||||
//line views/readers.qtpl:146
|
||||
}
|
||||
//line views/readers.qtpl:144
|
||||
//line views/readers.qtpl:146
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/readers.qtpl:145
|
||||
//line views/readers.qtpl:147
|
||||
}
|
||||
|
||||
//line views/readers.qtpl:145
|
||||
//line views/readers.qtpl:147
|
||||
func writeviewScripts(qq422016 qtio422016.Writer) {
|
||||
//line views/readers.qtpl:145
|
||||
//line views/readers.qtpl:147
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/readers.qtpl:145
|
||||
//line views/readers.qtpl:147
|
||||
streamviewScripts(qw422016)
|
||||
//line views/readers.qtpl:145
|
||||
//line views/readers.qtpl:147
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/readers.qtpl:145
|
||||
//line views/readers.qtpl:147
|
||||
}
|
||||
|
||||
//line views/readers.qtpl:145
|
||||
//line views/readers.qtpl:147
|
||||
func viewScripts() string {
|
||||
//line views/readers.qtpl:145
|
||||
//line views/readers.qtpl:147
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/readers.qtpl:145
|
||||
//line views/readers.qtpl:147
|
||||
writeviewScripts(qb422016)
|
||||
//line views/readers.qtpl:145
|
||||
//line views/readers.qtpl:147
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/readers.qtpl:145
|
||||
//line views/readers.qtpl:147
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/readers.qtpl:145
|
||||
//line views/readers.qtpl:147
|
||||
return qs422016
|
||||
//line views/readers.qtpl:145
|
||||
//line views/readers.qtpl:147
|
||||
}
|
||||
|
@ -166,6 +166,7 @@ It outputs a poorly formatted JSON, but it works and is valid.
|
||||
<li><a href="/help/{%s lang %}/mycomarkup">{%s lc.GetWithLocale(lang, "help.mycomarkup") %}</a></li>
|
||||
<li>{%s lc.GetWithLocale(lang, "help.interface") %}
|
||||
<ul>
|
||||
<li><a href="/help/{%s lang %}/prevnext">{%s lc.GetWithLocale(lang, "help.prevnext") %}</a></li>
|
||||
<li><a href="/help/{%s lang %}/top_bar">{%s lc.GetWithLocale(lang, "help.top_bar") %}</a></li>
|
||||
<li><a href="/help/{%s lang %}/sibling_hyphae_section">{%s lc.GetWithLocale(lang, "help.sibling_hyphae") %}</a></li>
|
||||
<li>...</li>
|
||||
|
@ -664,72 +664,81 @@ func streamhelpTopicsHTML(qw422016 *qt422016.Writer, lang string, lc *l18n.Local
|
||||
//line views/stuff.qtpl:169
|
||||
qw422016.E().S(lang)
|
||||
//line views/stuff.qtpl:169
|
||||
qw422016.N().S(`/top_bar">`)
|
||||
qw422016.N().S(`/prevnext">`)
|
||||
//line views/stuff.qtpl:169
|
||||
qw422016.E().S(lc.GetWithLocale(lang, "help.top_bar"))
|
||||
qw422016.E().S(lc.GetWithLocale(lang, "help.prevnext"))
|
||||
//line views/stuff.qtpl:169
|
||||
qw422016.N().S(`</a></li>
|
||||
<li><a href="/help/`)
|
||||
//line views/stuff.qtpl:170
|
||||
qw422016.E().S(lang)
|
||||
//line views/stuff.qtpl:170
|
||||
qw422016.N().S(`/top_bar">`)
|
||||
//line views/stuff.qtpl:170
|
||||
qw422016.E().S(lc.GetWithLocale(lang, "help.top_bar"))
|
||||
//line views/stuff.qtpl:170
|
||||
qw422016.N().S(`</a></li>
|
||||
<li><a href="/help/`)
|
||||
//line views/stuff.qtpl:171
|
||||
qw422016.E().S(lang)
|
||||
//line views/stuff.qtpl:171
|
||||
qw422016.N().S(`/sibling_hyphae_section">`)
|
||||
//line views/stuff.qtpl:170
|
||||
//line views/stuff.qtpl:171
|
||||
qw422016.E().S(lc.GetWithLocale(lang, "help.sibling_hyphae"))
|
||||
//line views/stuff.qtpl:170
|
||||
//line views/stuff.qtpl:171
|
||||
qw422016.N().S(`</a></li>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>`)
|
||||
//line views/stuff.qtpl:174
|
||||
//line views/stuff.qtpl:175
|
||||
qw422016.E().S(lc.GetWithLocale(lang, "help.special_pages"))
|
||||
//line views/stuff.qtpl:174
|
||||
//line views/stuff.qtpl:175
|
||||
qw422016.N().S(`
|
||||
<ul>
|
||||
<li><a href="/help/`)
|
||||
//line views/stuff.qtpl:176
|
||||
//line views/stuff.qtpl:177
|
||||
qw422016.E().S(lang)
|
||||
//line views/stuff.qtpl:176
|
||||
//line views/stuff.qtpl:177
|
||||
qw422016.N().S(`/recent_changes">`)
|
||||
//line views/stuff.qtpl:176
|
||||
//line views/stuff.qtpl:177
|
||||
qw422016.E().S(lc.GetWithLocale(lang, "help.recent_changes"))
|
||||
//line views/stuff.qtpl:176
|
||||
//line views/stuff.qtpl:177
|
||||
qw422016.N().S(`</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>`)
|
||||
//line views/stuff.qtpl:179
|
||||
//line views/stuff.qtpl:180
|
||||
qw422016.E().S(lc.GetWithLocale(lang, "help.configuration"))
|
||||
//line views/stuff.qtpl:179
|
||||
//line views/stuff.qtpl:180
|
||||
qw422016.N().S(`
|
||||
<ul>
|
||||
<li><a href="/help/`)
|
||||
//line views/stuff.qtpl:181
|
||||
//line views/stuff.qtpl:182
|
||||
qw422016.E().S(lang)
|
||||
//line views/stuff.qtpl:181
|
||||
//line views/stuff.qtpl:182
|
||||
qw422016.N().S(`/lock">`)
|
||||
//line views/stuff.qtpl:181
|
||||
//line views/stuff.qtpl:182
|
||||
qw422016.E().S(lc.GetWithLocale(lang, "help.lock"))
|
||||
//line views/stuff.qtpl:181
|
||||
//line views/stuff.qtpl:182
|
||||
qw422016.N().S(`</a></li>
|
||||
<li><a href="/help/`)
|
||||
//line views/stuff.qtpl:182
|
||||
//line views/stuff.qtpl:183
|
||||
qw422016.E().S(lang)
|
||||
//line views/stuff.qtpl:182
|
||||
//line views/stuff.qtpl:183
|
||||
qw422016.N().S(`/whitelist">`)
|
||||
//line views/stuff.qtpl:182
|
||||
//line views/stuff.qtpl:183
|
||||
qw422016.E().S(lc.GetWithLocale(lang, "help.whitelist"))
|
||||
//line views/stuff.qtpl:182
|
||||
//line views/stuff.qtpl:183
|
||||
qw422016.N().S(`</a></li>
|
||||
<li><a href="/help/`)
|
||||
//line views/stuff.qtpl:183
|
||||
//line views/stuff.qtpl:184
|
||||
qw422016.E().S(lang)
|
||||
//line views/stuff.qtpl:183
|
||||
//line views/stuff.qtpl:184
|
||||
qw422016.N().S(`/telegram">`)
|
||||
//line views/stuff.qtpl:183
|
||||
//line views/stuff.qtpl:184
|
||||
qw422016.E().S(lc.GetWithLocale(lang, "help.telegram"))
|
||||
//line views/stuff.qtpl:183
|
||||
//line views/stuff.qtpl:184
|
||||
qw422016.N().S(`</a></li>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
@ -737,91 +746,91 @@ func streamhelpTopicsHTML(qw422016 *qt422016.Writer, lang string, lc *l18n.Local
|
||||
</ul>
|
||||
</aside>
|
||||
`)
|
||||
//line views/stuff.qtpl:189
|
||||
//line views/stuff.qtpl:190
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:189
|
||||
//line views/stuff.qtpl:190
|
||||
func writehelpTopicsHTML(qq422016 qtio422016.Writer, lang string, lc *l18n.Localizer) {
|
||||
//line views/stuff.qtpl:189
|
||||
//line views/stuff.qtpl:190
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/stuff.qtpl:189
|
||||
//line views/stuff.qtpl:190
|
||||
streamhelpTopicsHTML(qw422016, lang, lc)
|
||||
//line views/stuff.qtpl:189
|
||||
//line views/stuff.qtpl:190
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/stuff.qtpl:189
|
||||
//line views/stuff.qtpl:190
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:189
|
||||
//line views/stuff.qtpl:190
|
||||
func helpTopicsHTML(lang string, lc *l18n.Localizer) string {
|
||||
//line views/stuff.qtpl:189
|
||||
//line views/stuff.qtpl:190
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/stuff.qtpl:189
|
||||
//line views/stuff.qtpl:190
|
||||
writehelpTopicsHTML(qb422016, lang, lc)
|
||||
//line views/stuff.qtpl:189
|
||||
//line views/stuff.qtpl:190
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/stuff.qtpl:189
|
||||
//line views/stuff.qtpl:190
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/stuff.qtpl:189
|
||||
//line views/stuff.qtpl:190
|
||||
return qs422016
|
||||
//line views/stuff.qtpl:189
|
||||
//line views/stuff.qtpl:190
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:191
|
||||
//line views/stuff.qtpl:192
|
||||
func streamhelpTopicBadgeHTML(qw422016 *qt422016.Writer, lang, topic string) {
|
||||
//line views/stuff.qtpl:191
|
||||
//line views/stuff.qtpl:192
|
||||
qw422016.N().S(`
|
||||
<a class="help-topic-badge" href="/help/`)
|
||||
//line views/stuff.qtpl:192
|
||||
//line views/stuff.qtpl:193
|
||||
qw422016.E().S(lang)
|
||||
//line views/stuff.qtpl:192
|
||||
//line views/stuff.qtpl:193
|
||||
qw422016.N().S(`/`)
|
||||
//line views/stuff.qtpl:192
|
||||
//line views/stuff.qtpl:193
|
||||
qw422016.E().S(topic)
|
||||
//line views/stuff.qtpl:192
|
||||
//line views/stuff.qtpl:193
|
||||
qw422016.N().S(`">?</a>
|
||||
`)
|
||||
//line views/stuff.qtpl:193
|
||||
//line views/stuff.qtpl:194
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:193
|
||||
//line views/stuff.qtpl:194
|
||||
func writehelpTopicBadgeHTML(qq422016 qtio422016.Writer, lang, topic string) {
|
||||
//line views/stuff.qtpl:193
|
||||
//line views/stuff.qtpl:194
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/stuff.qtpl:193
|
||||
//line views/stuff.qtpl:194
|
||||
streamhelpTopicBadgeHTML(qw422016, lang, topic)
|
||||
//line views/stuff.qtpl:193
|
||||
//line views/stuff.qtpl:194
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/stuff.qtpl:193
|
||||
//line views/stuff.qtpl:194
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:193
|
||||
//line views/stuff.qtpl:194
|
||||
func helpTopicBadgeHTML(lang, topic string) string {
|
||||
//line views/stuff.qtpl:193
|
||||
//line views/stuff.qtpl:194
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/stuff.qtpl:193
|
||||
//line views/stuff.qtpl:194
|
||||
writehelpTopicBadgeHTML(qb422016, lang, topic)
|
||||
//line views/stuff.qtpl:193
|
||||
//line views/stuff.qtpl:194
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/stuff.qtpl:193
|
||||
//line views/stuff.qtpl:194
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/stuff.qtpl:193
|
||||
//line views/stuff.qtpl:194
|
||||
return qs422016
|
||||
//line views/stuff.qtpl:193
|
||||
//line views/stuff.qtpl:194
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:195
|
||||
//line views/stuff.qtpl:196
|
||||
func StreamUserListHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
|
||||
//line views/stuff.qtpl:195
|
||||
//line views/stuff.qtpl:196
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width user-list">
|
||||
<h1>`)
|
||||
//line views/stuff.qtpl:198
|
||||
//line views/stuff.qtpl:199
|
||||
qw422016.E().S(lc.Get("ui.users_heading"))
|
||||
//line views/stuff.qtpl:198
|
||||
//line views/stuff.qtpl:199
|
||||
qw422016.N().S(`</h1>
|
||||
`)
|
||||
//line views/stuff.qtpl:200
|
||||
//line views/stuff.qtpl:201
|
||||
var (
|
||||
admins = make([]string, 0)
|
||||
moderators = make([]string, 0)
|
||||
@ -838,385 +847,385 @@ func StreamUserListHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
|
||||
}
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:215
|
||||
//line views/stuff.qtpl:216
|
||||
qw422016.N().S(`
|
||||
<section>
|
||||
<h2>`)
|
||||
//line views/stuff.qtpl:217
|
||||
//line views/stuff.qtpl:218
|
||||
qw422016.E().S(lc.Get("ui.users_admins"))
|
||||
//line views/stuff.qtpl:217
|
||||
//line views/stuff.qtpl:218
|
||||
qw422016.N().S(`</h2>
|
||||
<ol>`)
|
||||
//line views/stuff.qtpl:218
|
||||
//line views/stuff.qtpl:219
|
||||
for _, name := range admins {
|
||||
//line views/stuff.qtpl:218
|
||||
//line views/stuff.qtpl:219
|
||||
qw422016.N().S(`
|
||||
<li><a href="/hypha/`)
|
||||
//line views/stuff.qtpl:219
|
||||
//line views/stuff.qtpl:220
|
||||
qw422016.E().S(cfg.UserHypha)
|
||||
//line views/stuff.qtpl:219
|
||||
//line views/stuff.qtpl:220
|
||||
qw422016.N().S(`/`)
|
||||
//line views/stuff.qtpl:219
|
||||
//line views/stuff.qtpl:220
|
||||
qw422016.E().S(name)
|
||||
//line views/stuff.qtpl:219
|
||||
//line views/stuff.qtpl:220
|
||||
qw422016.N().S(`">`)
|
||||
//line views/stuff.qtpl:219
|
||||
//line views/stuff.qtpl:220
|
||||
qw422016.E().S(name)
|
||||
//line views/stuff.qtpl:219
|
||||
//line views/stuff.qtpl:220
|
||||
qw422016.N().S(`</a></li>
|
||||
`)
|
||||
//line views/stuff.qtpl:220
|
||||
//line views/stuff.qtpl:221
|
||||
}
|
||||
//line views/stuff.qtpl:220
|
||||
//line views/stuff.qtpl:221
|
||||
qw422016.N().S(`</ol>
|
||||
</section>
|
||||
<section>
|
||||
<h2>`)
|
||||
//line views/stuff.qtpl:223
|
||||
//line views/stuff.qtpl:224
|
||||
qw422016.E().S(lc.Get("ui.users_moderators"))
|
||||
//line views/stuff.qtpl:223
|
||||
//line views/stuff.qtpl:224
|
||||
qw422016.N().S(`</h2>
|
||||
<ol>`)
|
||||
//line views/stuff.qtpl:224
|
||||
//line views/stuff.qtpl:225
|
||||
for _, name := range moderators {
|
||||
//line views/stuff.qtpl:224
|
||||
//line views/stuff.qtpl:225
|
||||
qw422016.N().S(`
|
||||
<li><a href="/hypha/`)
|
||||
//line views/stuff.qtpl:225
|
||||
//line views/stuff.qtpl:226
|
||||
qw422016.E().S(cfg.UserHypha)
|
||||
//line views/stuff.qtpl:225
|
||||
//line views/stuff.qtpl:226
|
||||
qw422016.N().S(`/`)
|
||||
//line views/stuff.qtpl:225
|
||||
//line views/stuff.qtpl:226
|
||||
qw422016.E().S(name)
|
||||
//line views/stuff.qtpl:225
|
||||
//line views/stuff.qtpl:226
|
||||
qw422016.N().S(`">`)
|
||||
//line views/stuff.qtpl:225
|
||||
//line views/stuff.qtpl:226
|
||||
qw422016.E().S(name)
|
||||
//line views/stuff.qtpl:225
|
||||
//line views/stuff.qtpl:226
|
||||
qw422016.N().S(`</a></li>
|
||||
`)
|
||||
//line views/stuff.qtpl:226
|
||||
//line views/stuff.qtpl:227
|
||||
}
|
||||
//line views/stuff.qtpl:226
|
||||
//line views/stuff.qtpl:227
|
||||
qw422016.N().S(`</ol>
|
||||
</section>
|
||||
<section>
|
||||
<h2>`)
|
||||
//line views/stuff.qtpl:229
|
||||
//line views/stuff.qtpl:230
|
||||
qw422016.E().S(lc.Get("ui.users_editors"))
|
||||
//line views/stuff.qtpl:229
|
||||
//line views/stuff.qtpl:230
|
||||
qw422016.N().S(`</h2>
|
||||
<ol>`)
|
||||
//line views/stuff.qtpl:230
|
||||
//line views/stuff.qtpl:231
|
||||
for _, name := range editors {
|
||||
//line views/stuff.qtpl:230
|
||||
//line views/stuff.qtpl:231
|
||||
qw422016.N().S(`
|
||||
<li><a href="/hypha/`)
|
||||
//line views/stuff.qtpl:231
|
||||
//line views/stuff.qtpl:232
|
||||
qw422016.E().S(cfg.UserHypha)
|
||||
//line views/stuff.qtpl:231
|
||||
//line views/stuff.qtpl:232
|
||||
qw422016.N().S(`/`)
|
||||
//line views/stuff.qtpl:231
|
||||
//line views/stuff.qtpl:232
|
||||
qw422016.E().S(name)
|
||||
//line views/stuff.qtpl:231
|
||||
//line views/stuff.qtpl:232
|
||||
qw422016.N().S(`">`)
|
||||
//line views/stuff.qtpl:231
|
||||
//line views/stuff.qtpl:232
|
||||
qw422016.E().S(name)
|
||||
//line views/stuff.qtpl:231
|
||||
//line views/stuff.qtpl:232
|
||||
qw422016.N().S(`</a></li>
|
||||
`)
|
||||
//line views/stuff.qtpl:232
|
||||
//line views/stuff.qtpl:233
|
||||
}
|
||||
//line views/stuff.qtpl:232
|
||||
//line views/stuff.qtpl:233
|
||||
qw422016.N().S(`</ol>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/stuff.qtpl:236
|
||||
//line views/stuff.qtpl:237
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:236
|
||||
//line views/stuff.qtpl:237
|
||||
func WriteUserListHTML(qq422016 qtio422016.Writer, lc *l18n.Localizer) {
|
||||
//line views/stuff.qtpl:236
|
||||
//line views/stuff.qtpl:237
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/stuff.qtpl:236
|
||||
//line views/stuff.qtpl:237
|
||||
StreamUserListHTML(qw422016, lc)
|
||||
//line views/stuff.qtpl:236
|
||||
//line views/stuff.qtpl:237
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/stuff.qtpl:236
|
||||
//line views/stuff.qtpl:237
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:236
|
||||
//line views/stuff.qtpl:237
|
||||
func UserListHTML(lc *l18n.Localizer) string {
|
||||
//line views/stuff.qtpl:236
|
||||
//line views/stuff.qtpl:237
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/stuff.qtpl:236
|
||||
//line views/stuff.qtpl:237
|
||||
WriteUserListHTML(qb422016, lc)
|
||||
//line views/stuff.qtpl:236
|
||||
//line views/stuff.qtpl:237
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/stuff.qtpl:236
|
||||
//line views/stuff.qtpl:237
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/stuff.qtpl:236
|
||||
//line views/stuff.qtpl:237
|
||||
return qs422016
|
||||
//line views/stuff.qtpl:236
|
||||
//line views/stuff.qtpl:237
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:238
|
||||
//line views/stuff.qtpl:239
|
||||
func StreamHyphaListHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
|
||||
//line views/stuff.qtpl:238
|
||||
//line views/stuff.qtpl:239
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<h1>`)
|
||||
//line views/stuff.qtpl:241
|
||||
//line views/stuff.qtpl:242
|
||||
qw422016.E().S(lc.Get("ui.list_heading"))
|
||||
//line views/stuff.qtpl:241
|
||||
//line views/stuff.qtpl:242
|
||||
qw422016.N().S(`</h1>
|
||||
<p>`)
|
||||
//line views/stuff.qtpl:242
|
||||
//line views/stuff.qtpl:243
|
||||
qw422016.E().S(lc.GetPlural("ui.list_desc", hyphae.Count()))
|
||||
//line views/stuff.qtpl:242
|
||||
//line views/stuff.qtpl:243
|
||||
qw422016.N().S(`</p>
|
||||
<ul class="hypha-list">
|
||||
`)
|
||||
//line views/stuff.qtpl:244
|
||||
//line views/stuff.qtpl:245
|
||||
for h := range hyphae.YieldExistingHyphae() {
|
||||
//line views/stuff.qtpl:244
|
||||
//line views/stuff.qtpl:245
|
||||
qw422016.N().S(`
|
||||
<li class="hypha-list__entry">
|
||||
<a class="hypha-list__link" href="/hypha/`)
|
||||
//line views/stuff.qtpl:246
|
||||
//line views/stuff.qtpl:247
|
||||
qw422016.E().S(h.Name)
|
||||
//line views/stuff.qtpl:246
|
||||
//line views/stuff.qtpl:247
|
||||
qw422016.N().S(`">`)
|
||||
//line views/stuff.qtpl:246
|
||||
//line views/stuff.qtpl:247
|
||||
qw422016.E().S(util.BeautifulName(h.Name))
|
||||
//line views/stuff.qtpl:246
|
||||
//line views/stuff.qtpl:247
|
||||
qw422016.N().S(`</a>
|
||||
`)
|
||||
//line views/stuff.qtpl:247
|
||||
//line views/stuff.qtpl:248
|
||||
if h.BinaryPath != "" {
|
||||
//line views/stuff.qtpl:247
|
||||
//line views/stuff.qtpl:248
|
||||
qw422016.N().S(`
|
||||
<span class="hypha-list__amnt-type">`)
|
||||
//line views/stuff.qtpl:248
|
||||
//line views/stuff.qtpl:249
|
||||
qw422016.E().S(filepath.Ext(h.BinaryPath)[1:])
|
||||
//line views/stuff.qtpl:248
|
||||
//line views/stuff.qtpl:249
|
||||
qw422016.N().S(`</span>
|
||||
`)
|
||||
//line views/stuff.qtpl:249
|
||||
//line views/stuff.qtpl:250
|
||||
}
|
||||
//line views/stuff.qtpl:249
|
||||
//line views/stuff.qtpl:250
|
||||
qw422016.N().S(`
|
||||
</li>
|
||||
`)
|
||||
//line views/stuff.qtpl:251
|
||||
//line views/stuff.qtpl:252
|
||||
}
|
||||
//line views/stuff.qtpl:251
|
||||
//line views/stuff.qtpl:252
|
||||
qw422016.N().S(`
|
||||
</ul>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/stuff.qtpl:255
|
||||
//line views/stuff.qtpl:256
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:255
|
||||
//line views/stuff.qtpl:256
|
||||
func WriteHyphaListHTML(qq422016 qtio422016.Writer, lc *l18n.Localizer) {
|
||||
//line views/stuff.qtpl:255
|
||||
//line views/stuff.qtpl:256
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/stuff.qtpl:255
|
||||
//line views/stuff.qtpl:256
|
||||
StreamHyphaListHTML(qw422016, lc)
|
||||
//line views/stuff.qtpl:255
|
||||
//line views/stuff.qtpl:256
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/stuff.qtpl:255
|
||||
//line views/stuff.qtpl:256
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:255
|
||||
//line views/stuff.qtpl:256
|
||||
func HyphaListHTML(lc *l18n.Localizer) string {
|
||||
//line views/stuff.qtpl:255
|
||||
//line views/stuff.qtpl:256
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/stuff.qtpl:255
|
||||
//line views/stuff.qtpl:256
|
||||
WriteHyphaListHTML(qb422016, lc)
|
||||
//line views/stuff.qtpl:255
|
||||
//line views/stuff.qtpl:256
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/stuff.qtpl:255
|
||||
//line views/stuff.qtpl:256
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/stuff.qtpl:255
|
||||
//line views/stuff.qtpl:256
|
||||
return qs422016
|
||||
//line views/stuff.qtpl:255
|
||||
//line views/stuff.qtpl:256
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:257
|
||||
//line views/stuff.qtpl:258
|
||||
func StreamAboutHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) {
|
||||
//line views/stuff.qtpl:257
|
||||
//line views/stuff.qtpl:258
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section>
|
||||
<h1>`)
|
||||
//line views/stuff.qtpl:261
|
||||
//line views/stuff.qtpl:262
|
||||
qw422016.E().S(lc.Get("ui.about_title", &l18n.Replacements{"name": cfg.WikiName}))
|
||||
//line views/stuff.qtpl:261
|
||||
//line views/stuff.qtpl:262
|
||||
qw422016.N().S(`</h1>
|
||||
<ul>
|
||||
<li><b>`)
|
||||
//line views/stuff.qtpl:263
|
||||
//line views/stuff.qtpl:264
|
||||
qw422016.N().S(lc.Get("ui.about_version", &l18n.Replacements{"pre": "<a href=\"https://mycorrhiza.wiki\">", "post": "</a>"}))
|
||||
//line views/stuff.qtpl:263
|
||||
//line views/stuff.qtpl:264
|
||||
qw422016.N().S(`</b> 1.5.0</li>
|
||||
`)
|
||||
//line views/stuff.qtpl:264
|
||||
//line views/stuff.qtpl:265
|
||||
if cfg.UseAuth {
|
||||
//line views/stuff.qtpl:264
|
||||
//line views/stuff.qtpl:265
|
||||
qw422016.N().S(` <li><b>`)
|
||||
//line views/stuff.qtpl:265
|
||||
//line views/stuff.qtpl:266
|
||||
qw422016.E().S(lc.Get("ui.about_usercount"))
|
||||
//line views/stuff.qtpl:265
|
||||
//line views/stuff.qtpl:266
|
||||
qw422016.N().S(`</b> `)
|
||||
//line views/stuff.qtpl:265
|
||||
//line views/stuff.qtpl:266
|
||||
qw422016.N().DUL(user.Count())
|
||||
//line views/stuff.qtpl:265
|
||||
//line views/stuff.qtpl:266
|
||||
qw422016.N().S(`</li>
|
||||
<li><b>`)
|
||||
//line views/stuff.qtpl:266
|
||||
//line views/stuff.qtpl:267
|
||||
qw422016.E().S(lc.Get("ui.about_homepage"))
|
||||
//line views/stuff.qtpl:266
|
||||
//line views/stuff.qtpl:267
|
||||
qw422016.N().S(`</b> <a href="/">`)
|
||||
//line views/stuff.qtpl:266
|
||||
//line views/stuff.qtpl:267
|
||||
qw422016.E().S(cfg.HomeHypha)
|
||||
//line views/stuff.qtpl:266
|
||||
//line views/stuff.qtpl:267
|
||||
qw422016.N().S(`</a></li>
|
||||
<li><b>`)
|
||||
//line views/stuff.qtpl:267
|
||||
//line views/stuff.qtpl:268
|
||||
qw422016.E().S(lc.Get("ui.about_admins"))
|
||||
//line views/stuff.qtpl:267
|
||||
//line views/stuff.qtpl:268
|
||||
qw422016.N().S(`</b>`)
|
||||
//line views/stuff.qtpl:267
|
||||
//line views/stuff.qtpl:268
|
||||
for i, username := range user.ListUsersWithGroup("admin") {
|
||||
//line views/stuff.qtpl:268
|
||||
//line views/stuff.qtpl:269
|
||||
if i > 0 {
|
||||
//line views/stuff.qtpl:268
|
||||
//line views/stuff.qtpl:269
|
||||
qw422016.N().S(`<span aria-hidden="true">, </span>
|
||||
`)
|
||||
//line views/stuff.qtpl:269
|
||||
//line views/stuff.qtpl:270
|
||||
}
|
||||
//line views/stuff.qtpl:269
|
||||
//line views/stuff.qtpl:270
|
||||
qw422016.N().S(` <a href="/hypha/`)
|
||||
//line views/stuff.qtpl:270
|
||||
//line views/stuff.qtpl:271
|
||||
qw422016.E().S(cfg.UserHypha)
|
||||
//line views/stuff.qtpl:270
|
||||
//line views/stuff.qtpl:271
|
||||
qw422016.N().S(`/`)
|
||||
//line views/stuff.qtpl:270
|
||||
//line views/stuff.qtpl:271
|
||||
qw422016.E().S(username)
|
||||
//line views/stuff.qtpl:270
|
||||
//line views/stuff.qtpl:271
|
||||
qw422016.N().S(`">`)
|
||||
//line views/stuff.qtpl:270
|
||||
//line views/stuff.qtpl:271
|
||||
qw422016.E().S(username)
|
||||
//line views/stuff.qtpl:270
|
||||
//line views/stuff.qtpl:271
|
||||
qw422016.N().S(`</a>`)
|
||||
//line views/stuff.qtpl:270
|
||||
//line views/stuff.qtpl:271
|
||||
}
|
||||
//line views/stuff.qtpl:270
|
||||
//line views/stuff.qtpl:271
|
||||
qw422016.N().S(`</li>
|
||||
`)
|
||||
//line views/stuff.qtpl:271
|
||||
//line views/stuff.qtpl:272
|
||||
} else {
|
||||
//line views/stuff.qtpl:271
|
||||
//line views/stuff.qtpl:272
|
||||
qw422016.N().S(` <li>`)
|
||||
//line views/stuff.qtpl:272
|
||||
//line views/stuff.qtpl:273
|
||||
qw422016.E().S(lc.Get("ui.about_noauth"))
|
||||
//line views/stuff.qtpl:272
|
||||
//line views/stuff.qtpl:273
|
||||
qw422016.N().S(`</li>
|
||||
`)
|
||||
//line views/stuff.qtpl:273
|
||||
//line views/stuff.qtpl:274
|
||||
}
|
||||
//line views/stuff.qtpl:273
|
||||
//line views/stuff.qtpl:274
|
||||
qw422016.N().S(` </ul>
|
||||
<p>`)
|
||||
//line views/stuff.qtpl:275
|
||||
//line views/stuff.qtpl:276
|
||||
qw422016.N().S(lc.Get("ui.about_hyphae", &l18n.Replacements{"link": "<a href=\"/list\">/list</a>"}))
|
||||
//line views/stuff.qtpl:275
|
||||
//line views/stuff.qtpl:276
|
||||
qw422016.N().S(`</p>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/stuff.qtpl:279
|
||||
//line views/stuff.qtpl:280
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:279
|
||||
//line views/stuff.qtpl:280
|
||||
func WriteAboutHTML(qq422016 qtio422016.Writer, lc *l18n.Localizer) {
|
||||
//line views/stuff.qtpl:279
|
||||
//line views/stuff.qtpl:280
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/stuff.qtpl:279
|
||||
//line views/stuff.qtpl:280
|
||||
StreamAboutHTML(qw422016, lc)
|
||||
//line views/stuff.qtpl:279
|
||||
//line views/stuff.qtpl:280
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/stuff.qtpl:279
|
||||
//line views/stuff.qtpl:280
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:279
|
||||
//line views/stuff.qtpl:280
|
||||
func AboutHTML(lc *l18n.Localizer) string {
|
||||
//line views/stuff.qtpl:279
|
||||
//line views/stuff.qtpl:280
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/stuff.qtpl:279
|
||||
//line views/stuff.qtpl:280
|
||||
WriteAboutHTML(qb422016, lc)
|
||||
//line views/stuff.qtpl:279
|
||||
//line views/stuff.qtpl:280
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/stuff.qtpl:279
|
||||
//line views/stuff.qtpl:280
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/stuff.qtpl:279
|
||||
//line views/stuff.qtpl:280
|
||||
return qs422016
|
||||
//line views/stuff.qtpl:279
|
||||
//line views/stuff.qtpl:280
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:281
|
||||
//line views/stuff.qtpl:282
|
||||
func StreamCommonScripts(qw422016 *qt422016.Writer) {
|
||||
//line views/stuff.qtpl:281
|
||||
//line views/stuff.qtpl:282
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/stuff.qtpl:282
|
||||
//line views/stuff.qtpl:283
|
||||
for _, scriptPath := range cfg.CommonScripts {
|
||||
//line views/stuff.qtpl:282
|
||||
//line views/stuff.qtpl:283
|
||||
qw422016.N().S(`
|
||||
<script src="`)
|
||||
//line views/stuff.qtpl:283
|
||||
//line views/stuff.qtpl:284
|
||||
qw422016.E().S(scriptPath)
|
||||
//line views/stuff.qtpl:283
|
||||
//line views/stuff.qtpl:284
|
||||
qw422016.N().S(`"></script>
|
||||
`)
|
||||
//line views/stuff.qtpl:284
|
||||
//line views/stuff.qtpl:285
|
||||
}
|
||||
//line views/stuff.qtpl:284
|
||||
//line views/stuff.qtpl:285
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/stuff.qtpl:285
|
||||
//line views/stuff.qtpl:286
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:285
|
||||
//line views/stuff.qtpl:286
|
||||
func WriteCommonScripts(qq422016 qtio422016.Writer) {
|
||||
//line views/stuff.qtpl:285
|
||||
//line views/stuff.qtpl:286
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/stuff.qtpl:285
|
||||
//line views/stuff.qtpl:286
|
||||
StreamCommonScripts(qw422016)
|
||||
//line views/stuff.qtpl:285
|
||||
//line views/stuff.qtpl:286
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/stuff.qtpl:285
|
||||
//line views/stuff.qtpl:286
|
||||
}
|
||||
|
||||
//line views/stuff.qtpl:285
|
||||
//line views/stuff.qtpl:286
|
||||
func CommonScripts() string {
|
||||
//line views/stuff.qtpl:285
|
||||
//line views/stuff.qtpl:286
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/stuff.qtpl:285
|
||||
//line views/stuff.qtpl:286
|
||||
WriteCommonScripts(qb422016)
|
||||
//line views/stuff.qtpl:285
|
||||
//line views/stuff.qtpl:286
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/stuff.qtpl:285
|
||||
//line views/stuff.qtpl:286
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/stuff.qtpl:285
|
||||
//line views/stuff.qtpl:286
|
||||
return qs422016
|
||||
//line views/stuff.qtpl:285
|
||||
//line views/stuff.qtpl:286
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
// TODO: l18n
|
||||
package web
|
||||
|
||||
import (
|
||||
|
@ -1,4 +1,3 @@
|
||||
// TODO: l18n
|
||||
package web
|
||||
|
||||
import (
|
||||
|
@ -2,6 +2,7 @@ package web
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
@ -30,6 +31,7 @@ func initReaders(r *mux.Router) {
|
||||
r.PathPrefix("/text/").HandlerFunc(handlerText)
|
||||
r.PathPrefix("/binary/").HandlerFunc(handlerBinary)
|
||||
r.PathPrefix("/rev/").HandlerFunc(handlerRevision)
|
||||
r.PathPrefix("/rev-text/").HandlerFunc(handlerRevisionText)
|
||||
r.PathPrefix("/primitive-diff/").HandlerFunc(handlerPrimitiveDiff)
|
||||
r.PathPrefix("/attachment/").HandlerFunc(handlerAttachment)
|
||||
}
|
||||
@ -69,7 +71,32 @@ func handlerPrimitiveDiff(w http.ResponseWriter, rq *http.Request) {
|
||||
u))
|
||||
}
|
||||
|
||||
// handlerRevision displays a specific revision of text part a page
|
||||
// handlerRevisionText sends Mycomarkup text of the hypha at the given revision. See also: handlerRevision, handlerText.
|
||||
//
|
||||
// /rev-text/<revHash>/<hyphaName>
|
||||
func handlerRevisionText(w http.ResponseWriter, rq *http.Request) {
|
||||
util.PrepareRq(rq)
|
||||
var (
|
||||
shorterUrl = strings.TrimPrefix(rq.URL.Path, "/rev-text/")
|
||||
firstSlashIndex = strings.IndexRune(shorterUrl, '/')
|
||||
revHash = shorterUrl[:firstSlashIndex]
|
||||
hyphaName = util.CanonicalName(shorterUrl[firstSlashIndex+1:])
|
||||
h = hyphae.ByName(hyphaName)
|
||||
textContents, err = history.FileAtRevision(h.TextPartPath(), revHash)
|
||||
)
|
||||
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
log.Printf("While serving text of ‘%s’ at revision ‘%s’: %s\n", hyphaName, revHash, err.Error())
|
||||
_, _ = io.WriteString(w, "Error: "+err.Error())
|
||||
return
|
||||
}
|
||||
log.Printf("Serving text of ‘%s’ from ‘%s’ at revision ‘%s’\n", hyphaName, h.TextPartPath(), revHash)
|
||||
w.WriteHeader(http.StatusOK)
|
||||
_, _ = io.WriteString(w, textContents)
|
||||
}
|
||||
|
||||
// handlerRevision displays a specific revision of the text part the hypha
|
||||
func handlerRevision(w http.ResponseWriter, rq *http.Request) {
|
||||
util.PrepareRq(rq)
|
||||
var (
|
||||
|
Loading…
Reference in New Issue
Block a user