Compensate the lack of the tabs on other pages

This commit is contained in:
Timur Ismagilov 2021-08-09 00:38:41 +05:00
parent f54cfe44ff
commit 3a45ad4330
10 changed files with 577 additions and 544 deletions

View File

@ -3,7 +3,6 @@
{% import "time" %} {% import "time" %}
{% import "github.com/bouncepaw/mycorrhiza/cfg" %} {% import "github.com/bouncepaw/mycorrhiza/cfg" %}
{% import "github.com/bouncepaw/mycorrhiza/util" %}
{% import "github.com/bouncepaw/mycorrhiza/user" %} {% import "github.com/bouncepaw/mycorrhiza/user" %}
{% import "github.com/bouncepaw/mycorrhiza/hyphae" %} {% import "github.com/bouncepaw/mycorrhiza/hyphae" %}
{% import "github.com/bouncepaw/mycorrhiza/history" %} {% import "github.com/bouncepaw/mycorrhiza/history" %}
@ -19,7 +18,7 @@ if err != nil {
<div class="layout"> <div class="layout">
<main class="main-width"> <main class="main-width">
<article> <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> <pre class="codeblock"><code>{%s text %}</code></pre>
</article> </article>
</main> </main>
@ -114,7 +113,7 @@ if err != nil {
<div class="layout"> <div class="layout">
<main class="main-width"> <main class="main-width">
<article class="history"> <article class="history">
<h1>History of {%s util.BeautifulName(hyphaName) %}</h1> <h1>History of {%s= beautifulLink(hyphaName) %}</h1>
{%s= list %} {%s= list %}
</article> </article>
</main> </main>

View File

@ -17,96 +17,93 @@ import "time"
import "github.com/bouncepaw/mycorrhiza/cfg" import "github.com/bouncepaw/mycorrhiza/cfg"
//line views/history.qtpl:6 //line views/history.qtpl:6
import "github.com/bouncepaw/mycorrhiza/util"
//line views/history.qtpl:7
import "github.com/bouncepaw/mycorrhiza/user" import "github.com/bouncepaw/mycorrhiza/user"
//line views/history.qtpl:8 //line views/history.qtpl:7
import "github.com/bouncepaw/mycorrhiza/hyphae" import "github.com/bouncepaw/mycorrhiza/hyphae"
//line views/history.qtpl:9 //line views/history.qtpl:8
import "github.com/bouncepaw/mycorrhiza/history" import "github.com/bouncepaw/mycorrhiza/history"
//line views/history.qtpl:12 //line views/history.qtpl:11
import ( import (
qtio422016 "io" qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate" qt422016 "github.com/valyala/quicktemplate"
) )
//line views/history.qtpl:12 //line views/history.qtpl:11
var ( var (
_ = qtio422016.Copy _ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer _ = 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) { 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(` qw422016.N().S(`
`) `)
//line views/history.qtpl:14 //line views/history.qtpl:13
text, err := history.PrimitiveDiffAtRevision(h.TextPartPath(), hash) text, err := history.PrimitiveDiffAtRevision(h.TextPartPath(), hash)
if err != nil { if err != nil {
text = err.Error() text = err.Error()
} }
//line views/history.qtpl:18 //line views/history.qtpl:17
qw422016.N().S(` qw422016.N().S(`
<div class="layout"> <div class="layout">
<main class="main-width"> <main class="main-width">
<article> <article>
<h1>Diff `) <h1>Diff `)
//line views/history.qtpl:22 //line views/history.qtpl:21
qw422016.E().S(util.BeautifulName(h.Name)) qw422016.N().S(beautifulLink(h.Name))
//line views/history.qtpl:22 //line views/history.qtpl:21
qw422016.N().S(` at `) qw422016.N().S(` at `)
//line views/history.qtpl:22 //line views/history.qtpl:21
qw422016.E().S(hash) qw422016.E().S(hash)
//line views/history.qtpl:22 //line views/history.qtpl:21
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
<pre class="codeblock"><code>`) <pre class="codeblock"><code>`)
//line views/history.qtpl:23 //line views/history.qtpl:22
qw422016.E().S(text) qw422016.E().S(text)
//line views/history.qtpl:23 //line views/history.qtpl:22
qw422016.N().S(`</code></pre> qw422016.N().S(`</code></pre>
</article> </article>
</main> </main>
</div> </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) { 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) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/history.qtpl:27 //line views/history.qtpl:26
StreamPrimitiveDiffHTML(qw422016, rq, h, u, hash) StreamPrimitiveDiffHTML(qw422016, rq, h, u, hash)
//line views/history.qtpl:27 //line views/history.qtpl:26
qt422016.ReleaseWriter(qw422016) 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 { 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() qb422016 := qt422016.AcquireByteBuffer()
//line views/history.qtpl:27 //line views/history.qtpl:26
WritePrimitiveDiffHTML(qb422016, rq, h, u, hash) WritePrimitiveDiffHTML(qb422016, rq, h, u, hash)
//line views/history.qtpl:27 //line views/history.qtpl:26
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/history.qtpl:27 //line views/history.qtpl:26
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/history.qtpl:27 //line views/history.qtpl:26
return qs422016 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) { func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int) {
//line views/history.qtpl:29 //line views/history.qtpl:28
qw422016.N().S(` qw422016.N().S(`
<div class="layout"> <div class="layout">
<main class="main-width recent-changes"> <main class="main-width recent-changes">
@ -115,54 +112,54 @@ func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int) {
<nav class="recent-changes__count"> <nav class="recent-changes__count">
See See
`) `)
//line views/history.qtpl:36 //line views/history.qtpl:35
for i, m := range []int{20, 50, 100} { for i, m := range []int{20, 50, 100} {
//line views/history.qtpl:36 //line views/history.qtpl:35
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/history.qtpl:37 //line views/history.qtpl:36
if i > 0 { if i > 0 {
//line views/history.qtpl:37 //line views/history.qtpl:36
qw422016.N().S(` qw422016.N().S(`
<span aria-hidden="true">|</span> <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(` qw422016.N().S(`
`) `)
//line views/history.qtpl:40 //line views/history.qtpl:39
if m == n { if m == n {
//line views/history.qtpl:40 //line views/history.qtpl:39
qw422016.N().S(` qw422016.N().S(`
<b>`) <b>`)
//line views/history.qtpl:41 //line views/history.qtpl:40
qw422016.N().D(m) qw422016.N().D(m)
//line views/history.qtpl:41 //line views/history.qtpl:40
qw422016.N().S(`</b> qw422016.N().S(`</b>
`) `)
//line views/history.qtpl:42 //line views/history.qtpl:41
} else { } else {
//line views/history.qtpl:42 //line views/history.qtpl:41
qw422016.N().S(` qw422016.N().S(`
<a href="/recent-changes/`) <a href="/recent-changes/`)
//line views/history.qtpl:43 //line views/history.qtpl:42
qw422016.N().D(m) qw422016.N().D(m)
//line views/history.qtpl:43 //line views/history.qtpl:42
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line views/history.qtpl:43 //line views/history.qtpl:42
qw422016.N().D(m) qw422016.N().D(m)
//line views/history.qtpl:43 //line views/history.qtpl:42
qw422016.N().S(`</a> 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(` 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(` qw422016.N().S(`
recent changes recent changes
</nav> </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> <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(` qw422016.N().S(`
`) `)
//line views/history.qtpl:59 //line views/history.qtpl:58
changes := history.RecentChanges(n) changes := history.RecentChanges(n)
var year, day int var year, day int
var month time.Month var month time.Month
//line views/history.qtpl:62 //line views/history.qtpl:61
qw422016.N().S(` qw422016.N().S(`
<section class="recent-changes__list" role="feed"> <section class="recent-changes__list" role="feed">
`) `)
//line views/history.qtpl:64 //line views/history.qtpl:63
if len(changes) == 0 { if len(changes) == 0 {
//line views/history.qtpl:64 //line views/history.qtpl:63
qw422016.N().S(` qw422016.N().S(`
<p>Could not find any recent changes.</p> <p>Could not find any recent changes.</p>
`) `)
//line views/history.qtpl:66 //line views/history.qtpl:65
} else { } else {
//line views/history.qtpl:66 //line views/history.qtpl:65
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/history.qtpl:67 //line views/history.qtpl:66
for i, entry := range changes { for i, entry := range changes {
//line views/history.qtpl:67 //line views/history.qtpl:66
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/history.qtpl:69 //line views/history.qtpl:68
y, m, d := entry.Time.UTC().Date() y, m, d := entry.Time.UTC().Date()
//line views/history.qtpl:69 //line views/history.qtpl:68
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/history.qtpl:70 //line views/history.qtpl:69
if d != day || m != month || y != year { if d != day || m != month || y != year {
//line views/history.qtpl:70 //line views/history.qtpl:69
qw422016.N().S(` qw422016.N().S(`
<h2 class="recent-changes__heading"> <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)) qw422016.E().S(fmt.Sprintf("%04d-%02d-%02d", y, m, d))
//line views/history.qtpl:72 //line views/history.qtpl:71
qw422016.N().S(` qw422016.N().S(`
</h2> </h2>
`) `)
//line views/history.qtpl:74 //line views/history.qtpl:73
year, month, day = y, m, d year, month, day = y, m, d
//line views/history.qtpl:74 //line views/history.qtpl:73
qw422016.N().S(` 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(` qw422016.N().S(`
<div class="recent-changes__entry" role="article" <div class="recent-changes__entry" role="article"
aria-setsize="`) aria-setsize="`)
//line views/history.qtpl:78 //line views/history.qtpl:77
qw422016.N().D(n) qw422016.N().D(n)
//line views/history.qtpl:78 //line views/history.qtpl:77
qw422016.N().S(`" aria-posinset="`) qw422016.N().S(`" aria-posinset="`)
//line views/history.qtpl:78 //line views/history.qtpl:77
qw422016.N().D(i) qw422016.N().D(i)
//line views/history.qtpl:78 //line views/history.qtpl:77
qw422016.N().S(`"> qw422016.N().S(`">
`) `)
//line views/history.qtpl:79 //line views/history.qtpl:78
qw422016.N().S(recentChangesEntry(entry)) qw422016.N().S(recentChangesEntry(entry))
//line views/history.qtpl:79 //line views/history.qtpl:78
qw422016.N().S(` qw422016.N().S(`
</div> </div>
`) `)
//line views/history.qtpl:82 //line views/history.qtpl:81
} }
//line views/history.qtpl:82 //line views/history.qtpl:81
qw422016.N().S(` 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(` qw422016.N().S(`
`) `)
//line views/history.qtpl:84 //line views/history.qtpl:83
qw422016.N().S(helpTopicBadgeHTML("en", "recent_changes")) qw422016.N().S(helpTopicBadgeHTML("en", "recent_changes"))
//line views/history.qtpl:84 //line views/history.qtpl:83
qw422016.N().S(` qw422016.N().S(`
</section> </section>
</main> </main>
</div> </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) { func WriteRecentChangesHTML(qq422016 qtio422016.Writer, n int) {
//line views/history.qtpl:88 //line views/history.qtpl:87
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/history.qtpl:88 //line views/history.qtpl:87
StreamRecentChangesHTML(qw422016, n) StreamRecentChangesHTML(qw422016, n)
//line views/history.qtpl:88 //line views/history.qtpl:87
qt422016.ReleaseWriter(qw422016) 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 { func RecentChangesHTML(n int) string {
//line views/history.qtpl:88 //line views/history.qtpl:87
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/history.qtpl:88 //line views/history.qtpl:87
WriteRecentChangesHTML(qb422016, n) WriteRecentChangesHTML(qb422016, n)
//line views/history.qtpl:88 //line views/history.qtpl:87
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/history.qtpl:88 //line views/history.qtpl:87
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/history.qtpl:88 //line views/history.qtpl:87
return qs422016 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) { func streamrecentChangesEntry(qw422016 *qt422016.Writer, rev history.Revision) {
//line views/history.qtpl:90 //line views/history.qtpl:89
qw422016.N().S(` qw422016.N().S(`
<div> <div>
<time class="recent-changes__entry__time"> <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")) qw422016.E().S(rev.Time.UTC().Format("15:04 UTC"))
//line views/history.qtpl:93 //line views/history.qtpl:92
qw422016.N().S(` qw422016.N().S(`
</time> </time>
<span class="recent-changes__entry__message">`) <span class="recent-changes__entry__message">`)
//line views/history.qtpl:95 //line views/history.qtpl:94
qw422016.E().S(rev.Hash) qw422016.E().S(rev.Hash)
//line views/history.qtpl:95 //line views/history.qtpl:94
qw422016.N().S(`</span> qw422016.N().S(`</span>
`) `)
//line views/history.qtpl:97 //line views/history.qtpl:96
if rev.Username != "anon" { if rev.Username != "anon" {
//line views/history.qtpl:97 //line views/history.qtpl:96
qw422016.N().S(` qw422016.N().S(`
<span class="recent-changes__entry__author"> <span class="recent-changes__entry__author">
&mdash; <a href="/hypha/`) &mdash; <a href="/hypha/`)
//line views/history.qtpl:99 //line views/history.qtpl:98
qw422016.E().S(cfg.UserHypha) qw422016.E().S(cfg.UserHypha)
//line views/history.qtpl:99 //line views/history.qtpl:98
qw422016.N().S(`/`) qw422016.N().S(`/`)
//line views/history.qtpl:99 //line views/history.qtpl:98
qw422016.E().S(rev.Username) qw422016.E().S(rev.Username)
//line views/history.qtpl:99 //line views/history.qtpl:98
qw422016.N().S(`" rel="author">`) qw422016.N().S(`" rel="author">`)
//line views/history.qtpl:99 //line views/history.qtpl:98
qw422016.E().S(rev.Username) qw422016.E().S(rev.Username)
//line views/history.qtpl:99 //line views/history.qtpl:98
qw422016.N().S(`</a> qw422016.N().S(`</a>
</span> </span>
`) `)
//line views/history.qtpl:101 //line views/history.qtpl:100
} }
//line views/history.qtpl:101 //line views/history.qtpl:100
qw422016.N().S(` qw422016.N().S(`
</div> </div>
<div> <div>
<span class="recent-changes__entry__links"> <span class="recent-changes__entry__links">
`) `)
//line views/history.qtpl:105 //line views/history.qtpl:104
qw422016.N().S(rev.HyphaeLinksHTML()) qw422016.N().S(rev.HyphaeLinksHTML())
//line views/history.qtpl:105 //line views/history.qtpl:104
qw422016.N().S(` qw422016.N().S(`
</span> </span>
<span class="recent-changes__entry__message"> <span class="recent-changes__entry__message">
`) `)
//line views/history.qtpl:108 //line views/history.qtpl:107
qw422016.E().S(rev.Message) qw422016.E().S(rev.Message)
//line views/history.qtpl:108 //line views/history.qtpl:107
qw422016.N().S(` qw422016.N().S(`
</span> </span>
</div> </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) { func writerecentChangesEntry(qq422016 qtio422016.Writer, rev history.Revision) {
//line views/history.qtpl:111 //line views/history.qtpl:110
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/history.qtpl:111 //line views/history.qtpl:110
streamrecentChangesEntry(qw422016, rev) streamrecentChangesEntry(qw422016, rev)
//line views/history.qtpl:111 //line views/history.qtpl:110
qt422016.ReleaseWriter(qw422016) 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 { func recentChangesEntry(rev history.Revision) string {
//line views/history.qtpl:111 //line views/history.qtpl:110
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/history.qtpl:111 //line views/history.qtpl:110
writerecentChangesEntry(qb422016, rev) writerecentChangesEntry(qb422016, rev)
//line views/history.qtpl:111 //line views/history.qtpl:110
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/history.qtpl:111 //line views/history.qtpl:110
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/history.qtpl:111 //line views/history.qtpl:110
return qs422016 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) { func StreamHistoryHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, list string) {
//line views/history.qtpl:113 //line views/history.qtpl:112
qw422016.N().S(` qw422016.N().S(`
<div class="layout"> <div class="layout">
<main class="main-width"> <main class="main-width">
<article class="history"> <article class="history">
<h1>History of `) <h1>History of `)
//line views/history.qtpl:117 //line views/history.qtpl:116
qw422016.E().S(util.BeautifulName(hyphaName)) qw422016.N().S(beautifulLink(hyphaName))
//line views/history.qtpl:117 //line views/history.qtpl:116
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
`) `)
//line views/history.qtpl:118 //line views/history.qtpl:117
qw422016.N().S(list) qw422016.N().S(list)
//line views/history.qtpl:118 //line views/history.qtpl:117
qw422016.N().S(` qw422016.N().S(`
</article> </article>
</main> </main>
</div> </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) { 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) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/history.qtpl:122 //line views/history.qtpl:121
StreamHistoryHTML(qw422016, rq, hyphaName, list) StreamHistoryHTML(qw422016, rq, hyphaName, list)
//line views/history.qtpl:122 //line views/history.qtpl:121
qt422016.ReleaseWriter(qw422016) 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 { func HistoryHTML(rq *http.Request, hyphaName, list string) string {
//line views/history.qtpl:122 //line views/history.qtpl:121
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/history.qtpl:122 //line views/history.qtpl:121
WriteHistoryHTML(qb422016, rq, hyphaName, list) WriteHistoryHTML(qb422016, rq, hyphaName, list)
//line views/history.qtpl:122 //line views/history.qtpl:121
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/history.qtpl:122 //line views/history.qtpl:121
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/history.qtpl:122 //line views/history.qtpl:121
return qs422016 return qs422016
//line views/history.qtpl:122 //line views/history.qtpl:121
} }

View File

@ -6,6 +6,9 @@
{% import "github.com/bouncepaw/mycorrhiza/user" %} {% import "github.com/bouncepaw/mycorrhiza/user" %}
{% import "github.com/bouncepaw/mycorrhiza/util" %} {% 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) %} {% func nonExistentHyphaNotice(h *hyphae.Hypha, u *user.User) %}
<section class="non-existent-hypha"> <section class="non-existent-hypha">
<h2 class="non-existent-hypha__title">This hypha does not exist</h2> <h2 class="non-existent-hypha__title">This hypha does not exist</h2>

View File

@ -36,33 +36,75 @@ var (
) )
//line views/hypha.qtpl:9 //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 //line views/hypha.qtpl:9
qw422016.N().S(` 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"> <section class="non-existent-hypha">
<h2 class="non-existent-hypha__title">This hypha does not exist</h2> <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" { if cfg.UseAuth && u.Group == "anon" {
//line views/hypha.qtpl:12 //line views/hypha.qtpl:15
qw422016.N().S(` qw422016.N().S(`
<p>You are not authorized to create new hyphae. Here is what you can do:</p> <p>You are not authorized to create new hyphae. Here is what you can do:</p>
<ul> <ul>
<li><a href="/login">Log in to your account, if you have one</a></li> <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 { 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>`) 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(` qw422016.N().S(`
</ul> </ul>
`) `)
//line views/hypha.qtpl:18 //line views/hypha.qtpl:21
} else { } else {
//line views/hypha.qtpl:18 //line views/hypha.qtpl:21
qw422016.N().S(` qw422016.N().S(`
<div class="non-existent-hypha__ways"> <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>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&apos;s writing conventions if there are any.</p> <p>Make sure to follow this wiki&apos;s writing conventions if there are any.</p>
<a class="btn btn_accent stick-to-bottom" href="/edit/`) <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) qw422016.E().S(h.Name)
//line views/hypha.qtpl:25 //line views/hypha.qtpl:28
qw422016.N().S(`">Create</a> qw422016.N().S(`">Create</a>
</section> </section>
@ -81,9 +123,9 @@ func streamnonExistentHyphaNotice(qw422016 *qt422016.Writer, h *hyphae.Hypha, u
<h3 class="non-existent-hypha__subtitle">🖼 Upload a media</h3> <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> <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/`) <form action="/upload-binary/`)
//line views/hypha.qtpl:31 //line views/hypha.qtpl:34
qw422016.E().S(h.Name) qw422016.E().S(h.Name)
//line views/hypha.qtpl:31 //line views/hypha.qtpl:34
qw422016.N().S(`" qw422016.N().S(`"
method="post" enctype="multipart/form-data" method="post" enctype="multipart/form-data"
class="upload-binary"> class="upload-binary">
@ -95,240 +137,240 @@ func streamnonExistentHyphaNotice(qw422016 *qt422016.Writer, h *hyphae.Hypha, u
</section> </section>
</div> </div>
`) `)
//line views/hypha.qtpl:41 //line views/hypha.qtpl:44
} }
//line views/hypha.qtpl:41 //line views/hypha.qtpl:44
qw422016.N().S(` qw422016.N().S(`
</section> </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) { 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) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/hypha.qtpl:43 //line views/hypha.qtpl:46
streamnonExistentHyphaNotice(qw422016, h, u) streamnonExistentHyphaNotice(qw422016, h, u)
//line views/hypha.qtpl:43 //line views/hypha.qtpl:46
qt422016.ReleaseWriter(qw422016) 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 { func nonExistentHyphaNotice(h *hyphae.Hypha, u *user.User) string {
//line views/hypha.qtpl:43 //line views/hypha.qtpl:46
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/hypha.qtpl:43 //line views/hypha.qtpl:46
writenonExistentHyphaNotice(qb422016, h, u) writenonExistentHyphaNotice(qb422016, h, u)
//line views/hypha.qtpl:43 //line views/hypha.qtpl:46
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/hypha.qtpl:43 //line views/hypha.qtpl:46
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/hypha.qtpl:43 //line views/hypha.qtpl:46
return qs422016 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) { func StreamNaviTitleHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) {
//line views/hypha.qtpl:45 //line views/hypha.qtpl:48
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/hypha.qtpl:47 //line views/hypha.qtpl:50
var ( var (
prevAcc = "/hypha/" prevAcc = "/hypha/"
parts = strings.Split(h.Name, "/") parts = strings.Split(h.Name, "/")
) )
//line views/hypha.qtpl:51 //line views/hypha.qtpl:54
qw422016.N().S(` qw422016.N().S(`
<h1 class="navi-title"> <h1 class="navi-title">
`) `)
//line views/hypha.qtpl:53 //line views/hypha.qtpl:56
qw422016.N().S(`<a href="/hypha/`) qw422016.N().S(`<a href="/hypha/`)
//line views/hypha.qtpl:54 //line views/hypha.qtpl:57
qw422016.E().S(cfg.HomeHypha) qw422016.E().S(cfg.HomeHypha)
//line views/hypha.qtpl:54 //line views/hypha.qtpl:57
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line views/hypha.qtpl:55 //line views/hypha.qtpl:58
qw422016.N().S(cfg.NaviTitleIcon) 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>`) 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 { for i, part := range parts {
//line views/hypha.qtpl:60 //line views/hypha.qtpl:63
if i > 0 { 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>`) 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="`) 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 //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 + "/" 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(` qw422016.N().S(`
</h1> </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) { func WriteNaviTitleHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) {
//line views/hypha.qtpl:71 //line views/hypha.qtpl:74
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/hypha.qtpl:71 //line views/hypha.qtpl:74
StreamNaviTitleHTML(qw422016, h) StreamNaviTitleHTML(qw422016, h)
//line views/hypha.qtpl:71 //line views/hypha.qtpl:74
qt422016.ReleaseWriter(qw422016) 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 { func NaviTitleHTML(h *hyphae.Hypha) string {
//line views/hypha.qtpl:71 //line views/hypha.qtpl:74
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/hypha.qtpl:71 //line views/hypha.qtpl:74
WriteNaviTitleHTML(qb422016, h) WriteNaviTitleHTML(qb422016, h)
//line views/hypha.qtpl:71 //line views/hypha.qtpl:74
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/hypha.qtpl:71 //line views/hypha.qtpl:74
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/hypha.qtpl:71 //line views/hypha.qtpl:74
return qs422016 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) { func StreamAttachmentHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) {
//line views/hypha.qtpl:73 //line views/hypha.qtpl:76
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/hypha.qtpl:74 //line views/hypha.qtpl:77
switch filepath.Ext(h.BinaryPath) { switch filepath.Ext(h.BinaryPath) {
//line views/hypha.qtpl:76 //line views/hypha.qtpl:79
case ".jpg", ".gif", ".png", ".webp", ".svg", ".ico": case ".jpg", ".gif", ".png", ".webp", ".svg", ".ico":
//line views/hypha.qtpl:76 //line views/hypha.qtpl:79
qw422016.N().S(` qw422016.N().S(`
<div class="binary-container binary-container_with-img"> <div class="binary-container binary-container_with-img">
<a href="/binary/`) <a href="/binary/`)
//line views/hypha.qtpl:78 //line views/hypha.qtpl:81
qw422016.N().S(h.Name) qw422016.N().S(h.Name)
//line views/hypha.qtpl:78 //line views/hypha.qtpl:81
qw422016.N().S(`"><img src="/binary/`) qw422016.N().S(`"><img src="/binary/`)
//line views/hypha.qtpl:78 //line views/hypha.qtpl:81
qw422016.N().S(h.Name) qw422016.N().S(h.Name)
//line views/hypha.qtpl:78 //line views/hypha.qtpl:81
qw422016.N().S(`"/></a> qw422016.N().S(`"/></a>
</div> </div>
`) `)
//line views/hypha.qtpl:81 //line views/hypha.qtpl:84
case ".ogg", ".webm", ".mp4": case ".ogg", ".webm", ".mp4":
//line views/hypha.qtpl:81 //line views/hypha.qtpl:84
qw422016.N().S(` qw422016.N().S(`
<div class="binary-container binary-container_with-video"> <div class="binary-container binary-container_with-video">
<video controls> <video controls>
<source src="/binary/`) <source src="/binary/`)
//line views/hypha.qtpl:84 //line views/hypha.qtpl:87
qw422016.N().S(h.Name) qw422016.N().S(h.Name)
//line views/hypha.qtpl:84 //line views/hypha.qtpl:87
qw422016.N().S(`"/> qw422016.N().S(`"/>
<p>Your browser does not support video. <a href="/binary/`) <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) qw422016.N().S(h.Name)
//line views/hypha.qtpl:85 //line views/hypha.qtpl:88
qw422016.N().S(`">Download video</a></p> qw422016.N().S(`">Download video</a></p>
</video> </video>
</div> </div>
`) `)
//line views/hypha.qtpl:89 //line views/hypha.qtpl:92
case ".mp3": case ".mp3":
//line views/hypha.qtpl:89 //line views/hypha.qtpl:92
qw422016.N().S(` qw422016.N().S(`
<div class="binary-container binary-container_with-audio"> <div class="binary-container binary-container_with-audio">
<audio controls> <audio controls>
<source src="/binary/`) <source src="/binary/`)
//line views/hypha.qtpl:92 //line views/hypha.qtpl:95
qw422016.N().S(h.Name) qw422016.N().S(h.Name)
//line views/hypha.qtpl:92 //line views/hypha.qtpl:95
qw422016.N().S(`"/> qw422016.N().S(`"/>
<p>Your browser does not support audio. <a href="/binary/`) <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) qw422016.N().S(h.Name)
//line views/hypha.qtpl:93 //line views/hypha.qtpl:96
qw422016.N().S(`">Download audio</a></p> qw422016.N().S(`">Download audio</a></p>
</audio> </audio>
</div> </div>
`) `)
//line views/hypha.qtpl:97 //line views/hypha.qtpl:100
default: default:
//line views/hypha.qtpl:97 //line views/hypha.qtpl:100
qw422016.N().S(` qw422016.N().S(`
<div class="binary-container binary-container_with-nothing"> <div class="binary-container binary-container_with-nothing">
<p><a href="/binary/`) <p><a href="/binary/`)
//line views/hypha.qtpl:99 //line views/hypha.qtpl:102
qw422016.N().S(h.Name) qw422016.N().S(h.Name)
//line views/hypha.qtpl:99 //line views/hypha.qtpl:102
qw422016.N().S(`">Download media</a></p> qw422016.N().S(`">Download media</a></p>
</div> </div>
`) `)
//line views/hypha.qtpl:101 //line views/hypha.qtpl:104
} }
//line views/hypha.qtpl:101 //line views/hypha.qtpl:104
qw422016.N().S(` 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) { func WriteAttachmentHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) {
//line views/hypha.qtpl:102 //line views/hypha.qtpl:105
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/hypha.qtpl:102 //line views/hypha.qtpl:105
StreamAttachmentHTML(qw422016, h) StreamAttachmentHTML(qw422016, h)
//line views/hypha.qtpl:102 //line views/hypha.qtpl:105
qt422016.ReleaseWriter(qw422016) 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 { func AttachmentHTML(h *hyphae.Hypha) string {
//line views/hypha.qtpl:102 //line views/hypha.qtpl:105
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/hypha.qtpl:102 //line views/hypha.qtpl:105
WriteAttachmentHTML(qb422016, h) WriteAttachmentHTML(qb422016, h)
//line views/hypha.qtpl:102 //line views/hypha.qtpl:105
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/hypha.qtpl:102 //line views/hypha.qtpl:105
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/hypha.qtpl:102 //line views/hypha.qtpl:105
return qs422016 return qs422016
//line views/hypha.qtpl:102 //line views/hypha.qtpl:105
} }

View File

@ -1,12 +1,11 @@
{% import "net/http" %} {% import "net/http" %}
{% import "github.com/bouncepaw/mycorrhiza/util" %}
{% func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) %} {% func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) %}
{%= modalBegin( {%= modalBegin(
"delete-confirm", "delete-confirm",
hyphaName, hyphaName,
"", "",
"Delete "+util.BeautifulName(hyphaName)+"?") %} "Delete "+beautifulLink(hyphaName)+"?") %}
{%= modalReallyWant(hyphaName, "unattach") %} {%= modalReallyWant(hyphaName, "unattach") %}
<p>In this version of Mycorrhiza Wiki you cannot undelete a deleted hypha but the history can still be accessed.</p> <p>In this version of Mycorrhiza Wiki you cannot undelete a deleted hypha but the history can still be accessed.</p>
{%= modalEnd(hyphaName, true) %} {%= modalEnd(hyphaName, true) %}
@ -17,7 +16,7 @@
"unattach", "unattach",
hyphaName, hyphaName,
"", "",
"Unattach "+util.BeautifulName(hyphaName)+"?") %} "Unattach "+beautifulLink(hyphaName)+"?") %}
{%= modalReallyWant(hyphaName, "unattach") %} {%= modalReallyWant(hyphaName, "unattach") %}
{%= modalEnd(hyphaName, true) %} {%= modalEnd(hyphaName, true) %}
{% endfunc %} {% endfunc %}
@ -27,7 +26,7 @@
"rename-confirm", "rename-confirm",
hyphaName, hyphaName,
` method="post" enctype="multipart/form-data"`, ` method="post" enctype="multipart/form-data"`,
"Rename "+util.BeautifulName(hyphaName)) %} "Rename "+beautifulLink(hyphaName)) %}
<label for="new-name">New name</label> <label for="new-name">New name</label>
<input type="text" value="{%s hyphaName %}" required autofocus id="new-name" name="new-name"/> <input type="text" value="{%s hyphaName %}" required autofocus id="new-name" name="new-name"/>

View File

@ -7,147 +7,144 @@ package views
//line views/modal.qtpl:1 //line views/modal.qtpl:1
import "net/http" import "net/http"
//line views/modal.qtpl:2 //line views/modal.qtpl:3
import "github.com/bouncepaw/mycorrhiza/util"
//line views/modal.qtpl:4
import ( import (
qtio422016 "io" qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate" qt422016 "github.com/valyala/quicktemplate"
) )
//line views/modal.qtpl:4 //line views/modal.qtpl:3
var ( var (
_ = qtio422016.Copy _ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer _ = qt422016.AcquireByteBuffer
) )
//line views/modal.qtpl:4 //line views/modal.qtpl:3
func StreamDeleteAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string, isOld bool) { 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(` qw422016.N().S(`
`) `)
//line views/modal.qtpl:5 //line views/modal.qtpl:4
streammodalBegin(qw422016, streammodalBegin(qw422016,
"delete-confirm", "delete-confirm",
hyphaName, hyphaName,
"", "",
"Delete "+util.BeautifulName(hyphaName)+"?") "Delete "+beautifulLink(hyphaName)+"?")
//line views/modal.qtpl:9 //line views/modal.qtpl:8
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/modal.qtpl:10 //line views/modal.qtpl:9
streammodalReallyWant(qw422016, hyphaName, "unattach") streammodalReallyWant(qw422016, hyphaName, "unattach")
//line views/modal.qtpl:10 //line views/modal.qtpl:9
qw422016.N().S(` qw422016.N().S(`
<p>In this version of Mycorrhiza Wiki you cannot undelete a deleted hypha but the history can still be accessed.</p> <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) streammodalEnd(qw422016, hyphaName, true)
//line views/modal.qtpl:11
qw422016.N().S(`
`)
//line views/modal.qtpl:12 //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) { 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) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/modal.qtpl:13 //line views/modal.qtpl:12
StreamDeleteAskHTML(qw422016, rq, hyphaName, isOld) StreamDeleteAskHTML(qw422016, rq, hyphaName, isOld)
//line views/modal.qtpl:13 //line views/modal.qtpl:12
qt422016.ReleaseWriter(qw422016) 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 { func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
//line views/modal.qtpl:13 //line views/modal.qtpl:12
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/modal.qtpl:13 //line views/modal.qtpl:12
WriteDeleteAskHTML(qb422016, rq, hyphaName, isOld) WriteDeleteAskHTML(qb422016, rq, hyphaName, isOld)
//line views/modal.qtpl:13 //line views/modal.qtpl:12
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/modal.qtpl:13 //line views/modal.qtpl:12
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/modal.qtpl:13 //line views/modal.qtpl:12
return qs422016 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) { 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(` qw422016.N().S(`
`) `)
//line views/modal.qtpl:16 //line views/modal.qtpl:15
streammodalBegin(qw422016, streammodalBegin(qw422016,
"unattach", "unattach",
hyphaName, 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 //line views/modal.qtpl:20
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/modal.qtpl:21 //line views/modal.qtpl:21
streammodalReallyWant(qw422016, hyphaName, "unattach") streammodalEnd(qw422016, hyphaName, true)
//line views/modal.qtpl:21 //line views/modal.qtpl:21
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/modal.qtpl:22 //line views/modal.qtpl:22
streammodalEnd(qw422016, hyphaName, true) }
//line views/modal.qtpl:22 //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) { 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) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/modal.qtpl:23 //line views/modal.qtpl:22
StreamUnattachAskHTML(qw422016, rq, hyphaName, isOld) StreamUnattachAskHTML(qw422016, rq, hyphaName, isOld)
//line views/modal.qtpl:23 //line views/modal.qtpl:22
qt422016.ReleaseWriter(qw422016) 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 { func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
//line views/modal.qtpl:23 //line views/modal.qtpl:22
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/modal.qtpl:23 //line views/modal.qtpl:22
WriteUnattachAskHTML(qb422016, rq, hyphaName, isOld) WriteUnattachAskHTML(qb422016, rq, hyphaName, isOld)
//line views/modal.qtpl:23 //line views/modal.qtpl:22
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/modal.qtpl:23 //line views/modal.qtpl:22
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/modal.qtpl:23 //line views/modal.qtpl:22
return qs422016 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) { 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(` qw422016.N().S(`
`) `)
//line views/modal.qtpl:26 //line views/modal.qtpl:25
streammodalBegin(qw422016, streammodalBegin(qw422016,
"rename-confirm", "rename-confirm",
hyphaName, hyphaName,
` method="post" enctype="multipart/form-data"`, ` method="post" enctype="multipart/form-data"`,
"Rename "+util.BeautifulName(hyphaName)) "Rename "+beautifulLink(hyphaName))
//line views/modal.qtpl:30 //line views/modal.qtpl:29
qw422016.N().S(` qw422016.N().S(`
<label for="new-name">New name</label> <label for="new-name">New name</label>
<input type="text" value="`) <input type="text" value="`)
//line views/modal.qtpl:32 //line views/modal.qtpl:31
qw422016.E().S(hyphaName) 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"/> qw422016.N().S(`" required autofocus id="new-name" name="new-name"/>
<input type="checkbox" id="recursive" name="recursive" value="true" checked/> <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> <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) streammodalEnd(qw422016, hyphaName, false)
//line views/modal.qtpl:38 //line views/modal.qtpl:37
qw422016.N().S(` 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) { 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) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/modal.qtpl:39 //line views/modal.qtpl:38
StreamRenameAskHTML(qw422016, rq, hyphaName, isOld) StreamRenameAskHTML(qw422016, rq, hyphaName, isOld)
//line views/modal.qtpl:39 //line views/modal.qtpl:38
qt422016.ReleaseWriter(qw422016) 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 { func RenameAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
//line views/modal.qtpl:39 //line views/modal.qtpl:38
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/modal.qtpl:39 //line views/modal.qtpl:38
WriteRenameAskHTML(qb422016, rq, hyphaName, isOld) WriteRenameAskHTML(qb422016, rq, hyphaName, isOld)
//line views/modal.qtpl:39 //line views/modal.qtpl:38
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/modal.qtpl:39 //line views/modal.qtpl:38
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/modal.qtpl:39 //line views/modal.qtpl:38
return qs422016 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) { func streammodalReallyWant(qw422016 *qt422016.Writer, hyphaName, verb string) {
//line views/modal.qtpl:41 //line views/modal.qtpl:40
qw422016.N().S(` qw422016.N().S(`
<p class="modal__confirmation-msg">Do you really want to `) <p class="modal__confirmation-msg">Do you really want to `)
//line views/modal.qtpl:42 //line views/modal.qtpl:41
qw422016.E().S(verb) qw422016.E().S(verb)
//line views/modal.qtpl:42 //line views/modal.qtpl:41
qw422016.N().S(` hypha <em>`) qw422016.N().S(` hypha <em>`)
//line views/modal.qtpl:42 //line views/modal.qtpl:41
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line views/modal.qtpl:42 //line views/modal.qtpl:41
qw422016.N().S(`</em>?</p> 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) { func writemodalReallyWant(qq422016 qtio422016.Writer, hyphaName, verb string) {
//line views/modal.qtpl:43 //line views/modal.qtpl:42
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/modal.qtpl:43 //line views/modal.qtpl:42
streammodalReallyWant(qw422016, hyphaName, verb) streammodalReallyWant(qw422016, hyphaName, verb)
//line views/modal.qtpl:43 //line views/modal.qtpl:42
qt422016.ReleaseWriter(qw422016) 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 { func modalReallyWant(hyphaName, verb string) string {
//line views/modal.qtpl:43 //line views/modal.qtpl:42
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/modal.qtpl:43 //line views/modal.qtpl:42
writemodalReallyWant(qb422016, hyphaName, verb) writemodalReallyWant(qb422016, hyphaName, verb)
//line views/modal.qtpl:43 //line views/modal.qtpl:42
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/modal.qtpl:43 //line views/modal.qtpl:42
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/modal.qtpl:43 //line views/modal.qtpl:42
return qs422016 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) { func streammodalBegin(qw422016 *qt422016.Writer, path, hyphaName, formAttrs, legend string) {
//line views/modal.qtpl:45 //line views/modal.qtpl:44
qw422016.N().S(` qw422016.N().S(`
<div class="layout"> <div class="layout">
<main class="main-width"> <main class="main-width">
<form class="modal" action="/`) <form class="modal" action="/`)
//line views/modal.qtpl:48 //line views/modal.qtpl:47
qw422016.E().S(path) qw422016.E().S(path)
//line views/modal.qtpl:48 //line views/modal.qtpl:47
qw422016.N().S(`/`) qw422016.N().S(`/`)
//line views/modal.qtpl:48 //line views/modal.qtpl:47
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line views/modal.qtpl:48 //line views/modal.qtpl:47
qw422016.N().S(`"`) qw422016.N().S(`"`)
//line views/modal.qtpl:48 //line views/modal.qtpl:47
qw422016.N().S(formAttrs) qw422016.N().S(formAttrs)
//line views/modal.qtpl:48 //line views/modal.qtpl:47
qw422016.N().S(`> qw422016.N().S(`>
<fieldset class="modal__fieldset"> <fieldset class="modal__fieldset">
<legend class="modal__title">`) <legend class="modal__title">`)
//line views/modal.qtpl:50 //line views/modal.qtpl:49
qw422016.N().S(legend) qw422016.N().S(legend)
//line views/modal.qtpl:50 //line views/modal.qtpl:49
qw422016.N().S(`</legend> 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) { func writemodalBegin(qq422016 qtio422016.Writer, path, hyphaName, formAttrs, legend string) {
//line views/modal.qtpl:51 //line views/modal.qtpl:50
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/modal.qtpl:51 //line views/modal.qtpl:50
streammodalBegin(qw422016, path, hyphaName, formAttrs, legend) streammodalBegin(qw422016, path, hyphaName, formAttrs, legend)
//line views/modal.qtpl:51 //line views/modal.qtpl:50
qt422016.ReleaseWriter(qw422016) 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 { func modalBegin(path, hyphaName, formAttrs, legend string) string {
//line views/modal.qtpl:51 //line views/modal.qtpl:50
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/modal.qtpl:51 //line views/modal.qtpl:50
writemodalBegin(qb422016, path, hyphaName, formAttrs, legend) writemodalBegin(qb422016, path, hyphaName, formAttrs, legend)
//line views/modal.qtpl:51 //line views/modal.qtpl:50
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/modal.qtpl:51 //line views/modal.qtpl:50
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/modal.qtpl:51 //line views/modal.qtpl:50
return qs422016 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) { func streammodalEnd(qw422016 *qt422016.Writer, hyphaName string, shouldFocusOnConfirm bool) {
//line views/modal.qtpl:53 //line views/modal.qtpl:52
qw422016.N().S(` qw422016.N().S(`
<input type="submit" value="Confirm" class="btn" `) <input type="submit" value="Confirm" class="btn" `)
//line views/modal.qtpl:54 //line views/modal.qtpl:53
if shouldFocusOnConfirm { if shouldFocusOnConfirm {
//line views/modal.qtpl:54 //line views/modal.qtpl:53
qw422016.N().S(`autofocus`) 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(`> qw422016.N().S(`>
<a href="/hypha/`) <a href="/hypha/`)
//line views/modal.qtpl:55 //line views/modal.qtpl:54
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line views/modal.qtpl:55 //line views/modal.qtpl:54
qw422016.N().S(`" class="btn btn_weak">Cancel</a> qw422016.N().S(`" class="btn btn_weak">Cancel</a>
</fieldset> </fieldset>
</form> </form>
</main> </main>
</div> </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) { func writemodalEnd(qq422016 qtio422016.Writer, hyphaName string, shouldFocusOnConfirm bool) {
//line views/modal.qtpl:60 //line views/modal.qtpl:59
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/modal.qtpl:60 //line views/modal.qtpl:59
streammodalEnd(qw422016, hyphaName, shouldFocusOnConfirm) streammodalEnd(qw422016, hyphaName, shouldFocusOnConfirm)
//line views/modal.qtpl:60 //line views/modal.qtpl:59
qt422016.ReleaseWriter(qw422016) 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 { func modalEnd(hyphaName string, shouldFocusOnConfirm bool) string {
//line views/modal.qtpl:60 //line views/modal.qtpl:59
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/modal.qtpl:60 //line views/modal.qtpl:59
writemodalEnd(qb422016, hyphaName, shouldFocusOnConfirm) writemodalEnd(qb422016, hyphaName, shouldFocusOnConfirm)
//line views/modal.qtpl:60 //line views/modal.qtpl:59
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/modal.qtpl:60 //line views/modal.qtpl:59
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/modal.qtpl:60 //line views/modal.qtpl:59
return qs422016 return qs422016
//line views/modal.qtpl:60 //line views/modal.qtpl:59
} }

View File

@ -1,7 +1,6 @@
{% import "net/http" %} {% import "net/http" %}
{% import "github.com/bouncepaw/mycorrhiza/cfg" %} {% import "github.com/bouncepaw/mycorrhiza/cfg" %}
{% import "github.com/bouncepaw/mycorrhiza/util" %}
{% import "github.com/bouncepaw/mycorrhiza/user" %} {% import "github.com/bouncepaw/mycorrhiza/user" %}
{% func Toolbar(u *user.User) %} {% func Toolbar(u *user.User) %}
@ -72,7 +71,7 @@
{% func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) %} {% func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) %}
<div class="layout"> <div class="layout">
<main class="main-width edit edit_no-preview"> <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 %} {%s= warning %}
<form method="post" class="edit-form" <form method="post" class="edit-form"
action="/upload-text/{%s hyphaName %}"> action="/upload-text/{%s hyphaName %}">
@ -94,7 +93,7 @@
{% func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) %} {% func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) %}
<div class="layout"> <div class="layout">
<main class="main-width edit edit_with-preview"> <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 %} {%s= warning %}
<form method="post" class="edit-form" <form method="post" class="edit-form"
action="/upload-text/{%s hyphaName %}"> action="/upload-text/{%s hyphaName %}">

View File

@ -11,33 +11,30 @@ import "net/http"
import "github.com/bouncepaw/mycorrhiza/cfg" import "github.com/bouncepaw/mycorrhiza/cfg"
//line views/mutators.qtpl:4 //line views/mutators.qtpl:4
import "github.com/bouncepaw/mycorrhiza/util"
//line views/mutators.qtpl:5
import "github.com/bouncepaw/mycorrhiza/user" import "github.com/bouncepaw/mycorrhiza/user"
//line views/mutators.qtpl:7 //line views/mutators.qtpl:6
import ( import (
qtio422016 "io" qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate" qt422016 "github.com/valyala/quicktemplate"
) )
//line views/mutators.qtpl:7 //line views/mutators.qtpl:6
var ( var (
_ = qtio422016.Copy _ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer _ = qt422016.AcquireByteBuffer
) )
//line views/mutators.qtpl:7 //line views/mutators.qtpl:6
func StreamToolbar(qw422016 *qt422016.Writer, u *user.User) { func StreamToolbar(qw422016 *qt422016.Writer, u *user.User) {
//line views/mutators.qtpl:7 //line views/mutators.qtpl:6
qw422016.N().S(` qw422016.N().S(`
<aside class="edit-toolbar layout-card"> <aside class="edit-toolbar layout-card">
<h2 class="edit-toolbar__title layout-card__title">Markup</h2> <h2 class="edit-toolbar__title layout-card__title">Markup</h2>
<section class="edit-toolbar__buttons"> <section class="edit-toolbar__buttons">
`) `)
//line views/mutators.qtpl:11 //line views/mutators.qtpl:10
for _, el := range []struct { for _, el := range []struct {
class string class string
onclick string onclick string
@ -63,36 +60,36 @@ func StreamToolbar(qw422016 *qt422016.Writer, u *user.User) {
{"bulletedlist", "insertBulletedList()", "* bullet list"}, {"bulletedlist", "insertBulletedList()", "* bullet list"},
{"numberedlist", "insertNumberedList()", "*. number list"}, {"numberedlist", "insertNumberedList()", "*. number list"},
} { } {
//line views/mutators.qtpl:35 //line views/mutators.qtpl:34
qw422016.N().S(` qw422016.N().S(`
<button <button
class="btn edit-toolbar__btn edit-toolbar__`) class="btn edit-toolbar__btn edit-toolbar__`)
//line views/mutators.qtpl:37 //line views/mutators.qtpl:36
qw422016.E().S(el.class) qw422016.E().S(el.class)
//line views/mutators.qtpl:37 //line views/mutators.qtpl:36
qw422016.N().S(`" qw422016.N().S(`"
onclick="`) onclick="`)
//line views/mutators.qtpl:38 //line views/mutators.qtpl:37
qw422016.E().S(el.onclick) qw422016.E().S(el.onclick)
//line views/mutators.qtpl:38 //line views/mutators.qtpl:37
qw422016.N().S(`"> qw422016.N().S(`">
`) `)
//line views/mutators.qtpl:39 //line views/mutators.qtpl:38
qw422016.N().S(el.display) qw422016.N().S(el.display)
//line views/mutators.qtpl:39 //line views/mutators.qtpl:38
qw422016.N().S(` qw422016.N().S(`
</button> </button>
`) `)
//line views/mutators.qtpl:41 //line views/mutators.qtpl:40
} }
//line views/mutators.qtpl:41 //line views/mutators.qtpl:40
qw422016.N().S(` qw422016.N().S(`
</section> </section>
<p class="edit-toolbar__ad"><a href="/help/en/mycomarkup" target="_blank" class="shy-link">Learn more</a> about mycomarkup</p> <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> <h2 class="edit-toolbar__title layout-card__title">Actions</h2>
<section class="edit-toolbar__buttons"> <section class="edit-toolbar__buttons">
`) `)
//line views/mutators.qtpl:46 //line views/mutators.qtpl:45
for _, el := range []struct { for _, el := range []struct {
class string class string
onclick string onclick string
@ -101,34 +98,34 @@ func StreamToolbar(qw422016 *qt422016.Writer, u *user.User) {
{"date", "insertDate()", "Insert current date"}, {"date", "insertDate()", "Insert current date"},
{"time", "insertTimeUTC()", "Insert current time"}, {"time", "insertTimeUTC()", "Insert current time"},
} { } {
//line views/mutators.qtpl:53 //line views/mutators.qtpl:52
qw422016.N().S(` qw422016.N().S(`
<button <button
class="btn edit-toolbar__btn edit-toolbar__`) class="btn edit-toolbar__btn edit-toolbar__`)
//line views/mutators.qtpl:55 //line views/mutators.qtpl:54
qw422016.E().S(el.class) qw422016.E().S(el.class)
//line views/mutators.qtpl:55 //line views/mutators.qtpl:54
qw422016.N().S(`" qw422016.N().S(`"
onclick="`) onclick="`)
//line views/mutators.qtpl:56 //line views/mutators.qtpl:55
qw422016.E().S(el.onclick) qw422016.E().S(el.onclick)
//line views/mutators.qtpl:56 //line views/mutators.qtpl:55
qw422016.N().S(`"> qw422016.N().S(`">
`) `)
//line views/mutators.qtpl:57 //line views/mutators.qtpl:56
qw422016.N().S(el.display) qw422016.N().S(el.display)
//line views/mutators.qtpl:57 //line views/mutators.qtpl:56
qw422016.N().S(` qw422016.N().S(`
</button> </button>
`) `)
//line views/mutators.qtpl:59 //line views/mutators.qtpl:58
} }
//line views/mutators.qtpl:59 //line views/mutators.qtpl:58
qw422016.N().S(` qw422016.N().S(`
`) `)
//line views/mutators.qtpl:60 //line views/mutators.qtpl:59
if u.Group != "anon" { if u.Group != "anon" {
//line views/mutators.qtpl:60 //line views/mutators.qtpl:59
qw422016.N().S(` qw422016.N().S(`
<button <button
class="btn edit-toolbar__btn edit-toolbar__user-link" class="btn edit-toolbar__btn edit-toolbar__user-link"
@ -136,69 +133,69 @@ func StreamToolbar(qw422016 *qt422016.Writer, u *user.User) {
Link yourself Link yourself
</button> </button>
`) `)
//line views/mutators.qtpl:66 //line views/mutators.qtpl:65
} }
//line views/mutators.qtpl:66 //line views/mutators.qtpl:65
qw422016.N().S(` qw422016.N().S(`
</section> </section>
</aside> </aside>
<script src="/static/toolbar.js"></script> <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) { func WriteToolbar(qq422016 qtio422016.Writer, u *user.User) {
//line views/mutators.qtpl:70 //line views/mutators.qtpl:69
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/mutators.qtpl:70 //line views/mutators.qtpl:69
StreamToolbar(qw422016, u) StreamToolbar(qw422016, u)
//line views/mutators.qtpl:70 //line views/mutators.qtpl:69
qt422016.ReleaseWriter(qw422016) 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 { func Toolbar(u *user.User) string {
//line views/mutators.qtpl:70 //line views/mutators.qtpl:69
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/mutators.qtpl:70 //line views/mutators.qtpl:69
WriteToolbar(qb422016, u) WriteToolbar(qb422016, u)
//line views/mutators.qtpl:70 //line views/mutators.qtpl:69
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/mutators.qtpl:70 //line views/mutators.qtpl:69
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/mutators.qtpl:70 //line views/mutators.qtpl:69
return qs422016 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) { 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(` qw422016.N().S(`
<div class="layout"> <div class="layout">
<main class="main-width edit edit_no-preview"> <main class="main-width edit edit_no-preview">
<h1 class="edit__title">Edit `) <h1 class="edit__title">Edit `)
//line views/mutators.qtpl:75 //line views/mutators.qtpl:74
qw422016.E().S(util.BeautifulName(hyphaName)) qw422016.N().S(beautifulLink(hyphaName))
//line views/mutators.qtpl:75 //line views/mutators.qtpl:74
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
`) `)
//line views/mutators.qtpl:76 //line views/mutators.qtpl:75
qw422016.N().S(warning) qw422016.N().S(warning)
//line views/mutators.qtpl:76 //line views/mutators.qtpl:75
qw422016.N().S(` qw422016.N().S(`
<form method="post" class="edit-form" <form method="post" class="edit-form"
action="/upload-text/`) action="/upload-text/`)
//line views/mutators.qtpl:78 //line views/mutators.qtpl:77
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line views/mutators.qtpl:78 //line views/mutators.qtpl:77
qw422016.N().S(`"> qw422016.N().S(`">
<textarea name="text" class="edit-form__textarea" autofocus>`) <textarea name="text" class="edit-form__textarea" autofocus>`)
//line views/mutators.qtpl:79 //line views/mutators.qtpl:78
qw422016.E().S(textAreaFill) qw422016.E().S(textAreaFill)
//line views/mutators.qtpl:79 //line views/mutators.qtpl:78
qw422016.N().S(`</textarea> qw422016.N().S(`</textarea>
<br><br> <br><br>
<label for="text">Describe your changes:</label><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 btn_accent edit-form__save" value="Save">
<input type="submit" name="action" class="btn edit-form__preview" value="Preview"> <input type="submit" name="action" class="btn edit-form__preview" value="Preview">
<a href="/hypha/`) <a href="/hypha/`)
//line views/mutators.qtpl:86 //line views/mutators.qtpl:85
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line views/mutators.qtpl:86 //line views/mutators.qtpl:85
qw422016.N().S(`" class="btn btn_weak">Cancel</a> qw422016.N().S(`" class="btn btn_weak">Cancel</a>
</form> </form>
</main> </main>
`) `)
//line views/mutators.qtpl:89 //line views/mutators.qtpl:88
qw422016.N().S(Toolbar(user.FromRequest(rq))) qw422016.N().S(Toolbar(user.FromRequest(rq)))
//line views/mutators.qtpl:89 //line views/mutators.qtpl:88
qw422016.N().S(` qw422016.N().S(`
</div> </div>
`) `)
//line views/mutators.qtpl:91 //line views/mutators.qtpl:90
streameditScripts(qw422016) streameditScripts(qw422016)
//line views/mutators.qtpl:91 //line views/mutators.qtpl:90
qw422016.N().S(` 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) { 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) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/mutators.qtpl:92 //line views/mutators.qtpl:91
StreamEditHTML(qw422016, rq, hyphaName, textAreaFill, warning) StreamEditHTML(qw422016, rq, hyphaName, textAreaFill, warning)
//line views/mutators.qtpl:92 //line views/mutators.qtpl:91
qt422016.ReleaseWriter(qw422016) 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 { func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) string {
//line views/mutators.qtpl:92 //line views/mutators.qtpl:91
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/mutators.qtpl:92 //line views/mutators.qtpl:91
WriteEditHTML(qb422016, rq, hyphaName, textAreaFill, warning) WriteEditHTML(qb422016, rq, hyphaName, textAreaFill, warning)
//line views/mutators.qtpl:92 //line views/mutators.qtpl:91
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/mutators.qtpl:92 //line views/mutators.qtpl:91
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/mutators.qtpl:92 //line views/mutators.qtpl:91
return qs422016 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) { 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(` qw422016.N().S(`
<div class="layout"> <div class="layout">
<main class="main-width edit edit_with-preview"> <main class="main-width edit edit_with-preview">
<h1 class="edit__title">Edit `) <h1 class="edit__title">Edit `)
//line views/mutators.qtpl:97 //line views/mutators.qtpl:96
qw422016.E().S(util.BeautifulName(hyphaName)) qw422016.N().S(beautifulLink(hyphaName))
//line views/mutators.qtpl:97 //line views/mutators.qtpl:96
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
`) `)
//line views/mutators.qtpl:98 //line views/mutators.qtpl:97
qw422016.N().S(warning) qw422016.N().S(warning)
//line views/mutators.qtpl:98 //line views/mutators.qtpl:97
qw422016.N().S(` qw422016.N().S(`
<form method="post" class="edit-form" <form method="post" class="edit-form"
action="/upload-text/`) action="/upload-text/`)
//line views/mutators.qtpl:100 //line views/mutators.qtpl:99
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line views/mutators.qtpl:100 //line views/mutators.qtpl:99
qw422016.N().S(`"> qw422016.N().S(`">
<textarea name="text" class="edit-form__textarea" autofocus>`) <textarea name="text" class="edit-form__textarea" autofocus>`)
//line views/mutators.qtpl:101 //line views/mutators.qtpl:100
qw422016.E().S(textAreaFill) qw422016.E().S(textAreaFill)
//line views/mutators.qtpl:101 //line views/mutators.qtpl:100
qw422016.N().S(`</textarea> qw422016.N().S(`</textarea>
<br><br> <br><br>
<label for="text">Describe your changes:</label><br> <label for="text">Describe your changes:</label><br>
<input id="text" type="text" name="message" class="edit-form__message" value="`) <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) qw422016.E().S(message)
//line views/mutators.qtpl:104 //line views/mutators.qtpl:103
qw422016.N().S(`"> qw422016.N().S(`">
<br><br> <br><br>
<input type="submit" name="action" class="btn btn_accent edit-form__save" value="Save"> <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"> <input type="submit" name="action" class="btn edit-form__preview" value="Preview">
<a href="/hypha/`) <a href="/hypha/`)
//line views/mutators.qtpl:108 //line views/mutators.qtpl:107
qw422016.E().S(hyphaName) qw422016.E().S(hyphaName)
//line views/mutators.qtpl:108 //line views/mutators.qtpl:107
qw422016.N().S(`" class="btn btn_weak">Cancel</a> qw422016.N().S(`" class="btn btn_weak">Cancel</a>
</form> </form>
<p class="warning">Note that the hypha hasn't been saved yet. Here's the preview:</p> <p class="warning">Note that the hypha hasn't been saved yet. Here's the preview:</p>
<article class="edit__preview">`) <article class="edit__preview">`)
//line views/mutators.qtpl:111 //line views/mutators.qtpl:110
qw422016.N().S(renderedPage) qw422016.N().S(renderedPage)
//line views/mutators.qtpl:111 //line views/mutators.qtpl:110
qw422016.N().S(`</article> qw422016.N().S(`</article>
</main> </main>
`) `)
//line views/mutators.qtpl:113 //line views/mutators.qtpl:112
qw422016.N().S(Toolbar(user.FromRequest(rq))) qw422016.N().S(Toolbar(user.FromRequest(rq)))
//line views/mutators.qtpl:113 //line views/mutators.qtpl:112
qw422016.N().S(` qw422016.N().S(`
</div> </div>
`) `)
//line views/mutators.qtpl:115 //line views/mutators.qtpl:114
streameditScripts(qw422016) streameditScripts(qw422016)
//line views/mutators.qtpl:115 //line views/mutators.qtpl:114
qw422016.N().S(` 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) { 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) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/mutators.qtpl:116 //line views/mutators.qtpl:115
StreamPreviewHTML(qw422016, rq, hyphaName, textAreaFill, message, warning, renderedPage) StreamPreviewHTML(qw422016, rq, hyphaName, textAreaFill, message, warning, renderedPage)
//line views/mutators.qtpl:116 //line views/mutators.qtpl:115
qt422016.ReleaseWriter(qw422016) 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 { 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() qb422016 := qt422016.AcquireByteBuffer()
//line views/mutators.qtpl:116 //line views/mutators.qtpl:115
WritePreviewHTML(qb422016, rq, hyphaName, textAreaFill, message, warning, renderedPage) WritePreviewHTML(qb422016, rq, hyphaName, textAreaFill, message, warning, renderedPage)
//line views/mutators.qtpl:116 //line views/mutators.qtpl:115
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/mutators.qtpl:116 //line views/mutators.qtpl:115
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/mutators.qtpl:116 //line views/mutators.qtpl:115
return qs422016 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) { func streameditScripts(qw422016 *qt422016.Writer) {
//line views/mutators.qtpl:118 //line views/mutators.qtpl:117
qw422016.N().S(` qw422016.N().S(`
<script src="/static/editor.js"></script> <script src="/static/editor.js"></script>
`) `)
//line views/mutators.qtpl:120 //line views/mutators.qtpl:119
for _, scriptPath := range cfg.EditScripts { for _, scriptPath := range cfg.EditScripts {
//line views/mutators.qtpl:120 //line views/mutators.qtpl:119
qw422016.N().S(` qw422016.N().S(`
<script src="`) <script src="`)
//line views/mutators.qtpl:121 //line views/mutators.qtpl:120
qw422016.E().S(scriptPath) qw422016.E().S(scriptPath)
//line views/mutators.qtpl:121 //line views/mutators.qtpl:120
qw422016.N().S(`"></script> 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(` 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) { func writeeditScripts(qq422016 qtio422016.Writer) {
//line views/mutators.qtpl:123 //line views/mutators.qtpl:122
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/mutators.qtpl:123 //line views/mutators.qtpl:122
streameditScripts(qw422016) streameditScripts(qw422016)
//line views/mutators.qtpl:123 //line views/mutators.qtpl:122
qt422016.ReleaseWriter(qw422016) 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 { func editScripts() string {
//line views/mutators.qtpl:123 //line views/mutators.qtpl:122
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/mutators.qtpl:123 //line views/mutators.qtpl:122
writeeditScripts(qb422016) writeeditScripts(qb422016)
//line views/mutators.qtpl:123 //line views/mutators.qtpl:122
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/mutators.qtpl:123 //line views/mutators.qtpl:122
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/mutators.qtpl:123 //line views/mutators.qtpl:122
return qs422016 return qs422016
//line views/mutators.qtpl:123 //line views/mutators.qtpl:122
} }

View File

@ -13,7 +13,7 @@
{% func AttachmentMenuHTML(rq *http.Request, h *hyphae.Hypha, u *user.User) %} {% func AttachmentMenuHTML(rq *http.Request, h *hyphae.Hypha, u *user.User) %}
<div class="layout"> <div class="layout">
<main class="main-width attachment-tab"> <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 == "" %} {% 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> <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 %} {% else %}

View File

@ -55,7 +55,7 @@ func StreamAttachmentMenuHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hy
<main class="main-width attachment-tab"> <main class="main-width attachment-tab">
<h1>Attachment of `) <h1>Attachment of `)
//line views/readers.qtpl:16 //line views/readers.qtpl:16
qw422016.E().S(util.BeautifulName(h.Name)) qw422016.N().S(beautifulLink(h.Name))
//line views/readers.qtpl:16 //line views/readers.qtpl:16
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
`) `)