mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-04-05 02:07:04 +00:00
Compensate the lack of the tabs on other pages
This commit is contained in:
parent
f54cfe44ff
commit
3a45ad4330
@ -3,7 +3,6 @@
|
||||
{% import "time" %}
|
||||
|
||||
{% import "github.com/bouncepaw/mycorrhiza/cfg" %}
|
||||
{% import "github.com/bouncepaw/mycorrhiza/util" %}
|
||||
{% import "github.com/bouncepaw/mycorrhiza/user" %}
|
||||
{% import "github.com/bouncepaw/mycorrhiza/hyphae" %}
|
||||
{% import "github.com/bouncepaw/mycorrhiza/history" %}
|
||||
@ -19,7 +18,7 @@ if err != nil {
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<article>
|
||||
<h1>Diff {%s util.BeautifulName(h.Name) %} at {%s hash %}</h1>
|
||||
<h1>Diff {%s= beautifulLink(h.Name) %} at {%s hash %}</h1>
|
||||
<pre class="codeblock"><code>{%s text %}</code></pre>
|
||||
</article>
|
||||
</main>
|
||||
@ -114,7 +113,7 @@ if err != nil {
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<article class="history">
|
||||
<h1>History of {%s util.BeautifulName(hyphaName) %}</h1>
|
||||
<h1>History of {%s= beautifulLink(hyphaName) %}</h1>
|
||||
{%s= list %}
|
||||
</article>
|
||||
</main>
|
||||
|
@ -17,96 +17,93 @@ import "time"
|
||||
import "github.com/bouncepaw/mycorrhiza/cfg"
|
||||
|
||||
//line views/history.qtpl:6
|
||||
import "github.com/bouncepaw/mycorrhiza/util"
|
||||
|
||||
//line views/history.qtpl:7
|
||||
import "github.com/bouncepaw/mycorrhiza/user"
|
||||
|
||||
//line views/history.qtpl:8
|
||||
//line views/history.qtpl:7
|
||||
import "github.com/bouncepaw/mycorrhiza/hyphae"
|
||||
|
||||
//line views/history.qtpl:9
|
||||
//line views/history.qtpl:8
|
||||
import "github.com/bouncepaw/mycorrhiza/history"
|
||||
|
||||
//line views/history.qtpl:12
|
||||
//line views/history.qtpl:11
|
||||
import (
|
||||
qtio422016 "io"
|
||||
|
||||
qt422016 "github.com/valyala/quicktemplate"
|
||||
)
|
||||
|
||||
//line views/history.qtpl:12
|
||||
//line views/history.qtpl:11
|
||||
var (
|
||||
_ = qtio422016.Copy
|
||||
_ = qt422016.AcquireByteBuffer
|
||||
)
|
||||
|
||||
//line views/history.qtpl:12
|
||||
//line views/history.qtpl:11
|
||||
func StreamPrimitiveDiffHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) {
|
||||
//line views/history.qtpl:12
|
||||
//line views/history.qtpl:11
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:14
|
||||
//line views/history.qtpl:13
|
||||
text, err := history.PrimitiveDiffAtRevision(h.TextPartPath(), hash)
|
||||
if err != nil {
|
||||
text = err.Error()
|
||||
}
|
||||
|
||||
//line views/history.qtpl:18
|
||||
//line views/history.qtpl:17
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<article>
|
||||
<h1>Diff `)
|
||||
//line views/history.qtpl:22
|
||||
qw422016.E().S(util.BeautifulName(h.Name))
|
||||
//line views/history.qtpl:22
|
||||
//line views/history.qtpl:21
|
||||
qw422016.N().S(beautifulLink(h.Name))
|
||||
//line views/history.qtpl:21
|
||||
qw422016.N().S(` at `)
|
||||
//line views/history.qtpl:22
|
||||
//line views/history.qtpl:21
|
||||
qw422016.E().S(hash)
|
||||
//line views/history.qtpl:22
|
||||
//line views/history.qtpl:21
|
||||
qw422016.N().S(`</h1>
|
||||
<pre class="codeblock"><code>`)
|
||||
//line views/history.qtpl:23
|
||||
//line views/history.qtpl:22
|
||||
qw422016.E().S(text)
|
||||
//line views/history.qtpl:23
|
||||
//line views/history.qtpl:22
|
||||
qw422016.N().S(`</code></pre>
|
||||
</article>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/history.qtpl:27
|
||||
//line views/history.qtpl:26
|
||||
}
|
||||
|
||||
//line views/history.qtpl:27
|
||||
//line views/history.qtpl:26
|
||||
func WritePrimitiveDiffHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) {
|
||||
//line views/history.qtpl:27
|
||||
//line views/history.qtpl:26
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/history.qtpl:27
|
||||
//line views/history.qtpl:26
|
||||
StreamPrimitiveDiffHTML(qw422016, rq, h, u, hash)
|
||||
//line views/history.qtpl:27
|
||||
//line views/history.qtpl:26
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/history.qtpl:27
|
||||
//line views/history.qtpl:26
|
||||
}
|
||||
|
||||
//line views/history.qtpl:27
|
||||
//line views/history.qtpl:26
|
||||
func PrimitiveDiffHTML(rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) string {
|
||||
//line views/history.qtpl:27
|
||||
//line views/history.qtpl:26
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/history.qtpl:27
|
||||
//line views/history.qtpl:26
|
||||
WritePrimitiveDiffHTML(qb422016, rq, h, u, hash)
|
||||
//line views/history.qtpl:27
|
||||
//line views/history.qtpl:26
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/history.qtpl:27
|
||||
//line views/history.qtpl:26
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/history.qtpl:27
|
||||
//line views/history.qtpl:26
|
||||
return qs422016
|
||||
//line views/history.qtpl:27
|
||||
//line views/history.qtpl:26
|
||||
}
|
||||
|
||||
//line views/history.qtpl:29
|
||||
//line views/history.qtpl:28
|
||||
func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int) {
|
||||
//line views/history.qtpl:29
|
||||
//line views/history.qtpl:28
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width recent-changes">
|
||||
@ -115,54 +112,54 @@ func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int) {
|
||||
<nav class="recent-changes__count">
|
||||
See
|
||||
`)
|
||||
//line views/history.qtpl:36
|
||||
//line views/history.qtpl:35
|
||||
for i, m := range []int{20, 50, 100} {
|
||||
//line views/history.qtpl:36
|
||||
//line views/history.qtpl:35
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:37
|
||||
//line views/history.qtpl:36
|
||||
if i > 0 {
|
||||
//line views/history.qtpl:37
|
||||
//line views/history.qtpl:36
|
||||
qw422016.N().S(`
|
||||
<span aria-hidden="true">|</span>
|
||||
`)
|
||||
//line views/history.qtpl:39
|
||||
//line views/history.qtpl:38
|
||||
}
|
||||
//line views/history.qtpl:39
|
||||
//line views/history.qtpl:38
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:40
|
||||
//line views/history.qtpl:39
|
||||
if m == n {
|
||||
//line views/history.qtpl:40
|
||||
//line views/history.qtpl:39
|
||||
qw422016.N().S(`
|
||||
<b>`)
|
||||
//line views/history.qtpl:41
|
||||
//line views/history.qtpl:40
|
||||
qw422016.N().D(m)
|
||||
//line views/history.qtpl:41
|
||||
//line views/history.qtpl:40
|
||||
qw422016.N().S(`</b>
|
||||
`)
|
||||
//line views/history.qtpl:42
|
||||
//line views/history.qtpl:41
|
||||
} else {
|
||||
//line views/history.qtpl:42
|
||||
//line views/history.qtpl:41
|
||||
qw422016.N().S(`
|
||||
<a href="/recent-changes/`)
|
||||
//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(`">`)
|
||||
//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(`</a>
|
||||
`)
|
||||
//line views/history.qtpl:44
|
||||
//line views/history.qtpl:43
|
||||
}
|
||||
//line views/history.qtpl:44
|
||||
//line views/history.qtpl:43
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:45
|
||||
//line views/history.qtpl:44
|
||||
}
|
||||
//line views/history.qtpl:45
|
||||
//line views/history.qtpl:44
|
||||
qw422016.N().S(`
|
||||
recent changes
|
||||
</nav>
|
||||
@ -170,266 +167,266 @@ func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int) {
|
||||
<p><img class="icon" width="20" height="20" src="/static/icon/feed.svg">Subscribe via <a href="/recent-changes-rss">RSS</a>, <a href="/recent-changes-atom">Atom</a> or <a href="/recent-changes-json">JSON feed</a>.</p>
|
||||
|
||||
`)
|
||||
//line views/history.qtpl:56
|
||||
//line views/history.qtpl:55
|
||||
qw422016.N().S(`
|
||||
|
||||
`)
|
||||
//line views/history.qtpl:59
|
||||
//line views/history.qtpl:58
|
||||
changes := history.RecentChanges(n)
|
||||
var year, day int
|
||||
var month time.Month
|
||||
|
||||
//line views/history.qtpl:62
|
||||
//line views/history.qtpl:61
|
||||
qw422016.N().S(`
|
||||
<section class="recent-changes__list" role="feed">
|
||||
`)
|
||||
//line views/history.qtpl:64
|
||||
//line views/history.qtpl:63
|
||||
if len(changes) == 0 {
|
||||
//line views/history.qtpl:64
|
||||
//line views/history.qtpl:63
|
||||
qw422016.N().S(`
|
||||
<p>Could not find any recent changes.</p>
|
||||
`)
|
||||
//line views/history.qtpl:66
|
||||
//line views/history.qtpl:65
|
||||
} else {
|
||||
//line views/history.qtpl:66
|
||||
//line views/history.qtpl:65
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:67
|
||||
//line views/history.qtpl:66
|
||||
for i, entry := range changes {
|
||||
//line views/history.qtpl:67
|
||||
//line views/history.qtpl:66
|
||||
qw422016.N().S(`
|
||||
|
||||
`)
|
||||
//line views/history.qtpl:69
|
||||
//line views/history.qtpl:68
|
||||
y, m, d := entry.Time.UTC().Date()
|
||||
|
||||
//line views/history.qtpl:69
|
||||
//line views/history.qtpl:68
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:70
|
||||
//line views/history.qtpl:69
|
||||
if d != day || m != month || y != year {
|
||||
//line views/history.qtpl:70
|
||||
//line views/history.qtpl:69
|
||||
qw422016.N().S(`
|
||||
<h2 class="recent-changes__heading">
|
||||
`)
|
||||
//line views/history.qtpl:72
|
||||
//line views/history.qtpl:71
|
||||
qw422016.E().S(fmt.Sprintf("%04d-%02d-%02d", y, m, d))
|
||||
//line views/history.qtpl:72
|
||||
//line views/history.qtpl:71
|
||||
qw422016.N().S(`
|
||||
</h2>
|
||||
`)
|
||||
//line views/history.qtpl:74
|
||||
//line views/history.qtpl:73
|
||||
year, month, day = y, m, d
|
||||
|
||||
//line views/history.qtpl:74
|
||||
//line views/history.qtpl:73
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:75
|
||||
//line views/history.qtpl:74
|
||||
}
|
||||
//line views/history.qtpl:75
|
||||
//line views/history.qtpl:74
|
||||
qw422016.N().S(`
|
||||
|
||||
<div class="recent-changes__entry" role="article"
|
||||
aria-setsize="`)
|
||||
//line views/history.qtpl:78
|
||||
//line views/history.qtpl:77
|
||||
qw422016.N().D(n)
|
||||
//line views/history.qtpl:78
|
||||
//line views/history.qtpl:77
|
||||
qw422016.N().S(`" aria-posinset="`)
|
||||
//line views/history.qtpl:78
|
||||
//line views/history.qtpl:77
|
||||
qw422016.N().D(i)
|
||||
//line views/history.qtpl:78
|
||||
//line views/history.qtpl:77
|
||||
qw422016.N().S(`">
|
||||
`)
|
||||
//line views/history.qtpl:79
|
||||
//line views/history.qtpl:78
|
||||
qw422016.N().S(recentChangesEntry(entry))
|
||||
//line views/history.qtpl:79
|
||||
//line views/history.qtpl:78
|
||||
qw422016.N().S(`
|
||||
</div>
|
||||
|
||||
`)
|
||||
//line views/history.qtpl:82
|
||||
//line views/history.qtpl:81
|
||||
}
|
||||
//line views/history.qtpl:82
|
||||
//line views/history.qtpl:81
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:83
|
||||
//line views/history.qtpl:82
|
||||
}
|
||||
//line views/history.qtpl:83
|
||||
//line views/history.qtpl:82
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/history.qtpl:84
|
||||
//line views/history.qtpl:83
|
||||
qw422016.N().S(helpTopicBadgeHTML("en", "recent_changes"))
|
||||
//line views/history.qtpl:84
|
||||
//line views/history.qtpl:83
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:87
|
||||
}
|
||||
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:87
|
||||
func WriteRecentChangesHTML(qq422016 qtio422016.Writer, n int) {
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:87
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:87
|
||||
StreamRecentChangesHTML(qw422016, n)
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:87
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:87
|
||||
}
|
||||
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:87
|
||||
func RecentChangesHTML(n int) string {
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:87
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:87
|
||||
WriteRecentChangesHTML(qb422016, n)
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:87
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:87
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:87
|
||||
return qs422016
|
||||
//line views/history.qtpl:88
|
||||
//line views/history.qtpl:87
|
||||
}
|
||||
|
||||
//line views/history.qtpl:90
|
||||
//line views/history.qtpl:89
|
||||
func streamrecentChangesEntry(qw422016 *qt422016.Writer, rev history.Revision) {
|
||||
//line views/history.qtpl:90
|
||||
//line views/history.qtpl:89
|
||||
qw422016.N().S(`
|
||||
<div>
|
||||
<time class="recent-changes__entry__time">
|
||||
`)
|
||||
//line views/history.qtpl:93
|
||||
//line views/history.qtpl:92
|
||||
qw422016.E().S(rev.Time.UTC().Format("15:04 UTC"))
|
||||
//line views/history.qtpl:93
|
||||
//line views/history.qtpl:92
|
||||
qw422016.N().S(`
|
||||
</time>
|
||||
<span class="recent-changes__entry__message">`)
|
||||
//line views/history.qtpl:95
|
||||
//line views/history.qtpl:94
|
||||
qw422016.E().S(rev.Hash)
|
||||
//line views/history.qtpl:95
|
||||
//line views/history.qtpl:94
|
||||
qw422016.N().S(`</span>
|
||||
|
||||
`)
|
||||
//line views/history.qtpl:97
|
||||
//line views/history.qtpl:96
|
||||
if rev.Username != "anon" {
|
||||
//line views/history.qtpl:97
|
||||
//line views/history.qtpl:96
|
||||
qw422016.N().S(`
|
||||
<span class="recent-changes__entry__author">
|
||||
— <a href="/hypha/`)
|
||||
//line views/history.qtpl:99
|
||||
//line views/history.qtpl:98
|
||||
qw422016.E().S(cfg.UserHypha)
|
||||
//line views/history.qtpl:99
|
||||
//line views/history.qtpl:98
|
||||
qw422016.N().S(`/`)
|
||||
//line views/history.qtpl:99
|
||||
//line views/history.qtpl:98
|
||||
qw422016.E().S(rev.Username)
|
||||
//line views/history.qtpl:99
|
||||
//line views/history.qtpl:98
|
||||
qw422016.N().S(`" rel="author">`)
|
||||
//line views/history.qtpl:99
|
||||
//line views/history.qtpl:98
|
||||
qw422016.E().S(rev.Username)
|
||||
//line views/history.qtpl:99
|
||||
//line views/history.qtpl:98
|
||||
qw422016.N().S(`</a>
|
||||
</span>
|
||||
`)
|
||||
//line views/history.qtpl:101
|
||||
//line views/history.qtpl:100
|
||||
}
|
||||
//line views/history.qtpl:101
|
||||
//line views/history.qtpl:100
|
||||
qw422016.N().S(`
|
||||
</div>
|
||||
<div>
|
||||
<span class="recent-changes__entry__links">
|
||||
`)
|
||||
//line views/history.qtpl:105
|
||||
//line views/history.qtpl:104
|
||||
qw422016.N().S(rev.HyphaeLinksHTML())
|
||||
//line views/history.qtpl:105
|
||||
//line views/history.qtpl:104
|
||||
qw422016.N().S(`
|
||||
</span>
|
||||
<span class="recent-changes__entry__message">
|
||||
`)
|
||||
//line views/history.qtpl:108
|
||||
//line views/history.qtpl:107
|
||||
qw422016.E().S(rev.Message)
|
||||
//line views/history.qtpl:108
|
||||
//line views/history.qtpl:107
|
||||
qw422016.N().S(`
|
||||
</span>
|
||||
</div>
|
||||
`)
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:110
|
||||
}
|
||||
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:110
|
||||
func writerecentChangesEntry(qq422016 qtio422016.Writer, rev history.Revision) {
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:110
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:110
|
||||
streamrecentChangesEntry(qw422016, rev)
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:110
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:110
|
||||
}
|
||||
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:110
|
||||
func recentChangesEntry(rev history.Revision) string {
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:110
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:110
|
||||
writerecentChangesEntry(qb422016, rev)
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:110
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:110
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:110
|
||||
return qs422016
|
||||
//line views/history.qtpl:111
|
||||
//line views/history.qtpl:110
|
||||
}
|
||||
|
||||
//line views/history.qtpl:113
|
||||
//line views/history.qtpl:112
|
||||
func StreamHistoryHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, list string) {
|
||||
//line views/history.qtpl:113
|
||||
//line views/history.qtpl:112
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<article class="history">
|
||||
<h1>History of `)
|
||||
//line views/history.qtpl:117
|
||||
qw422016.E().S(util.BeautifulName(hyphaName))
|
||||
//line views/history.qtpl:117
|
||||
//line views/history.qtpl:116
|
||||
qw422016.N().S(beautifulLink(hyphaName))
|
||||
//line views/history.qtpl:116
|
||||
qw422016.N().S(`</h1>
|
||||
`)
|
||||
//line views/history.qtpl:118
|
||||
//line views/history.qtpl:117
|
||||
qw422016.N().S(list)
|
||||
//line views/history.qtpl:118
|
||||
//line views/history.qtpl:117
|
||||
qw422016.N().S(`
|
||||
</article>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:121
|
||||
}
|
||||
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:121
|
||||
func WriteHistoryHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, list string) {
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:121
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:121
|
||||
StreamHistoryHTML(qw422016, rq, hyphaName, list)
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:121
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:121
|
||||
}
|
||||
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:121
|
||||
func HistoryHTML(rq *http.Request, hyphaName, list string) string {
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:121
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:121
|
||||
WriteHistoryHTML(qb422016, rq, hyphaName, list)
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:121
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:121
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:121
|
||||
return qs422016
|
||||
//line views/history.qtpl:122
|
||||
//line views/history.qtpl:121
|
||||
}
|
||||
|
@ -6,6 +6,9 @@
|
||||
{% import "github.com/bouncepaw/mycorrhiza/user" %}
|
||||
{% import "github.com/bouncepaw/mycorrhiza/util" %}
|
||||
|
||||
{% func beautifulLink(hyphaName string) %}
|
||||
<a href="/hypha/{%s= hyphaName %}">{%s util.BeautifulName(hyphaName) %}</a>{% endfunc %}
|
||||
|
||||
{% func nonExistentHyphaNotice(h *hyphae.Hypha, u *user.User) %}
|
||||
<section class="non-existent-hypha">
|
||||
<h2 class="non-existent-hypha__title">This hypha does not exist</h2>
|
||||
|
@ -36,33 +36,75 @@ var (
|
||||
)
|
||||
|
||||
//line views/hypha.qtpl:9
|
||||
func streamnonExistentHyphaNotice(qw422016 *qt422016.Writer, h *hyphae.Hypha, u *user.User) {
|
||||
func streambeautifulLink(qw422016 *qt422016.Writer, hyphaName string) {
|
||||
//line views/hypha.qtpl:9
|
||||
qw422016.N().S(`
|
||||
<a href="/hypha/`)
|
||||
//line views/hypha.qtpl:10
|
||||
qw422016.N().S(hyphaName)
|
||||
//line views/hypha.qtpl:10
|
||||
qw422016.N().S(`">`)
|
||||
//line views/hypha.qtpl:10
|
||||
qw422016.E().S(util.BeautifulName(hyphaName))
|
||||
//line views/hypha.qtpl:10
|
||||
qw422016.N().S(`</a>`)
|
||||
//line views/hypha.qtpl:10
|
||||
}
|
||||
|
||||
//line views/hypha.qtpl:10
|
||||
func writebeautifulLink(qq422016 qtio422016.Writer, hyphaName string) {
|
||||
//line views/hypha.qtpl:10
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/hypha.qtpl:10
|
||||
streambeautifulLink(qw422016, hyphaName)
|
||||
//line views/hypha.qtpl:10
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/hypha.qtpl:10
|
||||
}
|
||||
|
||||
//line views/hypha.qtpl:10
|
||||
func beautifulLink(hyphaName string) string {
|
||||
//line views/hypha.qtpl:10
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/hypha.qtpl:10
|
||||
writebeautifulLink(qb422016, hyphaName)
|
||||
//line views/hypha.qtpl:10
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/hypha.qtpl:10
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/hypha.qtpl:10
|
||||
return qs422016
|
||||
//line views/hypha.qtpl:10
|
||||
}
|
||||
|
||||
//line views/hypha.qtpl:12
|
||||
func streamnonExistentHyphaNotice(qw422016 *qt422016.Writer, h *hyphae.Hypha, u *user.User) {
|
||||
//line views/hypha.qtpl:12
|
||||
qw422016.N().S(`
|
||||
<section class="non-existent-hypha">
|
||||
<h2 class="non-existent-hypha__title">This hypha does not exist</h2>
|
||||
`)
|
||||
//line views/hypha.qtpl:12
|
||||
//line views/hypha.qtpl:15
|
||||
if cfg.UseAuth && u.Group == "anon" {
|
||||
//line views/hypha.qtpl:12
|
||||
//line views/hypha.qtpl:15
|
||||
qw422016.N().S(`
|
||||
<p>You are not authorized to create new hyphae. Here is what you can do:</p>
|
||||
<ul>
|
||||
<li><a href="/login">Log in to your account, if you have one</a></li>
|
||||
`)
|
||||
//line views/hypha.qtpl:16
|
||||
//line views/hypha.qtpl:19
|
||||
if cfg.AllowRegistration {
|
||||
//line views/hypha.qtpl:16
|
||||
//line views/hypha.qtpl:19
|
||||
qw422016.N().S(`<li><a href="/register">Register a new account</a></li>`)
|
||||
//line views/hypha.qtpl:16
|
||||
//line views/hypha.qtpl:19
|
||||
}
|
||||
//line views/hypha.qtpl:16
|
||||
//line views/hypha.qtpl:19
|
||||
qw422016.N().S(`
|
||||
</ul>
|
||||
`)
|
||||
//line views/hypha.qtpl:18
|
||||
//line views/hypha.qtpl:21
|
||||
} else {
|
||||
//line views/hypha.qtpl:18
|
||||
//line views/hypha.qtpl:21
|
||||
qw422016.N().S(`
|
||||
|
||||
<div class="non-existent-hypha__ways">
|
||||
@ -71,9 +113,9 @@ func streamnonExistentHyphaNotice(qw422016 *qt422016.Writer, h *hyphae.Hypha, u
|
||||
<p>Write a note, a diary, an article, a story or anything textual using <a href="/help/en/mycomarkup" class="shy-link">Mycomarkup</a>. Full history of edits to the document will be saved.</p>
|
||||
<p>Make sure to follow this wiki's writing conventions if there are any.</p>
|
||||
<a class="btn btn_accent stick-to-bottom" href="/edit/`)
|
||||
//line views/hypha.qtpl:25
|
||||
//line views/hypha.qtpl:28
|
||||
qw422016.E().S(h.Name)
|
||||
//line views/hypha.qtpl:25
|
||||
//line views/hypha.qtpl:28
|
||||
qw422016.N().S(`">Create</a>
|
||||
</section>
|
||||
|
||||
@ -81,9 +123,9 @@ func streamnonExistentHyphaNotice(qw422016 *qt422016.Writer, h *hyphae.Hypha, u
|
||||
<h3 class="non-existent-hypha__subtitle">🖼 Upload a media</h3>
|
||||
<p>Upload a picture, a video or an audio. Most common formats can be accessed from the browser, others can be only downloaded afterwards. You can write a description for the media later.</p>
|
||||
<form action="/upload-binary/`)
|
||||
//line views/hypha.qtpl:31
|
||||
//line views/hypha.qtpl:34
|
||||
qw422016.E().S(h.Name)
|
||||
//line views/hypha.qtpl:31
|
||||
//line views/hypha.qtpl:34
|
||||
qw422016.N().S(`"
|
||||
method="post" enctype="multipart/form-data"
|
||||
class="upload-binary">
|
||||
@ -95,240 +137,240 @@ func streamnonExistentHyphaNotice(qw422016 *qt422016.Writer, h *hyphae.Hypha, u
|
||||
</section>
|
||||
</div>
|
||||
`)
|
||||
//line views/hypha.qtpl:41
|
||||
//line views/hypha.qtpl:44
|
||||
}
|
||||
//line views/hypha.qtpl:41
|
||||
//line views/hypha.qtpl:44
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
`)
|
||||
//line views/hypha.qtpl:43
|
||||
//line views/hypha.qtpl:46
|
||||
}
|
||||
|
||||
//line views/hypha.qtpl:43
|
||||
//line views/hypha.qtpl:46
|
||||
func writenonExistentHyphaNotice(qq422016 qtio422016.Writer, h *hyphae.Hypha, u *user.User) {
|
||||
//line views/hypha.qtpl:43
|
||||
//line views/hypha.qtpl:46
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/hypha.qtpl:43
|
||||
//line views/hypha.qtpl:46
|
||||
streamnonExistentHyphaNotice(qw422016, h, u)
|
||||
//line views/hypha.qtpl:43
|
||||
//line views/hypha.qtpl:46
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/hypha.qtpl:43
|
||||
//line views/hypha.qtpl:46
|
||||
}
|
||||
|
||||
//line views/hypha.qtpl:43
|
||||
//line views/hypha.qtpl:46
|
||||
func nonExistentHyphaNotice(h *hyphae.Hypha, u *user.User) string {
|
||||
//line views/hypha.qtpl:43
|
||||
//line views/hypha.qtpl:46
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/hypha.qtpl:43
|
||||
//line views/hypha.qtpl:46
|
||||
writenonExistentHyphaNotice(qb422016, h, u)
|
||||
//line views/hypha.qtpl:43
|
||||
//line views/hypha.qtpl:46
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/hypha.qtpl:43
|
||||
//line views/hypha.qtpl:46
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/hypha.qtpl:43
|
||||
//line views/hypha.qtpl:46
|
||||
return qs422016
|
||||
//line views/hypha.qtpl:43
|
||||
//line views/hypha.qtpl:46
|
||||
}
|
||||
|
||||
//line views/hypha.qtpl:45
|
||||
//line views/hypha.qtpl:48
|
||||
func StreamNaviTitleHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) {
|
||||
//line views/hypha.qtpl:45
|
||||
//line views/hypha.qtpl:48
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/hypha.qtpl:47
|
||||
//line views/hypha.qtpl:50
|
||||
var (
|
||||
prevAcc = "/hypha/"
|
||||
parts = strings.Split(h.Name, "/")
|
||||
)
|
||||
|
||||
//line views/hypha.qtpl:51
|
||||
//line views/hypha.qtpl:54
|
||||
qw422016.N().S(`
|
||||
<h1 class="navi-title">
|
||||
`)
|
||||
//line views/hypha.qtpl:53
|
||||
//line views/hypha.qtpl:56
|
||||
qw422016.N().S(`<a href="/hypha/`)
|
||||
//line views/hypha.qtpl:54
|
||||
//line views/hypha.qtpl:57
|
||||
qw422016.E().S(cfg.HomeHypha)
|
||||
//line views/hypha.qtpl:54
|
||||
//line views/hypha.qtpl:57
|
||||
qw422016.N().S(`">`)
|
||||
//line views/hypha.qtpl:55
|
||||
//line views/hypha.qtpl:58
|
||||
qw422016.N().S(cfg.NaviTitleIcon)
|
||||
//line views/hypha.qtpl:55
|
||||
//line views/hypha.qtpl:58
|
||||
qw422016.N().S(`<span aria-hidden="true" class="navi-title__colon">:</span></a>`)
|
||||
//line views/hypha.qtpl:59
|
||||
//line views/hypha.qtpl:62
|
||||
for i, part := range parts {
|
||||
//line views/hypha.qtpl:60
|
||||
//line views/hypha.qtpl:63
|
||||
if i > 0 {
|
||||
//line views/hypha.qtpl:60
|
||||
//line views/hypha.qtpl:63
|
||||
qw422016.N().S(`<span aria-hidden="true" class="navi-title__separator">/</span>`)
|
||||
//line views/hypha.qtpl:62
|
||||
//line views/hypha.qtpl:65
|
||||
}
|
||||
//line views/hypha.qtpl:62
|
||||
//line views/hypha.qtpl:65
|
||||
qw422016.N().S(`<a href="`)
|
||||
//line views/hypha.qtpl:64
|
||||
qw422016.E().S(prevAcc + part)
|
||||
//line views/hypha.qtpl:64
|
||||
qw422016.N().S(`" rel="`)
|
||||
//line views/hypha.qtpl:64
|
||||
if i == len(parts)-1 {
|
||||
//line views/hypha.qtpl:64
|
||||
qw422016.N().S(`bookmark`)
|
||||
//line views/hypha.qtpl:64
|
||||
} else {
|
||||
//line views/hypha.qtpl:64
|
||||
qw422016.N().S(`up`)
|
||||
//line views/hypha.qtpl:64
|
||||
}
|
||||
//line views/hypha.qtpl:64
|
||||
qw422016.N().S(`">`)
|
||||
//line views/hypha.qtpl:65
|
||||
qw422016.N().S(util.BeautifulName(part))
|
||||
//line views/hypha.qtpl:65
|
||||
qw422016.N().S(`</a>`)
|
||||
//line views/hypha.qtpl:67
|
||||
qw422016.E().S(prevAcc + part)
|
||||
//line views/hypha.qtpl:67
|
||||
qw422016.N().S(`" rel="`)
|
||||
//line views/hypha.qtpl:67
|
||||
if i == len(parts)-1 {
|
||||
//line views/hypha.qtpl:67
|
||||
qw422016.N().S(`bookmark`)
|
||||
//line views/hypha.qtpl:67
|
||||
} else {
|
||||
//line views/hypha.qtpl:67
|
||||
qw422016.N().S(`up`)
|
||||
//line views/hypha.qtpl:67
|
||||
}
|
||||
//line views/hypha.qtpl:67
|
||||
qw422016.N().S(`">`)
|
||||
//line views/hypha.qtpl:68
|
||||
qw422016.N().S(util.BeautifulName(part))
|
||||
//line views/hypha.qtpl:68
|
||||
qw422016.N().S(`</a>`)
|
||||
//line views/hypha.qtpl:70
|
||||
prevAcc += part + "/"
|
||||
|
||||
//line views/hypha.qtpl:68
|
||||
//line views/hypha.qtpl:71
|
||||
}
|
||||
//line views/hypha.qtpl:69
|
||||
//line views/hypha.qtpl:72
|
||||
qw422016.N().S(`
|
||||
</h1>
|
||||
`)
|
||||
//line views/hypha.qtpl:71
|
||||
//line views/hypha.qtpl:74
|
||||
}
|
||||
|
||||
//line views/hypha.qtpl:71
|
||||
//line views/hypha.qtpl:74
|
||||
func WriteNaviTitleHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) {
|
||||
//line views/hypha.qtpl:71
|
||||
//line views/hypha.qtpl:74
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/hypha.qtpl:71
|
||||
//line views/hypha.qtpl:74
|
||||
StreamNaviTitleHTML(qw422016, h)
|
||||
//line views/hypha.qtpl:71
|
||||
//line views/hypha.qtpl:74
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/hypha.qtpl:71
|
||||
//line views/hypha.qtpl:74
|
||||
}
|
||||
|
||||
//line views/hypha.qtpl:71
|
||||
//line views/hypha.qtpl:74
|
||||
func NaviTitleHTML(h *hyphae.Hypha) string {
|
||||
//line views/hypha.qtpl:71
|
||||
//line views/hypha.qtpl:74
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/hypha.qtpl:71
|
||||
//line views/hypha.qtpl:74
|
||||
WriteNaviTitleHTML(qb422016, h)
|
||||
//line views/hypha.qtpl:71
|
||||
//line views/hypha.qtpl:74
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/hypha.qtpl:71
|
||||
//line views/hypha.qtpl:74
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/hypha.qtpl:71
|
||||
//line views/hypha.qtpl:74
|
||||
return qs422016
|
||||
//line views/hypha.qtpl:71
|
||||
//line views/hypha.qtpl:74
|
||||
}
|
||||
|
||||
//line views/hypha.qtpl:73
|
||||
//line views/hypha.qtpl:76
|
||||
func StreamAttachmentHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) {
|
||||
//line views/hypha.qtpl:73
|
||||
//line views/hypha.qtpl:76
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/hypha.qtpl:74
|
||||
//line views/hypha.qtpl:77
|
||||
switch filepath.Ext(h.BinaryPath) {
|
||||
//line views/hypha.qtpl:76
|
||||
//line views/hypha.qtpl:79
|
||||
case ".jpg", ".gif", ".png", ".webp", ".svg", ".ico":
|
||||
//line views/hypha.qtpl:76
|
||||
//line views/hypha.qtpl:79
|
||||
qw422016.N().S(`
|
||||
<div class="binary-container binary-container_with-img">
|
||||
<a href="/binary/`)
|
||||
//line views/hypha.qtpl:78
|
||||
//line views/hypha.qtpl:81
|
||||
qw422016.N().S(h.Name)
|
||||
//line views/hypha.qtpl:78
|
||||
//line views/hypha.qtpl:81
|
||||
qw422016.N().S(`"><img src="/binary/`)
|
||||
//line views/hypha.qtpl:78
|
||||
//line views/hypha.qtpl:81
|
||||
qw422016.N().S(h.Name)
|
||||
//line views/hypha.qtpl:78
|
||||
//line views/hypha.qtpl:81
|
||||
qw422016.N().S(`"/></a>
|
||||
</div>
|
||||
|
||||
`)
|
||||
//line views/hypha.qtpl:81
|
||||
//line views/hypha.qtpl:84
|
||||
case ".ogg", ".webm", ".mp4":
|
||||
//line views/hypha.qtpl:81
|
||||
//line views/hypha.qtpl:84
|
||||
qw422016.N().S(`
|
||||
<div class="binary-container binary-container_with-video">
|
||||
<video controls>
|
||||
<source src="/binary/`)
|
||||
//line views/hypha.qtpl:84
|
||||
//line views/hypha.qtpl:87
|
||||
qw422016.N().S(h.Name)
|
||||
//line views/hypha.qtpl:84
|
||||
//line views/hypha.qtpl:87
|
||||
qw422016.N().S(`"/>
|
||||
<p>Your browser does not support video. <a href="/binary/`)
|
||||
//line views/hypha.qtpl:85
|
||||
//line views/hypha.qtpl:88
|
||||
qw422016.N().S(h.Name)
|
||||
//line views/hypha.qtpl:85
|
||||
//line views/hypha.qtpl:88
|
||||
qw422016.N().S(`">Download video</a></p>
|
||||
</video>
|
||||
</div>
|
||||
|
||||
`)
|
||||
//line views/hypha.qtpl:89
|
||||
//line views/hypha.qtpl:92
|
||||
case ".mp3":
|
||||
//line views/hypha.qtpl:89
|
||||
//line views/hypha.qtpl:92
|
||||
qw422016.N().S(`
|
||||
<div class="binary-container binary-container_with-audio">
|
||||
<audio controls>
|
||||
<source src="/binary/`)
|
||||
//line views/hypha.qtpl:92
|
||||
//line views/hypha.qtpl:95
|
||||
qw422016.N().S(h.Name)
|
||||
//line views/hypha.qtpl:92
|
||||
//line views/hypha.qtpl:95
|
||||
qw422016.N().S(`"/>
|
||||
<p>Your browser does not support audio. <a href="/binary/`)
|
||||
//line views/hypha.qtpl:93
|
||||
//line views/hypha.qtpl:96
|
||||
qw422016.N().S(h.Name)
|
||||
//line views/hypha.qtpl:93
|
||||
//line views/hypha.qtpl:96
|
||||
qw422016.N().S(`">Download audio</a></p>
|
||||
</audio>
|
||||
</div>
|
||||
|
||||
`)
|
||||
//line views/hypha.qtpl:97
|
||||
//line views/hypha.qtpl:100
|
||||
default:
|
||||
//line views/hypha.qtpl:97
|
||||
//line views/hypha.qtpl:100
|
||||
qw422016.N().S(`
|
||||
<div class="binary-container binary-container_with-nothing">
|
||||
<p><a href="/binary/`)
|
||||
//line views/hypha.qtpl:99
|
||||
//line views/hypha.qtpl:102
|
||||
qw422016.N().S(h.Name)
|
||||
//line views/hypha.qtpl:99
|
||||
//line views/hypha.qtpl:102
|
||||
qw422016.N().S(`">Download media</a></p>
|
||||
</div>
|
||||
`)
|
||||
//line views/hypha.qtpl:101
|
||||
//line views/hypha.qtpl:104
|
||||
}
|
||||
//line views/hypha.qtpl:101
|
||||
//line views/hypha.qtpl:104
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/hypha.qtpl:102
|
||||
//line views/hypha.qtpl:105
|
||||
}
|
||||
|
||||
//line views/hypha.qtpl:102
|
||||
//line views/hypha.qtpl:105
|
||||
func WriteAttachmentHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) {
|
||||
//line views/hypha.qtpl:102
|
||||
//line views/hypha.qtpl:105
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/hypha.qtpl:102
|
||||
//line views/hypha.qtpl:105
|
||||
StreamAttachmentHTML(qw422016, h)
|
||||
//line views/hypha.qtpl:102
|
||||
//line views/hypha.qtpl:105
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/hypha.qtpl:102
|
||||
//line views/hypha.qtpl:105
|
||||
}
|
||||
|
||||
//line views/hypha.qtpl:102
|
||||
//line views/hypha.qtpl:105
|
||||
func AttachmentHTML(h *hyphae.Hypha) string {
|
||||
//line views/hypha.qtpl:102
|
||||
//line views/hypha.qtpl:105
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/hypha.qtpl:102
|
||||
//line views/hypha.qtpl:105
|
||||
WriteAttachmentHTML(qb422016, h)
|
||||
//line views/hypha.qtpl:102
|
||||
//line views/hypha.qtpl:105
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/hypha.qtpl:102
|
||||
//line views/hypha.qtpl:105
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/hypha.qtpl:102
|
||||
//line views/hypha.qtpl:105
|
||||
return qs422016
|
||||
//line views/hypha.qtpl:102
|
||||
//line views/hypha.qtpl:105
|
||||
}
|
||||
|
@ -1,12 +1,11 @@
|
||||
{% import "net/http" %}
|
||||
{% import "github.com/bouncepaw/mycorrhiza/util" %}
|
||||
|
||||
{% func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) %}
|
||||
{%= modalBegin(
|
||||
"delete-confirm",
|
||||
hyphaName,
|
||||
"",
|
||||
"Delete "+util.BeautifulName(hyphaName)+"?") %}
|
||||
"Delete "+beautifulLink(hyphaName)+"?") %}
|
||||
{%= modalReallyWant(hyphaName, "unattach") %}
|
||||
<p>In this version of Mycorrhiza Wiki you cannot undelete a deleted hypha but the history can still be accessed.</p>
|
||||
{%= modalEnd(hyphaName, true) %}
|
||||
@ -17,7 +16,7 @@
|
||||
"unattach",
|
||||
hyphaName,
|
||||
"",
|
||||
"Unattach "+util.BeautifulName(hyphaName)+"?") %}
|
||||
"Unattach "+beautifulLink(hyphaName)+"?") %}
|
||||
{%= modalReallyWant(hyphaName, "unattach") %}
|
||||
{%= modalEnd(hyphaName, true) %}
|
||||
{% endfunc %}
|
||||
@ -27,7 +26,7 @@
|
||||
"rename-confirm",
|
||||
hyphaName,
|
||||
` method="post" enctype="multipart/form-data"`,
|
||||
"Rename "+util.BeautifulName(hyphaName)) %}
|
||||
"Rename "+beautifulLink(hyphaName)) %}
|
||||
<label for="new-name">New name</label>
|
||||
<input type="text" value="{%s hyphaName %}" required autofocus id="new-name" name="new-name"/>
|
||||
|
||||
|
@ -7,147 +7,144 @@ package views
|
||||
//line views/modal.qtpl:1
|
||||
import "net/http"
|
||||
|
||||
//line views/modal.qtpl:2
|
||||
import "github.com/bouncepaw/mycorrhiza/util"
|
||||
|
||||
//line views/modal.qtpl:4
|
||||
//line views/modal.qtpl:3
|
||||
import (
|
||||
qtio422016 "io"
|
||||
|
||||
qt422016 "github.com/valyala/quicktemplate"
|
||||
)
|
||||
|
||||
//line views/modal.qtpl:4
|
||||
//line views/modal.qtpl:3
|
||||
var (
|
||||
_ = qtio422016.Copy
|
||||
_ = qt422016.AcquireByteBuffer
|
||||
)
|
||||
|
||||
//line views/modal.qtpl:4
|
||||
//line views/modal.qtpl:3
|
||||
func StreamDeleteAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
|
||||
//line views/modal.qtpl:4
|
||||
//line views/modal.qtpl:3
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/modal.qtpl:5
|
||||
//line views/modal.qtpl:4
|
||||
streammodalBegin(qw422016,
|
||||
"delete-confirm",
|
||||
hyphaName,
|
||||
"",
|
||||
"Delete "+util.BeautifulName(hyphaName)+"?")
|
||||
//line views/modal.qtpl:9
|
||||
"Delete "+beautifulLink(hyphaName)+"?")
|
||||
//line views/modal.qtpl:8
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/modal.qtpl:10
|
||||
//line views/modal.qtpl:9
|
||||
streammodalReallyWant(qw422016, hyphaName, "unattach")
|
||||
//line views/modal.qtpl:10
|
||||
//line views/modal.qtpl:9
|
||||
qw422016.N().S(`
|
||||
<p>In this version of Mycorrhiza Wiki you cannot undelete a deleted hypha but the history can still be accessed.</p>
|
||||
`)
|
||||
//line views/modal.qtpl:12
|
||||
//line views/modal.qtpl:11
|
||||
streammodalEnd(qw422016, hyphaName, true)
|
||||
//line views/modal.qtpl:11
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/modal.qtpl:12
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/modal.qtpl:13
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:13
|
||||
//line views/modal.qtpl:12
|
||||
func WriteDeleteAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
|
||||
//line views/modal.qtpl:13
|
||||
//line views/modal.qtpl:12
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/modal.qtpl:13
|
||||
//line views/modal.qtpl:12
|
||||
StreamDeleteAskHTML(qw422016, rq, hyphaName, isOld)
|
||||
//line views/modal.qtpl:13
|
||||
//line views/modal.qtpl:12
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/modal.qtpl:13
|
||||
//line views/modal.qtpl:12
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:13
|
||||
//line views/modal.qtpl:12
|
||||
func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
|
||||
//line views/modal.qtpl:13
|
||||
//line views/modal.qtpl:12
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/modal.qtpl:13
|
||||
//line views/modal.qtpl:12
|
||||
WriteDeleteAskHTML(qb422016, rq, hyphaName, isOld)
|
||||
//line views/modal.qtpl:13
|
||||
//line views/modal.qtpl:12
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/modal.qtpl:13
|
||||
//line views/modal.qtpl:12
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/modal.qtpl:13
|
||||
//line views/modal.qtpl:12
|
||||
return qs422016
|
||||
//line views/modal.qtpl:13
|
||||
//line views/modal.qtpl:12
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:15
|
||||
//line views/modal.qtpl:14
|
||||
func StreamUnattachAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
|
||||
//line views/modal.qtpl:15
|
||||
//line views/modal.qtpl:14
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/modal.qtpl:16
|
||||
//line views/modal.qtpl:15
|
||||
streammodalBegin(qw422016,
|
||||
"unattach",
|
||||
hyphaName,
|
||||
"",
|
||||
"Unattach "+util.BeautifulName(hyphaName)+"?")
|
||||
"Unattach "+beautifulLink(hyphaName)+"?")
|
||||
//line views/modal.qtpl:19
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/modal.qtpl:20
|
||||
streammodalReallyWant(qw422016, hyphaName, "unattach")
|
||||
//line views/modal.qtpl:20
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/modal.qtpl:21
|
||||
streammodalReallyWant(qw422016, hyphaName, "unattach")
|
||||
streammodalEnd(qw422016, hyphaName, true)
|
||||
//line views/modal.qtpl:21
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/modal.qtpl:22
|
||||
streammodalEnd(qw422016, hyphaName, true)
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:22
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/modal.qtpl:23
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:23
|
||||
func WriteUnattachAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
|
||||
//line views/modal.qtpl:23
|
||||
//line views/modal.qtpl:22
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/modal.qtpl:23
|
||||
//line views/modal.qtpl:22
|
||||
StreamUnattachAskHTML(qw422016, rq, hyphaName, isOld)
|
||||
//line views/modal.qtpl:23
|
||||
//line views/modal.qtpl:22
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/modal.qtpl:23
|
||||
//line views/modal.qtpl:22
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:23
|
||||
//line views/modal.qtpl:22
|
||||
func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
|
||||
//line views/modal.qtpl:23
|
||||
//line views/modal.qtpl:22
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/modal.qtpl:23
|
||||
//line views/modal.qtpl:22
|
||||
WriteUnattachAskHTML(qb422016, rq, hyphaName, isOld)
|
||||
//line views/modal.qtpl:23
|
||||
//line views/modal.qtpl:22
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/modal.qtpl:23
|
||||
//line views/modal.qtpl:22
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/modal.qtpl:23
|
||||
//line views/modal.qtpl:22
|
||||
return qs422016
|
||||
//line views/modal.qtpl:23
|
||||
//line views/modal.qtpl:22
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:25
|
||||
//line views/modal.qtpl:24
|
||||
func StreamRenameAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
|
||||
//line views/modal.qtpl:25
|
||||
//line views/modal.qtpl:24
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/modal.qtpl:26
|
||||
//line views/modal.qtpl:25
|
||||
streammodalBegin(qw422016,
|
||||
"rename-confirm",
|
||||
hyphaName,
|
||||
` method="post" enctype="multipart/form-data"`,
|
||||
"Rename "+util.BeautifulName(hyphaName))
|
||||
//line views/modal.qtpl:30
|
||||
"Rename "+beautifulLink(hyphaName))
|
||||
//line views/modal.qtpl:29
|
||||
qw422016.N().S(`
|
||||
<label for="new-name">New name</label>
|
||||
<input type="text" value="`)
|
||||
//line views/modal.qtpl:32
|
||||
//line views/modal.qtpl:31
|
||||
qw422016.E().S(hyphaName)
|
||||
//line views/modal.qtpl:32
|
||||
//line views/modal.qtpl:31
|
||||
qw422016.N().S(`" required autofocus id="new-name" name="new-name"/>
|
||||
|
||||
<input type="checkbox" id="recursive" name="recursive" value="true" checked/>
|
||||
@ -155,186 +152,186 @@ func StreamRenameAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName
|
||||
|
||||
<p>If you rename this hypha, all incoming links and all relative outcoming links will break. You will also lose all history for the new name. Rename carefully.</p>
|
||||
`)
|
||||
//line views/modal.qtpl:38
|
||||
//line views/modal.qtpl:37
|
||||
streammodalEnd(qw422016, hyphaName, false)
|
||||
//line views/modal.qtpl:38
|
||||
//line views/modal.qtpl:37
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/modal.qtpl:39
|
||||
//line views/modal.qtpl:38
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:39
|
||||
//line views/modal.qtpl:38
|
||||
func WriteRenameAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
|
||||
//line views/modal.qtpl:39
|
||||
//line views/modal.qtpl:38
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/modal.qtpl:39
|
||||
//line views/modal.qtpl:38
|
||||
StreamRenameAskHTML(qw422016, rq, hyphaName, isOld)
|
||||
//line views/modal.qtpl:39
|
||||
//line views/modal.qtpl:38
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/modal.qtpl:39
|
||||
//line views/modal.qtpl:38
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:39
|
||||
//line views/modal.qtpl:38
|
||||
func RenameAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
|
||||
//line views/modal.qtpl:39
|
||||
//line views/modal.qtpl:38
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/modal.qtpl:39
|
||||
//line views/modal.qtpl:38
|
||||
WriteRenameAskHTML(qb422016, rq, hyphaName, isOld)
|
||||
//line views/modal.qtpl:39
|
||||
//line views/modal.qtpl:38
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/modal.qtpl:39
|
||||
//line views/modal.qtpl:38
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/modal.qtpl:39
|
||||
//line views/modal.qtpl:38
|
||||
return qs422016
|
||||
//line views/modal.qtpl:39
|
||||
//line views/modal.qtpl:38
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:41
|
||||
//line views/modal.qtpl:40
|
||||
func streammodalReallyWant(qw422016 *qt422016.Writer, hyphaName, verb string) {
|
||||
//line views/modal.qtpl:41
|
||||
//line views/modal.qtpl:40
|
||||
qw422016.N().S(`
|
||||
<p class="modal__confirmation-msg">Do you really want to `)
|
||||
//line views/modal.qtpl:42
|
||||
//line views/modal.qtpl:41
|
||||
qw422016.E().S(verb)
|
||||
//line views/modal.qtpl:42
|
||||
//line views/modal.qtpl:41
|
||||
qw422016.N().S(` hypha <em>`)
|
||||
//line views/modal.qtpl:42
|
||||
//line views/modal.qtpl:41
|
||||
qw422016.E().S(hyphaName)
|
||||
//line views/modal.qtpl:42
|
||||
//line views/modal.qtpl:41
|
||||
qw422016.N().S(`</em>?</p>
|
||||
`)
|
||||
//line views/modal.qtpl:43
|
||||
//line views/modal.qtpl:42
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:43
|
||||
//line views/modal.qtpl:42
|
||||
func writemodalReallyWant(qq422016 qtio422016.Writer, hyphaName, verb string) {
|
||||
//line views/modal.qtpl:43
|
||||
//line views/modal.qtpl:42
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/modal.qtpl:43
|
||||
//line views/modal.qtpl:42
|
||||
streammodalReallyWant(qw422016, hyphaName, verb)
|
||||
//line views/modal.qtpl:43
|
||||
//line views/modal.qtpl:42
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/modal.qtpl:43
|
||||
//line views/modal.qtpl:42
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:43
|
||||
//line views/modal.qtpl:42
|
||||
func modalReallyWant(hyphaName, verb string) string {
|
||||
//line views/modal.qtpl:43
|
||||
//line views/modal.qtpl:42
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/modal.qtpl:43
|
||||
//line views/modal.qtpl:42
|
||||
writemodalReallyWant(qb422016, hyphaName, verb)
|
||||
//line views/modal.qtpl:43
|
||||
//line views/modal.qtpl:42
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/modal.qtpl:43
|
||||
//line views/modal.qtpl:42
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/modal.qtpl:43
|
||||
//line views/modal.qtpl:42
|
||||
return qs422016
|
||||
//line views/modal.qtpl:43
|
||||
//line views/modal.qtpl:42
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:45
|
||||
//line views/modal.qtpl:44
|
||||
func streammodalBegin(qw422016 *qt422016.Writer, path, hyphaName, formAttrs, legend string) {
|
||||
//line views/modal.qtpl:45
|
||||
//line views/modal.qtpl:44
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<form class="modal" action="/`)
|
||||
//line views/modal.qtpl:48
|
||||
//line views/modal.qtpl:47
|
||||
qw422016.E().S(path)
|
||||
//line views/modal.qtpl:48
|
||||
//line views/modal.qtpl:47
|
||||
qw422016.N().S(`/`)
|
||||
//line views/modal.qtpl:48
|
||||
//line views/modal.qtpl:47
|
||||
qw422016.E().S(hyphaName)
|
||||
//line views/modal.qtpl:48
|
||||
//line views/modal.qtpl:47
|
||||
qw422016.N().S(`"`)
|
||||
//line views/modal.qtpl:48
|
||||
//line views/modal.qtpl:47
|
||||
qw422016.N().S(formAttrs)
|
||||
//line views/modal.qtpl:48
|
||||
//line views/modal.qtpl:47
|
||||
qw422016.N().S(`>
|
||||
<fieldset class="modal__fieldset">
|
||||
<legend class="modal__title">`)
|
||||
//line views/modal.qtpl:50
|
||||
//line views/modal.qtpl:49
|
||||
qw422016.N().S(legend)
|
||||
//line views/modal.qtpl:50
|
||||
//line views/modal.qtpl:49
|
||||
qw422016.N().S(`</legend>
|
||||
`)
|
||||
//line views/modal.qtpl:51
|
||||
//line views/modal.qtpl:50
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:51
|
||||
//line views/modal.qtpl:50
|
||||
func writemodalBegin(qq422016 qtio422016.Writer, path, hyphaName, formAttrs, legend string) {
|
||||
//line views/modal.qtpl:51
|
||||
//line views/modal.qtpl:50
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/modal.qtpl:51
|
||||
//line views/modal.qtpl:50
|
||||
streammodalBegin(qw422016, path, hyphaName, formAttrs, legend)
|
||||
//line views/modal.qtpl:51
|
||||
//line views/modal.qtpl:50
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/modal.qtpl:51
|
||||
//line views/modal.qtpl:50
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:51
|
||||
//line views/modal.qtpl:50
|
||||
func modalBegin(path, hyphaName, formAttrs, legend string) string {
|
||||
//line views/modal.qtpl:51
|
||||
//line views/modal.qtpl:50
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/modal.qtpl:51
|
||||
//line views/modal.qtpl:50
|
||||
writemodalBegin(qb422016, path, hyphaName, formAttrs, legend)
|
||||
//line views/modal.qtpl:51
|
||||
//line views/modal.qtpl:50
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/modal.qtpl:51
|
||||
//line views/modal.qtpl:50
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/modal.qtpl:51
|
||||
//line views/modal.qtpl:50
|
||||
return qs422016
|
||||
//line views/modal.qtpl:51
|
||||
//line views/modal.qtpl:50
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:53
|
||||
//line views/modal.qtpl:52
|
||||
func streammodalEnd(qw422016 *qt422016.Writer, hyphaName string, shouldFocusOnConfirm bool) {
|
||||
//line views/modal.qtpl:53
|
||||
//line views/modal.qtpl:52
|
||||
qw422016.N().S(`
|
||||
<input type="submit" value="Confirm" class="btn" `)
|
||||
//line views/modal.qtpl:54
|
||||
//line views/modal.qtpl:53
|
||||
if shouldFocusOnConfirm {
|
||||
//line views/modal.qtpl:54
|
||||
//line views/modal.qtpl:53
|
||||
qw422016.N().S(`autofocus`)
|
||||
//line views/modal.qtpl:54
|
||||
//line views/modal.qtpl:53
|
||||
}
|
||||
//line views/modal.qtpl:54
|
||||
//line views/modal.qtpl:53
|
||||
qw422016.N().S(`>
|
||||
<a href="/hypha/`)
|
||||
//line views/modal.qtpl:55
|
||||
//line views/modal.qtpl:54
|
||||
qw422016.E().S(hyphaName)
|
||||
//line views/modal.qtpl:55
|
||||
//line views/modal.qtpl:54
|
||||
qw422016.N().S(`" class="btn btn_weak">Cancel</a>
|
||||
</fieldset>
|
||||
</form>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line views/modal.qtpl:60
|
||||
//line views/modal.qtpl:59
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:60
|
||||
//line views/modal.qtpl:59
|
||||
func writemodalEnd(qq422016 qtio422016.Writer, hyphaName string, shouldFocusOnConfirm bool) {
|
||||
//line views/modal.qtpl:60
|
||||
//line views/modal.qtpl:59
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/modal.qtpl:60
|
||||
//line views/modal.qtpl:59
|
||||
streammodalEnd(qw422016, hyphaName, shouldFocusOnConfirm)
|
||||
//line views/modal.qtpl:60
|
||||
//line views/modal.qtpl:59
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/modal.qtpl:60
|
||||
//line views/modal.qtpl:59
|
||||
}
|
||||
|
||||
//line views/modal.qtpl:60
|
||||
//line views/modal.qtpl:59
|
||||
func modalEnd(hyphaName string, shouldFocusOnConfirm bool) string {
|
||||
//line views/modal.qtpl:60
|
||||
//line views/modal.qtpl:59
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/modal.qtpl:60
|
||||
//line views/modal.qtpl:59
|
||||
writemodalEnd(qb422016, hyphaName, shouldFocusOnConfirm)
|
||||
//line views/modal.qtpl:60
|
||||
//line views/modal.qtpl:59
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/modal.qtpl:60
|
||||
//line views/modal.qtpl:59
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/modal.qtpl:60
|
||||
//line views/modal.qtpl:59
|
||||
return qs422016
|
||||
//line views/modal.qtpl:60
|
||||
//line views/modal.qtpl:59
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
{% import "net/http" %}
|
||||
|
||||
{% import "github.com/bouncepaw/mycorrhiza/cfg" %}
|
||||
{% import "github.com/bouncepaw/mycorrhiza/util" %}
|
||||
{% import "github.com/bouncepaw/mycorrhiza/user" %}
|
||||
|
||||
{% func Toolbar(u *user.User) %}
|
||||
@ -72,7 +71,7 @@
|
||||
{% func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) %}
|
||||
<div class="layout">
|
||||
<main class="main-width edit edit_no-preview">
|
||||
<h1 class="edit__title">Edit {%s util.BeautifulName(hyphaName) %}</h1>
|
||||
<h1 class="edit__title">Edit {%s= beautifulLink(hyphaName) %}</h1>
|
||||
{%s= warning %}
|
||||
<form method="post" class="edit-form"
|
||||
action="/upload-text/{%s hyphaName %}">
|
||||
@ -94,7 +93,7 @@
|
||||
{% func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) %}
|
||||
<div class="layout">
|
||||
<main class="main-width edit edit_with-preview">
|
||||
<h1 class="edit__title">Edit {%s util.BeautifulName(hyphaName) %}</h1>
|
||||
<h1 class="edit__title">Edit {%s= beautifulLink(hyphaName) %}</h1>
|
||||
{%s= warning %}
|
||||
<form method="post" class="edit-form"
|
||||
action="/upload-text/{%s hyphaName %}">
|
||||
|
@ -11,33 +11,30 @@ import "net/http"
|
||||
import "github.com/bouncepaw/mycorrhiza/cfg"
|
||||
|
||||
//line views/mutators.qtpl:4
|
||||
import "github.com/bouncepaw/mycorrhiza/util"
|
||||
|
||||
//line views/mutators.qtpl:5
|
||||
import "github.com/bouncepaw/mycorrhiza/user"
|
||||
|
||||
//line views/mutators.qtpl:7
|
||||
//line views/mutators.qtpl:6
|
||||
import (
|
||||
qtio422016 "io"
|
||||
|
||||
qt422016 "github.com/valyala/quicktemplate"
|
||||
)
|
||||
|
||||
//line views/mutators.qtpl:7
|
||||
//line views/mutators.qtpl:6
|
||||
var (
|
||||
_ = qtio422016.Copy
|
||||
_ = qt422016.AcquireByteBuffer
|
||||
)
|
||||
|
||||
//line views/mutators.qtpl:7
|
||||
//line views/mutators.qtpl:6
|
||||
func StreamToolbar(qw422016 *qt422016.Writer, u *user.User) {
|
||||
//line views/mutators.qtpl:7
|
||||
//line views/mutators.qtpl:6
|
||||
qw422016.N().S(`
|
||||
<aside class="edit-toolbar layout-card">
|
||||
<h2 class="edit-toolbar__title layout-card__title">Markup</h2>
|
||||
<section class="edit-toolbar__buttons">
|
||||
`)
|
||||
//line views/mutators.qtpl:11
|
||||
//line views/mutators.qtpl:10
|
||||
for _, el := range []struct {
|
||||
class string
|
||||
onclick string
|
||||
@ -63,36 +60,36 @@ func StreamToolbar(qw422016 *qt422016.Writer, u *user.User) {
|
||||
{"bulletedlist", "insertBulletedList()", "* bullet list"},
|
||||
{"numberedlist", "insertNumberedList()", "*. number list"},
|
||||
} {
|
||||
//line views/mutators.qtpl:35
|
||||
//line views/mutators.qtpl:34
|
||||
qw422016.N().S(`
|
||||
<button
|
||||
class="btn edit-toolbar__btn edit-toolbar__`)
|
||||
//line views/mutators.qtpl:37
|
||||
//line views/mutators.qtpl:36
|
||||
qw422016.E().S(el.class)
|
||||
//line views/mutators.qtpl:37
|
||||
//line views/mutators.qtpl:36
|
||||
qw422016.N().S(`"
|
||||
onclick="`)
|
||||
//line views/mutators.qtpl:38
|
||||
//line views/mutators.qtpl:37
|
||||
qw422016.E().S(el.onclick)
|
||||
//line views/mutators.qtpl:38
|
||||
//line views/mutators.qtpl:37
|
||||
qw422016.N().S(`">
|
||||
`)
|
||||
//line views/mutators.qtpl:39
|
||||
//line views/mutators.qtpl:38
|
||||
qw422016.N().S(el.display)
|
||||
//line views/mutators.qtpl:39
|
||||
//line views/mutators.qtpl:38
|
||||
qw422016.N().S(`
|
||||
</button>
|
||||
`)
|
||||
//line views/mutators.qtpl:41
|
||||
//line views/mutators.qtpl:40
|
||||
}
|
||||
//line views/mutators.qtpl:41
|
||||
//line views/mutators.qtpl:40
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
<p class="edit-toolbar__ad"><a href="/help/en/mycomarkup" target="_blank" class="shy-link">Learn more</a> about mycomarkup</p>
|
||||
<h2 class="edit-toolbar__title layout-card__title">Actions</h2>
|
||||
<section class="edit-toolbar__buttons">
|
||||
`)
|
||||
//line views/mutators.qtpl:46
|
||||
//line views/mutators.qtpl:45
|
||||
for _, el := range []struct {
|
||||
class string
|
||||
onclick string
|
||||
@ -101,34 +98,34 @@ func StreamToolbar(qw422016 *qt422016.Writer, u *user.User) {
|
||||
{"date", "insertDate()", "Insert current date"},
|
||||
{"time", "insertTimeUTC()", "Insert current time"},
|
||||
} {
|
||||
//line views/mutators.qtpl:53
|
||||
//line views/mutators.qtpl:52
|
||||
qw422016.N().S(`
|
||||
<button
|
||||
class="btn edit-toolbar__btn edit-toolbar__`)
|
||||
//line views/mutators.qtpl:55
|
||||
//line views/mutators.qtpl:54
|
||||
qw422016.E().S(el.class)
|
||||
//line views/mutators.qtpl:55
|
||||
//line views/mutators.qtpl:54
|
||||
qw422016.N().S(`"
|
||||
onclick="`)
|
||||
//line views/mutators.qtpl:56
|
||||
//line views/mutators.qtpl:55
|
||||
qw422016.E().S(el.onclick)
|
||||
//line views/mutators.qtpl:56
|
||||
//line views/mutators.qtpl:55
|
||||
qw422016.N().S(`">
|
||||
`)
|
||||
//line views/mutators.qtpl:57
|
||||
//line views/mutators.qtpl:56
|
||||
qw422016.N().S(el.display)
|
||||
//line views/mutators.qtpl:57
|
||||
//line views/mutators.qtpl:56
|
||||
qw422016.N().S(`
|
||||
</button>
|
||||
`)
|
||||
//line views/mutators.qtpl:59
|
||||
//line views/mutators.qtpl:58
|
||||
}
|
||||
//line views/mutators.qtpl:59
|
||||
//line views/mutators.qtpl:58
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/mutators.qtpl:60
|
||||
//line views/mutators.qtpl:59
|
||||
if u.Group != "anon" {
|
||||
//line views/mutators.qtpl:60
|
||||
//line views/mutators.qtpl:59
|
||||
qw422016.N().S(`
|
||||
<button
|
||||
class="btn edit-toolbar__btn edit-toolbar__user-link"
|
||||
@ -136,69 +133,69 @@ func StreamToolbar(qw422016 *qt422016.Writer, u *user.User) {
|
||||
Link yourself
|
||||
</button>
|
||||
`)
|
||||
//line views/mutators.qtpl:66
|
||||
//line views/mutators.qtpl:65
|
||||
}
|
||||
//line views/mutators.qtpl:66
|
||||
//line views/mutators.qtpl:65
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
</aside>
|
||||
<script src="/static/toolbar.js"></script>
|
||||
`)
|
||||
//line views/mutators.qtpl:70
|
||||
//line views/mutators.qtpl:69
|
||||
}
|
||||
|
||||
//line views/mutators.qtpl:70
|
||||
//line views/mutators.qtpl:69
|
||||
func WriteToolbar(qq422016 qtio422016.Writer, u *user.User) {
|
||||
//line views/mutators.qtpl:70
|
||||
//line views/mutators.qtpl:69
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/mutators.qtpl:70
|
||||
//line views/mutators.qtpl:69
|
||||
StreamToolbar(qw422016, u)
|
||||
//line views/mutators.qtpl:70
|
||||
//line views/mutators.qtpl:69
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/mutators.qtpl:70
|
||||
//line views/mutators.qtpl:69
|
||||
}
|
||||
|
||||
//line views/mutators.qtpl:70
|
||||
//line views/mutators.qtpl:69
|
||||
func Toolbar(u *user.User) string {
|
||||
//line views/mutators.qtpl:70
|
||||
//line views/mutators.qtpl:69
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/mutators.qtpl:70
|
||||
//line views/mutators.qtpl:69
|
||||
WriteToolbar(qb422016, u)
|
||||
//line views/mutators.qtpl:70
|
||||
//line views/mutators.qtpl:69
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/mutators.qtpl:70
|
||||
//line views/mutators.qtpl:69
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/mutators.qtpl:70
|
||||
//line views/mutators.qtpl:69
|
||||
return qs422016
|
||||
//line views/mutators.qtpl:70
|
||||
//line views/mutators.qtpl:69
|
||||
}
|
||||
|
||||
//line views/mutators.qtpl:72
|
||||
//line views/mutators.qtpl:71
|
||||
func StreamEditHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) {
|
||||
//line views/mutators.qtpl:72
|
||||
//line views/mutators.qtpl:71
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width edit edit_no-preview">
|
||||
<h1 class="edit__title">Edit `)
|
||||
//line views/mutators.qtpl:75
|
||||
qw422016.E().S(util.BeautifulName(hyphaName))
|
||||
//line views/mutators.qtpl:75
|
||||
//line views/mutators.qtpl:74
|
||||
qw422016.N().S(beautifulLink(hyphaName))
|
||||
//line views/mutators.qtpl:74
|
||||
qw422016.N().S(`</h1>
|
||||
`)
|
||||
//line views/mutators.qtpl:76
|
||||
//line views/mutators.qtpl:75
|
||||
qw422016.N().S(warning)
|
||||
//line views/mutators.qtpl:76
|
||||
//line views/mutators.qtpl:75
|
||||
qw422016.N().S(`
|
||||
<form method="post" class="edit-form"
|
||||
action="/upload-text/`)
|
||||
//line views/mutators.qtpl:78
|
||||
//line views/mutators.qtpl:77
|
||||
qw422016.E().S(hyphaName)
|
||||
//line views/mutators.qtpl:78
|
||||
//line views/mutators.qtpl:77
|
||||
qw422016.N().S(`">
|
||||
<textarea name="text" class="edit-form__textarea" autofocus>`)
|
||||
//line views/mutators.qtpl:79
|
||||
//line views/mutators.qtpl:78
|
||||
qw422016.E().S(textAreaFill)
|
||||
//line views/mutators.qtpl:79
|
||||
//line views/mutators.qtpl:78
|
||||
qw422016.N().S(`</textarea>
|
||||
<br><br>
|
||||
<label for="text">Describe your changes:</label><br>
|
||||
@ -207,190 +204,190 @@ func StreamEditHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, text
|
||||
<input type="submit" name="action" class="btn btn_accent edit-form__save" value="Save">
|
||||
<input type="submit" name="action" class="btn edit-form__preview" value="Preview">
|
||||
<a href="/hypha/`)
|
||||
//line views/mutators.qtpl:86
|
||||
//line views/mutators.qtpl:85
|
||||
qw422016.E().S(hyphaName)
|
||||
//line views/mutators.qtpl:86
|
||||
//line views/mutators.qtpl:85
|
||||
qw422016.N().S(`" class="btn btn_weak">Cancel</a>
|
||||
</form>
|
||||
</main>
|
||||
`)
|
||||
//line views/mutators.qtpl:89
|
||||
//line views/mutators.qtpl:88
|
||||
qw422016.N().S(Toolbar(user.FromRequest(rq)))
|
||||
//line views/mutators.qtpl:89
|
||||
//line views/mutators.qtpl:88
|
||||
qw422016.N().S(`
|
||||
</div>
|
||||
`)
|
||||
//line views/mutators.qtpl:91
|
||||
//line views/mutators.qtpl:90
|
||||
streameditScripts(qw422016)
|
||||
//line views/mutators.qtpl:91
|
||||
//line views/mutators.qtpl:90
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/mutators.qtpl:92
|
||||
//line views/mutators.qtpl:91
|
||||
}
|
||||
|
||||
//line views/mutators.qtpl:92
|
||||
//line views/mutators.qtpl:91
|
||||
func WriteEditHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) {
|
||||
//line views/mutators.qtpl:92
|
||||
//line views/mutators.qtpl:91
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/mutators.qtpl:92
|
||||
//line views/mutators.qtpl:91
|
||||
StreamEditHTML(qw422016, rq, hyphaName, textAreaFill, warning)
|
||||
//line views/mutators.qtpl:92
|
||||
//line views/mutators.qtpl:91
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/mutators.qtpl:92
|
||||
//line views/mutators.qtpl:91
|
||||
}
|
||||
|
||||
//line views/mutators.qtpl:92
|
||||
//line views/mutators.qtpl:91
|
||||
func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) string {
|
||||
//line views/mutators.qtpl:92
|
||||
//line views/mutators.qtpl:91
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/mutators.qtpl:92
|
||||
//line views/mutators.qtpl:91
|
||||
WriteEditHTML(qb422016, rq, hyphaName, textAreaFill, warning)
|
||||
//line views/mutators.qtpl:92
|
||||
//line views/mutators.qtpl:91
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/mutators.qtpl:92
|
||||
//line views/mutators.qtpl:91
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/mutators.qtpl:92
|
||||
//line views/mutators.qtpl:91
|
||||
return qs422016
|
||||
//line views/mutators.qtpl:92
|
||||
//line views/mutators.qtpl:91
|
||||
}
|
||||
|
||||
//line views/mutators.qtpl:94
|
||||
//line views/mutators.qtpl:93
|
||||
func StreamPreviewHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) {
|
||||
//line views/mutators.qtpl:94
|
||||
//line views/mutators.qtpl:93
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width edit edit_with-preview">
|
||||
<h1 class="edit__title">Edit `)
|
||||
//line views/mutators.qtpl:97
|
||||
qw422016.E().S(util.BeautifulName(hyphaName))
|
||||
//line views/mutators.qtpl:97
|
||||
//line views/mutators.qtpl:96
|
||||
qw422016.N().S(beautifulLink(hyphaName))
|
||||
//line views/mutators.qtpl:96
|
||||
qw422016.N().S(`</h1>
|
||||
`)
|
||||
//line views/mutators.qtpl:98
|
||||
//line views/mutators.qtpl:97
|
||||
qw422016.N().S(warning)
|
||||
//line views/mutators.qtpl:98
|
||||
//line views/mutators.qtpl:97
|
||||
qw422016.N().S(`
|
||||
<form method="post" class="edit-form"
|
||||
action="/upload-text/`)
|
||||
//line views/mutators.qtpl:100
|
||||
//line views/mutators.qtpl:99
|
||||
qw422016.E().S(hyphaName)
|
||||
//line views/mutators.qtpl:100
|
||||
//line views/mutators.qtpl:99
|
||||
qw422016.N().S(`">
|
||||
<textarea name="text" class="edit-form__textarea" autofocus>`)
|
||||
//line views/mutators.qtpl:101
|
||||
//line views/mutators.qtpl:100
|
||||
qw422016.E().S(textAreaFill)
|
||||
//line views/mutators.qtpl:101
|
||||
//line views/mutators.qtpl:100
|
||||
qw422016.N().S(`</textarea>
|
||||
<br><br>
|
||||
<label for="text">Describe your changes:</label><br>
|
||||
<input id="text" type="text" name="message" class="edit-form__message" value="`)
|
||||
//line views/mutators.qtpl:104
|
||||
//line views/mutators.qtpl:103
|
||||
qw422016.E().S(message)
|
||||
//line views/mutators.qtpl:104
|
||||
//line views/mutators.qtpl:103
|
||||
qw422016.N().S(`">
|
||||
<br><br>
|
||||
<input type="submit" name="action" class="btn btn_accent edit-form__save" value="Save">
|
||||
<input type="submit" name="action" class="btn edit-form__preview" value="Preview">
|
||||
<a href="/hypha/`)
|
||||
//line views/mutators.qtpl:108
|
||||
//line views/mutators.qtpl:107
|
||||
qw422016.E().S(hyphaName)
|
||||
//line views/mutators.qtpl:108
|
||||
//line views/mutators.qtpl:107
|
||||
qw422016.N().S(`" class="btn btn_weak">Cancel</a>
|
||||
</form>
|
||||
<p class="warning">Note that the hypha hasn't been saved yet. Here's the preview:</p>
|
||||
<article class="edit__preview">`)
|
||||
//line views/mutators.qtpl:111
|
||||
//line views/mutators.qtpl:110
|
||||
qw422016.N().S(renderedPage)
|
||||
//line views/mutators.qtpl:111
|
||||
//line views/mutators.qtpl:110
|
||||
qw422016.N().S(`</article>
|
||||
</main>
|
||||
`)
|
||||
//line views/mutators.qtpl:113
|
||||
//line views/mutators.qtpl:112
|
||||
qw422016.N().S(Toolbar(user.FromRequest(rq)))
|
||||
//line views/mutators.qtpl:113
|
||||
//line views/mutators.qtpl:112
|
||||
qw422016.N().S(`
|
||||
</div>
|
||||
`)
|
||||
//line views/mutators.qtpl:115
|
||||
//line views/mutators.qtpl:114
|
||||
streameditScripts(qw422016)
|
||||
//line views/mutators.qtpl:115
|
||||
//line views/mutators.qtpl:114
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/mutators.qtpl:116
|
||||
//line views/mutators.qtpl:115
|
||||
}
|
||||
|
||||
//line views/mutators.qtpl:116
|
||||
//line views/mutators.qtpl:115
|
||||
func WritePreviewHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) {
|
||||
//line views/mutators.qtpl:116
|
||||
//line views/mutators.qtpl:115
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/mutators.qtpl:116
|
||||
//line views/mutators.qtpl:115
|
||||
StreamPreviewHTML(qw422016, rq, hyphaName, textAreaFill, message, warning, renderedPage)
|
||||
//line views/mutators.qtpl:116
|
||||
//line views/mutators.qtpl:115
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/mutators.qtpl:116
|
||||
//line views/mutators.qtpl:115
|
||||
}
|
||||
|
||||
//line views/mutators.qtpl:116
|
||||
//line views/mutators.qtpl:115
|
||||
func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) string {
|
||||
//line views/mutators.qtpl:116
|
||||
//line views/mutators.qtpl:115
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/mutators.qtpl:116
|
||||
//line views/mutators.qtpl:115
|
||||
WritePreviewHTML(qb422016, rq, hyphaName, textAreaFill, message, warning, renderedPage)
|
||||
//line views/mutators.qtpl:116
|
||||
//line views/mutators.qtpl:115
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/mutators.qtpl:116
|
||||
//line views/mutators.qtpl:115
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/mutators.qtpl:116
|
||||
//line views/mutators.qtpl:115
|
||||
return qs422016
|
||||
//line views/mutators.qtpl:116
|
||||
//line views/mutators.qtpl:115
|
||||
}
|
||||
|
||||
//line views/mutators.qtpl:118
|
||||
//line views/mutators.qtpl:117
|
||||
func streameditScripts(qw422016 *qt422016.Writer) {
|
||||
//line views/mutators.qtpl:118
|
||||
//line views/mutators.qtpl:117
|
||||
qw422016.N().S(`
|
||||
<script src="/static/editor.js"></script>
|
||||
`)
|
||||
//line views/mutators.qtpl:120
|
||||
//line views/mutators.qtpl:119
|
||||
for _, scriptPath := range cfg.EditScripts {
|
||||
//line views/mutators.qtpl:120
|
||||
//line views/mutators.qtpl:119
|
||||
qw422016.N().S(`
|
||||
<script src="`)
|
||||
//line views/mutators.qtpl:121
|
||||
//line views/mutators.qtpl:120
|
||||
qw422016.E().S(scriptPath)
|
||||
//line views/mutators.qtpl:121
|
||||
//line views/mutators.qtpl:120
|
||||
qw422016.N().S(`"></script>
|
||||
`)
|
||||
//line views/mutators.qtpl:122
|
||||
//line views/mutators.qtpl:121
|
||||
}
|
||||
//line views/mutators.qtpl:122
|
||||
//line views/mutators.qtpl:121
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line views/mutators.qtpl:123
|
||||
//line views/mutators.qtpl:122
|
||||
}
|
||||
|
||||
//line views/mutators.qtpl:123
|
||||
//line views/mutators.qtpl:122
|
||||
func writeeditScripts(qq422016 qtio422016.Writer) {
|
||||
//line views/mutators.qtpl:123
|
||||
//line views/mutators.qtpl:122
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line views/mutators.qtpl:123
|
||||
//line views/mutators.qtpl:122
|
||||
streameditScripts(qw422016)
|
||||
//line views/mutators.qtpl:123
|
||||
//line views/mutators.qtpl:122
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line views/mutators.qtpl:123
|
||||
//line views/mutators.qtpl:122
|
||||
}
|
||||
|
||||
//line views/mutators.qtpl:123
|
||||
//line views/mutators.qtpl:122
|
||||
func editScripts() string {
|
||||
//line views/mutators.qtpl:123
|
||||
//line views/mutators.qtpl:122
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line views/mutators.qtpl:123
|
||||
//line views/mutators.qtpl:122
|
||||
writeeditScripts(qb422016)
|
||||
//line views/mutators.qtpl:123
|
||||
//line views/mutators.qtpl:122
|
||||
qs422016 := string(qb422016.B)
|
||||
//line views/mutators.qtpl:123
|
||||
//line views/mutators.qtpl:122
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line views/mutators.qtpl:123
|
||||
//line views/mutators.qtpl:122
|
||||
return qs422016
|
||||
//line views/mutators.qtpl:123
|
||||
//line views/mutators.qtpl:122
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
{% func AttachmentMenuHTML(rq *http.Request, h *hyphae.Hypha, u *user.User) %}
|
||||
<div class="layout">
|
||||
<main class="main-width attachment-tab">
|
||||
<h1>Attachment of {%s util.BeautifulName(h.Name) %}</h1>
|
||||
<h1>Attachment of {%s= beautifulLink(h.Name) %}</h1>
|
||||
{% if h.BinaryPath == "" %}
|
||||
<p class="explanation">This hypha has no attachment, you can upload it here. <a href="/help/en/attachment" class="shy-link">What are attachments?</a></p>
|
||||
{% else %}
|
||||
|
@ -55,7 +55,7 @@ func StreamAttachmentMenuHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hy
|
||||
<main class="main-width attachment-tab">
|
||||
<h1>Attachment of `)
|
||||
//line views/readers.qtpl:16
|
||||
qw422016.E().S(util.BeautifulName(h.Name))
|
||||
qw422016.N().S(beautifulLink(h.Name))
|
||||
//line views/readers.qtpl:16
|
||||
qw422016.N().S(`</h1>
|
||||
`)
|
||||
|
Loading…
x
Reference in New Issue
Block a user