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:
parent
9eae5e6256
commit
f54cfe44ff
@ -29,6 +29,11 @@ func (h *Hypha) TextPartPath() string {
|
|||||||
return h.TextPath
|
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 byNames = make(map[string]*Hypha)
|
||||||
var byNamesMutex = sync.Mutex{}
|
var byNamesMutex = sync.Mutex{}
|
||||||
|
|
||||||
|
@ -22,13 +22,6 @@
|
|||||||
.layout { display: grid; row-gap: 1rem; }
|
.layout { display: grid; row-gap: 1rem; }
|
||||||
header { width: 100%; margin-bottom: 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; }
|
.layout-card li { list-style-type: none; }
|
||||||
.backlinks__list { padding: 0; margin: 0; }
|
.backlinks__list { padding: 0; margin: 0; }
|
||||||
.backlinks__link { text-decoration: none; display: block; padding: .25rem; padding-left: 1.25rem; }
|
.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; }
|
.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) {
|
@media screen and (min-width: 801px) {
|
||||||
.main-width { padding: 1rem 2rem; width: 800px; margin: 0 auto; }
|
.main-width { padding: 1rem 2rem; width: 800px; margin: 0 auto; }
|
||||||
main { border-radius: .25rem; }
|
main { border-radius: .25rem; }
|
||||||
.layout-card { width: 800px; margin: 0 auto; }
|
.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; }
|
.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) {
|
@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; }
|
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 { 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 { font-size: 1rem; margin: 0; padding: .25rem .5rem; border-radius: .25rem .25rem 0 0; }
|
||||||
.layout-card__title { border-bottom: 1px solid #eee; }
|
.layout-card__title { border-bottom: 1px solid #eee; }
|
||||||
@ -248,7 +225,7 @@ td { border: #ddd 1px solid; }
|
|||||||
/* Dark theme! */
|
/* Dark theme! */
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
html { background: #222; color: #ddd; }
|
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, .wikilink_external { color: #f1fa8c; }
|
||||||
a:visited, .wikilink_external:visited { color: #ffb86c; }
|
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; }
|
.prevnext__el, .prevnext__el:visited { color: #ddd; }
|
||||||
|
|
||||||
.hypha-tabs__tab a, .hypha-tabs__tab { color: #ddd; background-color: #232323; border: 0; }
|
.layout-card__title { background-color: #343434; }
|
||||||
.layout-card__title, .hypha-tabs__tab_active { background-color: #343434; }
|
|
||||||
|
|
||||||
.transclusion .transclusion__link, a.shy-link { color: #ddd; }
|
.transclusion .transclusion__link, a.shy-link { color: #ddd; }
|
||||||
|
|
||||||
@ -279,10 +255,6 @@ table { border: 0; background-color: #444444; color: #ddd; }
|
|||||||
.transclusion code,
|
.transclusion code,
|
||||||
.transclusion .codeblock { background-color: #454545; }
|
.transclusion .codeblock { background-color: #454545; }
|
||||||
mark { background: rgba(130, 80, 30, 5); color: inherit; }
|
mark { background: rgba(130, 80, 30, 5); color: inherit; }
|
||||||
@media screen and (max-width: 800px) {
|
|
||||||
.hypha-tabs a,
|
|
||||||
.hypha-tabs { background-color: #343434; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
kbd {
|
kbd {
|
||||||
@ -777,4 +749,59 @@ kbd {
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
border: 1px solid #999;
|
border: 1px solid #999;
|
||||||
border-radius: 1rem;
|
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;
|
||||||
}
|
}
|
@ -16,7 +16,6 @@ if err != nil {
|
|||||||
text = err.Error()
|
text = err.Error()
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
{%= NavHTML(rq, h.Name, "history") %}
|
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<main class="main-width">
|
<main class="main-width">
|
||||||
<article>
|
<article>
|
||||||
@ -112,7 +111,6 @@ if err != nil {
|
|||||||
{% endfunc %}
|
{% endfunc %}
|
||||||
|
|
||||||
{% func HistoryHTML(rq *http.Request, hyphaName, list string) %}
|
{% func HistoryHTML(rq *http.Request, hyphaName, list string) %}
|
||||||
{%= NavHTML(rq, hyphaName, "history") %}
|
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<main class="main-width">
|
<main class="main-width">
|
||||||
<article class="history">
|
<article class="history">
|
||||||
|
@ -54,64 +54,59 @@ func StreamPrimitiveDiffHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyp
|
|||||||
|
|
||||||
//line views/history.qtpl:18
|
//line views/history.qtpl:18
|
||||||
qw422016.N().S(`
|
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">
|
<div class="layout">
|
||||||
<main class="main-width">
|
<main class="main-width">
|
||||||
<article>
|
<article>
|
||||||
<h1>Diff `)
|
<h1>Diff `)
|
||||||
//line views/history.qtpl:23
|
//line views/history.qtpl:22
|
||||||
qw422016.E().S(util.BeautifulName(h.Name))
|
qw422016.E().S(util.BeautifulName(h.Name))
|
||||||
//line views/history.qtpl:23
|
//line views/history.qtpl:22
|
||||||
qw422016.N().S(` at `)
|
qw422016.N().S(` at `)
|
||||||
//line views/history.qtpl:23
|
//line views/history.qtpl:22
|
||||||
qw422016.E().S(hash)
|
qw422016.E().S(hash)
|
||||||
//line views/history.qtpl:23
|
//line views/history.qtpl:22
|
||||||
qw422016.N().S(`</h1>
|
qw422016.N().S(`</h1>
|
||||||
<pre class="codeblock"><code>`)
|
<pre class="codeblock"><code>`)
|
||||||
//line views/history.qtpl:24
|
//line views/history.qtpl:23
|
||||||
qw422016.E().S(text)
|
qw422016.E().S(text)
|
||||||
//line views/history.qtpl:24
|
//line views/history.qtpl:23
|
||||||
qw422016.N().S(`</code></pre>
|
qw422016.N().S(`</code></pre>
|
||||||
</article>
|
</article>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</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) {
|
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)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/history.qtpl:28
|
//line views/history.qtpl:27
|
||||||
StreamPrimitiveDiffHTML(qw422016, rq, h, u, hash)
|
StreamPrimitiveDiffHTML(qw422016, rq, h, u, hash)
|
||||||
//line views/history.qtpl:28
|
//line views/history.qtpl:27
|
||||||
qt422016.ReleaseWriter(qw422016)
|
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 {
|
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()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/history.qtpl:28
|
//line views/history.qtpl:27
|
||||||
WritePrimitiveDiffHTML(qb422016, rq, h, u, hash)
|
WritePrimitiveDiffHTML(qb422016, rq, h, u, hash)
|
||||||
//line views/history.qtpl:28
|
//line views/history.qtpl:27
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/history.qtpl:28
|
//line views/history.qtpl:27
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/history.qtpl:28
|
//line views/history.qtpl:27
|
||||||
return qs422016
|
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) {
|
func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int) {
|
||||||
//line views/history.qtpl:30
|
//line views/history.qtpl:29
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<main class="main-width recent-changes">
|
<main class="main-width recent-changes">
|
||||||
@ -120,54 +115,54 @@ func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int) {
|
|||||||
<nav class="recent-changes__count">
|
<nav class="recent-changes__count">
|
||||||
See
|
See
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:37
|
//line views/history.qtpl:36
|
||||||
for i, m := range []int{20, 50, 100} {
|
for i, m := range []int{20, 50, 100} {
|
||||||
//line views/history.qtpl:37
|
//line views/history.qtpl:36
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:38
|
//line views/history.qtpl:37
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
//line views/history.qtpl:38
|
//line views/history.qtpl:37
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<span aria-hidden="true">|</span>
|
<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(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:41
|
//line views/history.qtpl:40
|
||||||
if m == n {
|
if m == n {
|
||||||
//line views/history.qtpl:41
|
//line views/history.qtpl:40
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<b>`)
|
<b>`)
|
||||||
//line views/history.qtpl:42
|
//line views/history.qtpl:41
|
||||||
qw422016.N().D(m)
|
qw422016.N().D(m)
|
||||||
//line views/history.qtpl:42
|
//line views/history.qtpl:41
|
||||||
qw422016.N().S(`</b>
|
qw422016.N().S(`</b>
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:43
|
//line views/history.qtpl:42
|
||||||
} else {
|
} else {
|
||||||
//line views/history.qtpl:43
|
//line views/history.qtpl:42
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<a href="/recent-changes/`)
|
<a href="/recent-changes/`)
|
||||||
//line views/history.qtpl:44
|
//line views/history.qtpl:43
|
||||||
qw422016.N().D(m)
|
qw422016.N().D(m)
|
||||||
//line views/history.qtpl:44
|
//line views/history.qtpl:43
|
||||||
qw422016.N().S(`">`)
|
qw422016.N().S(`">`)
|
||||||
//line views/history.qtpl:44
|
//line views/history.qtpl:43
|
||||||
qw422016.N().D(m)
|
qw422016.N().D(m)
|
||||||
//line views/history.qtpl:44
|
//line views/history.qtpl:43
|
||||||
qw422016.N().S(`</a>
|
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(`
|
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(`
|
qw422016.N().S(`
|
||||||
recent changes
|
recent changes
|
||||||
</nav>
|
</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>
|
<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(`
|
qw422016.N().S(`
|
||||||
|
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:60
|
//line views/history.qtpl:59
|
||||||
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:63
|
//line views/history.qtpl:62
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<section class="recent-changes__list" role="feed">
|
<section class="recent-changes__list" role="feed">
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:65
|
//line views/history.qtpl:64
|
||||||
if len(changes) == 0 {
|
if len(changes) == 0 {
|
||||||
//line views/history.qtpl:65
|
//line views/history.qtpl:64
|
||||||
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:67
|
//line views/history.qtpl:66
|
||||||
} else {
|
} else {
|
||||||
//line views/history.qtpl:67
|
//line views/history.qtpl:66
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:68
|
//line views/history.qtpl:67
|
||||||
for i, entry := range changes {
|
for i, entry := range changes {
|
||||||
//line views/history.qtpl:68
|
//line views/history.qtpl:67
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
|
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:70
|
//line views/history.qtpl:69
|
||||||
y, m, d := entry.Time.UTC().Date()
|
y, m, d := entry.Time.UTC().Date()
|
||||||
|
|
||||||
//line views/history.qtpl:70
|
//line views/history.qtpl:69
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:71
|
//line views/history.qtpl:70
|
||||||
if d != day || m != month || y != year {
|
if d != day || m != month || y != year {
|
||||||
//line views/history.qtpl:71
|
//line views/history.qtpl:70
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<h2 class="recent-changes__heading">
|
<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))
|
qw422016.E().S(fmt.Sprintf("%04d-%02d-%02d", y, m, d))
|
||||||
//line views/history.qtpl:73
|
//line views/history.qtpl:72
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</h2>
|
</h2>
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:75
|
//line views/history.qtpl:74
|
||||||
year, month, day = y, m, d
|
year, month, day = y, m, d
|
||||||
|
|
||||||
//line views/history.qtpl:75
|
//line views/history.qtpl:74
|
||||||
qw422016.N().S(`
|
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(`
|
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:79
|
//line views/history.qtpl:78
|
||||||
qw422016.N().D(n)
|
qw422016.N().D(n)
|
||||||
//line views/history.qtpl:79
|
//line views/history.qtpl:78
|
||||||
qw422016.N().S(`" aria-posinset="`)
|
qw422016.N().S(`" aria-posinset="`)
|
||||||
//line views/history.qtpl:79
|
//line views/history.qtpl:78
|
||||||
qw422016.N().D(i)
|
qw422016.N().D(i)
|
||||||
//line views/history.qtpl:79
|
//line views/history.qtpl:78
|
||||||
qw422016.N().S(`">
|
qw422016.N().S(`">
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:80
|
//line views/history.qtpl:79
|
||||||
qw422016.N().S(recentChangesEntry(entry))
|
qw422016.N().S(recentChangesEntry(entry))
|
||||||
//line views/history.qtpl:80
|
//line views/history.qtpl:79
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
`)
|
`)
|
||||||
//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
|
||||||
}
|
}
|
||||||
//line views/history.qtpl:84
|
//line views/history.qtpl:83
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:85
|
//line views/history.qtpl:84
|
||||||
qw422016.N().S(helpTopicBadgeHTML("en", "recent_changes"))
|
qw422016.N().S(helpTopicBadgeHTML("en", "recent_changes"))
|
||||||
//line views/history.qtpl:85
|
//line views/history.qtpl:84
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</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) {
|
func WriteRecentChangesHTML(qq422016 qtio422016.Writer, n int) {
|
||||||
//line views/history.qtpl:89
|
//line views/history.qtpl:88
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/history.qtpl:89
|
//line views/history.qtpl:88
|
||||||
StreamRecentChangesHTML(qw422016, n)
|
StreamRecentChangesHTML(qw422016, n)
|
||||||
//line views/history.qtpl:89
|
//line views/history.qtpl:88
|
||||||
qt422016.ReleaseWriter(qw422016)
|
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 {
|
func RecentChangesHTML(n int) string {
|
||||||
//line views/history.qtpl:89
|
//line views/history.qtpl:88
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/history.qtpl:89
|
//line views/history.qtpl:88
|
||||||
WriteRecentChangesHTML(qb422016, n)
|
WriteRecentChangesHTML(qb422016, n)
|
||||||
//line views/history.qtpl:89
|
//line views/history.qtpl:88
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/history.qtpl:89
|
//line views/history.qtpl:88
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/history.qtpl:89
|
//line views/history.qtpl:88
|
||||||
return qs422016
|
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) {
|
func streamrecentChangesEntry(qw422016 *qt422016.Writer, rev history.Revision) {
|
||||||
//line views/history.qtpl:91
|
//line views/history.qtpl:90
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<div>
|
<div>
|
||||||
<time class="recent-changes__entry__time">
|
<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"))
|
qw422016.E().S(rev.Time.UTC().Format("15:04 UTC"))
|
||||||
//line views/history.qtpl:94
|
//line views/history.qtpl:93
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</time>
|
</time>
|
||||||
<span class="recent-changes__entry__message">`)
|
<span class="recent-changes__entry__message">`)
|
||||||
//line views/history.qtpl:96
|
//line views/history.qtpl:95
|
||||||
qw422016.E().S(rev.Hash)
|
qw422016.E().S(rev.Hash)
|
||||||
//line views/history.qtpl:96
|
//line views/history.qtpl:95
|
||||||
qw422016.N().S(`</span>
|
qw422016.N().S(`</span>
|
||||||
|
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:98
|
//line views/history.qtpl:97
|
||||||
if rev.Username != "anon" {
|
if rev.Username != "anon" {
|
||||||
//line views/history.qtpl:98
|
//line views/history.qtpl:97
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<span class="recent-changes__entry__author">
|
<span class="recent-changes__entry__author">
|
||||||
— <a href="/hypha/`)
|
— <a href="/hypha/`)
|
||||||
//line views/history.qtpl:100
|
//line views/history.qtpl:99
|
||||||
qw422016.E().S(cfg.UserHypha)
|
qw422016.E().S(cfg.UserHypha)
|
||||||
//line views/history.qtpl:100
|
//line views/history.qtpl:99
|
||||||
qw422016.N().S(`/`)
|
qw422016.N().S(`/`)
|
||||||
//line views/history.qtpl:100
|
//line views/history.qtpl:99
|
||||||
qw422016.E().S(rev.Username)
|
qw422016.E().S(rev.Username)
|
||||||
//line views/history.qtpl:100
|
//line views/history.qtpl:99
|
||||||
qw422016.N().S(`" rel="author">`)
|
qw422016.N().S(`" rel="author">`)
|
||||||
//line views/history.qtpl:100
|
//line views/history.qtpl:99
|
||||||
qw422016.E().S(rev.Username)
|
qw422016.E().S(rev.Username)
|
||||||
//line views/history.qtpl:100
|
//line views/history.qtpl:99
|
||||||
qw422016.N().S(`</a>
|
qw422016.N().S(`</a>
|
||||||
</span>
|
</span>
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:102
|
//line views/history.qtpl:101
|
||||||
}
|
}
|
||||||
//line views/history.qtpl:102
|
//line views/history.qtpl:101
|
||||||
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:106
|
//line views/history.qtpl:105
|
||||||
qw422016.N().S(rev.HyphaeLinksHTML())
|
qw422016.N().S(rev.HyphaeLinksHTML())
|
||||||
//line views/history.qtpl:106
|
//line views/history.qtpl:105
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</span>
|
</span>
|
||||||
<span class="recent-changes__entry__message">
|
<span class="recent-changes__entry__message">
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:109
|
//line views/history.qtpl:108
|
||||||
qw422016.E().S(rev.Message)
|
qw422016.E().S(rev.Message)
|
||||||
//line views/history.qtpl:109
|
//line views/history.qtpl:108
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</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) {
|
func writerecentChangesEntry(qq422016 qtio422016.Writer, rev history.Revision) {
|
||||||
//line views/history.qtpl:112
|
//line views/history.qtpl:111
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/history.qtpl:112
|
//line views/history.qtpl:111
|
||||||
streamrecentChangesEntry(qw422016, rev)
|
streamrecentChangesEntry(qw422016, rev)
|
||||||
//line views/history.qtpl:112
|
//line views/history.qtpl:111
|
||||||
qt422016.ReleaseWriter(qw422016)
|
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 {
|
func recentChangesEntry(rev history.Revision) string {
|
||||||
//line views/history.qtpl:112
|
//line views/history.qtpl:111
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/history.qtpl:112
|
//line views/history.qtpl:111
|
||||||
writerecentChangesEntry(qb422016, rev)
|
writerecentChangesEntry(qb422016, rev)
|
||||||
//line views/history.qtpl:112
|
//line views/history.qtpl:111
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/history.qtpl:112
|
//line views/history.qtpl:111
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/history.qtpl:112
|
//line views/history.qtpl:111
|
||||||
return qs422016
|
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) {
|
func StreamHistoryHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, list string) {
|
||||||
//line views/history.qtpl:114
|
//line views/history.qtpl:113
|
||||||
qw422016.N().S(`
|
|
||||||
`)
|
|
||||||
//line views/history.qtpl:115
|
|
||||||
StreamNavHTML(qw422016, rq, hyphaName, "history")
|
|
||||||
//line views/history.qtpl:115
|
|
||||||
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:119
|
//line views/history.qtpl:117
|
||||||
qw422016.E().S(util.BeautifulName(hyphaName))
|
qw422016.E().S(util.BeautifulName(hyphaName))
|
||||||
//line views/history.qtpl:119
|
//line views/history.qtpl:117
|
||||||
qw422016.N().S(`</h1>
|
qw422016.N().S(`</h1>
|
||||||
`)
|
`)
|
||||||
//line views/history.qtpl:120
|
//line views/history.qtpl:118
|
||||||
qw422016.N().S(list)
|
qw422016.N().S(list)
|
||||||
//line views/history.qtpl:120
|
//line views/history.qtpl:118
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</article>
|
</article>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</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) {
|
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)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/history.qtpl:124
|
//line views/history.qtpl:122
|
||||||
StreamHistoryHTML(qw422016, rq, hyphaName, list)
|
StreamHistoryHTML(qw422016, rq, hyphaName, list)
|
||||||
//line views/history.qtpl:124
|
//line views/history.qtpl:122
|
||||||
qt422016.ReleaseWriter(qw422016)
|
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 {
|
func HistoryHTML(rq *http.Request, hyphaName, list string) string {
|
||||||
//line views/history.qtpl:124
|
//line views/history.qtpl:122
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/history.qtpl:124
|
//line views/history.qtpl:122
|
||||||
WriteHistoryHTML(qb422016, rq, hyphaName, list)
|
WriteHistoryHTML(qb422016, rq, hyphaName, list)
|
||||||
//line views/history.qtpl:124
|
//line views/history.qtpl:122
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/history.qtpl:124
|
//line views/history.qtpl:122
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/history.qtpl:124
|
//line views/history.qtpl:122
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/history.qtpl:124
|
//line views/history.qtpl:122
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
{% import "github.com/bouncepaw/mycorrhiza/util" %}
|
{% import "github.com/bouncepaw/mycorrhiza/util" %}
|
||||||
|
|
||||||
{% func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) %}
|
{% func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) %}
|
||||||
{%= NavHTML(rq, hyphaName, "delete-ask") %}
|
|
||||||
{%= modalBegin(
|
{%= modalBegin(
|
||||||
"delete-confirm",
|
"delete-confirm",
|
||||||
hyphaName,
|
hyphaName,
|
||||||
@ -14,7 +13,6 @@
|
|||||||
{% endfunc %}
|
{% endfunc %}
|
||||||
|
|
||||||
{% func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) %}
|
{% func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) %}
|
||||||
{%= NavHTML(rq, hyphaName, "unattach-ask") %}
|
|
||||||
{%= modalBegin(
|
{%= modalBegin(
|
||||||
"unattach",
|
"unattach",
|
||||||
hyphaName,
|
hyphaName,
|
||||||
@ -25,7 +23,6 @@
|
|||||||
{% endfunc %}
|
{% endfunc %}
|
||||||
|
|
||||||
{% func RenameAskHTML(rq *http.Request, hyphaName string, isOld bool) %}
|
{% func RenameAskHTML(rq *http.Request, hyphaName string, isOld bool) %}
|
||||||
{%= NavHTML(rq, hyphaName, "rename-ask") %}
|
|
||||||
{%= modalBegin(
|
{%= modalBegin(
|
||||||
"rename-confirm",
|
"rename-confirm",
|
||||||
hyphaName,
|
hyphaName,
|
||||||
|
@ -29,140 +29,125 @@ func StreamDeleteAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName
|
|||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/modal.qtpl:5
|
//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,
|
streammodalBegin(qw422016,
|
||||||
"delete-confirm",
|
"delete-confirm",
|
||||||
hyphaName,
|
hyphaName,
|
||||||
"",
|
"",
|
||||||
"Delete "+util.BeautifulName(hyphaName)+"?")
|
"Delete "+util.BeautifulName(hyphaName)+"?")
|
||||||
//line views/modal.qtpl:10
|
//line views/modal.qtpl:9
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/modal.qtpl:11
|
//line views/modal.qtpl:10
|
||||||
streammodalReallyWant(qw422016, hyphaName, "unattach")
|
streammodalReallyWant(qw422016, hyphaName, "unattach")
|
||||||
//line views/modal.qtpl:11
|
//line views/modal.qtpl:10
|
||||||
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:13
|
//line views/modal.qtpl:12
|
||||||
streammodalEnd(qw422016, hyphaName, true)
|
streammodalEnd(qw422016, hyphaName, true)
|
||||||
|
//line views/modal.qtpl:12
|
||||||
|
qw422016.N().S(`
|
||||||
|
`)
|
||||||
//line views/modal.qtpl:13
|
//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) {
|
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)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/modal.qtpl:14
|
//line views/modal.qtpl:13
|
||||||
StreamDeleteAskHTML(qw422016, rq, hyphaName, isOld)
|
StreamDeleteAskHTML(qw422016, rq, hyphaName, isOld)
|
||||||
//line views/modal.qtpl:14
|
//line views/modal.qtpl:13
|
||||||
qt422016.ReleaseWriter(qw422016)
|
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 {
|
func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
|
||||||
//line views/modal.qtpl:14
|
//line views/modal.qtpl:13
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/modal.qtpl:14
|
//line views/modal.qtpl:13
|
||||||
WriteDeleteAskHTML(qb422016, rq, hyphaName, isOld)
|
WriteDeleteAskHTML(qb422016, rq, hyphaName, isOld)
|
||||||
//line views/modal.qtpl:14
|
//line views/modal.qtpl:13
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/modal.qtpl:14
|
//line views/modal.qtpl:13
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/modal.qtpl:14
|
//line views/modal.qtpl:13
|
||||||
return qs422016
|
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) {
|
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
|
//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,
|
streammodalBegin(qw422016,
|
||||||
"unattach",
|
"unattach",
|
||||||
hyphaName,
|
hyphaName,
|
||||||
"",
|
"",
|
||||||
"Unattach "+util.BeautifulName(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
|
//line views/modal.qtpl:22
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/modal.qtpl:23
|
//line views/modal.qtpl:23
|
||||||
streammodalReallyWant(qw422016, hyphaName, "unattach")
|
}
|
||||||
|
|
||||||
//line views/modal.qtpl:23
|
//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) {
|
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)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/modal.qtpl:25
|
//line views/modal.qtpl:23
|
||||||
StreamUnattachAskHTML(qw422016, rq, hyphaName, isOld)
|
StreamUnattachAskHTML(qw422016, rq, hyphaName, isOld)
|
||||||
//line views/modal.qtpl:25
|
//line views/modal.qtpl:23
|
||||||
qt422016.ReleaseWriter(qw422016)
|
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 {
|
func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
|
||||||
//line views/modal.qtpl:25
|
//line views/modal.qtpl:23
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/modal.qtpl:25
|
//line views/modal.qtpl:23
|
||||||
WriteUnattachAskHTML(qb422016, rq, hyphaName, isOld)
|
WriteUnattachAskHTML(qb422016, rq, hyphaName, isOld)
|
||||||
//line views/modal.qtpl:25
|
//line views/modal.qtpl:23
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/modal.qtpl:25
|
//line views/modal.qtpl:23
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/modal.qtpl:25
|
//line views/modal.qtpl:23
|
||||||
return qs422016
|
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) {
|
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(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/modal.qtpl:28
|
//line views/modal.qtpl:26
|
||||||
StreamNavHTML(qw422016, rq, hyphaName, "rename-ask")
|
|
||||||
//line views/modal.qtpl:28
|
|
||||||
qw422016.N().S(`
|
|
||||||
`)
|
|
||||||
//line views/modal.qtpl:29
|
|
||||||
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 "+util.BeautifulName(hyphaName))
|
||||||
//line views/modal.qtpl:33
|
//line views/modal.qtpl:30
|
||||||
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:35
|
//line views/modal.qtpl:32
|
||||||
qw422016.E().S(hyphaName)
|
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"/>
|
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/>
|
||||||
@ -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>
|
<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)
|
streammodalEnd(qw422016, hyphaName, false)
|
||||||
//line views/modal.qtpl:41
|
//line views/modal.qtpl:38
|
||||||
qw422016.N().S(`
|
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) {
|
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)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/modal.qtpl:42
|
//line views/modal.qtpl:39
|
||||||
StreamRenameAskHTML(qw422016, rq, hyphaName, isOld)
|
StreamRenameAskHTML(qw422016, rq, hyphaName, isOld)
|
||||||
//line views/modal.qtpl:42
|
//line views/modal.qtpl:39
|
||||||
qt422016.ReleaseWriter(qw422016)
|
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 {
|
func RenameAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
|
||||||
//line views/modal.qtpl:42
|
//line views/modal.qtpl:39
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/modal.qtpl:42
|
//line views/modal.qtpl:39
|
||||||
WriteRenameAskHTML(qb422016, rq, hyphaName, isOld)
|
WriteRenameAskHTML(qb422016, rq, hyphaName, isOld)
|
||||||
//line views/modal.qtpl:42
|
//line views/modal.qtpl:39
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/modal.qtpl:42
|
//line views/modal.qtpl:39
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/modal.qtpl:42
|
//line views/modal.qtpl:39
|
||||||
return qs422016
|
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) {
|
func streammodalReallyWant(qw422016 *qt422016.Writer, hyphaName, verb string) {
|
||||||
//line views/modal.qtpl:44
|
//line views/modal.qtpl:41
|
||||||
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:45
|
//line views/modal.qtpl:42
|
||||||
qw422016.E().S(verb)
|
qw422016.E().S(verb)
|
||||||
//line views/modal.qtpl:45
|
//line views/modal.qtpl:42
|
||||||
qw422016.N().S(` hypha <em>`)
|
qw422016.N().S(` hypha <em>`)
|
||||||
//line views/modal.qtpl:45
|
//line views/modal.qtpl:42
|
||||||
qw422016.E().S(hyphaName)
|
qw422016.E().S(hyphaName)
|
||||||
//line views/modal.qtpl:45
|
//line views/modal.qtpl:42
|
||||||
qw422016.N().S(`</em>?</p>
|
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) {
|
func writemodalReallyWant(qq422016 qtio422016.Writer, hyphaName, verb string) {
|
||||||
//line views/modal.qtpl:46
|
//line views/modal.qtpl:43
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/modal.qtpl:46
|
//line views/modal.qtpl:43
|
||||||
streammodalReallyWant(qw422016, hyphaName, verb)
|
streammodalReallyWant(qw422016, hyphaName, verb)
|
||||||
//line views/modal.qtpl:46
|
//line views/modal.qtpl:43
|
||||||
qt422016.ReleaseWriter(qw422016)
|
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 {
|
func modalReallyWant(hyphaName, verb string) string {
|
||||||
//line views/modal.qtpl:46
|
//line views/modal.qtpl:43
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/modal.qtpl:46
|
//line views/modal.qtpl:43
|
||||||
writemodalReallyWant(qb422016, hyphaName, verb)
|
writemodalReallyWant(qb422016, hyphaName, verb)
|
||||||
//line views/modal.qtpl:46
|
//line views/modal.qtpl:43
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/modal.qtpl:46
|
//line views/modal.qtpl:43
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/modal.qtpl:46
|
//line views/modal.qtpl:43
|
||||||
return qs422016
|
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) {
|
func streammodalBegin(qw422016 *qt422016.Writer, path, hyphaName, formAttrs, legend string) {
|
||||||
//line views/modal.qtpl:48
|
//line views/modal.qtpl:45
|
||||||
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:51
|
//line views/modal.qtpl:48
|
||||||
qw422016.E().S(path)
|
qw422016.E().S(path)
|
||||||
//line views/modal.qtpl:51
|
//line views/modal.qtpl:48
|
||||||
qw422016.N().S(`/`)
|
qw422016.N().S(`/`)
|
||||||
//line views/modal.qtpl:51
|
//line views/modal.qtpl:48
|
||||||
qw422016.E().S(hyphaName)
|
qw422016.E().S(hyphaName)
|
||||||
//line views/modal.qtpl:51
|
//line views/modal.qtpl:48
|
||||||
qw422016.N().S(`"`)
|
qw422016.N().S(`"`)
|
||||||
//line views/modal.qtpl:51
|
//line views/modal.qtpl:48
|
||||||
qw422016.N().S(formAttrs)
|
qw422016.N().S(formAttrs)
|
||||||
//line views/modal.qtpl:51
|
//line views/modal.qtpl:48
|
||||||
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:53
|
//line views/modal.qtpl:50
|
||||||
qw422016.N().S(legend)
|
qw422016.N().S(legend)
|
||||||
//line views/modal.qtpl:53
|
//line views/modal.qtpl:50
|
||||||
qw422016.N().S(`</legend>
|
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) {
|
func writemodalBegin(qq422016 qtio422016.Writer, path, hyphaName, formAttrs, legend string) {
|
||||||
//line views/modal.qtpl:54
|
//line views/modal.qtpl:51
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/modal.qtpl:54
|
//line views/modal.qtpl:51
|
||||||
streammodalBegin(qw422016, path, hyphaName, formAttrs, legend)
|
streammodalBegin(qw422016, path, hyphaName, formAttrs, legend)
|
||||||
//line views/modal.qtpl:54
|
//line views/modal.qtpl:51
|
||||||
qt422016.ReleaseWriter(qw422016)
|
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 {
|
func modalBegin(path, hyphaName, formAttrs, legend string) string {
|
||||||
//line views/modal.qtpl:54
|
//line views/modal.qtpl:51
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/modal.qtpl:54
|
//line views/modal.qtpl:51
|
||||||
writemodalBegin(qb422016, path, hyphaName, formAttrs, legend)
|
writemodalBegin(qb422016, path, hyphaName, formAttrs, legend)
|
||||||
//line views/modal.qtpl:54
|
//line views/modal.qtpl:51
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/modal.qtpl:54
|
//line views/modal.qtpl:51
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/modal.qtpl:54
|
//line views/modal.qtpl:51
|
||||||
return qs422016
|
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) {
|
func streammodalEnd(qw422016 *qt422016.Writer, hyphaName string, shouldFocusOnConfirm bool) {
|
||||||
//line views/modal.qtpl:56
|
//line views/modal.qtpl:53
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<input type="submit" value="Confirm" class="btn" `)
|
<input type="submit" value="Confirm" class="btn" `)
|
||||||
//line views/modal.qtpl:57
|
//line views/modal.qtpl:54
|
||||||
if shouldFocusOnConfirm {
|
if shouldFocusOnConfirm {
|
||||||
//line views/modal.qtpl:57
|
//line views/modal.qtpl:54
|
||||||
qw422016.N().S(`autofocus`)
|
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(`>
|
qw422016.N().S(`>
|
||||||
<a href="/hypha/`)
|
<a href="/hypha/`)
|
||||||
//line views/modal.qtpl:58
|
//line views/modal.qtpl:55
|
||||||
qw422016.E().S(hyphaName)
|
qw422016.E().S(hyphaName)
|
||||||
//line views/modal.qtpl:58
|
//line views/modal.qtpl:55
|
||||||
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: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) {
|
func writemodalEnd(qq422016 qtio422016.Writer, hyphaName string, shouldFocusOnConfirm bool) {
|
||||||
//line views/modal.qtpl:63
|
//line views/modal.qtpl:60
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/modal.qtpl:63
|
//line views/modal.qtpl:60
|
||||||
streammodalEnd(qw422016, hyphaName, shouldFocusOnConfirm)
|
streammodalEnd(qw422016, hyphaName, shouldFocusOnConfirm)
|
||||||
//line views/modal.qtpl:63
|
//line views/modal.qtpl:60
|
||||||
qt422016.ReleaseWriter(qw422016)
|
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 {
|
func modalEnd(hyphaName string, shouldFocusOnConfirm bool) string {
|
||||||
//line views/modal.qtpl:63
|
//line views/modal.qtpl:60
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/modal.qtpl:63
|
//line views/modal.qtpl:60
|
||||||
writemodalEnd(qb422016, hyphaName, shouldFocusOnConfirm)
|
writemodalEnd(qb422016, hyphaName, shouldFocusOnConfirm)
|
||||||
//line views/modal.qtpl:63
|
//line views/modal.qtpl:60
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/modal.qtpl:63
|
//line views/modal.qtpl:60
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/modal.qtpl:63
|
//line views/modal.qtpl:60
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/modal.qtpl:63
|
//line views/modal.qtpl:60
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,6 @@
|
|||||||
{% endfunc %}
|
{% endfunc %}
|
||||||
|
|
||||||
{% func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) %}
|
{% func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) %}
|
||||||
{%s= NavHTML(rq, hyphaName, "edit") %}
|
|
||||||
<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 util.BeautifulName(hyphaName) %}</h1>
|
||||||
@ -93,7 +92,6 @@
|
|||||||
{% endfunc %}
|
{% endfunc %}
|
||||||
|
|
||||||
{% func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) %}
|
{% func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) %}
|
||||||
{%s= NavHTML(rq, hyphaName, "edit") %}
|
|
||||||
<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 util.BeautifulName(hyphaName) %}</h1>
|
||||||
|
@ -177,33 +177,28 @@ func Toolbar(u *user.User) string {
|
|||||||
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:72
|
||||||
qw422016.N().S(`
|
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">
|
<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:76
|
//line views/mutators.qtpl:75
|
||||||
qw422016.E().S(util.BeautifulName(hyphaName))
|
qw422016.E().S(util.BeautifulName(hyphaName))
|
||||||
//line views/mutators.qtpl:76
|
//line views/mutators.qtpl:75
|
||||||
qw422016.N().S(`</h1>
|
qw422016.N().S(`</h1>
|
||||||
`)
|
`)
|
||||||
//line views/mutators.qtpl:77
|
//line views/mutators.qtpl:76
|
||||||
qw422016.N().S(warning)
|
qw422016.N().S(warning)
|
||||||
//line views/mutators.qtpl:77
|
//line views/mutators.qtpl:76
|
||||||
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:79
|
//line views/mutators.qtpl:78
|
||||||
qw422016.E().S(hyphaName)
|
qw422016.E().S(hyphaName)
|
||||||
//line views/mutators.qtpl:79
|
//line views/mutators.qtpl:78
|
||||||
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:80
|
//line views/mutators.qtpl:79
|
||||||
qw422016.E().S(textAreaFill)
|
qw422016.E().S(textAreaFill)
|
||||||
//line views/mutators.qtpl:80
|
//line views/mutators.qtpl:79
|
||||||
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>
|
||||||
@ -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 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:87
|
//line views/mutators.qtpl:86
|
||||||
qw422016.E().S(hyphaName)
|
qw422016.E().S(hyphaName)
|
||||||
//line views/mutators.qtpl:87
|
//line views/mutators.qtpl:86
|
||||||
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:90
|
//line views/mutators.qtpl:89
|
||||||
qw422016.N().S(Toolbar(user.FromRequest(rq)))
|
qw422016.N().S(Toolbar(user.FromRequest(rq)))
|
||||||
//line views/mutators.qtpl:90
|
//line views/mutators.qtpl:89
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
//line views/mutators.qtpl:92
|
//line views/mutators.qtpl:91
|
||||||
streameditScripts(qw422016)
|
streameditScripts(qw422016)
|
||||||
|
//line views/mutators.qtpl:91
|
||||||
|
qw422016.N().S(`
|
||||||
|
`)
|
||||||
//line views/mutators.qtpl:92
|
//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) {
|
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)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/mutators.qtpl:93
|
//line views/mutators.qtpl:92
|
||||||
StreamEditHTML(qw422016, rq, hyphaName, textAreaFill, warning)
|
StreamEditHTML(qw422016, rq, hyphaName, textAreaFill, warning)
|
||||||
//line views/mutators.qtpl:93
|
//line views/mutators.qtpl:92
|
||||||
qt422016.ReleaseWriter(qw422016)
|
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 {
|
func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) string {
|
||||||
//line views/mutators.qtpl:93
|
//line views/mutators.qtpl:92
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/mutators.qtpl:93
|
//line views/mutators.qtpl:92
|
||||||
WriteEditHTML(qb422016, rq, hyphaName, textAreaFill, warning)
|
WriteEditHTML(qb422016, rq, hyphaName, textAreaFill, warning)
|
||||||
//line views/mutators.qtpl:93
|
//line views/mutators.qtpl:92
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/mutators.qtpl:93
|
//line views/mutators.qtpl:92
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/mutators.qtpl:93
|
//line views/mutators.qtpl:92
|
||||||
return qs422016
|
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) {
|
func StreamPreviewHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, message, warning string, renderedPage string) {
|
||||||
//line views/mutators.qtpl:95
|
//line views/mutators.qtpl:94
|
||||||
qw422016.N().S(`
|
|
||||||
`)
|
|
||||||
//line views/mutators.qtpl:96
|
|
||||||
qw422016.N().S(NavHTML(rq, hyphaName, "edit"))
|
|
||||||
//line views/mutators.qtpl:96
|
|
||||||
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:99
|
//line views/mutators.qtpl:97
|
||||||
qw422016.E().S(util.BeautifulName(hyphaName))
|
qw422016.E().S(util.BeautifulName(hyphaName))
|
||||||
//line views/mutators.qtpl:99
|
//line views/mutators.qtpl:97
|
||||||
qw422016.N().S(`</h1>
|
qw422016.N().S(`</h1>
|
||||||
`)
|
`)
|
||||||
//line views/mutators.qtpl:100
|
//line views/mutators.qtpl:98
|
||||||
qw422016.N().S(warning)
|
qw422016.N().S(warning)
|
||||||
//line views/mutators.qtpl:100
|
//line views/mutators.qtpl:98
|
||||||
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:102
|
//line views/mutators.qtpl:100
|
||||||
qw422016.E().S(hyphaName)
|
qw422016.E().S(hyphaName)
|
||||||
//line views/mutators.qtpl:102
|
//line views/mutators.qtpl:100
|
||||||
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:103
|
//line views/mutators.qtpl:101
|
||||||
qw422016.E().S(textAreaFill)
|
qw422016.E().S(textAreaFill)
|
||||||
//line views/mutators.qtpl:103
|
//line views/mutators.qtpl:101
|
||||||
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:106
|
//line views/mutators.qtpl:104
|
||||||
qw422016.E().S(message)
|
qw422016.E().S(message)
|
||||||
//line views/mutators.qtpl:106
|
//line views/mutators.qtpl:104
|
||||||
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:110
|
//line views/mutators.qtpl:108
|
||||||
qw422016.E().S(hyphaName)
|
qw422016.E().S(hyphaName)
|
||||||
//line views/mutators.qtpl:110
|
//line views/mutators.qtpl:108
|
||||||
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:113
|
//line views/mutators.qtpl:111
|
||||||
qw422016.N().S(renderedPage)
|
qw422016.N().S(renderedPage)
|
||||||
//line views/mutators.qtpl:113
|
//line views/mutators.qtpl:111
|
||||||
qw422016.N().S(`</article>
|
qw422016.N().S(`</article>
|
||||||
</main>
|
</main>
|
||||||
`)
|
`)
|
||||||
//line views/mutators.qtpl:115
|
//line views/mutators.qtpl:113
|
||||||
qw422016.N().S(Toolbar(user.FromRequest(rq)))
|
qw422016.N().S(Toolbar(user.FromRequest(rq)))
|
||||||
//line views/mutators.qtpl:115
|
//line views/mutators.qtpl:113
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
//line views/mutators.qtpl:117
|
//line views/mutators.qtpl:115
|
||||||
streameditScripts(qw422016)
|
streameditScripts(qw422016)
|
||||||
//line views/mutators.qtpl:117
|
//line views/mutators.qtpl:115
|
||||||
qw422016.N().S(`
|
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) {
|
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)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/mutators.qtpl:118
|
//line views/mutators.qtpl:116
|
||||||
StreamPreviewHTML(qw422016, rq, hyphaName, textAreaFill, message, warning, renderedPage)
|
StreamPreviewHTML(qw422016, rq, hyphaName, textAreaFill, message, warning, renderedPage)
|
||||||
//line views/mutators.qtpl:118
|
//line views/mutators.qtpl:116
|
||||||
qt422016.ReleaseWriter(qw422016)
|
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 {
|
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()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/mutators.qtpl:118
|
//line views/mutators.qtpl:116
|
||||||
WritePreviewHTML(qb422016, rq, hyphaName, textAreaFill, message, warning, renderedPage)
|
WritePreviewHTML(qb422016, rq, hyphaName, textAreaFill, message, warning, renderedPage)
|
||||||
//line views/mutators.qtpl:118
|
//line views/mutators.qtpl:116
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/mutators.qtpl:118
|
//line views/mutators.qtpl:116
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/mutators.qtpl:118
|
//line views/mutators.qtpl:116
|
||||||
return qs422016
|
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) {
|
func streameditScripts(qw422016 *qt422016.Writer) {
|
||||||
//line views/mutators.qtpl:120
|
//line views/mutators.qtpl:118
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<script src="/static/editor.js"></script>
|
<script src="/static/editor.js"></script>
|
||||||
`)
|
`)
|
||||||
//line views/mutators.qtpl:122
|
//line views/mutators.qtpl:120
|
||||||
for _, scriptPath := range cfg.EditScripts {
|
for _, scriptPath := range cfg.EditScripts {
|
||||||
//line views/mutators.qtpl:122
|
//line views/mutators.qtpl:120
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<script src="`)
|
<script src="`)
|
||||||
//line views/mutators.qtpl:123
|
//line views/mutators.qtpl:121
|
||||||
qw422016.E().S(scriptPath)
|
qw422016.E().S(scriptPath)
|
||||||
//line views/mutators.qtpl:123
|
//line views/mutators.qtpl:121
|
||||||
qw422016.N().S(`"></script>
|
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(`
|
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) {
|
func writeeditScripts(qq422016 qtio422016.Writer) {
|
||||||
//line views/mutators.qtpl:125
|
//line views/mutators.qtpl:123
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/mutators.qtpl:125
|
//line views/mutators.qtpl:123
|
||||||
streameditScripts(qw422016)
|
streameditScripts(qw422016)
|
||||||
//line views/mutators.qtpl:125
|
//line views/mutators.qtpl:123
|
||||||
qt422016.ReleaseWriter(qw422016)
|
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 {
|
func editScripts() string {
|
||||||
//line views/mutators.qtpl:125
|
//line views/mutators.qtpl:123
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/mutators.qtpl:125
|
//line views/mutators.qtpl:123
|
||||||
writeeditScripts(qb422016)
|
writeeditScripts(qb422016)
|
||||||
//line views/mutators.qtpl:125
|
//line views/mutators.qtpl:123
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/mutators.qtpl:125
|
//line views/mutators.qtpl:123
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/mutators.qtpl:125
|
//line views/mutators.qtpl:123
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/mutators.qtpl:125
|
//line views/mutators.qtpl:123
|
||||||
}
|
}
|
||||||
|
@ -1,48 +1,29 @@
|
|||||||
{% import "net/http" %}
|
{% import "net/http" %}
|
||||||
{% import "strings" %}
|
{% import "strings" %}
|
||||||
{% import "github.com/bouncepaw/mycorrhiza/user" %}
|
{% 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
|
{% 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)
|
u := user.FromRequest(rq)
|
||||||
%}
|
%}
|
||||||
<nav class="hypha-tabs main-width">
|
<nav class="hypha-info">
|
||||||
<ul class="hypha-tabs__flex">
|
<ul class="hypha-info__list">
|
||||||
{%- for _, entry := range navEntries -%}
|
{% if h.HasAttachment() %}{%= hyphaInfoEntry(h, u, "attachment", "manage the attachment") %}{% endif %}
|
||||||
{%- if navType == "revision" && entry.path == "revision" -%}
|
{%= hyphaInfoEntry(h, u, "history", "view history") %}
|
||||||
<li class="hypha-tabs__tab hypha-tabs__tab_active">
|
{%= hyphaInfoEntry(h, u, "rename-ask", "rename") %}
|
||||||
<span class="hypha-tabs__selection">{%s revisionHash[0] %}</span>
|
{%= hyphaInfoEntry(h, u, "delete-ask", "delete") %}
|
||||||
</li>
|
{%= hyphaInfoEntry(h, u, "text", "view markup") %}
|
||||||
{%- elseif navType == entry.path -%}
|
</ul>
|
||||||
<li class="hypha-tabs__tab hypha-tabs__tab_active">
|
</nav>
|
||||||
<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>
|
|
||||||
{% endfunc %}
|
{% endfunc %}
|
||||||
|
|
||||||
{% func siblingHyphaeHTML(siblings string) %}
|
{% func siblingHyphaeHTML(siblings string) %}
|
||||||
|
@ -13,7 +13,8 @@ import "strings"
|
|||||||
//line views/nav.qtpl:3
|
//line views/nav.qtpl:3
|
||||||
import "github.com/bouncepaw/mycorrhiza/user"
|
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
|
//line views/nav.qtpl:6
|
||||||
import (
|
import (
|
||||||
@ -28,210 +29,236 @@ var (
|
|||||||
_ = qt422016.AcquireByteBuffer
|
_ = qt422016.AcquireByteBuffer
|
||||||
)
|
)
|
||||||
|
|
||||||
//line views/nav.qtpl:7
|
//line views/nav.qtpl:6
|
||||||
type navEntry struct {
|
func streamhyphaInfoEntry(qw422016 *qt422016.Writer, h *hyphae.Hypha, u *user.User, action, displayText string) {
|
||||||
path string
|
//line views/nav.qtpl:6
|
||||||
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
|
|
||||||
qw422016.N().S(`
|
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)
|
u := user.FromRequest(rq)
|
||||||
|
|
||||||
//line views/nav.qtpl:26
|
//line views/nav.qtpl:17
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<nav class="hypha-tabs main-width">
|
<nav class="hypha-info">
|
||||||
<ul class="hypha-tabs__flex">
|
<ul class="hypha-info__list">
|
||||||
`)
|
`)
|
||||||
//line views/nav.qtpl:29
|
//line views/nav.qtpl:20
|
||||||
for _, entry := range navEntries {
|
if h.HasAttachment() {
|
||||||
//line views/nav.qtpl:30
|
//line views/nav.qtpl:20
|
||||||
if navType == "revision" && entry.path == "revision" {
|
streamhyphaInfoEntry(qw422016, h, u, "attachment", "manage the attachment")
|
||||||
//line views/nav.qtpl:30
|
//line views/nav.qtpl:20
|
||||||
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
|
|
||||||
}
|
}
|
||||||
//line views/nav.qtpl:43
|
//line views/nav.qtpl:20
|
||||||
qw422016.N().S(` </ul>
|
qw422016.N().S(`
|
||||||
</nav>
|
`)
|
||||||
|
//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
|
//line views/nav.qtpl:27
|
||||||
func WriteNavHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, navType string, revisionHash ...string) {
|
func writehyphaInfo(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha) {
|
||||||
//line views/nav.qtpl:46
|
//line views/nav.qtpl:27
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/nav.qtpl:46
|
//line views/nav.qtpl:27
|
||||||
StreamNavHTML(qw422016, rq, hyphaName, navType, revisionHash...)
|
streamhyphaInfo(qw422016, rq, h)
|
||||||
//line views/nav.qtpl:46
|
//line views/nav.qtpl:27
|
||||||
qt422016.ReleaseWriter(qw422016)
|
qt422016.ReleaseWriter(qw422016)
|
||||||
//line views/nav.qtpl:46
|
//line views/nav.qtpl:27
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/nav.qtpl:46
|
//line views/nav.qtpl:27
|
||||||
func NavHTML(rq *http.Request, hyphaName, navType string, revisionHash ...string) string {
|
func hyphaInfo(rq *http.Request, h *hyphae.Hypha) string {
|
||||||
//line views/nav.qtpl:46
|
//line views/nav.qtpl:27
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/nav.qtpl:46
|
//line views/nav.qtpl:27
|
||||||
WriteNavHTML(qb422016, rq, hyphaName, navType, revisionHash...)
|
writehyphaInfo(qb422016, rq, h)
|
||||||
//line views/nav.qtpl:46
|
//line views/nav.qtpl:27
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/nav.qtpl:46
|
//line views/nav.qtpl:27
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/nav.qtpl:46
|
//line views/nav.qtpl:27
|
||||||
return qs422016
|
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) {
|
func streamsiblingHyphaeHTML(qw422016 *qt422016.Writer, siblings string) {
|
||||||
//line views/nav.qtpl:48
|
//line views/nav.qtpl:29
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<aside class="sibling-hyphae layout-card">
|
<aside class="sibling-hyphae layout-card">
|
||||||
<h2 class="sibling-hyphae__title layout-card__title">Sibling hyphae</h2>
|
<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)
|
qw422016.N().S(siblings)
|
||||||
//line views/nav.qtpl:51
|
//line views/nav.qtpl:32
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</aside>
|
</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) {
|
func writesiblingHyphaeHTML(qq422016 qtio422016.Writer, siblings string) {
|
||||||
//line views/nav.qtpl:53
|
//line views/nav.qtpl:34
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/nav.qtpl:53
|
//line views/nav.qtpl:34
|
||||||
streamsiblingHyphaeHTML(qw422016, siblings)
|
streamsiblingHyphaeHTML(qw422016, siblings)
|
||||||
//line views/nav.qtpl:53
|
//line views/nav.qtpl:34
|
||||||
qt422016.ReleaseWriter(qw422016)
|
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 {
|
func siblingHyphaeHTML(siblings string) string {
|
||||||
//line views/nav.qtpl:53
|
//line views/nav.qtpl:34
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/nav.qtpl:53
|
//line views/nav.qtpl:34
|
||||||
writesiblingHyphaeHTML(qb422016, siblings)
|
writesiblingHyphaeHTML(qb422016, siblings)
|
||||||
//line views/nav.qtpl:53
|
//line views/nav.qtpl:34
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/nav.qtpl:53
|
//line views/nav.qtpl:34
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/nav.qtpl:53
|
//line views/nav.qtpl:34
|
||||||
return qs422016
|
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) {
|
func StreamSubhyphaeHTML(qw422016 *qt422016.Writer, subhyphae string) {
|
||||||
//line views/nav.qtpl:55
|
//line views/nav.qtpl:36
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/nav.qtpl:56
|
//line views/nav.qtpl:37
|
||||||
if strings.TrimSpace(subhyphae) != "" {
|
if strings.TrimSpace(subhyphae) != "" {
|
||||||
//line views/nav.qtpl:56
|
//line views/nav.qtpl:37
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<section class="subhyphae">
|
<section class="subhyphae">
|
||||||
<h2 class="subhyphae__title">Subhyphae</h2>
|
<h2 class="subhyphae__title">Subhyphae</h2>
|
||||||
<nav class="subhyphae__nav">
|
<nav class="subhyphae__nav">
|
||||||
<ul class="subhyphae__list">
|
<ul class="subhyphae__list">
|
||||||
`)
|
`)
|
||||||
//line views/nav.qtpl:61
|
//line views/nav.qtpl:42
|
||||||
qw422016.N().S(subhyphae)
|
qw422016.N().S(subhyphae)
|
||||||
//line views/nav.qtpl:61
|
//line views/nav.qtpl:42
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</section>
|
</section>
|
||||||
`)
|
`)
|
||||||
//line views/nav.qtpl:65
|
//line views/nav.qtpl:46
|
||||||
}
|
}
|
||||||
//line views/nav.qtpl:65
|
//line views/nav.qtpl:46
|
||||||
qw422016.N().S(`
|
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) {
|
func WriteSubhyphaeHTML(qq422016 qtio422016.Writer, subhyphae string) {
|
||||||
//line views/nav.qtpl:66
|
//line views/nav.qtpl:47
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/nav.qtpl:66
|
//line views/nav.qtpl:47
|
||||||
StreamSubhyphaeHTML(qw422016, subhyphae)
|
StreamSubhyphaeHTML(qw422016, subhyphae)
|
||||||
//line views/nav.qtpl:66
|
//line views/nav.qtpl:47
|
||||||
qt422016.ReleaseWriter(qw422016)
|
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 {
|
func SubhyphaeHTML(subhyphae string) string {
|
||||||
//line views/nav.qtpl:66
|
//line views/nav.qtpl:47
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/nav.qtpl:66
|
//line views/nav.qtpl:47
|
||||||
WriteSubhyphaeHTML(qb422016, subhyphae)
|
WriteSubhyphaeHTML(qb422016, subhyphae)
|
||||||
//line views/nav.qtpl:66
|
//line views/nav.qtpl:47
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/nav.qtpl:66
|
//line views/nav.qtpl:47
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/nav.qtpl:66
|
//line views/nav.qtpl:47
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/nav.qtpl:66
|
//line views/nav.qtpl:47
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
{% import "github.com/bouncepaw/mycorrhiza/util" %}
|
{% import "github.com/bouncepaw/mycorrhiza/util" %}
|
||||||
|
|
||||||
{% func AttachmentMenuHTML(rq *http.Request, h *hyphae.Hypha, u *user.User) %}
|
{% func AttachmentMenuHTML(rq *http.Request, h *hyphae.Hypha, u *user.User) %}
|
||||||
{%= NavHTML(rq, h.Name, "attachment") %}
|
|
||||||
<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 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)
|
siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name)
|
||||||
u := user.FromRequest(rq)
|
u := user.FromRequest(rq)
|
||||||
%}
|
%}
|
||||||
{%= NavHTML(rq, h.Name, "hypha") %}
|
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<main class="main-width">
|
<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) %}
|
{%s= NaviTitleHTML(h) %}
|
||||||
{% if h.Exists %}
|
{% if h.Exists %}
|
||||||
{%s= contents %}
|
{%s= contents %}
|
||||||
@ -100,6 +104,12 @@ If `contents` == "", a helpful message is shown instead.
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</section>
|
</section>
|
||||||
{%= SubhyphaeHTML(subhyphae) %}
|
{%= SubhyphaeHTML(subhyphae) %}
|
||||||
|
<section id="hypha-bottom">
|
||||||
|
<div class="jump-btn">
|
||||||
|
<a class="jump-btn__link" href="#hypha">↑</a>
|
||||||
|
</div>
|
||||||
|
{%= hyphaInfo(rq, h) %}
|
||||||
|
</section>
|
||||||
</main>
|
</main>
|
||||||
{%= siblingHyphaeHTML(siblings) %}
|
{%= siblingHyphaeHTML(siblings) %}
|
||||||
</div>
|
</div>
|
||||||
@ -110,7 +120,6 @@ If `contents` == "", a helpful message is shown instead.
|
|||||||
{% code
|
{% code
|
||||||
siblings, subhyphae, _, _ := tree.Tree(h.Name)
|
siblings, subhyphae, _, _ := tree.Tree(h.Name)
|
||||||
%}
|
%}
|
||||||
{%= NavHTML(rq, h.Name, "revision", revHash) %}
|
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<main class="main-width">
|
<main class="main-width">
|
||||||
<article>
|
<article>
|
||||||
|
@ -51,108 +51,103 @@ var (
|
|||||||
func StreamAttachmentMenuHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, u *user.User) {
|
func StreamAttachmentMenuHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, u *user.User) {
|
||||||
//line views/readers.qtpl:13
|
//line views/readers.qtpl:13
|
||||||
qw422016.N().S(`
|
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">
|
<div class="layout">
|
||||||
<main class="main-width attachment-tab">
|
<main class="main-width attachment-tab">
|
||||||
<h1>Attachment of `)
|
<h1>Attachment of `)
|
||||||
//line views/readers.qtpl:17
|
//line views/readers.qtpl:16
|
||||||
qw422016.E().S(util.BeautifulName(h.Name))
|
qw422016.E().S(util.BeautifulName(h.Name))
|
||||||
//line views/readers.qtpl:17
|
//line views/readers.qtpl:16
|
||||||
qw422016.N().S(`</h1>
|
qw422016.N().S(`</h1>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:18
|
//line views/readers.qtpl:17
|
||||||
if h.BinaryPath == "" {
|
if h.BinaryPath == "" {
|
||||||
//line views/readers.qtpl:18
|
//line views/readers.qtpl:17
|
||||||
qw422016.N().S(`
|
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>
|
<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 {
|
} else {
|
||||||
//line views/readers.qtpl:20
|
//line views/readers.qtpl:19
|
||||||
qw422016.N().S(`
|
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>
|
<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(`
|
qw422016.N().S(`
|
||||||
|
|
||||||
<section class="amnt-grid">
|
<section class="amnt-grid">
|
||||||
|
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:26
|
//line views/readers.qtpl:25
|
||||||
if h.BinaryPath != "" {
|
if h.BinaryPath != "" {
|
||||||
//line views/readers.qtpl:26
|
//line views/readers.qtpl:25
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:28
|
//line views/readers.qtpl:27
|
||||||
mime := mimetype.FromExtension(path.Ext(h.BinaryPath))
|
mime := mimetype.FromExtension(path.Ext(h.BinaryPath))
|
||||||
fileinfo, err := os.Stat(h.BinaryPath)
|
fileinfo, err := os.Stat(h.BinaryPath)
|
||||||
|
|
||||||
//line views/readers.qtpl:29
|
//line views/readers.qtpl:28
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:30
|
//line views/readers.qtpl:29
|
||||||
if err == nil {
|
if err == nil {
|
||||||
//line views/readers.qtpl:30
|
//line views/readers.qtpl:29
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<fieldset class="amnt-menu-block">
|
<fieldset class="amnt-menu-block">
|
||||||
<legend class="modal__title modal__title_small">Stat</legend>
|
<legend class="modal__title modal__title_small">Stat</legend>
|
||||||
<p class="modal__confirmation-msg"><b>File size:</b> `)
|
<p class="modal__confirmation-msg"><b>File size:</b> `)
|
||||||
//line views/readers.qtpl:33
|
//line views/readers.qtpl:32
|
||||||
qw422016.N().DL(fileinfo.Size())
|
qw422016.N().DL(fileinfo.Size())
|
||||||
//line views/readers.qtpl:33
|
//line views/readers.qtpl:32
|
||||||
qw422016.N().S(` bytes</p>
|
qw422016.N().S(` bytes</p>
|
||||||
<p><b>MIME type:</b> `)
|
<p><b>MIME type:</b> `)
|
||||||
//line views/readers.qtpl:34
|
//line views/readers.qtpl:33
|
||||||
qw422016.E().S(mime)
|
qw422016.E().S(mime)
|
||||||
//line views/readers.qtpl:34
|
//line views/readers.qtpl:33
|
||||||
qw422016.N().S(`</p>
|
qw422016.N().S(`</p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:36
|
//line views/readers.qtpl:35
|
||||||
}
|
}
|
||||||
//line views/readers.qtpl:36
|
//line views/readers.qtpl:35
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
|
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:38
|
//line views/readers.qtpl:37
|
||||||
if strings.HasPrefix(mime, "image/") {
|
if strings.HasPrefix(mime, "image/") {
|
||||||
//line views/readers.qtpl:38
|
//line views/readers.qtpl:37
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<fieldset class="amnt-menu-block">
|
<fieldset class="amnt-menu-block">
|
||||||
<legend class="modal__title modal__title_small">Include</legend>
|
<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>
|
<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 { `)
|
<pre class="codebleck"><code>img { `)
|
||||||
//line views/readers.qtpl:42
|
//line views/readers.qtpl:41
|
||||||
qw422016.E().S(h.Name)
|
qw422016.E().S(h.Name)
|
||||||
//line views/readers.qtpl:42
|
//line views/readers.qtpl:41
|
||||||
qw422016.N().S(` }</code></pre>
|
qw422016.N().S(` }</code></pre>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:44
|
//line views/readers.qtpl:43
|
||||||
}
|
}
|
||||||
//line views/readers.qtpl:44
|
//line views/readers.qtpl:43
|
||||||
qw422016.N().S(`
|
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(`
|
qw422016.N().S(`
|
||||||
|
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:47
|
//line views/readers.qtpl:46
|
||||||
if u.CanProceed("upload-binary") {
|
if u.CanProceed("upload-binary") {
|
||||||
//line views/readers.qtpl:47
|
//line views/readers.qtpl:46
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<form action="/upload-binary/`)
|
<form action="/upload-binary/`)
|
||||||
//line views/readers.qtpl:48
|
//line views/readers.qtpl:47
|
||||||
qw422016.E().S(h.Name)
|
qw422016.E().S(h.Name)
|
||||||
//line views/readers.qtpl:48
|
//line views/readers.qtpl:47
|
||||||
qw422016.N().S(`"
|
qw422016.N().S(`"
|
||||||
method="post" enctype="multipart/form-data"
|
method="post" enctype="multipart/form-data"
|
||||||
class="upload-binary modal amnt-menu-block">
|
class="upload-binary modal amnt-menu-block">
|
||||||
@ -166,20 +161,20 @@ func StreamAttachmentMenuHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hy
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:60
|
//line views/readers.qtpl:59
|
||||||
}
|
}
|
||||||
//line views/readers.qtpl:60
|
//line views/readers.qtpl:59
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
|
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:62
|
//line views/readers.qtpl:61
|
||||||
if h.BinaryPath != "" && u.CanProceed("unattach-confirm") {
|
if h.BinaryPath != "" && u.CanProceed("unattach-confirm") {
|
||||||
//line views/readers.qtpl:62
|
//line views/readers.qtpl:61
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<form action="/unattach-confirm/`)
|
<form action="/unattach-confirm/`)
|
||||||
//line views/readers.qtpl:63
|
//line views/readers.qtpl:62
|
||||||
qw422016.E().S(h.Name)
|
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">
|
qw422016.N().S(`" method="post" class="modal amnt-menu-block">
|
||||||
<fieldset class="modal__fieldset">
|
<fieldset class="modal__fieldset">
|
||||||
<legend class="modal__title modal__title_small">Unattach</legend>
|
<legend class="modal__title modal__title_small">Unattach</legend>
|
||||||
@ -188,305 +183,315 @@ func StreamAttachmentMenuHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hy
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:70
|
//line views/readers.qtpl:69
|
||||||
}
|
}
|
||||||
//line views/readers.qtpl:70
|
//line views/readers.qtpl:69
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</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) {
|
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)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/readers.qtpl:75
|
//line views/readers.qtpl:74
|
||||||
StreamAttachmentMenuHTML(qw422016, rq, h, u)
|
StreamAttachmentMenuHTML(qw422016, rq, h, u)
|
||||||
//line views/readers.qtpl:75
|
//line views/readers.qtpl:74
|
||||||
qt422016.ReleaseWriter(qw422016)
|
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 {
|
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()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/readers.qtpl:75
|
//line views/readers.qtpl:74
|
||||||
WriteAttachmentMenuHTML(qb422016, rq, h, u)
|
WriteAttachmentMenuHTML(qb422016, rq, h, u)
|
||||||
//line views/readers.qtpl:75
|
//line views/readers.qtpl:74
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/readers.qtpl:75
|
//line views/readers.qtpl:74
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/readers.qtpl:75
|
//line views/readers.qtpl:74
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/readers.qtpl:75
|
//line views/readers.qtpl:74
|
||||||
}
|
}
|
||||||
|
|
||||||
// If `contents` == "", a helpful message is shown instead.
|
// 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) {
|
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(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:80
|
//line views/readers.qtpl:79
|
||||||
siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name)
|
siblings, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name)
|
||||||
u := user.FromRequest(rq)
|
u := user.FromRequest(rq)
|
||||||
|
|
||||||
//line views/readers.qtpl:82
|
//line views/readers.qtpl:81
|
||||||
qw422016.N().S(`
|
|
||||||
`)
|
|
||||||
//line views/readers.qtpl:83
|
|
||||||
StreamNavHTML(qw422016, rq, h.Name, "hypha")
|
|
||||||
//line views/readers.qtpl:83
|
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<main class="main-width">
|
<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))
|
qw422016.N().S(NaviTitleHTML(h))
|
||||||
//line views/readers.qtpl:87
|
//line views/readers.qtpl:91
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:88
|
//line views/readers.qtpl:92
|
||||||
if h.Exists {
|
if h.Exists {
|
||||||
//line views/readers.qtpl:88
|
//line views/readers.qtpl:92
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:89
|
//line views/readers.qtpl:93
|
||||||
qw422016.N().S(contents)
|
qw422016.N().S(contents)
|
||||||
//line views/readers.qtpl:89
|
//line views/readers.qtpl:93
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:90
|
//line views/readers.qtpl:94
|
||||||
} else {
|
} else {
|
||||||
//line views/readers.qtpl:90
|
//line views/readers.qtpl:94
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:91
|
//line views/readers.qtpl:95
|
||||||
streamnonExistentHyphaNotice(qw422016, h, u)
|
streamnonExistentHyphaNotice(qw422016, h, u)
|
||||||
//line views/readers.qtpl:91
|
//line views/readers.qtpl:95
|
||||||
qw422016.N().S(`
|
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(`
|
qw422016.N().S(`
|
||||||
</article>
|
</article>
|
||||||
<section class="prevnext">
|
<section class="prevnext">
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:95
|
//line views/readers.qtpl:99
|
||||||
if prevHyphaName != "" {
|
if prevHyphaName != "" {
|
||||||
//line views/readers.qtpl:95
|
//line views/readers.qtpl:99
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<a class="prevnext__el prevnext__prev" href="/hypha/`)
|
<a class="prevnext__el prevnext__prev" href="/hypha/`)
|
||||||
//line views/readers.qtpl:96
|
//line views/readers.qtpl:100
|
||||||
qw422016.E().S(prevHyphaName)
|
qw422016.E().S(prevHyphaName)
|
||||||
//line views/readers.qtpl:96
|
//line views/readers.qtpl:100
|
||||||
qw422016.N().S(`" rel="prev">← `)
|
qw422016.N().S(`" rel="prev">← `)
|
||||||
//line views/readers.qtpl:96
|
//line views/readers.qtpl:100
|
||||||
qw422016.E().S(util.BeautifulName(path.Base(prevHyphaName)))
|
qw422016.E().S(util.BeautifulName(path.Base(prevHyphaName)))
|
||||||
//line views/readers.qtpl:96
|
//line views/readers.qtpl:100
|
||||||
qw422016.N().S(`</a>
|
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(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:98
|
//line views/readers.qtpl:102
|
||||||
if nextHyphaName != "" {
|
if nextHyphaName != "" {
|
||||||
//line views/readers.qtpl:98
|
//line views/readers.qtpl:102
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<a class="prevnext__el prevnext__next" href="/hypha/`)
|
<a class="prevnext__el prevnext__next" href="/hypha/`)
|
||||||
//line views/readers.qtpl:99
|
//line views/readers.qtpl:103
|
||||||
qw422016.E().S(nextHyphaName)
|
qw422016.E().S(nextHyphaName)
|
||||||
//line views/readers.qtpl:99
|
//line views/readers.qtpl:103
|
||||||
qw422016.N().S(`" rel="next">`)
|
qw422016.N().S(`" rel="next">`)
|
||||||
//line views/readers.qtpl:99
|
//line views/readers.qtpl:103
|
||||||
qw422016.E().S(util.BeautifulName(path.Base(nextHyphaName)))
|
qw422016.E().S(util.BeautifulName(path.Base(nextHyphaName)))
|
||||||
//line views/readers.qtpl:99
|
//line views/readers.qtpl:103
|
||||||
qw422016.N().S(` →</a>
|
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(`
|
qw422016.N().S(`
|
||||||
</section>
|
</section>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:102
|
//line views/readers.qtpl:106
|
||||||
StreamSubhyphaeHTML(qw422016, subhyphae)
|
StreamSubhyphaeHTML(qw422016, subhyphae)
|
||||||
//line views/readers.qtpl:102
|
//line views/readers.qtpl:106
|
||||||
qw422016.N().S(`
|
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>
|
</main>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:104
|
//line views/readers.qtpl:114
|
||||||
streamsiblingHyphaeHTML(qw422016, siblings)
|
streamsiblingHyphaeHTML(qw422016, siblings)
|
||||||
//line views/readers.qtpl:104
|
//line views/readers.qtpl:114
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:106
|
//line views/readers.qtpl:116
|
||||||
streamviewScripts(qw422016)
|
streamviewScripts(qw422016)
|
||||||
//line views/readers.qtpl:106
|
//line views/readers.qtpl:116
|
||||||
qw422016.N().S(`
|
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) {
|
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)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/readers.qtpl:107
|
//line views/readers.qtpl:117
|
||||||
StreamHyphaHTML(qw422016, rq, h, contents)
|
StreamHyphaHTML(qw422016, rq, h, contents)
|
||||||
//line views/readers.qtpl:107
|
//line views/readers.qtpl:117
|
||||||
qt422016.ReleaseWriter(qw422016)
|
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 {
|
func HyphaHTML(rq *http.Request, h *hyphae.Hypha, contents string) string {
|
||||||
//line views/readers.qtpl:107
|
//line views/readers.qtpl:117
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/readers.qtpl:107
|
//line views/readers.qtpl:117
|
||||||
WriteHyphaHTML(qb422016, rq, h, contents)
|
WriteHyphaHTML(qb422016, rq, h, contents)
|
||||||
//line views/readers.qtpl:107
|
//line views/readers.qtpl:117
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/readers.qtpl:107
|
//line views/readers.qtpl:117
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/readers.qtpl:107
|
//line views/readers.qtpl:117
|
||||||
return qs422016
|
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) {
|
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(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:111
|
//line views/readers.qtpl:121
|
||||||
siblings, subhyphae, _, _ := tree.Tree(h.Name)
|
siblings, subhyphae, _, _ := tree.Tree(h.Name)
|
||||||
|
|
||||||
//line views/readers.qtpl:112
|
//line views/readers.qtpl:122
|
||||||
qw422016.N().S(`
|
|
||||||
`)
|
|
||||||
//line views/readers.qtpl:113
|
|
||||||
StreamNavHTML(qw422016, rq, h.Name, "revision", revHash)
|
|
||||||
//line views/readers.qtpl:113
|
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<main class="main-width">
|
<main class="main-width">
|
||||||
<article>
|
<article>
|
||||||
<p>Please note that viewing attachments of hyphae is not supported in history for now.</p>
|
<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))
|
qw422016.N().S(NaviTitleHTML(h))
|
||||||
//line views/readers.qtpl:118
|
//line views/readers.qtpl:127
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:119
|
//line views/readers.qtpl:128
|
||||||
qw422016.N().S(contents)
|
qw422016.N().S(contents)
|
||||||
//line views/readers.qtpl:119
|
//line views/readers.qtpl:128
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</article>
|
</article>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:121
|
//line views/readers.qtpl:130
|
||||||
StreamSubhyphaeHTML(qw422016, subhyphae)
|
StreamSubhyphaeHTML(qw422016, subhyphae)
|
||||||
//line views/readers.qtpl:121
|
//line views/readers.qtpl:130
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</main>
|
</main>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:123
|
//line views/readers.qtpl:132
|
||||||
streamsiblingHyphaeHTML(qw422016, siblings)
|
streamsiblingHyphaeHTML(qw422016, siblings)
|
||||||
//line views/readers.qtpl:123
|
//line views/readers.qtpl:132
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:125
|
//line views/readers.qtpl:134
|
||||||
streamviewScripts(qw422016)
|
streamviewScripts(qw422016)
|
||||||
//line views/readers.qtpl:125
|
//line views/readers.qtpl:134
|
||||||
qw422016.N().S(`
|
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) {
|
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)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/readers.qtpl:126
|
//line views/readers.qtpl:135
|
||||||
StreamRevisionHTML(qw422016, rq, h, contents, revHash)
|
StreamRevisionHTML(qw422016, rq, h, contents, revHash)
|
||||||
//line views/readers.qtpl:126
|
//line views/readers.qtpl:135
|
||||||
qt422016.ReleaseWriter(qw422016)
|
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 {
|
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()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/readers.qtpl:126
|
//line views/readers.qtpl:135
|
||||||
WriteRevisionHTML(qb422016, rq, h, contents, revHash)
|
WriteRevisionHTML(qb422016, rq, h, contents, revHash)
|
||||||
//line views/readers.qtpl:126
|
//line views/readers.qtpl:135
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/readers.qtpl:126
|
//line views/readers.qtpl:135
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/readers.qtpl:126
|
//line views/readers.qtpl:135
|
||||||
return qs422016
|
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) {
|
func streamviewScripts(qw422016 *qt422016.Writer) {
|
||||||
//line views/readers.qtpl:128
|
//line views/readers.qtpl:137
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/readers.qtpl:129
|
//line views/readers.qtpl:138
|
||||||
for _, scriptPath := range cfg.ViewScripts {
|
for _, scriptPath := range cfg.ViewScripts {
|
||||||
//line views/readers.qtpl:129
|
//line views/readers.qtpl:138
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<script src="`)
|
<script src="`)
|
||||||
//line views/readers.qtpl:130
|
//line views/readers.qtpl:139
|
||||||
qw422016.E().S(scriptPath)
|
qw422016.E().S(scriptPath)
|
||||||
//line views/readers.qtpl:130
|
//line views/readers.qtpl:139
|
||||||
qw422016.N().S(`"></script>
|
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(`
|
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) {
|
func writeviewScripts(qq422016 qtio422016.Writer) {
|
||||||
//line views/readers.qtpl:132
|
//line views/readers.qtpl:141
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/readers.qtpl:132
|
//line views/readers.qtpl:141
|
||||||
streamviewScripts(qw422016)
|
streamviewScripts(qw422016)
|
||||||
//line views/readers.qtpl:132
|
//line views/readers.qtpl:141
|
||||||
qt422016.ReleaseWriter(qw422016)
|
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 {
|
func viewScripts() string {
|
||||||
//line views/readers.qtpl:132
|
//line views/readers.qtpl:141
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/readers.qtpl:132
|
//line views/readers.qtpl:141
|
||||||
writeviewScripts(qb422016)
|
writeviewScripts(qb422016)
|
||||||
//line views/readers.qtpl:132
|
//line views/readers.qtpl:141
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/readers.qtpl:132
|
//line views/readers.qtpl:141
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/readers.qtpl:132
|
//line views/readers.qtpl:141
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/readers.qtpl:132
|
//line views/readers.qtpl:141
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user