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

Drop the hypha tabs

TODO:
* Make the hotkeys work again
* Compensate the lack of the tabs on other pages
This commit is contained in:
Timur Ismagilov 2021-08-09 00:19:55 +05:00
parent 9eae5e6256
commit f54cfe44ff
12 changed files with 774 additions and 762 deletions

View File

@ -29,6 +29,11 @@ func (h *Hypha) TextPartPath() string {
return h.TextPath
}
// HasAttachment is true if the hypha has an attachment.
func (h *Hypha) HasAttachment() bool {
return h.BinaryPath != ""
}
var byNames = make(map[string]*Hypha)
var byNamesMutex = sync.Mutex{}

View File

@ -22,13 +22,6 @@
.layout { display: grid; row-gap: 1rem; }
header { width: 100%; margin-bottom: 1rem; }
.hypha-tabs__flex { margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.hypha-tabs__tab { list-style-type: none; }
.hypha-tabs { padding: 0; margin: 0; }
.hypha-tabs__tab { margin-right: .5rem; padding: 0; }
.hypha-tabs__link { display: inline-block; padding: .25rem; text-decoration: none; }
.hypha-tabs__selection { display: inline-block; padding: .25rem; font-weight: bold; }
.layout-card li { list-style-type: none; }
.backlinks__list { padding: 0; margin: 0; }
.backlinks__link { text-decoration: none; display: block; padding: .25rem; padding-left: 1.25rem; }
@ -46,16 +39,11 @@ header { width: 100%; margin-bottom: 1rem; }
.non-existent-hypha__way:last-child { margin-right: 0; }
}
/* No longer a phone but still small screen: draw normal tabs, center main */
/* No longer a phone but still small screen: center main */
@media screen and (min-width: 801px) {
.main-width { padding: 1rem 2rem; width: 800px; margin: 0 auto; }
main { border-radius: .25rem; }
.layout-card { width: 800px; margin: 0 auto; }
.hypha-tabs { padding: 0; }
.hypha-tabs__tab { border-radius: .25rem .25rem 0 0; margin-right: 0; }
.hypha-tabs__selection, .hypha-tabs__link { padding: .25rem .5rem; }
.hypha-tabs__tab:nth-of-type(1) { margin-left: 2rem; }
}
@ -208,21 +196,10 @@ table,
}
.transclusion_blend .transclusion__link { display: none; }
.hypha-tabs__tab { background-color: #eee; }
.hypha-tabs__tab a { color: black; }
.hypha-tabs__tab_active { border-bottom: 2px white solid; background: white; }
@media screen and (max-width: 800px) {
.hypha-tabs { background: white; padding: .5rem 0 0 .75rem; }
.hypha-tabs__tab { background-color: white; }
main { padding-top: 0; }
}
@media screen and (min-width: 801px) {
.hypha-tabs__tab { border: 1px #ddd solid; }
.hypha-tabs__tab_active { border-bottom: 1px white solid; }
}
.layout-card { border-radius: .25rem; background-color: white; }
.layout-card__title { font-size: 1rem; margin: 0; padding: .25rem .5rem; border-radius: .25rem .25rem 0 0; }
.layout-card__title { border-bottom: 1px solid #eee; }
@ -248,7 +225,7 @@ td { border: #ddd 1px solid; }
/* Dark theme! */
@media (prefers-color-scheme: dark) {
html { background: #222; color: #ddd; }
main, article, .hypha-tabs__tab, header, .layout-card { background-color: #343434; color: #ddd; }
main, article, header, .layout-card { background-color: #343434; color: #ddd; }
a, .wikilink_external { color: #f1fa8c; }
a:visited, .wikilink_external:visited { color: #ffb86c; }
@ -257,8 +234,7 @@ a:visited, .wikilink_external:visited { color: #ffb86c; }
.prevnext__el, .prevnext__el:visited { color: #ddd; }
.hypha-tabs__tab a, .hypha-tabs__tab { color: #ddd; background-color: #232323; border: 0; }
.layout-card__title, .hypha-tabs__tab_active { background-color: #343434; }
.layout-card__title { background-color: #343434; }
.transclusion .transclusion__link, a.shy-link { color: #ddd; }
@ -279,10 +255,6 @@ table { border: 0; background-color: #444444; color: #ddd; }
.transclusion code,
.transclusion .codeblock { background-color: #454545; }
mark { background: rgba(130, 80, 30, 5); color: inherit; }
@media screen and (max-width: 800px) {
.hypha-tabs a,
.hypha-tabs { background-color: #343434; }
}
}
kbd {
@ -777,4 +749,59 @@ kbd {
text-decoration: none;
border: 1px solid #999;
border-radius: 1rem;
}
/*
* Buttons beside the hypha title
*/
.edit-btn {
float: right;
margin: -0.25rem 0;
}
.edit-btn__link {
display: block;
text-decoration: none;
color: inherit;
}
.jump-btn {
float: right;
margin: -0.25rem -1rem;
}
.jump-btn__link {
text-decoration: none;
color: inherit;
}
/*
* Hypha bottom
*/
#hypha-bottom {
clear: both;
}
.hypha-info {
display: block;
}
.hypha-info__list {
padding: 0;
margin-bottom: 0;
}
.hypha-info__entry {
display: inline;
}
.hypha-info__link {
display: inline-block;
color: #999;
}
.hypha-info__link:hover {
color: inherit;
}
.hypha-info__link:after {
content: ", ";
}
.hypha-info__entry:last-of-type a:after {
content: none;
}
.hypha-info__entry:first-of-type a:first-letter {
text-transform: uppercase;
}

View File

@ -16,7 +16,6 @@ if err != nil {
text = err.Error()
}
%}
{%= NavHTML(rq, h.Name, "history") %}
<div class="layout">
<main class="main-width">
<article>
@ -112,7 +111,6 @@ if err != nil {
{% endfunc %}
{% func HistoryHTML(rq *http.Request, hyphaName, list string) %}
{%= NavHTML(rq, hyphaName, "history") %}
<div class="layout">
<main class="main-width">
<article class="history">

View File

@ -54,64 +54,59 @@ func StreamPrimitiveDiffHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyp
//line views/history.qtpl:18
qw422016.N().S(`
`)
//line views/history.qtpl:19
StreamNavHTML(qw422016, rq, h.Name, "history")
//line views/history.qtpl:19
qw422016.N().S(`
<div class="layout">
<main class="main-width">
<article>
<h1>Diff `)
//line views/history.qtpl:23
//line views/history.qtpl:22
qw422016.E().S(util.BeautifulName(h.Name))
//line views/history.qtpl:23
//line views/history.qtpl:22
qw422016.N().S(` at `)
//line views/history.qtpl:23
//line views/history.qtpl:22
qw422016.E().S(hash)
//line views/history.qtpl:23
//line views/history.qtpl:22
qw422016.N().S(`</h1>
<pre class="codeblock"><code>`)
//line views/history.qtpl:24
//line views/history.qtpl:23
qw422016.E().S(text)
//line views/history.qtpl:24
//line views/history.qtpl:23
qw422016.N().S(`</code></pre>
</article>
</main>
</div>
`)
//line views/history.qtpl:28
//line views/history.qtpl:27
}
//line views/history.qtpl:28
//line views/history.qtpl:27
func WritePrimitiveDiffHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) {
//line views/history.qtpl:28
//line views/history.qtpl:27
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/history.qtpl:28
//line views/history.qtpl:27
StreamPrimitiveDiffHTML(qw422016, rq, h, u, hash)
//line views/history.qtpl:28
//line views/history.qtpl:27
qt422016.ReleaseWriter(qw422016)
//line views/history.qtpl:28
//line views/history.qtpl:27
}
//line views/history.qtpl:28
//line views/history.qtpl:27
func PrimitiveDiffHTML(rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) string {
//line views/history.qtpl:28
//line views/history.qtpl:27
qb422016 := qt422016.AcquireByteBuffer()
//line views/history.qtpl:28
//line views/history.qtpl:27
WritePrimitiveDiffHTML(qb422016, rq, h, u, hash)
//line views/history.qtpl:28
//line views/history.qtpl:27
qs422016 := string(qb422016.B)
//line views/history.qtpl:28
//line views/history.qtpl:27
qt422016.ReleaseByteBuffer(qb422016)
//line views/history.qtpl:28
//line views/history.qtpl:27
return qs422016
//line views/history.qtpl:28
//line views/history.qtpl:27
}
//line views/history.qtpl:30
//line views/history.qtpl:29
func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int) {
//line views/history.qtpl:30
//line views/history.qtpl:29
qw422016.N().S(`
<div class="layout">
<main class="main-width recent-changes">
@ -120,54 +115,54 @@ func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int) {
<nav class="recent-changes__count">
See
`)
//line views/history.qtpl:37
//line views/history.qtpl:36
for i, m := range []int{20, 50, 100} {
//line views/history.qtpl:37
//line views/history.qtpl:36
qw422016.N().S(`
`)
//line views/history.qtpl:38
//line views/history.qtpl:37
if i > 0 {
//line views/history.qtpl:38
//line views/history.qtpl:37
qw422016.N().S(`
<span aria-hidden="true">|</span>
`)
//line views/history.qtpl:40
//line views/history.qtpl:39
}
//line views/history.qtpl:40
//line views/history.qtpl:39
qw422016.N().S(`
`)
//line views/history.qtpl:41
//line views/history.qtpl:40
if m == n {
//line views/history.qtpl:41
//line views/history.qtpl:40
qw422016.N().S(`
<b>`)
//line views/history.qtpl:42
//line views/history.qtpl:41
qw422016.N().D(m)
//line views/history.qtpl:42
//line views/history.qtpl:41
qw422016.N().S(`</b>
`)
//line views/history.qtpl:43
//line views/history.qtpl:42
} else {
//line views/history.qtpl:43
//line views/history.qtpl:42
qw422016.N().S(`
<a href="/recent-changes/`)
//line views/history.qtpl:44
//line views/history.qtpl:43
qw422016.N().D(m)
//line views/history.qtpl:44
//line views/history.qtpl:43
qw422016.N().S(`">`)
//line views/history.qtpl:44
//line views/history.qtpl:43
qw422016.N().D(m)
//line views/history.qtpl:44
//line views/history.qtpl:43
qw422016.N().S(`</a>
`)
//line views/history.qtpl:45
//line views/history.qtpl:44
}
//line views/history.qtpl:45
//line views/history.qtpl:44
qw422016.N().S(`
`)
//line views/history.qtpl:46
//line views/history.qtpl:45
}
//line views/history.qtpl:46
//line views/history.qtpl:45
qw422016.N().S(`
recent changes
</nav>
@ -175,271 +170,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:57
//line views/history.qtpl:56
qw422016.N().S(`
`)
//line views/history.qtpl:60
//line views/history.qtpl:59
changes := history.RecentChanges(n)
var year, day int
var month time.Month
//line views/history.qtpl:63
//line views/history.qtpl:62
qw422016.N().S(`
<section class="recent-changes__list" role="feed">
`)
//line views/history.qtpl:65
//line views/history.qtpl:64
if len(changes) == 0 {
//line views/history.qtpl:65
//line views/history.qtpl:64
qw422016.N().S(`
<p>Could not find any recent changes.</p>
`)
//line views/history.qtpl:67
//line views/history.qtpl:66
} else {
//line views/history.qtpl:67
//line views/history.qtpl:66
qw422016.N().S(`
`)
//line views/history.qtpl:68
//line views/history.qtpl:67
for i, entry := range changes {
//line views/history.qtpl:68
//line views/history.qtpl:67
qw422016.N().S(`
`)
//line views/history.qtpl:70
//line views/history.qtpl:69
y, m, d := entry.Time.UTC().Date()
//line views/history.qtpl:70
//line views/history.qtpl:69
qw422016.N().S(`
`)
//line views/history.qtpl:71
//line views/history.qtpl:70
if d != day || m != month || y != year {
//line views/history.qtpl:71
//line views/history.qtpl:70
qw422016.N().S(`
<h2 class="recent-changes__heading">
`)
//line views/history.qtpl:73
//line views/history.qtpl:72
qw422016.E().S(fmt.Sprintf("%04d-%02d-%02d", y, m, d))
//line views/history.qtpl:73
//line views/history.qtpl:72
qw422016.N().S(`
</h2>
`)
//line views/history.qtpl:75
//line views/history.qtpl:74
year, month, day = y, m, d
//line views/history.qtpl:75
//line views/history.qtpl:74
qw422016.N().S(`
`)
//line views/history.qtpl:76
//line views/history.qtpl:75
}
//line views/history.qtpl:76
//line views/history.qtpl:75
qw422016.N().S(`
<div class="recent-changes__entry" role="article"
aria-setsize="`)
//line views/history.qtpl:79
//line views/history.qtpl:78
qw422016.N().D(n)
//line views/history.qtpl:79
//line views/history.qtpl:78
qw422016.N().S(`" aria-posinset="`)
//line views/history.qtpl:79
//line views/history.qtpl:78
qw422016.N().D(i)
//line views/history.qtpl:79
//line views/history.qtpl:78
qw422016.N().S(`">
`)
//line views/history.qtpl:80
//line views/history.qtpl:79
qw422016.N().S(recentChangesEntry(entry))
//line views/history.qtpl:80
//line views/history.qtpl:79
qw422016.N().S(`
</div>
`)
//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
}
//line views/history.qtpl:84
//line views/history.qtpl:83
qw422016.N().S(`
`)
//line views/history.qtpl:85
//line views/history.qtpl:84
qw422016.N().S(helpTopicBadgeHTML("en", "recent_changes"))
//line views/history.qtpl:85
//line views/history.qtpl:84
qw422016.N().S(`
</section>
</main>
</div>
`)
//line views/history.qtpl:89
//line views/history.qtpl:88
}
//line views/history.qtpl:89
//line views/history.qtpl:88
func WriteRecentChangesHTML(qq422016 qtio422016.Writer, n int) {
//line views/history.qtpl:89
//line views/history.qtpl:88
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/history.qtpl:89
//line views/history.qtpl:88
StreamRecentChangesHTML(qw422016, n)
//line views/history.qtpl:89
//line views/history.qtpl:88
qt422016.ReleaseWriter(qw422016)
//line views/history.qtpl:89
//line views/history.qtpl:88
}
//line views/history.qtpl:89
//line views/history.qtpl:88
func RecentChangesHTML(n int) string {
//line views/history.qtpl:89
//line views/history.qtpl:88
qb422016 := qt422016.AcquireByteBuffer()
//line views/history.qtpl:89
//line views/history.qtpl:88
WriteRecentChangesHTML(qb422016, n)
//line views/history.qtpl:89
//line views/history.qtpl:88
qs422016 := string(qb422016.B)
//line views/history.qtpl:89
//line views/history.qtpl:88
qt422016.ReleaseByteBuffer(qb422016)
//line views/history.qtpl:89
//line views/history.qtpl:88
return qs422016
//line views/history.qtpl:89
//line views/history.qtpl:88
}
//line views/history.qtpl:91
//line views/history.qtpl:90
func streamrecentChangesEntry(qw422016 *qt422016.Writer, rev history.Revision) {
//line views/history.qtpl:91
//line views/history.qtpl:90
qw422016.N().S(`
<div>
<time class="recent-changes__entry__time">
`)
//line views/history.qtpl:94
//line views/history.qtpl:93
qw422016.E().S(rev.Time.UTC().Format("15:04 UTC"))
//line views/history.qtpl:94
//line views/history.qtpl:93
qw422016.N().S(`
</time>
<span class="recent-changes__entry__message">`)
//line views/history.qtpl:96
//line views/history.qtpl:95
qw422016.E().S(rev.Hash)
//line views/history.qtpl:96
//line views/history.qtpl:95
qw422016.N().S(`</span>
`)
//line views/history.qtpl:98
//line views/history.qtpl:97
if rev.Username != "anon" {
//line views/history.qtpl:98
//line views/history.qtpl:97
qw422016.N().S(`
<span class="recent-changes__entry__author">
&mdash; <a href="/hypha/`)
//line views/history.qtpl:100
//line views/history.qtpl:99
qw422016.E().S(cfg.UserHypha)
//line views/history.qtpl:100
//line views/history.qtpl:99
qw422016.N().S(`/`)
//line views/history.qtpl:100
//line views/history.qtpl:99
qw422016.E().S(rev.Username)
//line views/history.qtpl:100
//line views/history.qtpl:99
qw422016.N().S(`" rel="author">`)
//line views/history.qtpl:100
//line views/history.qtpl:99
qw422016.E().S(rev.Username)
//line views/history.qtpl:100
//line views/history.qtpl:99
qw422016.N().S(`</a>
</span>
`)
//line views/history.qtpl:102
//line views/history.qtpl:101
}
//line views/history.qtpl:102
//line views/history.qtpl:101
qw422016.N().S(`
</div>
<div>
<span class="recent-changes__entry__links">
`)
//line views/history.qtpl:106
//line views/history.qtpl:105
qw422016.N().S(rev.HyphaeLinksHTML())
//line views/history.qtpl:106
//line views/history.qtpl:105
qw422016.N().S(`
</span>
<span class="recent-changes__entry__message">
`)
//line views/history.qtpl:109
//line views/history.qtpl:108
qw422016.E().S(rev.Message)
//line views/history.qtpl:109
//line views/history.qtpl:108
qw422016.N().S(`
</span>
</div>
`)
//line views/history.qtpl:112
//line views/history.qtpl:111
}
//line views/history.qtpl:112
//line views/history.qtpl:111
func writerecentChangesEntry(qq422016 qtio422016.Writer, rev history.Revision) {
//line views/history.qtpl:112
//line views/history.qtpl:111
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/history.qtpl:112
//line views/history.qtpl:111
streamrecentChangesEntry(qw422016, rev)
//line views/history.qtpl:112
//line views/history.qtpl:111
qt422016.ReleaseWriter(qw422016)
//line views/history.qtpl:112
//line views/history.qtpl:111
}
//line views/history.qtpl:112
//line views/history.qtpl:111
func recentChangesEntry(rev history.Revision) string {
//line views/history.qtpl:112
//line views/history.qtpl:111
qb422016 := qt422016.AcquireByteBuffer()
//line views/history.qtpl:112
//line views/history.qtpl:111
writerecentChangesEntry(qb422016, rev)
//line views/history.qtpl:112
//line views/history.qtpl:111
qs422016 := string(qb422016.B)
//line views/history.qtpl:112
//line views/history.qtpl:111
qt422016.ReleaseByteBuffer(qb422016)
//line views/history.qtpl:112
//line views/history.qtpl:111
return qs422016
//line views/history.qtpl:112
//line views/history.qtpl:111
}
//line views/history.qtpl:114
//line views/history.qtpl:113
func StreamHistoryHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, list string) {
//line views/history.qtpl:114
qw422016.N().S(`
`)
//line views/history.qtpl:115
StreamNavHTML(qw422016, rq, hyphaName, "history")
//line views/history.qtpl:115
//line views/history.qtpl:113
qw422016.N().S(`
<div class="layout">
<main class="main-width">
<article class="history">
<h1>History of `)
//line views/history.qtpl:119
//line views/history.qtpl:117
qw422016.E().S(util.BeautifulName(hyphaName))
//line views/history.qtpl:119
//line views/history.qtpl:117
qw422016.N().S(`</h1>
`)
//line views/history.qtpl:120
//line views/history.qtpl:118
qw422016.N().S(list)
//line views/history.qtpl:120
//line views/history.qtpl:118
qw422016.N().S(`
</article>
</main>
</div>
`)
//line views/history.qtpl:124
//line views/history.qtpl:122
}
//line views/history.qtpl:124
//line views/history.qtpl:122
func WriteHistoryHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, list string) {
//line views/history.qtpl:124
//line views/history.qtpl:122
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/history.qtpl:124
//line views/history.qtpl:122
StreamHistoryHTML(qw422016, rq, hyphaName, list)
//line views/history.qtpl:124
//line views/history.qtpl:122
qt422016.ReleaseWriter(qw422016)
//line views/history.qtpl:124
//line views/history.qtpl:122
}
//line views/history.qtpl:124
//line views/history.qtpl:122
func HistoryHTML(rq *http.Request, hyphaName, list string) string {
//line views/history.qtpl:124
//line views/history.qtpl:122
qb422016 := qt422016.AcquireByteBuffer()
//line views/history.qtpl:124
//line views/history.qtpl:122
WriteHistoryHTML(qb422016, rq, hyphaName, list)
//line views/history.qtpl:124
//line views/history.qtpl:122
qs422016 := string(qb422016.B)
//line views/history.qtpl:124
//line views/history.qtpl:122
qt422016.ReleaseByteBuffer(qb422016)
//line views/history.qtpl:124
//line views/history.qtpl:122
return qs422016
//line views/history.qtpl:124
//line views/history.qtpl:122
}

View File

@ -2,7 +2,6 @@
{% import "github.com/bouncepaw/mycorrhiza/util" %}
{% func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) %}
{%= NavHTML(rq, hyphaName, "delete-ask") %}
{%= modalBegin(
"delete-confirm",
hyphaName,
@ -14,7 +13,6 @@
{% endfunc %}
{% func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) %}
{%= NavHTML(rq, hyphaName, "unattach-ask") %}
{%= modalBegin(
"unattach",
hyphaName,
@ -25,7 +23,6 @@
{% endfunc %}
{% func RenameAskHTML(rq *http.Request, hyphaName string, isOld bool) %}
{%= NavHTML(rq, hyphaName, "rename-ask") %}
{%= modalBegin(
"rename-confirm",
hyphaName,

View File

@ -29,140 +29,125 @@ func StreamDeleteAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName
qw422016.N().S(`
`)
//line views/modal.qtpl:5
StreamNavHTML(qw422016, rq, hyphaName, "delete-ask")
//line views/modal.qtpl:5
qw422016.N().S(`
`)
//line views/modal.qtpl:6
streammodalBegin(qw422016,
"delete-confirm",
hyphaName,
"",
"Delete "+util.BeautifulName(hyphaName)+"?")
//line views/modal.qtpl:10
//line views/modal.qtpl:9
qw422016.N().S(`
`)
//line views/modal.qtpl:11
//line views/modal.qtpl:10
streammodalReallyWant(qw422016, hyphaName, "unattach")
//line views/modal.qtpl:11
//line views/modal.qtpl:10
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:13
//line views/modal.qtpl:12
streammodalEnd(qw422016, hyphaName, true)
//line views/modal.qtpl:12
qw422016.N().S(`
`)
//line views/modal.qtpl:13
qw422016.N().S(`
`)
//line views/modal.qtpl:14
}
//line views/modal.qtpl:14
//line views/modal.qtpl:13
func WriteDeleteAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
//line views/modal.qtpl:14
//line views/modal.qtpl:13
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/modal.qtpl:14
//line views/modal.qtpl:13
StreamDeleteAskHTML(qw422016, rq, hyphaName, isOld)
//line views/modal.qtpl:14
//line views/modal.qtpl:13
qt422016.ReleaseWriter(qw422016)
//line views/modal.qtpl:14
//line views/modal.qtpl:13
}
//line views/modal.qtpl:14
//line views/modal.qtpl:13
func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
//line views/modal.qtpl:14
//line views/modal.qtpl:13
qb422016 := qt422016.AcquireByteBuffer()
//line views/modal.qtpl:14
//line views/modal.qtpl:13
WriteDeleteAskHTML(qb422016, rq, hyphaName, isOld)
//line views/modal.qtpl:14
//line views/modal.qtpl:13
qs422016 := string(qb422016.B)
//line views/modal.qtpl:14
//line views/modal.qtpl:13
qt422016.ReleaseByteBuffer(qb422016)
//line views/modal.qtpl:14
//line views/modal.qtpl:13
return qs422016
//line views/modal.qtpl:14
//line views/modal.qtpl:13
}
//line views/modal.qtpl:16
//line views/modal.qtpl:15
func StreamUnattachAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
//line views/modal.qtpl:15
qw422016.N().S(`
`)
//line views/modal.qtpl:16
qw422016.N().S(`
`)
//line views/modal.qtpl:17
StreamNavHTML(qw422016, rq, hyphaName, "unattach-ask")
//line views/modal.qtpl:17
qw422016.N().S(`
`)
//line views/modal.qtpl:18
streammodalBegin(qw422016,
"unattach",
hyphaName,
"",
"Unattach "+util.BeautifulName(hyphaName)+"?")
//line views/modal.qtpl:20
qw422016.N().S(`
`)
//line views/modal.qtpl:21
streammodalReallyWant(qw422016, hyphaName, "unattach")
//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
streammodalReallyWant(qw422016, hyphaName, "unattach")
}
//line views/modal.qtpl:23
qw422016.N().S(`
`)
//line views/modal.qtpl:24
streammodalEnd(qw422016, hyphaName, true)
//line views/modal.qtpl:24
qw422016.N().S(`
`)
//line views/modal.qtpl:25
}
//line views/modal.qtpl:25
func WriteUnattachAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
//line views/modal.qtpl:25
//line views/modal.qtpl:23
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/modal.qtpl:25
//line views/modal.qtpl:23
StreamUnattachAskHTML(qw422016, rq, hyphaName, isOld)
//line views/modal.qtpl:25
//line views/modal.qtpl:23
qt422016.ReleaseWriter(qw422016)
//line views/modal.qtpl:25
//line views/modal.qtpl:23
}
//line views/modal.qtpl:25
//line views/modal.qtpl:23
func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
//line views/modal.qtpl:25
//line views/modal.qtpl:23
qb422016 := qt422016.AcquireByteBuffer()
//line views/modal.qtpl:25
//line views/modal.qtpl:23
WriteUnattachAskHTML(qb422016, rq, hyphaName, isOld)
//line views/modal.qtpl:25
//line views/modal.qtpl:23
qs422016 := string(qb422016.B)
//line views/modal.qtpl:25
//line views/modal.qtpl:23
qt422016.ReleaseByteBuffer(qb422016)
//line views/modal.qtpl:25
//line views/modal.qtpl:23
return qs422016
//line views/modal.qtpl:25
//line views/modal.qtpl:23
}
//line views/modal.qtpl:27
//line views/modal.qtpl:25
func StreamRenameAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
//line views/modal.qtpl:27
//line views/modal.qtpl:25
qw422016.N().S(`
`)
//line views/modal.qtpl:28
StreamNavHTML(qw422016, rq, hyphaName, "rename-ask")
//line views/modal.qtpl:28
qw422016.N().S(`
`)
//line views/modal.qtpl:29
//line views/modal.qtpl:26
streammodalBegin(qw422016,
"rename-confirm",
hyphaName,
` method="post" enctype="multipart/form-data"`,
"Rename "+util.BeautifulName(hyphaName))
//line views/modal.qtpl:33
//line views/modal.qtpl:30
qw422016.N().S(`
<label for="new-name">New name</label>
<input type="text" value="`)
//line views/modal.qtpl:35
//line views/modal.qtpl:32
qw422016.E().S(hyphaName)
//line views/modal.qtpl:35
//line views/modal.qtpl:32
qw422016.N().S(`" required autofocus id="new-name" name="new-name"/>
<input type="checkbox" id="recursive" name="recursive" value="true" checked/>
@ -170,186 +155,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:41
//line views/modal.qtpl:38
streammodalEnd(qw422016, hyphaName, false)
//line views/modal.qtpl:41
//line views/modal.qtpl:38
qw422016.N().S(`
`)
//line views/modal.qtpl:42
//line views/modal.qtpl:39
}
//line views/modal.qtpl:42
//line views/modal.qtpl:39
func WriteRenameAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
//line views/modal.qtpl:42
//line views/modal.qtpl:39
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/modal.qtpl:42
//line views/modal.qtpl:39
StreamRenameAskHTML(qw422016, rq, hyphaName, isOld)
//line views/modal.qtpl:42
//line views/modal.qtpl:39
qt422016.ReleaseWriter(qw422016)
//line views/modal.qtpl:42
//line views/modal.qtpl:39
}
//line views/modal.qtpl:42
//line views/modal.qtpl:39
func RenameAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
//line views/modal.qtpl:42
//line views/modal.qtpl:39
qb422016 := qt422016.AcquireByteBuffer()
//line views/modal.qtpl:42
//line views/modal.qtpl:39
WriteRenameAskHTML(qb422016, rq, hyphaName, isOld)
//line views/modal.qtpl:42
//line views/modal.qtpl:39
qs422016 := string(qb422016.B)
//line views/modal.qtpl:42
//line views/modal.qtpl:39
qt422016.ReleaseByteBuffer(qb422016)
//line views/modal.qtpl:42
//line views/modal.qtpl:39
return qs422016
//line views/modal.qtpl:42
//line views/modal.qtpl:39
}
//line views/modal.qtpl:44
//line views/modal.qtpl:41
func streammodalReallyWant(qw422016 *qt422016.Writer, hyphaName, verb string) {
//line views/modal.qtpl:44
//line views/modal.qtpl:41
qw422016.N().S(`
<p class="modal__confirmation-msg">Do you really want to `)
//line views/modal.qtpl:45
//line views/modal.qtpl:42
qw422016.E().S(verb)
//line views/modal.qtpl:45
//line views/modal.qtpl:42
qw422016.N().S(` hypha <em>`)
//line views/modal.qtpl:45
//line views/modal.qtpl:42
qw422016.E().S(hyphaName)
//line views/modal.qtpl:45
//line views/modal.qtpl:42
qw422016.N().S(`</em>?</p>
`)
//line views/modal.qtpl:46
//line views/modal.qtpl:43
}
//line views/modal.qtpl:46
//line views/modal.qtpl:43
func writemodalReallyWant(qq422016 qtio422016.Writer, hyphaName, verb string) {
//line views/modal.qtpl:46
//line views/modal.qtpl:43
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/modal.qtpl:46
//line views/modal.qtpl:43
streammodalReallyWant(qw422016, hyphaName, verb)
//line views/modal.qtpl:46
//line views/modal.qtpl:43
qt422016.ReleaseWriter(qw422016)
//line views/modal.qtpl:46
//line views/modal.qtpl:43
}
//line views/modal.qtpl:46
//line views/modal.qtpl:43
func modalReallyWant(hyphaName, verb string) string {
//line views/modal.qtpl:46
//line views/modal.qtpl:43
qb422016 := qt422016.AcquireByteBuffer()
//line views/modal.qtpl:46
//line views/modal.qtpl:43
writemodalReallyWant(qb422016, hyphaName, verb)
//line views/modal.qtpl:46
//line views/modal.qtpl:43
qs422016 := string(qb422016.B)
//line views/modal.qtpl:46
//line views/modal.qtpl:43
qt422016.ReleaseByteBuffer(qb422016)
//line views/modal.qtpl:46
//line views/modal.qtpl:43
return qs422016
//line views/modal.qtpl:46
//line views/modal.qtpl:43
}
//line views/modal.qtpl:48
//line views/modal.qtpl:45
func streammodalBegin(qw422016 *qt422016.Writer, path, hyphaName, formAttrs, legend string) {
//line views/modal.qtpl:48
//line views/modal.qtpl:45
qw422016.N().S(`
<div class="layout">
<main class="main-width">
<form class="modal" action="/`)
//line views/modal.qtpl:51
//line views/modal.qtpl:48
qw422016.E().S(path)
//line views/modal.qtpl:51
//line views/modal.qtpl:48
qw422016.N().S(`/`)
//line views/modal.qtpl:51
//line views/modal.qtpl:48
qw422016.E().S(hyphaName)
//line views/modal.qtpl:51
//line views/modal.qtpl:48
qw422016.N().S(`"`)
//line views/modal.qtpl:51
//line views/modal.qtpl:48
qw422016.N().S(formAttrs)
//line views/modal.qtpl:51
//line views/modal.qtpl:48
qw422016.N().S(`>
<fieldset class="modal__fieldset">
<legend class="modal__title">`)
//line views/modal.qtpl:53
//line views/modal.qtpl:50
qw422016.N().S(legend)
//line views/modal.qtpl:53
//line views/modal.qtpl:50
qw422016.N().S(`</legend>
`)
//line views/modal.qtpl:54
//line views/modal.qtpl:51
}
//line views/modal.qtpl:54
//line views/modal.qtpl:51
func writemodalBegin(qq422016 qtio422016.Writer, path, hyphaName, formAttrs, legend string) {
//line views/modal.qtpl:54
//line views/modal.qtpl:51
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/modal.qtpl:54
//line views/modal.qtpl:51
streammodalBegin(qw422016, path, hyphaName, formAttrs, legend)
//line views/modal.qtpl:54
//line views/modal.qtpl:51
qt422016.ReleaseWriter(qw422016)
//line views/modal.qtpl:54
//line views/modal.qtpl:51
}
//line views/modal.qtpl:54
//line views/modal.qtpl:51
func modalBegin(path, hyphaName, formAttrs, legend string) string {
//line views/modal.qtpl:54
//line views/modal.qtpl:51
qb422016 := qt422016.AcquireByteBuffer()
//line views/modal.qtpl:54
//line views/modal.qtpl:51
writemodalBegin(qb422016, path, hyphaName, formAttrs, legend)
//line views/modal.qtpl:54
//line views/modal.qtpl:51
qs422016 := string(qb422016.B)
//line views/modal.qtpl:54
//line views/modal.qtpl:51
qt422016.ReleaseByteBuffer(qb422016)
//line views/modal.qtpl:54
//line views/modal.qtpl:51
return qs422016
//line views/modal.qtpl:54
//line views/modal.qtpl:51
}
//line views/modal.qtpl:56
//line views/modal.qtpl:53
func streammodalEnd(qw422016 *qt422016.Writer, hyphaName string, shouldFocusOnConfirm bool) {
//line views/modal.qtpl:56
//line views/modal.qtpl:53
qw422016.N().S(`
<input type="submit" value="Confirm" class="btn" `)
//line views/modal.qtpl:57
//line views/modal.qtpl:54
if shouldFocusOnConfirm {
//line views/modal.qtpl:57
//line views/modal.qtpl:54
qw422016.N().S(`autofocus`)
//line views/modal.qtpl:57
//line views/modal.qtpl:54
}
//line views/modal.qtpl:57
//line views/modal.qtpl:54
qw422016.N().S(`>
<a href="/hypha/`)
//line views/modal.qtpl:58
//line views/modal.qtpl:55
qw422016.E().S(hyphaName)
//line views/modal.qtpl:58
//line views/modal.qtpl:55
qw422016.N().S(`" class="btn btn_weak">Cancel</a>
</fieldset>
</form>
</main>
</div>
`)
//line views/modal.qtpl:63
//line views/modal.qtpl:60
}
//line views/modal.qtpl:63
//line views/modal.qtpl:60
func writemodalEnd(qq422016 qtio422016.Writer, hyphaName string, shouldFocusOnConfirm bool) {
//line views/modal.qtpl:63
//line views/modal.qtpl:60
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/modal.qtpl:63
//line views/modal.qtpl:60
streammodalEnd(qw422016, hyphaName, shouldFocusOnConfirm)
//line views/modal.qtpl:63
//line views/modal.qtpl:60
qt422016.ReleaseWriter(qw422016)
//line views/modal.qtpl:63
//line views/modal.qtpl:60
}
//line views/modal.qtpl:63
//line views/modal.qtpl:60
func modalEnd(hyphaName string, shouldFocusOnConfirm bool) string {
//line views/modal.qtpl:63
//line views/modal.qtpl:60
qb422016 := qt422016.AcquireByteBuffer()
//line views/modal.qtpl:63
//line views/modal.qtpl:60
writemodalEnd(qb422016, hyphaName, shouldFocusOnConfirm)
//line views/modal.qtpl:63
//line views/modal.qtpl:60
qs422016 := string(qb422016.B)
//line views/modal.qtpl:63
//line views/modal.qtpl:60
qt422016.ReleaseByteBuffer(qb422016)
//line views/modal.qtpl:63
//line views/modal.qtpl:60
return qs422016
//line views/modal.qtpl:63
//line views/modal.qtpl:60
}

View File

@ -70,7 +70,6 @@
{% endfunc %}
{% func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) %}
{%s= NavHTML(rq, hyphaName, "edit") %}
<div class="layout">
<main class="main-width edit edit_no-preview">
<h1 class="edit__title">Edit {%s util.BeautifulName(hyphaName) %}</h1>
@ -93,7 +92,6 @@
{% endfunc %}
{% func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) %}
{%s= NavHTML(rq, hyphaName, "edit") %}
<div class="layout">
<main class="main-width edit edit_with-preview">
<h1 class="edit__title">Edit {%s util.BeautifulName(hyphaName) %}</h1>

View File

@ -177,33 +177,28 @@ func Toolbar(u *user.User) string {
func StreamEditHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) {
//line views/mutators.qtpl:72
qw422016.N().S(`
`)
//line views/mutators.qtpl:73
qw422016.N().S(NavHTML(rq, hyphaName, "edit"))
//line views/mutators.qtpl:73
qw422016.N().S(`
<div class="layout">
<main class="main-width edit edit_no-preview">
<h1 class="edit__title">Edit `)
//line views/mutators.qtpl:76
//line views/mutators.qtpl:75
qw422016.E().S(util.BeautifulName(hyphaName))
//line views/mutators.qtpl:76
//line views/mutators.qtpl:75
qw422016.N().S(`</h1>
`)
//line views/mutators.qtpl:77
//line views/mutators.qtpl:76
qw422016.N().S(warning)
//line views/mutators.qtpl:77
//line views/mutators.qtpl:76
qw422016.N().S(`
<form method="post" class="edit-form"
action="/upload-text/`)
//line views/mutators.qtpl:79
//line views/mutators.qtpl:78
qw422016.E().S(hyphaName)
//line views/mutators.qtpl:79
//line views/mutators.qtpl:78
qw422016.N().S(`">
<textarea name="text" class="edit-form__textarea" autofocus>`)
//line views/mutators.qtpl:80
//line views/mutators.qtpl:79
qw422016.E().S(textAreaFill)
//line views/mutators.qtpl:80
//line views/mutators.qtpl:79
qw422016.N().S(`</textarea>
<br><br>
<label for="text">Describe your changes:</label><br>
@ -212,195 +207,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:87
//line views/mutators.qtpl:86
qw422016.E().S(hyphaName)
//line views/mutators.qtpl:87
//line views/mutators.qtpl:86
qw422016.N().S(`" class="btn btn_weak">Cancel</a>
</form>
</main>
`)
//line views/mutators.qtpl:90
//line views/mutators.qtpl:89
qw422016.N().S(Toolbar(user.FromRequest(rq)))
//line views/mutators.qtpl:90
//line views/mutators.qtpl:89
qw422016.N().S(`
</div>
`)
//line views/mutators.qtpl:92
//line views/mutators.qtpl:91
streameditScripts(qw422016)
//line views/mutators.qtpl:91
qw422016.N().S(`
`)
//line views/mutators.qtpl:92
qw422016.N().S(`
`)
//line views/mutators.qtpl:93
}
//line views/mutators.qtpl:93
//line views/mutators.qtpl:92
func WriteEditHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) {
//line views/mutators.qtpl:93
//line views/mutators.qtpl:92
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/mutators.qtpl:93
//line views/mutators.qtpl:92
StreamEditHTML(qw422016, rq, hyphaName, textAreaFill, warning)
//line views/mutators.qtpl:93
//line views/mutators.qtpl:92
qt422016.ReleaseWriter(qw422016)
//line views/mutators.qtpl:93
//line views/mutators.qtpl:92
}
//line views/mutators.qtpl:93
//line views/mutators.qtpl:92
func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) string {
//line views/mutators.qtpl:93
//line views/mutators.qtpl:92
qb422016 := qt422016.AcquireByteBuffer()
//line views/mutators.qtpl:93
//line views/mutators.qtpl:92
WriteEditHTML(qb422016, rq, hyphaName, textAreaFill, warning)
//line views/mutators.qtpl:93
//line views/mutators.qtpl:92
qs422016 := string(qb422016.B)
//line views/mutators.qtpl:93
//line views/mutators.qtpl:92
qt422016.ReleaseByteBuffer(qb422016)
//line views/mutators.qtpl:93
//line views/mutators.qtpl:92
return qs422016
//line views/mutators.qtpl:93
//line views/mutators.qtpl:92
}
//line views/mutators.qtpl:95
//line views/mutators.qtpl:94
func StreamPreviewHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) {
//line views/mutators.qtpl:95
qw422016.N().S(`
`)
//line views/mutators.qtpl:96
qw422016.N().S(NavHTML(rq, hyphaName, "edit"))
//line views/mutators.qtpl:96
//line views/mutators.qtpl:94
qw422016.N().S(`
<div class="layout">
<main class="main-width edit edit_with-preview">
<h1 class="edit__title">Edit `)
//line views/mutators.qtpl:99
//line views/mutators.qtpl:97
qw422016.E().S(util.BeautifulName(hyphaName))
//line views/mutators.qtpl:99
//line views/mutators.qtpl:97
qw422016.N().S(`</h1>
`)
//line views/mutators.qtpl:100
//line views/mutators.qtpl:98
qw422016.N().S(warning)
//line views/mutators.qtpl:100
//line views/mutators.qtpl:98
qw422016.N().S(`
<form method="post" class="edit-form"
action="/upload-text/`)
//line views/mutators.qtpl:102
//line views/mutators.qtpl:100
qw422016.E().S(hyphaName)
//line views/mutators.qtpl:102
//line views/mutators.qtpl:100
qw422016.N().S(`">
<textarea name="text" class="edit-form__textarea" autofocus>`)
//line views/mutators.qtpl:103
//line views/mutators.qtpl:101
qw422016.E().S(textAreaFill)
//line views/mutators.qtpl:103
//line views/mutators.qtpl:101
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:106
//line views/mutators.qtpl:104
qw422016.E().S(message)
//line views/mutators.qtpl:106
//line views/mutators.qtpl:104
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:110
//line views/mutators.qtpl:108
qw422016.E().S(hyphaName)
//line views/mutators.qtpl:110
//line views/mutators.qtpl:108
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:113
//line views/mutators.qtpl:111
qw422016.N().S(renderedPage)
//line views/mutators.qtpl:113
//line views/mutators.qtpl:111
qw422016.N().S(`</article>
</main>
`)
//line views/mutators.qtpl:115
//line views/mutators.qtpl:113
qw422016.N().S(Toolbar(user.FromRequest(rq)))
//line views/mutators.qtpl:115
//line views/mutators.qtpl:113
qw422016.N().S(`
</div>
`)
//line views/mutators.qtpl:117
//line views/mutators.qtpl:115
streameditScripts(qw422016)
//line views/mutators.qtpl:117
//line views/mutators.qtpl:115
qw422016.N().S(`
`)
//line views/mutators.qtpl:118
//line views/mutators.qtpl:116
}
//line views/mutators.qtpl:118
//line views/mutators.qtpl:116
func WritePreviewHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) {
//line views/mutators.qtpl:118
//line views/mutators.qtpl:116
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/mutators.qtpl:118
//line views/mutators.qtpl:116
StreamPreviewHTML(qw422016, rq, hyphaName, textAreaFill, message, warning, renderedPage)
//line views/mutators.qtpl:118
//line views/mutators.qtpl:116
qt422016.ReleaseWriter(qw422016)
//line views/mutators.qtpl:118
//line views/mutators.qtpl:116
}
//line views/mutators.qtpl:118
//line views/mutators.qtpl:116
func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) string {
//line views/mutators.qtpl:118
//line views/mutators.qtpl:116
qb422016 := qt422016.AcquireByteBuffer()
//line views/mutators.qtpl:118
//line views/mutators.qtpl:116
WritePreviewHTML(qb422016, rq, hyphaName, textAreaFill, message, warning, renderedPage)
//line views/mutators.qtpl:118
//line views/mutators.qtpl:116
qs422016 := string(qb422016.B)
//line views/mutators.qtpl:118
//line views/mutators.qtpl:116
qt422016.ReleaseByteBuffer(qb422016)
//line views/mutators.qtpl:118
//line views/mutators.qtpl:116
return qs422016
//line views/mutators.qtpl:118
//line views/mutators.qtpl:116
}
//line views/mutators.qtpl:120
//line views/mutators.qtpl:118
func streameditScripts(qw422016 *qt422016.Writer) {
//line views/mutators.qtpl:120
//line views/mutators.qtpl:118
qw422016.N().S(`
<script src="/static/editor.js"></script>
`)
//line views/mutators.qtpl:122
//line views/mutators.qtpl:120
for _, scriptPath := range cfg.EditScripts {
//line views/mutators.qtpl:122
//line views/mutators.qtpl:120
qw422016.N().S(`
<script src="`)
//line views/mutators.qtpl:123
//line views/mutators.qtpl:121
qw422016.E().S(scriptPath)
//line views/mutators.qtpl:123
//line views/mutators.qtpl:121
qw422016.N().S(`"></script>
`)
//line views/mutators.qtpl:124
//line views/mutators.qtpl:122
}
//line views/mutators.qtpl:124
//line views/mutators.qtpl:122
qw422016.N().S(`
`)
//line views/mutators.qtpl:125
//line views/mutators.qtpl:123
}
//line views/mutators.qtpl:125
//line views/mutators.qtpl:123
func writeeditScripts(qq422016 qtio422016.Writer) {
//line views/mutators.qtpl:125
//line views/mutators.qtpl:123
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/mutators.qtpl:125
//line views/mutators.qtpl:123
streameditScripts(qw422016)
//line views/mutators.qtpl:125
//line views/mutators.qtpl:123
qt422016.ReleaseWriter(qw422016)
//line views/mutators.qtpl:125
//line views/mutators.qtpl:123
}
//line views/mutators.qtpl:125
//line views/mutators.qtpl:123
func editScripts() string {
//line views/mutators.qtpl:125
//line views/mutators.qtpl:123
qb422016 := qt422016.AcquireByteBuffer()
//line views/mutators.qtpl:125
//line views/mutators.qtpl:123
writeeditScripts(qb422016)
//line views/mutators.qtpl:125
//line views/mutators.qtpl:123
qs422016 := string(qb422016.B)
//line views/mutators.qtpl:125
//line views/mutators.qtpl:123
qt422016.ReleaseByteBuffer(qb422016)
//line views/mutators.qtpl:125
//line views/mutators.qtpl:123
return qs422016
//line views/mutators.qtpl:125
//line views/mutators.qtpl:123
}

View File

@ -1,48 +1,29 @@
{% import "net/http" %}
{% import "strings" %}
{% import "github.com/bouncepaw/mycorrhiza/user" %}
{% import "github.com/bouncepaw/mycorrhiza/hyphae" %}
This is the <nav> seen on top of many pages.
{% func hyphaInfoEntry(h *hyphae.Hypha, u *user.User, action, displayText string) %}
{% if u.CanProceed(action) %}
<li class="hypha-info__entry hypha-info__entry_{%s action %}">
<a class="hypha-info__link" href="/{%s action %}/{%s h.Name %}">{%s displayText %}</a>
</li>
{% endif %}
{% endfunc %}
{% func hyphaInfo(rq *http.Request, h *hyphae.Hypha) %}
{% code
type navEntry struct {
path string
title string
}
var navEntries = []navEntry{
{"hypha", "Hypha"},
{"edit", "Edit"},
{"attachment", "Attachment"},
{"history", "History"},
{"revision", "NOT REACHED"},
{"rename-ask", "Rename"},
{"delete-ask", "Delete"},
{"text", "Raw text"},
}
%}
{% func NavHTML(rq *http.Request, hyphaName, navType string, revisionHash ...string) %}
{% code
u := user.FromRequest(rq)
%}
<nav class="hypha-tabs main-width">
<ul class="hypha-tabs__flex">
{%- for _, entry := range navEntries -%}
{%- if navType == "revision" && entry.path == "revision" -%}
<li class="hypha-tabs__tab hypha-tabs__tab_active">
<span class="hypha-tabs__selection">{%s revisionHash[0] %}</span>
</li>
{%- elseif navType == entry.path -%}
<li class="hypha-tabs__tab hypha-tabs__tab_active">
<span class="hypha-tabs__selection">{%s entry.title %}</span>
</li>
{%- elseif entry.path != "revision" && u.CanProceed(entry.path) -%}
<li class="hypha-tabs__tab">
<a class="hypha-tabs__link" href="/{%s entry.path %}/{%s hyphaName %}">{%s entry.title %}</a>
</li>
{%- endif -%}
{%- endfor -%}
</ul>
</nav>
<nav class="hypha-info">
<ul class="hypha-info__list">
{% if h.HasAttachment() %}{%= hyphaInfoEntry(h, u, "attachment", "manage the attachment") %}{% endif %}
{%= hyphaInfoEntry(h, u, "history", "view history") %}
{%= hyphaInfoEntry(h, u, "rename-ask", "rename") %}
{%= hyphaInfoEntry(h, u, "delete-ask", "delete") %}
{%= hyphaInfoEntry(h, u, "text", "view markup") %}
</ul>
</nav>
{% endfunc %}
{% func siblingHyphaeHTML(siblings string) %}

View File

@ -13,7 +13,8 @@ import "strings"
//line views/nav.qtpl:3
import "github.com/bouncepaw/mycorrhiza/user"
// This is the <nav> seen on top of many pages.
//line views/nav.qtpl:4
import "github.com/bouncepaw/mycorrhiza/hyphae"
//line views/nav.qtpl:6
import (
@ -28,210 +29,236 @@ var (
_ = qt422016.AcquireByteBuffer
)
//line views/nav.qtpl:7
type navEntry struct {
path string
title string
}
var navEntries = []navEntry{
{"hypha", "Hypha"},
{"edit", "Edit"},
{"attachment", "Attachment"},
{"history", "History"},
{"revision", "NOT REACHED"},
{"rename-ask", "Rename"},
{"delete-ask", "Delete"},
{"text", "Raw text"},
}
//line views/nav.qtpl:23
func StreamNavHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, navType string, revisionHash ...string) {
//line views/nav.qtpl:23
//line views/nav.qtpl:6
func streamhyphaInfoEntry(qw422016 *qt422016.Writer, h *hyphae.Hypha, u *user.User, action, displayText string) {
//line views/nav.qtpl:6
qw422016.N().S(`
`)
//line views/nav.qtpl:25
//line views/nav.qtpl:7
if u.CanProceed(action) {
//line views/nav.qtpl:7
qw422016.N().S(`
<li class="hypha-info__entry hypha-info__entry_`)
//line views/nav.qtpl:8
qw422016.E().S(action)
//line views/nav.qtpl:8
qw422016.N().S(`">
<a class="hypha-info__link" href="/`)
//line views/nav.qtpl:9
qw422016.E().S(action)
//line views/nav.qtpl:9
qw422016.N().S(`/`)
//line views/nav.qtpl:9
qw422016.E().S(h.Name)
//line views/nav.qtpl:9
qw422016.N().S(`">`)
//line views/nav.qtpl:9
qw422016.E().S(displayText)
//line views/nav.qtpl:9
qw422016.N().S(`</a>
</li>
`)
//line views/nav.qtpl:11
}
//line views/nav.qtpl:11
qw422016.N().S(`
`)
//line views/nav.qtpl:12
}
//line views/nav.qtpl:12
func writehyphaInfoEntry(qq422016 qtio422016.Writer, h *hyphae.Hypha, u *user.User, action, displayText string) {
//line views/nav.qtpl:12
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/nav.qtpl:12
streamhyphaInfoEntry(qw422016, h, u, action, displayText)
//line views/nav.qtpl:12
qt422016.ReleaseWriter(qw422016)
//line views/nav.qtpl:12
}
//line views/nav.qtpl:12
func hyphaInfoEntry(h *hyphae.Hypha, u *user.User, action, displayText string) string {
//line views/nav.qtpl:12
qb422016 := qt422016.AcquireByteBuffer()
//line views/nav.qtpl:12
writehyphaInfoEntry(qb422016, h, u, action, displayText)
//line views/nav.qtpl:12
qs422016 := string(qb422016.B)
//line views/nav.qtpl:12
qt422016.ReleaseByteBuffer(qb422016)
//line views/nav.qtpl:12
return qs422016
//line views/nav.qtpl:12
}
//line views/nav.qtpl:14
func streamhyphaInfo(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha) {
//line views/nav.qtpl:14
qw422016.N().S(`
`)
//line views/nav.qtpl:16
u := user.FromRequest(rq)
//line views/nav.qtpl:26
//line views/nav.qtpl:17
qw422016.N().S(`
<nav class="hypha-tabs main-width">
<ul class="hypha-tabs__flex">
`)
//line views/nav.qtpl:29
for _, entry := range navEntries {
//line views/nav.qtpl:30
if navType == "revision" && entry.path == "revision" {
//line views/nav.qtpl:30
qw422016.N().S(` <li class="hypha-tabs__tab hypha-tabs__tab_active">
<span class="hypha-tabs__selection">`)
//line views/nav.qtpl:32
qw422016.E().S(revisionHash[0])
//line views/nav.qtpl:32
qw422016.N().S(`</span>
</li>
`)
//line views/nav.qtpl:34
} else if navType == entry.path {
//line views/nav.qtpl:34
qw422016.N().S(` <li class="hypha-tabs__tab hypha-tabs__tab_active">
<span class="hypha-tabs__selection">`)
//line views/nav.qtpl:36
qw422016.E().S(entry.title)
//line views/nav.qtpl:36
qw422016.N().S(`</span>
</li>
`)
//line views/nav.qtpl:38
} else if entry.path != "revision" && u.CanProceed(entry.path) {
//line views/nav.qtpl:38
qw422016.N().S(` <li class="hypha-tabs__tab">
<a class="hypha-tabs__link" href="/`)
//line views/nav.qtpl:40
qw422016.E().S(entry.path)
//line views/nav.qtpl:40
qw422016.N().S(`/`)
//line views/nav.qtpl:40
qw422016.E().S(hyphaName)
//line views/nav.qtpl:40
qw422016.N().S(`">`)
//line views/nav.qtpl:40
qw422016.E().S(entry.title)
//line views/nav.qtpl:40
qw422016.N().S(`</a>
</li>
`)
//line views/nav.qtpl:42
}
//line views/nav.qtpl:43
<nav class="hypha-info">
<ul class="hypha-info__list">
`)
//line views/nav.qtpl:20
if h.HasAttachment() {
//line views/nav.qtpl:20
streamhyphaInfoEntry(qw422016, h, u, "attachment", "manage the attachment")
//line views/nav.qtpl:20
}
//line views/nav.qtpl:43
qw422016.N().S(` </ul>
</nav>
//line views/nav.qtpl:20
qw422016.N().S(`
`)
//line views/nav.qtpl:21
streamhyphaInfoEntry(qw422016, h, u, "history", "view history")
//line views/nav.qtpl:21
qw422016.N().S(`
`)
//line views/nav.qtpl:22
streamhyphaInfoEntry(qw422016, h, u, "rename-ask", "rename")
//line views/nav.qtpl:22
qw422016.N().S(`
`)
//line views/nav.qtpl:23
streamhyphaInfoEntry(qw422016, h, u, "delete-ask", "delete")
//line views/nav.qtpl:23
qw422016.N().S(`
`)
//line views/nav.qtpl:24
streamhyphaInfoEntry(qw422016, h, u, "text", "view markup")
//line views/nav.qtpl:24
qw422016.N().S(`
</ul>
</nav>
`)
//line views/nav.qtpl:46
//line views/nav.qtpl:27
}
//line views/nav.qtpl:46
func WriteNavHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, navType string, revisionHash ...string) {
//line views/nav.qtpl:46
//line views/nav.qtpl:27
func writehyphaInfo(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha) {
//line views/nav.qtpl:27
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/nav.qtpl:46
StreamNavHTML(qw422016, rq, hyphaName, navType, revisionHash...)
//line views/nav.qtpl:46
//line views/nav.qtpl:27
streamhyphaInfo(qw422016, rq, h)
//line views/nav.qtpl:27
qt422016.ReleaseWriter(qw422016)
//line views/nav.qtpl:46
//line views/nav.qtpl:27
}
//line views/nav.qtpl:46
func NavHTML(rq *http.Request, hyphaName, navType string, revisionHash ...string) string {
//line views/nav.qtpl:46
//line views/nav.qtpl:27
func hyphaInfo(rq *http.Request, h *hyphae.Hypha) string {
//line views/nav.qtpl:27
qb422016 := qt422016.AcquireByteBuffer()
//line views/nav.qtpl:46
WriteNavHTML(qb422016, rq, hyphaName, navType, revisionHash...)
//line views/nav.qtpl:46
//line views/nav.qtpl:27
writehyphaInfo(qb422016, rq, h)
//line views/nav.qtpl:27
qs422016 := string(qb422016.B)
//line views/nav.qtpl:46
//line views/nav.qtpl:27
qt422016.ReleaseByteBuffer(qb422016)
//line views/nav.qtpl:46
//line views/nav.qtpl:27
return qs422016
//line views/nav.qtpl:46
//line views/nav.qtpl:27
}
//line views/nav.qtpl:48
//line views/nav.qtpl:29
func streamsiblingHyphaeHTML(qw422016 *qt422016.Writer, siblings string) {
//line views/nav.qtpl:48
//line views/nav.qtpl:29
qw422016.N().S(`
<aside class="sibling-hyphae layout-card">
<h2 class="sibling-hyphae__title layout-card__title">Sibling hyphae</h2>
`)
//line views/nav.qtpl:51
//line views/nav.qtpl:32
qw422016.N().S(siblings)
//line views/nav.qtpl:51
//line views/nav.qtpl:32
qw422016.N().S(`
</aside>
`)
//line views/nav.qtpl:53
//line views/nav.qtpl:34
}
//line views/nav.qtpl:53
//line views/nav.qtpl:34
func writesiblingHyphaeHTML(qq422016 qtio422016.Writer, siblings string) {
//line views/nav.qtpl:53
//line views/nav.qtpl:34
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/nav.qtpl:53
//line views/nav.qtpl:34
streamsiblingHyphaeHTML(qw422016, siblings)
//line views/nav.qtpl:53
//line views/nav.qtpl:34
qt422016.ReleaseWriter(qw422016)
//line views/nav.qtpl:53
//line views/nav.qtpl:34
}
//line views/nav.qtpl:53
//line views/nav.qtpl:34
func siblingHyphaeHTML(siblings string) string {
//line views/nav.qtpl:53
//line views/nav.qtpl:34
qb422016 := qt422016.AcquireByteBuffer()
//line views/nav.qtpl:53
//line views/nav.qtpl:34
writesiblingHyphaeHTML(qb422016, siblings)
//line views/nav.qtpl:53
//line views/nav.qtpl:34
qs422016 := string(qb422016.B)
//line views/nav.qtpl:53
//line views/nav.qtpl:34
qt422016.ReleaseByteBuffer(qb422016)
//line views/nav.qtpl:53
//line views/nav.qtpl:34
return qs422016
//line views/nav.qtpl:53
//line views/nav.qtpl:34
}
//line views/nav.qtpl:55
//line views/nav.qtpl:36
func StreamSubhyphaeHTML(qw422016 *qt422016.Writer, subhyphae string) {
//line views/nav.qtpl:55
//line views/nav.qtpl:36
qw422016.N().S(`
`)
//line views/nav.qtpl:56
//line views/nav.qtpl:37
if strings.TrimSpace(subhyphae) != "" {
//line views/nav.qtpl:56
//line views/nav.qtpl:37
qw422016.N().S(`
<section class="subhyphae">
<h2 class="subhyphae__title">Subhyphae</h2>
<nav class="subhyphae__nav">
<ul class="subhyphae__list">
`)
//line views/nav.qtpl:61
//line views/nav.qtpl:42
qw422016.N().S(subhyphae)
//line views/nav.qtpl:61
//line views/nav.qtpl:42
qw422016.N().S(`
</ul>
</nav>
</section>
`)
//line views/nav.qtpl:65
//line views/nav.qtpl:46
}
//line views/nav.qtpl:65
//line views/nav.qtpl:46
qw422016.N().S(`
`)
//line views/nav.qtpl:66
//line views/nav.qtpl:47
}
//line views/nav.qtpl:66
//line views/nav.qtpl:47
func WriteSubhyphaeHTML(qq422016 qtio422016.Writer, subhyphae string) {
//line views/nav.qtpl:66
//line views/nav.qtpl:47
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/nav.qtpl:66
//line views/nav.qtpl:47
StreamSubhyphaeHTML(qw422016, subhyphae)
//line views/nav.qtpl:66
//line views/nav.qtpl:47
qt422016.ReleaseWriter(qw422016)
//line views/nav.qtpl:66
//line views/nav.qtpl:47
}
//line views/nav.qtpl:66
//line views/nav.qtpl:47
func SubhyphaeHTML(subhyphae string) string {
//line views/nav.qtpl:66
//line views/nav.qtpl:47
qb422016 := qt422016.AcquireByteBuffer()
//line views/nav.qtpl:66
//line views/nav.qtpl:47
WriteSubhyphaeHTML(qb422016, subhyphae)
//line views/nav.qtpl:66
//line views/nav.qtpl:47
qs422016 := string(qb422016.B)
//line views/nav.qtpl:66
//line views/nav.qtpl:47
qt422016.ReleaseByteBuffer(qb422016)
//line views/nav.qtpl:66
//line views/nav.qtpl:47
return qs422016
//line views/nav.qtpl:66
//line views/nav.qtpl:47
}

View File

@ -11,7 +11,6 @@
{% import "github.com/bouncepaw/mycorrhiza/util" %}
{% func AttachmentMenuHTML(rq *http.Request, h *hyphae.Hypha, u *user.User) %}
{%= NavHTML(rq, h.Name, "attachment") %}
<div class="layout">
<main class="main-width attachment-tab">
<h1>Attachment of {%s util.BeautifulName(h.Name) %}</h1>
@ -80,10 +79,15 @@ If `contents` == "", a helpful message is shown instead.
siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name)
u := user.FromRequest(rq)
%}
{%= NavHTML(rq, h.Name, "hypha") %}
<div class="layout">
<main class="main-width">
<article>
<article id="hypha">
<div class="jump-btn">
<a class="jump-btn__link" href="#hypha-bottom">↓</a>
</div>
<div class="btn edit-btn">
<a class="edit-btn__link" href="/edit/{%s h.Name %}">Edit text</a>
</div>
{%s= NaviTitleHTML(h) %}
{% if h.Exists %}
{%s= contents %}
@ -100,6 +104,12 @@ If `contents` == "", a helpful message is shown instead.
{% endif %}
</section>
{%= SubhyphaeHTML(subhyphae) %}
<section id="hypha-bottom">
<div class="jump-btn">
<a class="jump-btn__link" href="#hypha">↑</a>
</div>
{%= hyphaInfo(rq, h) %}
</section>
</main>
{%= siblingHyphaeHTML(siblings) %}
</div>
@ -110,7 +120,6 @@ If `contents` == "", a helpful message is shown instead.
{% code
siblings, subhyphae, _, _ := tree.Tree(h.Name)
%}
{%= NavHTML(rq, h.Name, "revision", revHash) %}
<div class="layout">
<main class="main-width">
<article>

View File

@ -51,108 +51,103 @@ var (
func StreamAttachmentMenuHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, u *user.User) {
//line views/readers.qtpl:13
qw422016.N().S(`
`)
//line views/readers.qtpl:14
StreamNavHTML(qw422016, rq, h.Name, "attachment")
//line views/readers.qtpl:14
qw422016.N().S(`
<div class="layout">
<main class="main-width attachment-tab">
<h1>Attachment of `)
//line views/readers.qtpl:17
//line views/readers.qtpl:16
qw422016.E().S(util.BeautifulName(h.Name))
//line views/readers.qtpl:17
//line views/readers.qtpl:16
qw422016.N().S(`</h1>
`)
//line views/readers.qtpl:18
//line views/readers.qtpl:17
if h.BinaryPath == "" {
//line views/readers.qtpl:18
//line views/readers.qtpl:17
qw422016.N().S(`
<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>
`)
//line views/readers.qtpl:20
//line views/readers.qtpl:19
} else {
//line views/readers.qtpl:20
//line views/readers.qtpl:19
qw422016.N().S(`
<p class="explanation">You can manage the hypha's attachment on this page. <a href="/help/en/attachment" class="shy-link">What are attachments?</a></p>
`)
//line views/readers.qtpl:22
//line views/readers.qtpl:21
}
//line views/readers.qtpl:22
//line views/readers.qtpl:21
qw422016.N().S(`
<section class="amnt-grid">
`)
//line views/readers.qtpl:26
//line views/readers.qtpl:25
if h.BinaryPath != "" {
//line views/readers.qtpl:26
//line views/readers.qtpl:25
qw422016.N().S(`
`)
//line views/readers.qtpl:28
//line views/readers.qtpl:27
mime := mimetype.FromExtension(path.Ext(h.BinaryPath))
fileinfo, err := os.Stat(h.BinaryPath)
//line views/readers.qtpl:29
//line views/readers.qtpl:28
qw422016.N().S(`
`)
//line views/readers.qtpl:30
//line views/readers.qtpl:29
if err == nil {
//line views/readers.qtpl:30
//line views/readers.qtpl:29
qw422016.N().S(`
<fieldset class="amnt-menu-block">
<legend class="modal__title modal__title_small">Stat</legend>
<p class="modal__confirmation-msg"><b>File size:</b> `)
//line views/readers.qtpl:33
//line views/readers.qtpl:32
qw422016.N().DL(fileinfo.Size())
//line views/readers.qtpl:33
//line views/readers.qtpl:32
qw422016.N().S(` bytes</p>
<p><b>MIME type:</b> `)
//line views/readers.qtpl:34
//line views/readers.qtpl:33
qw422016.E().S(mime)
//line views/readers.qtpl:34
//line views/readers.qtpl:33
qw422016.N().S(`</p>
</fieldset>
`)
//line views/readers.qtpl:36
//line views/readers.qtpl:35
}
//line views/readers.qtpl:36
//line views/readers.qtpl:35
qw422016.N().S(`
`)
//line views/readers.qtpl:38
//line views/readers.qtpl:37
if strings.HasPrefix(mime, "image/") {
//line views/readers.qtpl:38
//line views/readers.qtpl:37
qw422016.N().S(`
<fieldset class="amnt-menu-block">
<legend class="modal__title modal__title_small">Include</legend>
<p class="modal__confirmation-msg">This attachment is an image. To include it n a hypha, use a syntax like this:</p>
<pre class="codebleck"><code>img { `)
//line views/readers.qtpl:42
//line views/readers.qtpl:41
qw422016.E().S(h.Name)
//line views/readers.qtpl:42
//line views/readers.qtpl:41
qw422016.N().S(` }</code></pre>
</fieldset>
`)
//line views/readers.qtpl:44
//line views/readers.qtpl:43
}
//line views/readers.qtpl:44
//line views/readers.qtpl:43
qw422016.N().S(`
`)
//line views/readers.qtpl:45
//line views/readers.qtpl:44
}
//line views/readers.qtpl:45
//line views/readers.qtpl:44
qw422016.N().S(`
`)
//line views/readers.qtpl:47
//line views/readers.qtpl:46
if u.CanProceed("upload-binary") {
//line views/readers.qtpl:47
//line views/readers.qtpl:46
qw422016.N().S(`
<form action="/upload-binary/`)
//line views/readers.qtpl:48
//line views/readers.qtpl:47
qw422016.E().S(h.Name)
//line views/readers.qtpl:48
//line views/readers.qtpl:47
qw422016.N().S(`"
method="post" enctype="multipart/form-data"
class="upload-binary modal amnt-menu-block">
@ -166,20 +161,20 @@ func StreamAttachmentMenuHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hy
</fieldset>
</form>
`)
//line views/readers.qtpl:60
//line views/readers.qtpl:59
}
//line views/readers.qtpl:60
//line views/readers.qtpl:59
qw422016.N().S(`
`)
//line views/readers.qtpl:62
//line views/readers.qtpl:61
if h.BinaryPath != "" && u.CanProceed("unattach-confirm") {
//line views/readers.qtpl:62
//line views/readers.qtpl:61
qw422016.N().S(`
<form action="/unattach-confirm/`)
//line views/readers.qtpl:63
//line views/readers.qtpl:62
qw422016.E().S(h.Name)
//line views/readers.qtpl:63
//line views/readers.qtpl:62
qw422016.N().S(`" method="post" class="modal amnt-menu-block">
<fieldset class="modal__fieldset">
<legend class="modal__title modal__title_small">Unattach</legend>
@ -188,305 +183,315 @@ func StreamAttachmentMenuHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hy
</fieldset>
</form>
`)
//line views/readers.qtpl:70
//line views/readers.qtpl:69
}
//line views/readers.qtpl:70
//line views/readers.qtpl:69
qw422016.N().S(`
</section>
</main>
</div>
`)
//line views/readers.qtpl:75
//line views/readers.qtpl:74
}
//line views/readers.qtpl:75
//line views/readers.qtpl:74
func WriteAttachmentMenuHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, u *user.User) {
//line views/readers.qtpl:75
//line views/readers.qtpl:74
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/readers.qtpl:75
//line views/readers.qtpl:74
StreamAttachmentMenuHTML(qw422016, rq, h, u)
//line views/readers.qtpl:75
//line views/readers.qtpl:74
qt422016.ReleaseWriter(qw422016)
//line views/readers.qtpl:75
//line views/readers.qtpl:74
}
//line views/readers.qtpl:75
//line views/readers.qtpl:74
func AttachmentMenuHTML(rq *http.Request, h *hyphae.Hypha, u *user.User) string {
//line views/readers.qtpl:75
//line views/readers.qtpl:74
qb422016 := qt422016.AcquireByteBuffer()
//line views/readers.qtpl:75
//line views/readers.qtpl:74
WriteAttachmentMenuHTML(qb422016, rq, h, u)
//line views/readers.qtpl:75
//line views/readers.qtpl:74
qs422016 := string(qb422016.B)
//line views/readers.qtpl:75
//line views/readers.qtpl:74
qt422016.ReleaseByteBuffer(qb422016)
//line views/readers.qtpl:75
//line views/readers.qtpl:74
return qs422016
//line views/readers.qtpl:75
//line views/readers.qtpl:74
}
// If `contents` == "", a helpful message is shown instead.
//line views/readers.qtpl:78
//line views/readers.qtpl:77
func StreamHyphaHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, contents string) {
//line views/readers.qtpl:78
//line views/readers.qtpl:77
qw422016.N().S(`
`)
//line views/readers.qtpl:80
//line views/readers.qtpl:79
siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name)
u := user.FromRequest(rq)
//line views/readers.qtpl:82
qw422016.N().S(`
`)
//line views/readers.qtpl:83
StreamNavHTML(qw422016, rq, h.Name, "hypha")
//line views/readers.qtpl:83
//line views/readers.qtpl:81
qw422016.N().S(`
<div class="layout">
<main class="main-width">
<article>
<article id="hypha">
<div class="jump-btn">
<a class="jump-btn__link" href="#hypha-bottom"></a>
</div>
<div class="btn edit-btn">
<a class="edit-btn__link" href="/edit/`)
//line views/readers.qtpl:89
qw422016.E().S(h.Name)
//line views/readers.qtpl:89
qw422016.N().S(`">Edit text</a>
</div>
`)
//line views/readers.qtpl:87
//line views/readers.qtpl:91
qw422016.N().S(NaviTitleHTML(h))
//line views/readers.qtpl:87
//line views/readers.qtpl:91
qw422016.N().S(`
`)
//line views/readers.qtpl:88
//line views/readers.qtpl:92
if h.Exists {
//line views/readers.qtpl:88
//line views/readers.qtpl:92
qw422016.N().S(`
`)
//line views/readers.qtpl:89
//line views/readers.qtpl:93
qw422016.N().S(contents)
//line views/readers.qtpl:89
//line views/readers.qtpl:93
qw422016.N().S(`
`)
//line views/readers.qtpl:90
//line views/readers.qtpl:94
} else {
//line views/readers.qtpl:90
//line views/readers.qtpl:94
qw422016.N().S(`
`)
//line views/readers.qtpl:91
//line views/readers.qtpl:95
streamnonExistentHyphaNotice(qw422016, h, u)
//line views/readers.qtpl:91
//line views/readers.qtpl:95
qw422016.N().S(`
`)
//line views/readers.qtpl:92
//line views/readers.qtpl:96
}
//line views/readers.qtpl:92
//line views/readers.qtpl:96
qw422016.N().S(`
</article>
<section class="prevnext">
`)
//line views/readers.qtpl:95
//line views/readers.qtpl:99
if prevHyphaName != "" {
//line views/readers.qtpl:95
//line views/readers.qtpl:99
qw422016.N().S(`
<a class="prevnext__el prevnext__prev" href="/hypha/`)
//line views/readers.qtpl:96
//line views/readers.qtpl:100
qw422016.E().S(prevHyphaName)
//line views/readers.qtpl:96
//line views/readers.qtpl:100
qw422016.N().S(`" rel="prev">← `)
//line views/readers.qtpl:96
//line views/readers.qtpl:100
qw422016.E().S(util.BeautifulName(path.Base(prevHyphaName)))
//line views/readers.qtpl:96
//line views/readers.qtpl:100
qw422016.N().S(`</a>
`)
//line views/readers.qtpl:97
//line views/readers.qtpl:101
}
//line views/readers.qtpl:97
//line views/readers.qtpl:101
qw422016.N().S(`
`)
//line views/readers.qtpl:98
//line views/readers.qtpl:102
if nextHyphaName != "" {
//line views/readers.qtpl:98
//line views/readers.qtpl:102
qw422016.N().S(`
<a class="prevnext__el prevnext__next" href="/hypha/`)
//line views/readers.qtpl:99
//line views/readers.qtpl:103
qw422016.E().S(nextHyphaName)
//line views/readers.qtpl:99
//line views/readers.qtpl:103
qw422016.N().S(`" rel="next">`)
//line views/readers.qtpl:99
//line views/readers.qtpl:103
qw422016.E().S(util.BeautifulName(path.Base(nextHyphaName)))
//line views/readers.qtpl:99
//line views/readers.qtpl:103
qw422016.N().S(` </a>
`)
//line views/readers.qtpl:100
//line views/readers.qtpl:104
}
//line views/readers.qtpl:100
//line views/readers.qtpl:104
qw422016.N().S(`
</section>
`)
//line views/readers.qtpl:102
//line views/readers.qtpl:106
StreamSubhyphaeHTML(qw422016, subhyphae)
//line views/readers.qtpl:102
//line views/readers.qtpl:106
qw422016.N().S(`
<section id="hypha-bottom">
<div class="jump-btn">
<a class="jump-btn__link" href="#hypha"></a>
</div>
`)
//line views/readers.qtpl:111
streamhyphaInfo(qw422016, rq, h)
//line views/readers.qtpl:111
qw422016.N().S(`
</section>
</main>
`)
//line views/readers.qtpl:104
//line views/readers.qtpl:114
streamsiblingHyphaeHTML(qw422016, siblings)
//line views/readers.qtpl:104
//line views/readers.qtpl:114
qw422016.N().S(`
</div>
`)
//line views/readers.qtpl:106
//line views/readers.qtpl:116
streamviewScripts(qw422016)
//line views/readers.qtpl:106
//line views/readers.qtpl:116
qw422016.N().S(`
`)
//line views/readers.qtpl:107
//line views/readers.qtpl:117
}
//line views/readers.qtpl:107
//line views/readers.qtpl:117
func WriteHyphaHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, contents string) {
//line views/readers.qtpl:107
//line views/readers.qtpl:117
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/readers.qtpl:107
//line views/readers.qtpl:117
StreamHyphaHTML(qw422016, rq, h, contents)
//line views/readers.qtpl:107
//line views/readers.qtpl:117
qt422016.ReleaseWriter(qw422016)
//line views/readers.qtpl:107
//line views/readers.qtpl:117
}
//line views/readers.qtpl:107
//line views/readers.qtpl:117
func HyphaHTML(rq *http.Request, h *hyphae.Hypha, contents string) string {
//line views/readers.qtpl:107
//line views/readers.qtpl:117
qb422016 := qt422016.AcquireByteBuffer()
//line views/readers.qtpl:107
//line views/readers.qtpl:117
WriteHyphaHTML(qb422016, rq, h, contents)
//line views/readers.qtpl:107
//line views/readers.qtpl:117
qs422016 := string(qb422016.B)
//line views/readers.qtpl:107
//line views/readers.qtpl:117
qt422016.ReleaseByteBuffer(qb422016)
//line views/readers.qtpl:107
//line views/readers.qtpl:117
return qs422016
//line views/readers.qtpl:107
//line views/readers.qtpl:117
}
//line views/readers.qtpl:109
//line views/readers.qtpl:119
func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, contents, revHash string) {
//line views/readers.qtpl:109
//line views/readers.qtpl:119
qw422016.N().S(`
`)
//line views/readers.qtpl:111
//line views/readers.qtpl:121
siblings, subhyphae, _, _ := tree.Tree(h.Name)
//line views/readers.qtpl:112
qw422016.N().S(`
`)
//line views/readers.qtpl:113
StreamNavHTML(qw422016, rq, h.Name, "revision", revHash)
//line views/readers.qtpl:113
//line views/readers.qtpl:122
qw422016.N().S(`
<div class="layout">
<main class="main-width">
<article>
<p>Please note that viewing attachments of hyphae is not supported in history for now.</p>
`)
//line views/readers.qtpl:118
//line views/readers.qtpl:127
qw422016.N().S(NaviTitleHTML(h))
//line views/readers.qtpl:118
//line views/readers.qtpl:127
qw422016.N().S(`
`)
//line views/readers.qtpl:119
//line views/readers.qtpl:128
qw422016.N().S(contents)
//line views/readers.qtpl:119
//line views/readers.qtpl:128
qw422016.N().S(`
</article>
`)
//line views/readers.qtpl:121
//line views/readers.qtpl:130
StreamSubhyphaeHTML(qw422016, subhyphae)
//line views/readers.qtpl:121
//line views/readers.qtpl:130
qw422016.N().S(`
</main>
`)
//line views/readers.qtpl:123
//line views/readers.qtpl:132
streamsiblingHyphaeHTML(qw422016, siblings)
//line views/readers.qtpl:123
//line views/readers.qtpl:132
qw422016.N().S(`
</div>
`)
//line views/readers.qtpl:125
//line views/readers.qtpl:134
streamviewScripts(qw422016)
//line views/readers.qtpl:125
//line views/readers.qtpl:134
qw422016.N().S(`
`)
//line views/readers.qtpl:126
//line views/readers.qtpl:135
}
//line views/readers.qtpl:126
//line views/readers.qtpl:135
func WriteRevisionHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, contents, revHash string) {
//line views/readers.qtpl:126
//line views/readers.qtpl:135
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/readers.qtpl:126
//line views/readers.qtpl:135
StreamRevisionHTML(qw422016, rq, h, contents, revHash)
//line views/readers.qtpl:126
//line views/readers.qtpl:135
qt422016.ReleaseWriter(qw422016)
//line views/readers.qtpl:126
//line views/readers.qtpl:135
}
//line views/readers.qtpl:126
//line views/readers.qtpl:135
func RevisionHTML(rq *http.Request, h *hyphae.Hypha, contents, revHash string) string {
//line views/readers.qtpl:126
//line views/readers.qtpl:135
qb422016 := qt422016.AcquireByteBuffer()
//line views/readers.qtpl:126
//line views/readers.qtpl:135
WriteRevisionHTML(qb422016, rq, h, contents, revHash)
//line views/readers.qtpl:126
//line views/readers.qtpl:135
qs422016 := string(qb422016.B)
//line views/readers.qtpl:126
//line views/readers.qtpl:135
qt422016.ReleaseByteBuffer(qb422016)
//line views/readers.qtpl:126
//line views/readers.qtpl:135
return qs422016
//line views/readers.qtpl:126
//line views/readers.qtpl:135
}
//line views/readers.qtpl:128
//line views/readers.qtpl:137
func streamviewScripts(qw422016 *qt422016.Writer) {
//line views/readers.qtpl:128
//line views/readers.qtpl:137
qw422016.N().S(`
`)
//line views/readers.qtpl:129
//line views/readers.qtpl:138
for _, scriptPath := range cfg.ViewScripts {
//line views/readers.qtpl:129
//line views/readers.qtpl:138
qw422016.N().S(`
<script src="`)
//line views/readers.qtpl:130
//line views/readers.qtpl:139
qw422016.E().S(scriptPath)
//line views/readers.qtpl:130
//line views/readers.qtpl:139
qw422016.N().S(`"></script>
`)
//line views/readers.qtpl:131
//line views/readers.qtpl:140
}
//line views/readers.qtpl:131
//line views/readers.qtpl:140
qw422016.N().S(`
`)
//line views/readers.qtpl:132
//line views/readers.qtpl:141
}
//line views/readers.qtpl:132
//line views/readers.qtpl:141
func writeviewScripts(qq422016 qtio422016.Writer) {
//line views/readers.qtpl:132
//line views/readers.qtpl:141
qw422016 := qt422016.AcquireWriter(qq422016)
//line views/readers.qtpl:132
//line views/readers.qtpl:141
streamviewScripts(qw422016)
//line views/readers.qtpl:132
//line views/readers.qtpl:141
qt422016.ReleaseWriter(qw422016)
//line views/readers.qtpl:132
//line views/readers.qtpl:141
}
//line views/readers.qtpl:132
//line views/readers.qtpl:141
func viewScripts() string {
//line views/readers.qtpl:132
//line views/readers.qtpl:141
qb422016 := qt422016.AcquireByteBuffer()
//line views/readers.qtpl:132
//line views/readers.qtpl:141
writeviewScripts(qb422016)
//line views/readers.qtpl:132
//line views/readers.qtpl:141
qs422016 := string(qb422016.B)
//line views/readers.qtpl:132
//line views/readers.qtpl:141
qt422016.ReleaseByteBuffer(qb422016)
//line views/readers.qtpl:132
//line views/readers.qtpl:141
return qs422016
//line views/readers.qtpl:132
//line views/readers.qtpl:141
}