mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-04-29 13:53:10 +00:00
Improve layout
This commit is contained in:
parent
f5ad2daf44
commit
d25c953409
@ -85,12 +85,14 @@ html { height:100%; padding:0; }
|
||||
body {height:100%; margin:0; font-size:16px; font-family: 'PT Sans', 'Liberation Sans', sans-serif;}
|
||||
main > form {margin-bottom:1rem;}
|
||||
textarea {font-size:16px; font-family: 'PT Sans', 'Liberation Sans', sans-serif;}
|
||||
.edit_no-preview {height:100%;}
|
||||
.edit_with-preview .edit-form textarea { min-height: 500px; }
|
||||
|
||||
.edit { min-height: 80vh; }
|
||||
.edit__title { margin-top: 0; }
|
||||
.edit__preview { border: 2px dashed #ddd; }
|
||||
.edit-form {height:90%;}
|
||||
.edit-form textarea {width:100%;height:90%;}
|
||||
.edit-form {height:70vh;}
|
||||
.edit-form textarea {width:100%;height:95%;}
|
||||
.edit-form__save { font-weight: bold; }
|
||||
|
||||
.icon {margin-right: .25rem; vertical-align: bottom; }
|
||||
|
||||
main h1:not(.navi-title) {font-size:1.7rem;}
|
||||
@ -220,6 +222,7 @@ main, article, .hypha-tabs__tab, header, .layout-card { background-color: #3434
|
||||
a, .wikilink_external { color: #f1fa8c; }
|
||||
a:visited, .wikilink_external:visited { color: #ffb86c; }
|
||||
.wikilink_new, .wikilink_new:visited { color: #dd4444; }
|
||||
.navitree__link:hover { background-color: #444; }
|
||||
|
||||
.header-links__link, .header-links__link:visited,
|
||||
.prevnext__el, .prevnext__el:visited { color: #ddd; }
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% import "github.com/bouncepaw/mycorrhiza/user" %}
|
||||
|
||||
{% func LoginHTML() %}
|
||||
<main>
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section>
|
||||
{% if user.AuthUsed %}
|
||||
<h1>Login</h1>
|
||||
@ -25,10 +26,12 @@
|
||||
{% endif %}
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
{% func LoginErrorHTML(err string) %}
|
||||
<main>
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section>
|
||||
{% switch err %}
|
||||
{% case "unknown username" %}
|
||||
@ -41,10 +44,12 @@
|
||||
<p><a href="/login">← Try again</a></p>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
{% func LogoutHTML(can bool) %}
|
||||
<main>
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section>
|
||||
{% if can %}
|
||||
<h1>Log out?</h1>
|
||||
@ -57,4 +62,5 @@
|
||||
{% endif %}
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
@ -24,12 +24,13 @@ var (
|
||||
func StreamLoginHTML(qw422016 *qt422016.Writer) {
|
||||
//line templates/auth.qtpl:3
|
||||
qw422016.N().S(`
|
||||
<main>
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section>
|
||||
`)
|
||||
//line templates/auth.qtpl:6
|
||||
//line templates/auth.qtpl:7
|
||||
if user.AuthUsed {
|
||||
//line templates/auth.qtpl:6
|
||||
//line templates/auth.qtpl:7
|
||||
qw422016.N().S(`
|
||||
<h1>Login</h1>
|
||||
<form method="post" action="/login-data" id="login-form" enctype="multipart/form-data">
|
||||
@ -47,172 +48,177 @@ func StreamLoginHTML(qw422016 *qt422016.Writer) {
|
||||
<a href="/">Cancel</a>
|
||||
</form>
|
||||
`)
|
||||
//line templates/auth.qtpl:22
|
||||
//line templates/auth.qtpl:23
|
||||
} else {
|
||||
//line templates/auth.qtpl:22
|
||||
//line templates/auth.qtpl:23
|
||||
qw422016.N().S(`
|
||||
<p>Administrator of this wiki have not configured any authorization method. You can make edits anonymously.</p>
|
||||
<p><a href="/">← Go home</a></p>
|
||||
`)
|
||||
//line templates/auth.qtpl:25
|
||||
//line templates/auth.qtpl:26
|
||||
}
|
||||
//line templates/auth.qtpl:25
|
||||
//line templates/auth.qtpl:26
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line templates/auth.qtpl:28
|
||||
//line templates/auth.qtpl:30
|
||||
}
|
||||
|
||||
//line templates/auth.qtpl:28
|
||||
//line templates/auth.qtpl:30
|
||||
func WriteLoginHTML(qq422016 qtio422016.Writer) {
|
||||
//line templates/auth.qtpl:28
|
||||
//line templates/auth.qtpl:30
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/auth.qtpl:28
|
||||
//line templates/auth.qtpl:30
|
||||
StreamLoginHTML(qw422016)
|
||||
//line templates/auth.qtpl:28
|
||||
//line templates/auth.qtpl:30
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/auth.qtpl:28
|
||||
//line templates/auth.qtpl:30
|
||||
}
|
||||
|
||||
//line templates/auth.qtpl:28
|
||||
//line templates/auth.qtpl:30
|
||||
func LoginHTML() string {
|
||||
//line templates/auth.qtpl:28
|
||||
//line templates/auth.qtpl:30
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/auth.qtpl:28
|
||||
//line templates/auth.qtpl:30
|
||||
WriteLoginHTML(qb422016)
|
||||
//line templates/auth.qtpl:28
|
||||
//line templates/auth.qtpl:30
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/auth.qtpl:28
|
||||
//line templates/auth.qtpl:30
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/auth.qtpl:28
|
||||
//line templates/auth.qtpl:30
|
||||
return qs422016
|
||||
//line templates/auth.qtpl:28
|
||||
//line templates/auth.qtpl:30
|
||||
}
|
||||
|
||||
//line templates/auth.qtpl:30
|
||||
//line templates/auth.qtpl:32
|
||||
func StreamLoginErrorHTML(qw422016 *qt422016.Writer, err string) {
|
||||
//line templates/auth.qtpl:30
|
||||
//line templates/auth.qtpl:32
|
||||
qw422016.N().S(`
|
||||
<main>
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section>
|
||||
`)
|
||||
//line templates/auth.qtpl:33
|
||||
//line templates/auth.qtpl:36
|
||||
switch err {
|
||||
//line templates/auth.qtpl:34
|
||||
//line templates/auth.qtpl:37
|
||||
case "unknown username":
|
||||
//line templates/auth.qtpl:34
|
||||
//line templates/auth.qtpl:37
|
||||
qw422016.N().S(`
|
||||
<p class="error">Unknown username.</p>
|
||||
`)
|
||||
//line templates/auth.qtpl:36
|
||||
//line templates/auth.qtpl:39
|
||||
case "wrong password":
|
||||
//line templates/auth.qtpl:36
|
||||
//line templates/auth.qtpl:39
|
||||
qw422016.N().S(`
|
||||
<p class="error">Wrong password.</p>
|
||||
`)
|
||||
//line templates/auth.qtpl:38
|
||||
//line templates/auth.qtpl:41
|
||||
default:
|
||||
//line templates/auth.qtpl:38
|
||||
//line templates/auth.qtpl:41
|
||||
qw422016.N().S(`
|
||||
<p class="error">`)
|
||||
//line templates/auth.qtpl:39
|
||||
//line templates/auth.qtpl:42
|
||||
qw422016.E().S(err)
|
||||
//line templates/auth.qtpl:39
|
||||
//line templates/auth.qtpl:42
|
||||
qw422016.N().S(`</p>
|
||||
`)
|
||||
//line templates/auth.qtpl:40
|
||||
//line templates/auth.qtpl:43
|
||||
}
|
||||
//line templates/auth.qtpl:40
|
||||
//line templates/auth.qtpl:43
|
||||
qw422016.N().S(`
|
||||
<p><a href="/login">← Try again</a></p>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line templates/auth.qtpl:44
|
||||
//line templates/auth.qtpl:48
|
||||
}
|
||||
|
||||
//line templates/auth.qtpl:44
|
||||
//line templates/auth.qtpl:48
|
||||
func WriteLoginErrorHTML(qq422016 qtio422016.Writer, err string) {
|
||||
//line templates/auth.qtpl:44
|
||||
//line templates/auth.qtpl:48
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/auth.qtpl:44
|
||||
//line templates/auth.qtpl:48
|
||||
StreamLoginErrorHTML(qw422016, err)
|
||||
//line templates/auth.qtpl:44
|
||||
//line templates/auth.qtpl:48
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/auth.qtpl:44
|
||||
//line templates/auth.qtpl:48
|
||||
}
|
||||
|
||||
//line templates/auth.qtpl:44
|
||||
//line templates/auth.qtpl:48
|
||||
func LoginErrorHTML(err string) string {
|
||||
//line templates/auth.qtpl:44
|
||||
//line templates/auth.qtpl:48
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/auth.qtpl:44
|
||||
//line templates/auth.qtpl:48
|
||||
WriteLoginErrorHTML(qb422016, err)
|
||||
//line templates/auth.qtpl:44
|
||||
//line templates/auth.qtpl:48
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/auth.qtpl:44
|
||||
//line templates/auth.qtpl:48
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/auth.qtpl:44
|
||||
//line templates/auth.qtpl:48
|
||||
return qs422016
|
||||
//line templates/auth.qtpl:44
|
||||
//line templates/auth.qtpl:48
|
||||
}
|
||||
|
||||
//line templates/auth.qtpl:46
|
||||
//line templates/auth.qtpl:50
|
||||
func StreamLogoutHTML(qw422016 *qt422016.Writer, can bool) {
|
||||
//line templates/auth.qtpl:46
|
||||
//line templates/auth.qtpl:50
|
||||
qw422016.N().S(`
|
||||
<main>
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section>
|
||||
`)
|
||||
//line templates/auth.qtpl:49
|
||||
//line templates/auth.qtpl:54
|
||||
if can {
|
||||
//line templates/auth.qtpl:49
|
||||
//line templates/auth.qtpl:54
|
||||
qw422016.N().S(`
|
||||
<h1>Log out?</h1>
|
||||
<p><a href="/logout-confirm"><strong>Confirm</strong></a></p>
|
||||
<p><a href="/">Cancel</a></p>
|
||||
`)
|
||||
//line templates/auth.qtpl:53
|
||||
//line templates/auth.qtpl:58
|
||||
} else {
|
||||
//line templates/auth.qtpl:53
|
||||
//line templates/auth.qtpl:58
|
||||
qw422016.N().S(`
|
||||
<p>You cannot log out because you are not logged in.</p>
|
||||
<p><a href="/login">Login</a></p>
|
||||
<p><a href="/login">← Home</a></p>
|
||||
`)
|
||||
//line templates/auth.qtpl:57
|
||||
//line templates/auth.qtpl:62
|
||||
}
|
||||
//line templates/auth.qtpl:57
|
||||
//line templates/auth.qtpl:62
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line templates/auth.qtpl:60
|
||||
//line templates/auth.qtpl:66
|
||||
}
|
||||
|
||||
//line templates/auth.qtpl:60
|
||||
//line templates/auth.qtpl:66
|
||||
func WriteLogoutHTML(qq422016 qtio422016.Writer, can bool) {
|
||||
//line templates/auth.qtpl:60
|
||||
//line templates/auth.qtpl:66
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/auth.qtpl:60
|
||||
//line templates/auth.qtpl:66
|
||||
StreamLogoutHTML(qw422016, can)
|
||||
//line templates/auth.qtpl:60
|
||||
//line templates/auth.qtpl:66
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/auth.qtpl:60
|
||||
//line templates/auth.qtpl:66
|
||||
}
|
||||
|
||||
//line templates/auth.qtpl:60
|
||||
//line templates/auth.qtpl:66
|
||||
func LogoutHTML(can bool) string {
|
||||
//line templates/auth.qtpl:60
|
||||
//line templates/auth.qtpl:66
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/auth.qtpl:60
|
||||
//line templates/auth.qtpl:66
|
||||
WriteLogoutHTML(qb422016, can)
|
||||
//line templates/auth.qtpl:60
|
||||
//line templates/auth.qtpl:66
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/auth.qtpl:60
|
||||
//line templates/auth.qtpl:66
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/auth.qtpl:60
|
||||
//line templates/auth.qtpl:66
|
||||
return qs422016
|
||||
//line templates/auth.qtpl:60
|
||||
//line templates/auth.qtpl:66
|
||||
}
|
||||
|
@ -11,11 +11,11 @@ type navEntry struct {
|
||||
var navEntries = []navEntry{
|
||||
{"page", "Hypha"},
|
||||
{"edit", "Edit"},
|
||||
{"text", "Raw text"},
|
||||
{"history", "History"},
|
||||
{"revision", "NOT REACHED"},
|
||||
{"rename-ask", "Rename"},
|
||||
{"delete-ask", "Delete"},
|
||||
{"text", "Raw text"},
|
||||
}
|
||||
%}
|
||||
|
||||
@ -56,3 +56,9 @@ var navEntries = []navEntry{
|
||||
{% endif %}
|
||||
{% endfunc %}
|
||||
|
||||
{% func relativeHyphae(relatives string) %}
|
||||
<aside class="relative-hyphae layout-card">
|
||||
<h1 class="relative-hyphae__title layout-card__title">Relative hyphae</h1>
|
||||
{%s= relatives %}
|
||||
</aside>
|
||||
{% endfunc %}
|
||||
|
@ -37,11 +37,11 @@ type navEntry struct {
|
||||
var navEntries = []navEntry{
|
||||
{"page", "Hypha"},
|
||||
{"edit", "Edit"},
|
||||
{"text", "Raw text"},
|
||||
{"history", "History"},
|
||||
{"revision", "NOT REACHED"},
|
||||
{"rename-ask", "Rename"},
|
||||
{"delete-ask", "Delete"},
|
||||
{"text", "Raw text"},
|
||||
}
|
||||
|
||||
//line templates/common.qtpl:22
|
||||
@ -211,3 +211,45 @@ func userMenuHTML(u *user.User) string {
|
||||
return qs422016
|
||||
//line templates/common.qtpl:57
|
||||
}
|
||||
|
||||
//line templates/common.qtpl:59
|
||||
func streamrelativeHyphae(qw422016 *qt422016.Writer, relatives string) {
|
||||
//line templates/common.qtpl:59
|
||||
qw422016.N().S(`
|
||||
<aside class="relative-hyphae layout-card">
|
||||
<h1 class="relative-hyphae__title layout-card__title">Relative hyphae</h1>
|
||||
`)
|
||||
//line templates/common.qtpl:62
|
||||
qw422016.N().S(relatives)
|
||||
//line templates/common.qtpl:62
|
||||
qw422016.N().S(`
|
||||
</aside>
|
||||
`)
|
||||
//line templates/common.qtpl:64
|
||||
}
|
||||
|
||||
//line templates/common.qtpl:64
|
||||
func writerelativeHyphae(qq422016 qtio422016.Writer, relatives string) {
|
||||
//line templates/common.qtpl:64
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/common.qtpl:64
|
||||
streamrelativeHyphae(qw422016, relatives)
|
||||
//line templates/common.qtpl:64
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/common.qtpl:64
|
||||
}
|
||||
|
||||
//line templates/common.qtpl:64
|
||||
func relativeHyphae(relatives string) string {
|
||||
//line templates/common.qtpl:64
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/common.qtpl:64
|
||||
writerelativeHyphae(qb422016, relatives)
|
||||
//line templates/common.qtpl:64
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/common.qtpl:64
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/common.qtpl:64
|
||||
return qs422016
|
||||
//line templates/common.qtpl:64
|
||||
}
|
||||
|
@ -60,12 +60,14 @@ html { height:100%; padding:0; }
|
||||
body {height:100%; margin:0; font-size:16px; font-family: 'PT Sans', 'Liberation Sans', sans-serif;}
|
||||
main > form {margin-bottom:1rem;}
|
||||
textarea {font-size:16px; font-family: 'PT Sans', 'Liberation Sans', sans-serif;}
|
||||
.edit_no-preview {height:100%;}
|
||||
.edit_with-preview .edit-form textarea { min-height: 500px; }
|
||||
|
||||
.edit { min-height: 80vh; }
|
||||
.edit__title { margin-top: 0; }
|
||||
.edit__preview { border: 2px dashed #ddd; }
|
||||
.edit-form {height:90%;}
|
||||
.edit-form textarea {width:100%;height:90%;}
|
||||
.edit-form {height:70vh;}
|
||||
.edit-form textarea {width:100%;height:95%;}
|
||||
.edit-form__save { font-weight: bold; }
|
||||
|
||||
.icon {margin-right: .25rem; vertical-align: bottom; }
|
||||
|
||||
main h1:not(.navi-title) {font-size:1.7rem;}
|
||||
|
@ -3,7 +3,8 @@
|
||||
This dialog is to be shown to a user when they try to delete a hypha.
|
||||
{% func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) %}
|
||||
{%= navHTML(rq, hyphaName, "delete-ask") %}
|
||||
<main>
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
{% if isOld %}
|
||||
<section>
|
||||
<h1>Delete {%s hyphaName %}?</h1>
|
||||
@ -16,6 +17,7 @@ This dialog is to be shown to a user when they try to delete a hypha.
|
||||
{%= cannotDeleteDueToNonExistence(hyphaName) %}
|
||||
{% endif %}
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
{% func cannotDeleteDueToNonExistence(hyphaName string) %}
|
||||
|
@ -31,124 +31,126 @@ func StreamDeleteAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName
|
||||
streamnavHTML(qw422016, rq, hyphaName, "delete-ask")
|
||||
//line templates/delete.qtpl:5
|
||||
qw422016.N().S(`
|
||||
<main>
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
`)
|
||||
//line templates/delete.qtpl:7
|
||||
//line templates/delete.qtpl:8
|
||||
if isOld {
|
||||
//line templates/delete.qtpl:7
|
||||
//line templates/delete.qtpl:8
|
||||
qw422016.N().S(`
|
||||
<section>
|
||||
<h1>Delete `)
|
||||
//line templates/delete.qtpl:9
|
||||
//line templates/delete.qtpl:10
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/delete.qtpl:9
|
||||
//line templates/delete.qtpl:10
|
||||
qw422016.N().S(`?</h1>
|
||||
<p>Do you really want to delete hypha <em>`)
|
||||
//line templates/delete.qtpl:10
|
||||
//line templates/delete.qtpl:11
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/delete.qtpl:10
|
||||
//line templates/delete.qtpl:11
|
||||
qw422016.N().S(`</em>?</p>
|
||||
<p>In this version of MycorrhizaWiki you cannot undelete a deleted hypha but the history can still be accessed.</p>
|
||||
<p><a href="/delete-confirm/`)
|
||||
//line templates/delete.qtpl:12
|
||||
//line templates/delete.qtpl:13
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/delete.qtpl:12
|
||||
//line templates/delete.qtpl:13
|
||||
qw422016.N().S(`"><strong>Confirm</strong></a></p>
|
||||
<p><a href="/page/`)
|
||||
//line templates/delete.qtpl:13
|
||||
//line templates/delete.qtpl:14
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/delete.qtpl:13
|
||||
//line templates/delete.qtpl:14
|
||||
qw422016.N().S(`">Cancel</a></p>
|
||||
</section>
|
||||
`)
|
||||
//line templates/delete.qtpl:15
|
||||
//line templates/delete.qtpl:16
|
||||
} else {
|
||||
//line templates/delete.qtpl:15
|
||||
//line templates/delete.qtpl:16
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/delete.qtpl:16
|
||||
//line templates/delete.qtpl:17
|
||||
streamcannotDeleteDueToNonExistence(qw422016, hyphaName)
|
||||
//line templates/delete.qtpl:16
|
||||
//line templates/delete.qtpl:17
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/delete.qtpl:17
|
||||
//line templates/delete.qtpl:18
|
||||
}
|
||||
//line templates/delete.qtpl:17
|
||||
//line templates/delete.qtpl:18
|
||||
qw422016.N().S(`
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line templates/delete.qtpl:19
|
||||
//line templates/delete.qtpl:21
|
||||
}
|
||||
|
||||
//line templates/delete.qtpl:19
|
||||
//line templates/delete.qtpl:21
|
||||
func WriteDeleteAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
|
||||
//line templates/delete.qtpl:19
|
||||
//line templates/delete.qtpl:21
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/delete.qtpl:19
|
||||
//line templates/delete.qtpl:21
|
||||
StreamDeleteAskHTML(qw422016, rq, hyphaName, isOld)
|
||||
//line templates/delete.qtpl:19
|
||||
//line templates/delete.qtpl:21
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/delete.qtpl:19
|
||||
//line templates/delete.qtpl:21
|
||||
}
|
||||
|
||||
//line templates/delete.qtpl:19
|
||||
//line templates/delete.qtpl:21
|
||||
func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
|
||||
//line templates/delete.qtpl:19
|
||||
//line templates/delete.qtpl:21
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/delete.qtpl:19
|
||||
//line templates/delete.qtpl:21
|
||||
WriteDeleteAskHTML(qb422016, rq, hyphaName, isOld)
|
||||
//line templates/delete.qtpl:19
|
||||
//line templates/delete.qtpl:21
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/delete.qtpl:19
|
||||
//line templates/delete.qtpl:21
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/delete.qtpl:19
|
||||
//line templates/delete.qtpl:21
|
||||
return qs422016
|
||||
//line templates/delete.qtpl:19
|
||||
//line templates/delete.qtpl:21
|
||||
}
|
||||
|
||||
//line templates/delete.qtpl:21
|
||||
//line templates/delete.qtpl:23
|
||||
func streamcannotDeleteDueToNonExistence(qw422016 *qt422016.Writer, hyphaName string) {
|
||||
//line templates/delete.qtpl:21
|
||||
//line templates/delete.qtpl:23
|
||||
qw422016.N().S(`
|
||||
<section>
|
||||
<h1>Cannot delete `)
|
||||
//line templates/delete.qtpl:23
|
||||
//line templates/delete.qtpl:25
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/delete.qtpl:23
|
||||
//line templates/delete.qtpl:25
|
||||
qw422016.N().S(`</h1>
|
||||
<p>This hypha does not exist.</p>
|
||||
<p><a href="/page/`)
|
||||
//line templates/delete.qtpl:25
|
||||
//line templates/delete.qtpl:27
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/delete.qtpl:25
|
||||
//line templates/delete.qtpl:27
|
||||
qw422016.N().S(`">Go back</a></p>
|
||||
</section>
|
||||
`)
|
||||
//line templates/delete.qtpl:27
|
||||
//line templates/delete.qtpl:29
|
||||
}
|
||||
|
||||
//line templates/delete.qtpl:27
|
||||
//line templates/delete.qtpl:29
|
||||
func writecannotDeleteDueToNonExistence(qq422016 qtio422016.Writer, hyphaName string) {
|
||||
//line templates/delete.qtpl:27
|
||||
//line templates/delete.qtpl:29
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/delete.qtpl:27
|
||||
//line templates/delete.qtpl:29
|
||||
streamcannotDeleteDueToNonExistence(qw422016, hyphaName)
|
||||
//line templates/delete.qtpl:27
|
||||
//line templates/delete.qtpl:29
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/delete.qtpl:27
|
||||
//line templates/delete.qtpl:29
|
||||
}
|
||||
|
||||
//line templates/delete.qtpl:27
|
||||
//line templates/delete.qtpl:29
|
||||
func cannotDeleteDueToNonExistence(hyphaName string) string {
|
||||
//line templates/delete.qtpl:27
|
||||
//line templates/delete.qtpl:29
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/delete.qtpl:27
|
||||
//line templates/delete.qtpl:29
|
||||
writecannotDeleteDueToNonExistence(qb422016, hyphaName)
|
||||
//line templates/delete.qtpl:27
|
||||
//line templates/delete.qtpl:29
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/delete.qtpl:27
|
||||
//line templates/delete.qtpl:29
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/delete.qtpl:27
|
||||
//line templates/delete.qtpl:29
|
||||
return qs422016
|
||||
//line templates/delete.qtpl:27
|
||||
//line templates/delete.qtpl:29
|
||||
}
|
||||
|
@ -1,9 +1,11 @@
|
||||
{% import "net/http" %}
|
||||
{% import "github.com/bouncepaw/mycorrhiza/util" %}
|
||||
|
||||
{% func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) %}
|
||||
{%s= navHTML(rq, hyphaName, "edit") %}
|
||||
<main class="edit edit_no-preview">
|
||||
<h1>Edit {%s hyphaName %}</h1>
|
||||
<div class="layout">
|
||||
<main class="main-width edit edit_no-preview">
|
||||
<h1 class="edit__title">Edit {%s util.BeautifulName(hyphaName) %}</h1>
|
||||
{%s= warning %}
|
||||
<form method="post" class="edit-form"
|
||||
action="/upload-text/{%s hyphaName %}">
|
||||
@ -14,11 +16,13 @@
|
||||
<a href="/page/{%s hyphaName %}" class="edit-form__cancel">Cancel</a>
|
||||
</form>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
{% func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) %}
|
||||
{%s= navHTML(rq, hyphaName, "edit") %}
|
||||
<main class="edit edit_with-preview">
|
||||
<div class="layout">
|
||||
<main class="main-width edit edit_with-preview">
|
||||
<h1>Edit {%s hyphaName %} (preview)</h1>
|
||||
{%s= warning %}
|
||||
<form method="post" class="edit-form"
|
||||
@ -32,4 +36,5 @@
|
||||
<p class="warning">Note that the hypha is not saved yet. You can preview the changes ↓</p>
|
||||
<section class="edit__preview">{%s= renderedPage %}</section>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
@ -7,163 +7,170 @@ package templates
|
||||
//line templates/mutators.qtpl:1
|
||||
import "net/http"
|
||||
|
||||
//line templates/mutators.qtpl:3
|
||||
//line templates/mutators.qtpl:2
|
||||
import "github.com/bouncepaw/mycorrhiza/util"
|
||||
|
||||
//line templates/mutators.qtpl:4
|
||||
import (
|
||||
qtio422016 "io"
|
||||
|
||||
qt422016 "github.com/valyala/quicktemplate"
|
||||
)
|
||||
|
||||
//line templates/mutators.qtpl:3
|
||||
//line templates/mutators.qtpl:4
|
||||
var (
|
||||
_ = qtio422016.Copy
|
||||
_ = qt422016.AcquireByteBuffer
|
||||
)
|
||||
|
||||
//line templates/mutators.qtpl:3
|
||||
//line templates/mutators.qtpl:4
|
||||
func StreamEditHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) {
|
||||
//line templates/mutators.qtpl:3
|
||||
//line templates/mutators.qtpl:4
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/mutators.qtpl:4
|
||||
//line templates/mutators.qtpl:5
|
||||
qw422016.N().S(navHTML(rq, hyphaName, "edit"))
|
||||
//line templates/mutators.qtpl:4
|
||||
//line templates/mutators.qtpl:5
|
||||
qw422016.N().S(`
|
||||
<main class="edit edit_no-preview">
|
||||
<h1>Edit `)
|
||||
//line templates/mutators.qtpl:6
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/mutators.qtpl:6
|
||||
<div class="layout">
|
||||
<main class="main-width edit edit_no-preview">
|
||||
<h1 class="edit__title">Edit `)
|
||||
//line templates/mutators.qtpl:8
|
||||
qw422016.E().S(util.BeautifulName(hyphaName))
|
||||
//line templates/mutators.qtpl:8
|
||||
qw422016.N().S(`</h1>
|
||||
`)
|
||||
//line templates/mutators.qtpl:7
|
||||
//line templates/mutators.qtpl:9
|
||||
qw422016.N().S(warning)
|
||||
//line templates/mutators.qtpl:7
|
||||
//line templates/mutators.qtpl:9
|
||||
qw422016.N().S(`
|
||||
<form method="post" class="edit-form"
|
||||
action="/upload-text/`)
|
||||
//line templates/mutators.qtpl:9
|
||||
//line templates/mutators.qtpl:11
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/mutators.qtpl:9
|
||||
//line templates/mutators.qtpl:11
|
||||
qw422016.N().S(`">
|
||||
<textarea name="text">`)
|
||||
//line templates/mutators.qtpl:10
|
||||
//line templates/mutators.qtpl:12
|
||||
qw422016.E().S(textAreaFill)
|
||||
//line templates/mutators.qtpl:10
|
||||
//line templates/mutators.qtpl:12
|
||||
qw422016.N().S(`</textarea>
|
||||
<br/>
|
||||
<input type="submit" name="action" value="Save" class="edit-form__save"/>
|
||||
<input type="submit" name="action" value="Preview" class="edit-form__preview">
|
||||
<a href="/page/`)
|
||||
//line templates/mutators.qtpl:14
|
||||
//line templates/mutators.qtpl:16
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/mutators.qtpl:14
|
||||
//line templates/mutators.qtpl:16
|
||||
qw422016.N().S(`" class="edit-form__cancel">Cancel</a>
|
||||
</form>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line templates/mutators.qtpl:17
|
||||
//line templates/mutators.qtpl:20
|
||||
}
|
||||
|
||||
//line templates/mutators.qtpl:17
|
||||
//line templates/mutators.qtpl:20
|
||||
func WriteEditHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string) {
|
||||
//line templates/mutators.qtpl:17
|
||||
//line templates/mutators.qtpl:20
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/mutators.qtpl:17
|
||||
//line templates/mutators.qtpl:20
|
||||
StreamEditHTML(qw422016, rq, hyphaName, textAreaFill, warning)
|
||||
//line templates/mutators.qtpl:17
|
||||
//line templates/mutators.qtpl:20
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/mutators.qtpl:17
|
||||
//line templates/mutators.qtpl:20
|
||||
}
|
||||
|
||||
//line templates/mutators.qtpl:17
|
||||
//line templates/mutators.qtpl:20
|
||||
func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) string {
|
||||
//line templates/mutators.qtpl:17
|
||||
//line templates/mutators.qtpl:20
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/mutators.qtpl:17
|
||||
//line templates/mutators.qtpl:20
|
||||
WriteEditHTML(qb422016, rq, hyphaName, textAreaFill, warning)
|
||||
//line templates/mutators.qtpl:17
|
||||
//line templates/mutators.qtpl:20
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/mutators.qtpl:17
|
||||
//line templates/mutators.qtpl:20
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/mutators.qtpl:17
|
||||
//line templates/mutators.qtpl:20
|
||||
return qs422016
|
||||
//line templates/mutators.qtpl:17
|
||||
//line templates/mutators.qtpl:20
|
||||
}
|
||||
|
||||
//line templates/mutators.qtpl:19
|
||||
//line templates/mutators.qtpl:22
|
||||
func StreamPreviewHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) {
|
||||
//line templates/mutators.qtpl:19
|
||||
//line templates/mutators.qtpl:22
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/mutators.qtpl:20
|
||||
//line templates/mutators.qtpl:23
|
||||
qw422016.N().S(navHTML(rq, hyphaName, "edit"))
|
||||
//line templates/mutators.qtpl:20
|
||||
//line templates/mutators.qtpl:23
|
||||
qw422016.N().S(`
|
||||
<main class="edit edit_with-preview">
|
||||
<div class="layout">
|
||||
<main class="main-width edit edit_with-preview">
|
||||
<h1>Edit `)
|
||||
//line templates/mutators.qtpl:22
|
||||
//line templates/mutators.qtpl:26
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/mutators.qtpl:22
|
||||
//line templates/mutators.qtpl:26
|
||||
qw422016.N().S(` (preview)</h1>
|
||||
`)
|
||||
//line templates/mutators.qtpl:23
|
||||
//line templates/mutators.qtpl:27
|
||||
qw422016.N().S(warning)
|
||||
//line templates/mutators.qtpl:23
|
||||
//line templates/mutators.qtpl:27
|
||||
qw422016.N().S(`
|
||||
<form method="post" class="edit-form"
|
||||
action="/upload-text/`)
|
||||
//line templates/mutators.qtpl:25
|
||||
//line templates/mutators.qtpl:29
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/mutators.qtpl:25
|
||||
//line templates/mutators.qtpl:29
|
||||
qw422016.N().S(`">
|
||||
<textarea name="text">`)
|
||||
//line templates/mutators.qtpl:26
|
||||
//line templates/mutators.qtpl:30
|
||||
qw422016.E().S(textAreaFill)
|
||||
//line templates/mutators.qtpl:26
|
||||
//line templates/mutators.qtpl:30
|
||||
qw422016.N().S(`</textarea>
|
||||
<br/>
|
||||
<input type="submit" name="action" value="Save" class="edit-form__save"/>
|
||||
<input type="submit" name="action" value="Preview" class="edit-form__preview">
|
||||
<a href="/page/`)
|
||||
//line templates/mutators.qtpl:30
|
||||
//line templates/mutators.qtpl:34
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/mutators.qtpl:30
|
||||
//line templates/mutators.qtpl:34
|
||||
qw422016.N().S(`" class="edit-form__cancel">Cancel</a>
|
||||
</form>
|
||||
<p class="warning">Note that the hypha is not saved yet. You can preview the changes ↓</p>
|
||||
<section class="edit__preview">`)
|
||||
//line templates/mutators.qtpl:33
|
||||
//line templates/mutators.qtpl:37
|
||||
qw422016.N().S(renderedPage)
|
||||
//line templates/mutators.qtpl:33
|
||||
//line templates/mutators.qtpl:37
|
||||
qw422016.N().S(`</section>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line templates/mutators.qtpl:35
|
||||
//line templates/mutators.qtpl:40
|
||||
}
|
||||
|
||||
//line templates/mutators.qtpl:35
|
||||
//line templates/mutators.qtpl:40
|
||||
func WritePreviewHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) {
|
||||
//line templates/mutators.qtpl:35
|
||||
//line templates/mutators.qtpl:40
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/mutators.qtpl:35
|
||||
//line templates/mutators.qtpl:40
|
||||
StreamPreviewHTML(qw422016, rq, hyphaName, textAreaFill, warning, renderedPage)
|
||||
//line templates/mutators.qtpl:35
|
||||
//line templates/mutators.qtpl:40
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/mutators.qtpl:35
|
||||
//line templates/mutators.qtpl:40
|
||||
}
|
||||
|
||||
//line templates/mutators.qtpl:35
|
||||
//line templates/mutators.qtpl:40
|
||||
func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) string {
|
||||
//line templates/mutators.qtpl:35
|
||||
//line templates/mutators.qtpl:40
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/mutators.qtpl:35
|
||||
//line templates/mutators.qtpl:40
|
||||
WritePreviewHTML(qb422016, rq, hyphaName, textAreaFill, warning, renderedPage)
|
||||
//line templates/mutators.qtpl:35
|
||||
//line templates/mutators.qtpl:40
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/mutators.qtpl:35
|
||||
//line templates/mutators.qtpl:40
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/mutators.qtpl:35
|
||||
//line templates/mutators.qtpl:40
|
||||
return qs422016
|
||||
//line templates/mutators.qtpl:35
|
||||
//line templates/mutators.qtpl:40
|
||||
}
|
||||
|
@ -4,67 +4,65 @@
|
||||
|
||||
{% func HistoryHTML(rq *http.Request, hyphaName, list string) %}
|
||||
{%= navHTML(rq, hyphaName, "history") %}
|
||||
<main>
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<article class="history">
|
||||
<h1>History of {%s hyphaName %}</h1>
|
||||
{%s= list %}
|
||||
</article>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
{% func RevisionHTML(rq *http.Request, hyphaName, naviTitle, contents, tree, revHash string) %}
|
||||
{% func RevisionHTML(rq *http.Request, hyphaName, naviTitle, contents, relatives, revHash string) %}
|
||||
{%= navHTML(rq, hyphaName, "revision", revHash) %}
|
||||
<main>
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<article>
|
||||
<p>Please note that viewing binary parts of hyphae is not supported in history for now.</p>
|
||||
{%s= naviTitle %}
|
||||
{%s= contents %}
|
||||
</article>
|
||||
<hr/>
|
||||
<aside>
|
||||
{%s= tree %}
|
||||
</aside>
|
||||
</main>
|
||||
{%= relativeHyphae(relatives) %}
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
If `contents` == "", a helpful message is shown instead.
|
||||
{% func PageHTML(rq *http.Request, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName string, hasAmnt bool) %}
|
||||
{%= navHTML(rq, hyphaName, "page") %}
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<article>
|
||||
{%s= naviTitle %}
|
||||
{% if contents == "" %}
|
||||
<p>This hypha has no text. Why not <a href="/edit/{%s hyphaName %}">create it</a>?</p>
|
||||
{% else %}
|
||||
{%s= contents %}
|
||||
{% endif %}
|
||||
</article>
|
||||
<section class="prevnext">
|
||||
{% if prevHyphaName != "" %}
|
||||
<a class="prevnext__el prevnext__prev" href="/page/{%s prevHyphaName %}" rel="prev">← {%s path.Base(prevHyphaName) %}</a>
|
||||
{% endif %}
|
||||
{% if nextHyphaName != "" %}
|
||||
<a class="prevnext__el prevnext__next" href="/page/{%s nextHyphaName %}" rel="next">{%s path.Base(nextHyphaName) %} →</a>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% if u := user.FromRequest(rq); !user.AuthUsed || u.Group != "anon" %}
|
||||
<form action="/upload-binary/{%s hyphaName %}"
|
||||
method="post" enctype="multipart/form-data"
|
||||
class="upload-amnt">
|
||||
{% if hasAmnt %}
|
||||
<a class="upload-amnt__unattach" href="/unattach-ask/{%s hyphaName %}">Unattach current attachment?</a>
|
||||
{% endif %}
|
||||
<label for="upload-binary__input">Upload a new attachment</label>
|
||||
<br>
|
||||
<input type="file" id="upload-binary__input" name="binary"/>
|
||||
<input type="submit"/>
|
||||
</form>
|
||||
{% endif %}
|
||||
</main>
|
||||
<aside class="relative-hyphae layout-card">
|
||||
<h1 class="relative-hyphae__title layout-card__title">Relative hyphae</h1>
|
||||
{%s= relatives %}
|
||||
</aside>
|
||||
<main class="main-width">
|
||||
<article>
|
||||
{%s= naviTitle %}
|
||||
{% if contents == "" %}
|
||||
<p>This hypha has no text. Why not <a href="/edit/{%s hyphaName %}">create it</a>?</p>
|
||||
{% else %}
|
||||
{%s= contents %}
|
||||
{% endif %}
|
||||
</article>
|
||||
<section class="prevnext">
|
||||
{% if prevHyphaName != "" %}
|
||||
<a class="prevnext__el prevnext__prev" href="/page/{%s prevHyphaName %}" rel="prev">← {%s path.Base(prevHyphaName) %}</a>
|
||||
{% endif %}
|
||||
{% if nextHyphaName != "" %}
|
||||
<a class="prevnext__el prevnext__next" href="/page/{%s nextHyphaName %}" rel="next">{%s path.Base(nextHyphaName) %} →</a>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% if u := user.FromRequest(rq); !user.AuthUsed || u.Group != "anon" %}
|
||||
<form action="/upload-binary/{%s hyphaName %}"
|
||||
method="post" enctype="multipart/form-data"
|
||||
class="upload-amnt">
|
||||
{% if hasAmnt %}
|
||||
<a class="upload-amnt__unattach" href="/unattach-ask/{%s hyphaName %}">Unattach current attachment?</a>
|
||||
{% endif %}
|
||||
<label for="upload-binary__input">Upload a new attachment</label>
|
||||
<br>
|
||||
<input type="file" id="upload-binary__input" name="binary"/>
|
||||
<input type="submit"/>
|
||||
</form>
|
||||
{% endif %}
|
||||
</main>
|
||||
{%= relativeHyphae(relatives) %}
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
@ -35,270 +35,268 @@ func StreamHistoryHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, l
|
||||
streamnavHTML(qw422016, rq, hyphaName, "history")
|
||||
//line templates/readers.qtpl:6
|
||||
qw422016.N().S(`
|
||||
<main>
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<article class="history">
|
||||
<h1>History of `)
|
||||
//line templates/readers.qtpl:9
|
||||
//line templates/readers.qtpl:10
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/readers.qtpl:9
|
||||
//line templates/readers.qtpl:10
|
||||
qw422016.N().S(`</h1>
|
||||
`)
|
||||
//line templates/readers.qtpl:10
|
||||
//line templates/readers.qtpl:11
|
||||
qw422016.N().S(list)
|
||||
//line templates/readers.qtpl:10
|
||||
//line templates/readers.qtpl:11
|
||||
qw422016.N().S(`
|
||||
</article>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line templates/readers.qtpl:13
|
||||
//line templates/readers.qtpl:15
|
||||
}
|
||||
|
||||
//line templates/readers.qtpl:13
|
||||
//line templates/readers.qtpl:15
|
||||
func WriteHistoryHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, list string) {
|
||||
//line templates/readers.qtpl:13
|
||||
//line templates/readers.qtpl:15
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/readers.qtpl:13
|
||||
//line templates/readers.qtpl:15
|
||||
StreamHistoryHTML(qw422016, rq, hyphaName, list)
|
||||
//line templates/readers.qtpl:13
|
||||
//line templates/readers.qtpl:15
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/readers.qtpl:13
|
||||
//line templates/readers.qtpl:15
|
||||
}
|
||||
|
||||
//line templates/readers.qtpl:13
|
||||
//line templates/readers.qtpl:15
|
||||
func HistoryHTML(rq *http.Request, hyphaName, list string) string {
|
||||
//line templates/readers.qtpl:13
|
||||
//line templates/readers.qtpl:15
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/readers.qtpl:13
|
||||
//line templates/readers.qtpl:15
|
||||
WriteHistoryHTML(qb422016, rq, hyphaName, list)
|
||||
//line templates/readers.qtpl:13
|
||||
//line templates/readers.qtpl:15
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/readers.qtpl:13
|
||||
//line templates/readers.qtpl:15
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/readers.qtpl:13
|
||||
//line templates/readers.qtpl:15
|
||||
return qs422016
|
||||
//line templates/readers.qtpl:13
|
||||
//line templates/readers.qtpl:15
|
||||
}
|
||||
|
||||
//line templates/readers.qtpl:15
|
||||
func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, tree, revHash string) {
|
||||
//line templates/readers.qtpl:15
|
||||
//line templates/readers.qtpl:17
|
||||
func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, relatives, revHash string) {
|
||||
//line templates/readers.qtpl:17
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/readers.qtpl:16
|
||||
//line templates/readers.qtpl:18
|
||||
streamnavHTML(qw422016, rq, hyphaName, "revision", revHash)
|
||||
//line templates/readers.qtpl:16
|
||||
//line templates/readers.qtpl:18
|
||||
qw422016.N().S(`
|
||||
<main>
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<article>
|
||||
<p>Please note that viewing binary parts of hyphae is not supported in history for now.</p>
|
||||
`)
|
||||
//line templates/readers.qtpl:20
|
||||
//line templates/readers.qtpl:23
|
||||
qw422016.N().S(naviTitle)
|
||||
//line templates/readers.qtpl:20
|
||||
//line templates/readers.qtpl:23
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/readers.qtpl:21
|
||||
//line templates/readers.qtpl:24
|
||||
qw422016.N().S(contents)
|
||||
//line templates/readers.qtpl:21
|
||||
//line templates/readers.qtpl:24
|
||||
qw422016.N().S(`
|
||||
</article>
|
||||
<hr/>
|
||||
<aside>
|
||||
`)
|
||||
//line templates/readers.qtpl:25
|
||||
qw422016.N().S(tree)
|
||||
//line templates/readers.qtpl:25
|
||||
qw422016.N().S(`
|
||||
</aside>
|
||||
</main>
|
||||
`)
|
||||
//line templates/readers.qtpl:28
|
||||
//line templates/readers.qtpl:27
|
||||
streamrelativeHyphae(qw422016, relatives)
|
||||
//line templates/readers.qtpl:27
|
||||
qw422016.N().S(`
|
||||
</div>
|
||||
`)
|
||||
//line templates/readers.qtpl:29
|
||||
}
|
||||
|
||||
//line templates/readers.qtpl:28
|
||||
func WriteRevisionHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, tree, revHash string) {
|
||||
//line templates/readers.qtpl:28
|
||||
//line templates/readers.qtpl:29
|
||||
func WriteRevisionHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, relatives, revHash string) {
|
||||
//line templates/readers.qtpl:29
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/readers.qtpl:28
|
||||
StreamRevisionHTML(qw422016, rq, hyphaName, naviTitle, contents, tree, revHash)
|
||||
//line templates/readers.qtpl:28
|
||||
//line templates/readers.qtpl:29
|
||||
StreamRevisionHTML(qw422016, rq, hyphaName, naviTitle, contents, relatives, revHash)
|
||||
//line templates/readers.qtpl:29
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/readers.qtpl:28
|
||||
//line templates/readers.qtpl:29
|
||||
}
|
||||
|
||||
//line templates/readers.qtpl:28
|
||||
func RevisionHTML(rq *http.Request, hyphaName, naviTitle, contents, tree, revHash string) string {
|
||||
//line templates/readers.qtpl:28
|
||||
//line templates/readers.qtpl:29
|
||||
func RevisionHTML(rq *http.Request, hyphaName, naviTitle, contents, relatives, revHash string) string {
|
||||
//line templates/readers.qtpl:29
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/readers.qtpl:28
|
||||
WriteRevisionHTML(qb422016, rq, hyphaName, naviTitle, contents, tree, revHash)
|
||||
//line templates/readers.qtpl:28
|
||||
//line templates/readers.qtpl:29
|
||||
WriteRevisionHTML(qb422016, rq, hyphaName, naviTitle, contents, relatives, revHash)
|
||||
//line templates/readers.qtpl:29
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/readers.qtpl:28
|
||||
//line templates/readers.qtpl:29
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/readers.qtpl:28
|
||||
//line templates/readers.qtpl:29
|
||||
return qs422016
|
||||
//line templates/readers.qtpl:28
|
||||
//line templates/readers.qtpl:29
|
||||
}
|
||||
|
||||
// If `contents` == "", a helpful message is shown instead.
|
||||
|
||||
//line templates/readers.qtpl:31
|
||||
//line templates/readers.qtpl:32
|
||||
func StreamPageHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName string, hasAmnt bool) {
|
||||
//line templates/readers.qtpl:31
|
||||
//line templates/readers.qtpl:32
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/readers.qtpl:32
|
||||
//line templates/readers.qtpl:33
|
||||
streamnavHTML(qw422016, rq, hyphaName, "page")
|
||||
//line templates/readers.qtpl:32
|
||||
//line templates/readers.qtpl:33
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<article>
|
||||
`)
|
||||
//line templates/readers.qtpl:36
|
||||
qw422016.N().S(naviTitle)
|
||||
//line templates/readers.qtpl:36
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/readers.qtpl:37
|
||||
if contents == "" {
|
||||
//line templates/readers.qtpl:37
|
||||
qw422016.N().S(`
|
||||
<p>This hypha has no text. Why not <a href="/edit/`)
|
||||
//line templates/readers.qtpl:38
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/readers.qtpl:38
|
||||
qw422016.N().S(`">create it</a>?</p>
|
||||
`)
|
||||
//line templates/readers.qtpl:39
|
||||
} else {
|
||||
//line templates/readers.qtpl:39
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/readers.qtpl:40
|
||||
qw422016.N().S(contents)
|
||||
//line templates/readers.qtpl:40
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/readers.qtpl:41
|
||||
}
|
||||
//line templates/readers.qtpl:41
|
||||
qw422016.N().S(`
|
||||
</article>
|
||||
<section class="prevnext">
|
||||
`)
|
||||
//line templates/readers.qtpl:44
|
||||
if prevHyphaName != "" {
|
||||
//line templates/readers.qtpl:44
|
||||
qw422016.N().S(`
|
||||
<a class="prevnext__el prevnext__prev" href="/page/`)
|
||||
//line templates/readers.qtpl:45
|
||||
qw422016.E().S(prevHyphaName)
|
||||
//line templates/readers.qtpl:45
|
||||
qw422016.N().S(`" rel="prev">← `)
|
||||
//line templates/readers.qtpl:45
|
||||
qw422016.E().S(path.Base(prevHyphaName))
|
||||
//line templates/readers.qtpl:45
|
||||
qw422016.N().S(`</a>
|
||||
`)
|
||||
//line templates/readers.qtpl:46
|
||||
}
|
||||
//line templates/readers.qtpl:46
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/readers.qtpl:47
|
||||
if nextHyphaName != "" {
|
||||
//line templates/readers.qtpl:47
|
||||
qw422016.N().S(`
|
||||
<a class="prevnext__el prevnext__next" href="/page/`)
|
||||
//line templates/readers.qtpl:48
|
||||
qw422016.E().S(nextHyphaName)
|
||||
//line templates/readers.qtpl:48
|
||||
qw422016.N().S(`" rel="next">`)
|
||||
//line templates/readers.qtpl:48
|
||||
qw422016.E().S(path.Base(nextHyphaName))
|
||||
//line templates/readers.qtpl:48
|
||||
qw422016.N().S(` →</a>
|
||||
`)
|
||||
//line templates/readers.qtpl:49
|
||||
}
|
||||
//line templates/readers.qtpl:49
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
`)
|
||||
//line templates/readers.qtpl:51
|
||||
if u := user.FromRequest(rq); !user.AuthUsed || u.Group != "anon" {
|
||||
//line templates/readers.qtpl:51
|
||||
qw422016.N().S(`
|
||||
<form action="/upload-binary/`)
|
||||
//line templates/readers.qtpl:52
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/readers.qtpl:52
|
||||
qw422016.N().S(`"
|
||||
method="post" enctype="multipart/form-data"
|
||||
class="upload-amnt">
|
||||
`)
|
||||
//line templates/readers.qtpl:55
|
||||
if hasAmnt {
|
||||
//line templates/readers.qtpl:55
|
||||
qw422016.N().S(`
|
||||
<a class="upload-amnt__unattach" href="/unattach-ask/`)
|
||||
//line templates/readers.qtpl:56
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/readers.qtpl:56
|
||||
qw422016.N().S(`">Unattach current attachment?</a>
|
||||
`)
|
||||
//line templates/readers.qtpl:57
|
||||
}
|
||||
//line templates/readers.qtpl:57
|
||||
qw422016.N().S(`
|
||||
<label for="upload-binary__input">Upload a new attachment</label>
|
||||
<br>
|
||||
<input type="file" id="upload-binary__input" name="binary"/>
|
||||
<input type="submit"/>
|
||||
</form>
|
||||
`)
|
||||
//line templates/readers.qtpl:63
|
||||
}
|
||||
//line templates/readers.qtpl:63
|
||||
qw422016.N().S(`
|
||||
</main>
|
||||
<aside class="relative-hyphae layout-card">
|
||||
<h1 class="relative-hyphae__title layout-card__title">Relative hyphae</h1>
|
||||
<main class="main-width">
|
||||
<article>
|
||||
`)
|
||||
//line templates/readers.qtpl:67
|
||||
qw422016.N().S(relatives)
|
||||
//line templates/readers.qtpl:67
|
||||
//line templates/readers.qtpl:37
|
||||
qw422016.N().S(naviTitle)
|
||||
//line templates/readers.qtpl:37
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/readers.qtpl:38
|
||||
if contents == "" {
|
||||
//line templates/readers.qtpl:38
|
||||
qw422016.N().S(`
|
||||
<p>This hypha has no text. Why not <a href="/edit/`)
|
||||
//line templates/readers.qtpl:39
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/readers.qtpl:39
|
||||
qw422016.N().S(`">create it</a>?</p>
|
||||
`)
|
||||
//line templates/readers.qtpl:40
|
||||
} else {
|
||||
//line templates/readers.qtpl:40
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/readers.qtpl:41
|
||||
qw422016.N().S(contents)
|
||||
//line templates/readers.qtpl:41
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/readers.qtpl:42
|
||||
}
|
||||
//line templates/readers.qtpl:42
|
||||
qw422016.N().S(`
|
||||
</article>
|
||||
<section class="prevnext">
|
||||
`)
|
||||
//line templates/readers.qtpl:45
|
||||
if prevHyphaName != "" {
|
||||
//line templates/readers.qtpl:45
|
||||
qw422016.N().S(`
|
||||
<a class="prevnext__el prevnext__prev" href="/page/`)
|
||||
//line templates/readers.qtpl:46
|
||||
qw422016.E().S(prevHyphaName)
|
||||
//line templates/readers.qtpl:46
|
||||
qw422016.N().S(`" rel="prev">← `)
|
||||
//line templates/readers.qtpl:46
|
||||
qw422016.E().S(path.Base(prevHyphaName))
|
||||
//line templates/readers.qtpl:46
|
||||
qw422016.N().S(`</a>
|
||||
`)
|
||||
//line templates/readers.qtpl:47
|
||||
}
|
||||
//line templates/readers.qtpl:47
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/readers.qtpl:48
|
||||
if nextHyphaName != "" {
|
||||
//line templates/readers.qtpl:48
|
||||
qw422016.N().S(`
|
||||
<a class="prevnext__el prevnext__next" href="/page/`)
|
||||
//line templates/readers.qtpl:49
|
||||
qw422016.E().S(nextHyphaName)
|
||||
//line templates/readers.qtpl:49
|
||||
qw422016.N().S(`" rel="next">`)
|
||||
//line templates/readers.qtpl:49
|
||||
qw422016.E().S(path.Base(nextHyphaName))
|
||||
//line templates/readers.qtpl:49
|
||||
qw422016.N().S(` →</a>
|
||||
`)
|
||||
//line templates/readers.qtpl:50
|
||||
}
|
||||
//line templates/readers.qtpl:50
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
`)
|
||||
//line templates/readers.qtpl:52
|
||||
if u := user.FromRequest(rq); !user.AuthUsed || u.Group != "anon" {
|
||||
//line templates/readers.qtpl:52
|
||||
qw422016.N().S(`
|
||||
<form action="/upload-binary/`)
|
||||
//line templates/readers.qtpl:53
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/readers.qtpl:53
|
||||
qw422016.N().S(`"
|
||||
method="post" enctype="multipart/form-data"
|
||||
class="upload-amnt">
|
||||
`)
|
||||
//line templates/readers.qtpl:56
|
||||
if hasAmnt {
|
||||
//line templates/readers.qtpl:56
|
||||
qw422016.N().S(`
|
||||
<a class="upload-amnt__unattach" href="/unattach-ask/`)
|
||||
//line templates/readers.qtpl:57
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/readers.qtpl:57
|
||||
qw422016.N().S(`">Unattach current attachment?</a>
|
||||
`)
|
||||
//line templates/readers.qtpl:58
|
||||
}
|
||||
//line templates/readers.qtpl:58
|
||||
qw422016.N().S(`
|
||||
<label for="upload-binary__input">Upload a new attachment</label>
|
||||
<br>
|
||||
<input type="file" id="upload-binary__input" name="binary"/>
|
||||
<input type="submit"/>
|
||||
</form>
|
||||
`)
|
||||
//line templates/readers.qtpl:64
|
||||
}
|
||||
//line templates/readers.qtpl:64
|
||||
qw422016.N().S(`
|
||||
</main>
|
||||
`)
|
||||
//line templates/readers.qtpl:66
|
||||
streamrelativeHyphae(qw422016, relatives)
|
||||
//line templates/readers.qtpl:66
|
||||
qw422016.N().S(`
|
||||
</aside>
|
||||
</div>
|
||||
`)
|
||||
//line templates/readers.qtpl:70
|
||||
//line templates/readers.qtpl:68
|
||||
}
|
||||
|
||||
//line templates/readers.qtpl:70
|
||||
//line templates/readers.qtpl:68
|
||||
func WritePageHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName string, hasAmnt bool) {
|
||||
//line templates/readers.qtpl:70
|
||||
//line templates/readers.qtpl:68
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/readers.qtpl:70
|
||||
//line templates/readers.qtpl:68
|
||||
StreamPageHTML(qw422016, rq, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName, hasAmnt)
|
||||
//line templates/readers.qtpl:70
|
||||
//line templates/readers.qtpl:68
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/readers.qtpl:70
|
||||
//line templates/readers.qtpl:68
|
||||
}
|
||||
|
||||
//line templates/readers.qtpl:70
|
||||
//line templates/readers.qtpl:68
|
||||
func PageHTML(rq *http.Request, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName string, hasAmnt bool) string {
|
||||
//line templates/readers.qtpl:70
|
||||
//line templates/readers.qtpl:68
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/readers.qtpl:70
|
||||
//line templates/readers.qtpl:68
|
||||
WritePageHTML(qb422016, rq, hyphaName, naviTitle, contents, relatives, prevHyphaName, nextHyphaName, hasAmnt)
|
||||
//line templates/readers.qtpl:70
|
||||
//line templates/readers.qtpl:68
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/readers.qtpl:70
|
||||
//line templates/readers.qtpl:68
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/readers.qtpl:70
|
||||
//line templates/readers.qtpl:68
|
||||
return qs422016
|
||||
//line templates/readers.qtpl:70
|
||||
//line templates/readers.qtpl:68
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
{% func RecentChangesHTML(changes []string, n int) %}
|
||||
<main class="recent-changes">
|
||||
<div class="layout">
|
||||
<main class="main-width recent-changes">
|
||||
<h1>Recent Changes</h1>
|
||||
<p><a href="/">← Back</a></p>
|
||||
|
||||
@ -40,4 +41,5 @@
|
||||
{% endif %}
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
@ -21,58 +21,59 @@ var (
|
||||
func StreamRecentChangesHTML(qw422016 *qt422016.Writer, changes []string, n int) {
|
||||
//line templates/recent_changes.qtpl:1
|
||||
qw422016.N().S(`
|
||||
<main class="recent-changes">
|
||||
<div class="layout">
|
||||
<main class="main-width recent-changes">
|
||||
<h1>Recent Changes</h1>
|
||||
<p><a href="/">← Back</a></p>
|
||||
|
||||
<nav class="recent-changes__count">
|
||||
See
|
||||
`)
|
||||
//line templates/recent_changes.qtpl:8
|
||||
//line templates/recent_changes.qtpl:9
|
||||
for _, m := range []int{20, 0, 50, 0, 100} {
|
||||
//line templates/recent_changes.qtpl:8
|
||||
//line templates/recent_changes.qtpl:9
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/recent_changes.qtpl:9
|
||||
//line templates/recent_changes.qtpl:10
|
||||
switch m {
|
||||
//line templates/recent_changes.qtpl:10
|
||||
//line templates/recent_changes.qtpl:11
|
||||
case 0:
|
||||
//line templates/recent_changes.qtpl:10
|
||||
//line templates/recent_changes.qtpl:11
|
||||
qw422016.N().S(`
|
||||
<span aria-hidden="true">|</span>
|
||||
`)
|
||||
//line templates/recent_changes.qtpl:12
|
||||
//line templates/recent_changes.qtpl:13
|
||||
case n:
|
||||
//line templates/recent_changes.qtpl:12
|
||||
//line templates/recent_changes.qtpl:13
|
||||
qw422016.N().S(`
|
||||
<b>`)
|
||||
//line templates/recent_changes.qtpl:13
|
||||
//line templates/recent_changes.qtpl:14
|
||||
qw422016.N().D(n)
|
||||
//line templates/recent_changes.qtpl:13
|
||||
//line templates/recent_changes.qtpl:14
|
||||
qw422016.N().S(`</b>
|
||||
`)
|
||||
//line templates/recent_changes.qtpl:14
|
||||
//line templates/recent_changes.qtpl:15
|
||||
default:
|
||||
//line templates/recent_changes.qtpl:14
|
||||
//line templates/recent_changes.qtpl:15
|
||||
qw422016.N().S(`
|
||||
<a href="/recent-changes/`)
|
||||
//line templates/recent_changes.qtpl:15
|
||||
//line templates/recent_changes.qtpl:16
|
||||
qw422016.N().D(m)
|
||||
//line templates/recent_changes.qtpl:15
|
||||
//line templates/recent_changes.qtpl:16
|
||||
qw422016.N().S(`">`)
|
||||
//line templates/recent_changes.qtpl:15
|
||||
//line templates/recent_changes.qtpl:16
|
||||
qw422016.N().D(m)
|
||||
//line templates/recent_changes.qtpl:15
|
||||
//line templates/recent_changes.qtpl:16
|
||||
qw422016.N().S(`</a>
|
||||
`)
|
||||
//line templates/recent_changes.qtpl:16
|
||||
//line templates/recent_changes.qtpl:17
|
||||
}
|
||||
//line templates/recent_changes.qtpl:16
|
||||
//line templates/recent_changes.qtpl:17
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/recent_changes.qtpl:17
|
||||
//line templates/recent_changes.qtpl:18
|
||||
}
|
||||
//line templates/recent_changes.qtpl:17
|
||||
//line templates/recent_changes.qtpl:18
|
||||
qw422016.N().S(`
|
||||
recent changes
|
||||
</nav>
|
||||
@ -80,80 +81,81 @@ func StreamRecentChangesHTML(qw422016 *qt422016.Writer, changes []string, n int)
|
||||
<p><img class="icon" width="20" height="20" src="https://upload.wikimedia.org/wikipedia/commons/4/46/Generic_Feed-icon.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 templates/recent_changes.qtpl:28
|
||||
//line templates/recent_changes.qtpl:29
|
||||
qw422016.N().S(`
|
||||
|
||||
<section class="recent-changes__list" role="feed">
|
||||
`)
|
||||
//line templates/recent_changes.qtpl:31
|
||||
//line templates/recent_changes.qtpl:32
|
||||
if len(changes) == 0 {
|
||||
//line templates/recent_changes.qtpl:31
|
||||
//line templates/recent_changes.qtpl:32
|
||||
qw422016.N().S(`
|
||||
<p>Could not find any recent changes.</p>
|
||||
`)
|
||||
//line templates/recent_changes.qtpl:33
|
||||
//line templates/recent_changes.qtpl:34
|
||||
} else {
|
||||
//line templates/recent_changes.qtpl:33
|
||||
//line templates/recent_changes.qtpl:34
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/recent_changes.qtpl:34
|
||||
//line templates/recent_changes.qtpl:35
|
||||
for i, entry := range changes {
|
||||
//line templates/recent_changes.qtpl:34
|
||||
//line templates/recent_changes.qtpl:35
|
||||
qw422016.N().S(`
|
||||
<ul class="recent-changes__entry rc-entry" role="article"
|
||||
aria-setsize="`)
|
||||
//line templates/recent_changes.qtpl:36
|
||||
//line templates/recent_changes.qtpl:37
|
||||
qw422016.N().D(n)
|
||||
//line templates/recent_changes.qtpl:36
|
||||
//line templates/recent_changes.qtpl:37
|
||||
qw422016.N().S(`" aria-posinset="`)
|
||||
//line templates/recent_changes.qtpl:36
|
||||
//line templates/recent_changes.qtpl:37
|
||||
qw422016.N().D(i)
|
||||
//line templates/recent_changes.qtpl:36
|
||||
//line templates/recent_changes.qtpl:37
|
||||
qw422016.N().S(`">
|
||||
`)
|
||||
//line templates/recent_changes.qtpl:37
|
||||
//line templates/recent_changes.qtpl:38
|
||||
qw422016.N().S(entry)
|
||||
//line templates/recent_changes.qtpl:37
|
||||
//line templates/recent_changes.qtpl:38
|
||||
qw422016.N().S(`
|
||||
</ul>
|
||||
`)
|
||||
//line templates/recent_changes.qtpl:39
|
||||
//line templates/recent_changes.qtpl:40
|
||||
}
|
||||
//line templates/recent_changes.qtpl:39
|
||||
//line templates/recent_changes.qtpl:40
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/recent_changes.qtpl:40
|
||||
//line templates/recent_changes.qtpl:41
|
||||
}
|
||||
//line templates/recent_changes.qtpl:40
|
||||
//line templates/recent_changes.qtpl:41
|
||||
qw422016.N().S(`
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line templates/recent_changes.qtpl:43
|
||||
//line templates/recent_changes.qtpl:45
|
||||
}
|
||||
|
||||
//line templates/recent_changes.qtpl:43
|
||||
//line templates/recent_changes.qtpl:45
|
||||
func WriteRecentChangesHTML(qq422016 qtio422016.Writer, changes []string, n int) {
|
||||
//line templates/recent_changes.qtpl:43
|
||||
//line templates/recent_changes.qtpl:45
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/recent_changes.qtpl:43
|
||||
//line templates/recent_changes.qtpl:45
|
||||
StreamRecentChangesHTML(qw422016, changes, n)
|
||||
//line templates/recent_changes.qtpl:43
|
||||
//line templates/recent_changes.qtpl:45
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/recent_changes.qtpl:43
|
||||
//line templates/recent_changes.qtpl:45
|
||||
}
|
||||
|
||||
//line templates/recent_changes.qtpl:43
|
||||
//line templates/recent_changes.qtpl:45
|
||||
func RecentChangesHTML(changes []string, n int) string {
|
||||
//line templates/recent_changes.qtpl:43
|
||||
//line templates/recent_changes.qtpl:45
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/recent_changes.qtpl:43
|
||||
//line templates/recent_changes.qtpl:45
|
||||
WriteRecentChangesHTML(qb422016, changes, n)
|
||||
//line templates/recent_changes.qtpl:43
|
||||
//line templates/recent_changes.qtpl:45
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/recent_changes.qtpl:43
|
||||
//line templates/recent_changes.qtpl:45
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/recent_changes.qtpl:43
|
||||
//line templates/recent_changes.qtpl:45
|
||||
return qs422016
|
||||
//line templates/recent_changes.qtpl:43
|
||||
//line templates/recent_changes.qtpl:45
|
||||
}
|
||||
|
@ -2,7 +2,8 @@
|
||||
This dialog is to be shown to a user when they try to rename a hypha.
|
||||
{% func RenameAskHTML(rq *http.Request, hyphaName string, isOld bool) %}
|
||||
{%= navHTML(rq, hyphaName, "rename-ask") %}
|
||||
<main>
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
{%- if isOld -%}
|
||||
<section>
|
||||
<h1>Rename {%s hyphaName %}</h1>
|
||||
@ -26,6 +27,7 @@ This dialog is to be shown to a user when they try to rename a hypha.
|
||||
{%= cannotRenameDueToNonExistence(hyphaName) %}
|
||||
{%- endif -%}
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
{% func cannotRenameDueToNonExistence(hyphaName string) %}
|
||||
|
@ -31,28 +31,29 @@ func StreamRenameAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName
|
||||
streamnavHTML(qw422016, rq, hyphaName, "rename-ask")
|
||||
//line templates/rename.qtpl:4
|
||||
qw422016.N().S(`
|
||||
<main>
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
`)
|
||||
//line templates/rename.qtpl:6
|
||||
//line templates/rename.qtpl:7
|
||||
if isOld {
|
||||
//line templates/rename.qtpl:6
|
||||
//line templates/rename.qtpl:7
|
||||
qw422016.N().S(` <section>
|
||||
<h1>Rename `)
|
||||
//line templates/rename.qtpl:8
|
||||
//line templates/rename.qtpl:9
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/rename.qtpl:8
|
||||
//line templates/rename.qtpl:9
|
||||
qw422016.N().S(`</h1>
|
||||
<form action="/rename-confirm/`)
|
||||
//line templates/rename.qtpl:9
|
||||
//line templates/rename.qtpl:10
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/rename.qtpl:9
|
||||
//line templates/rename.qtpl:10
|
||||
qw422016.N().S(`" method="post" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend>New name</legend>
|
||||
<input type="text" value="`)
|
||||
//line templates/rename.qtpl:12
|
||||
//line templates/rename.qtpl:13
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/rename.qtpl:12
|
||||
//line templates/rename.qtpl:13
|
||||
qw422016.N().S(`" required autofocus id="new-name" name="new-name"/>
|
||||
</fieldset>
|
||||
|
||||
@ -67,92 +68,93 @@ func StreamRenameAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName
|
||||
</form>
|
||||
</section>
|
||||
`)
|
||||
//line templates/rename.qtpl:25
|
||||
//line templates/rename.qtpl:26
|
||||
} else {
|
||||
//line templates/rename.qtpl:25
|
||||
//line templates/rename.qtpl:26
|
||||
qw422016.N().S(` `)
|
||||
//line templates/rename.qtpl:26
|
||||
//line templates/rename.qtpl:27
|
||||
streamcannotRenameDueToNonExistence(qw422016, hyphaName)
|
||||
//line templates/rename.qtpl:26
|
||||
//line templates/rename.qtpl:27
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/rename.qtpl:27
|
||||
//line templates/rename.qtpl:28
|
||||
}
|
||||
//line templates/rename.qtpl:27
|
||||
//line templates/rename.qtpl:28
|
||||
qw422016.N().S(`</main>
|
||||
</div>
|
||||
`)
|
||||
//line templates/rename.qtpl:29
|
||||
//line templates/rename.qtpl:31
|
||||
}
|
||||
|
||||
//line templates/rename.qtpl:29
|
||||
//line templates/rename.qtpl:31
|
||||
func WriteRenameAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
|
||||
//line templates/rename.qtpl:29
|
||||
//line templates/rename.qtpl:31
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/rename.qtpl:29
|
||||
//line templates/rename.qtpl:31
|
||||
StreamRenameAskHTML(qw422016, rq, hyphaName, isOld)
|
||||
//line templates/rename.qtpl:29
|
||||
//line templates/rename.qtpl:31
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/rename.qtpl:29
|
||||
//line templates/rename.qtpl:31
|
||||
}
|
||||
|
||||
//line templates/rename.qtpl:29
|
||||
//line templates/rename.qtpl:31
|
||||
func RenameAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
|
||||
//line templates/rename.qtpl:29
|
||||
//line templates/rename.qtpl:31
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/rename.qtpl:29
|
||||
//line templates/rename.qtpl:31
|
||||
WriteRenameAskHTML(qb422016, rq, hyphaName, isOld)
|
||||
//line templates/rename.qtpl:29
|
||||
//line templates/rename.qtpl:31
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/rename.qtpl:29
|
||||
//line templates/rename.qtpl:31
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/rename.qtpl:29
|
||||
//line templates/rename.qtpl:31
|
||||
return qs422016
|
||||
//line templates/rename.qtpl:29
|
||||
//line templates/rename.qtpl:31
|
||||
}
|
||||
|
||||
//line templates/rename.qtpl:31
|
||||
//line templates/rename.qtpl:33
|
||||
func streamcannotRenameDueToNonExistence(qw422016 *qt422016.Writer, hyphaName string) {
|
||||
//line templates/rename.qtpl:31
|
||||
//line templates/rename.qtpl:33
|
||||
qw422016.N().S(`
|
||||
<section>
|
||||
<h1>Cannot rename `)
|
||||
//line templates/rename.qtpl:33
|
||||
//line templates/rename.qtpl:35
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/rename.qtpl:33
|
||||
//line templates/rename.qtpl:35
|
||||
qw422016.N().S(`</h1>
|
||||
<p>This hypha does not exist.</p>
|
||||
<p><a href="/page/`)
|
||||
//line templates/rename.qtpl:35
|
||||
//line templates/rename.qtpl:37
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/rename.qtpl:35
|
||||
//line templates/rename.qtpl:37
|
||||
qw422016.N().S(`">Go back</a></p>
|
||||
</section>
|
||||
`)
|
||||
//line templates/rename.qtpl:37
|
||||
//line templates/rename.qtpl:39
|
||||
}
|
||||
|
||||
//line templates/rename.qtpl:37
|
||||
//line templates/rename.qtpl:39
|
||||
func writecannotRenameDueToNonExistence(qq422016 qtio422016.Writer, hyphaName string) {
|
||||
//line templates/rename.qtpl:37
|
||||
//line templates/rename.qtpl:39
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/rename.qtpl:37
|
||||
//line templates/rename.qtpl:39
|
||||
streamcannotRenameDueToNonExistence(qw422016, hyphaName)
|
||||
//line templates/rename.qtpl:37
|
||||
//line templates/rename.qtpl:39
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/rename.qtpl:37
|
||||
//line templates/rename.qtpl:39
|
||||
}
|
||||
|
||||
//line templates/rename.qtpl:37
|
||||
//line templates/rename.qtpl:39
|
||||
func cannotRenameDueToNonExistence(hyphaName string) string {
|
||||
//line templates/rename.qtpl:37
|
||||
//line templates/rename.qtpl:39
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/rename.qtpl:37
|
||||
//line templates/rename.qtpl:39
|
||||
writecannotRenameDueToNonExistence(qb422016, hyphaName)
|
||||
//line templates/rename.qtpl:37
|
||||
//line templates/rename.qtpl:39
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/rename.qtpl:37
|
||||
//line templates/rename.qtpl:39
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/rename.qtpl:37
|
||||
//line templates/rename.qtpl:39
|
||||
return qs422016
|
||||
//line templates/rename.qtpl:37
|
||||
//line templates/rename.qtpl:39
|
||||
}
|
||||
|
@ -27,7 +27,8 @@
|
||||
{% endfunc %}
|
||||
|
||||
{% func HyphaListHTML(tbody string, pageCount int) %}
|
||||
<main>
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<h1>List of hyphae</h1>
|
||||
<p>This wiki has {%d pageCount %} hyphae.</p>
|
||||
<table>
|
||||
@ -42,6 +43,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
{% func HyphaListRowHTML(hyphaName, binaryMime string, binaryPresent bool) %}
|
||||
@ -56,7 +58,8 @@
|
||||
{% endfunc %}
|
||||
|
||||
{% func AboutHTML() %}
|
||||
<main>
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section>
|
||||
<h1>About {%s util.SiteName %}</h1>
|
||||
<ul>
|
||||
@ -75,4 +78,5 @@
|
||||
<p>See <a href="/list">/list</a> for information about hyphae on this wiki.</p>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
@ -117,12 +117,13 @@ func BaseHTML(title, body string, u *user.User, headElements ...string) string {
|
||||
func StreamHyphaListHTML(qw422016 *qt422016.Writer, tbody string, pageCount int) {
|
||||
//line templates/stuff.qtpl:29
|
||||
qw422016.N().S(`
|
||||
<main>
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<h1>List of hyphae</h1>
|
||||
<p>This wiki has `)
|
||||
//line templates/stuff.qtpl:32
|
||||
//line templates/stuff.qtpl:33
|
||||
qw422016.N().D(pageCount)
|
||||
//line templates/stuff.qtpl:32
|
||||
//line templates/stuff.qtpl:33
|
||||
qw422016.N().S(` hyphae.</p>
|
||||
<table>
|
||||
<thead>
|
||||
@ -133,203 +134,206 @@ func StreamHyphaListHTML(qw422016 *qt422016.Writer, tbody string, pageCount int)
|
||||
</thead>
|
||||
<tbody>
|
||||
`)
|
||||
//line templates/stuff.qtpl:41
|
||||
//line templates/stuff.qtpl:42
|
||||
qw422016.N().S(tbody)
|
||||
//line templates/stuff.qtpl:41
|
||||
//line templates/stuff.qtpl:42
|
||||
qw422016.N().S(`
|
||||
</tbody>
|
||||
</table>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line templates/stuff.qtpl:45
|
||||
//line templates/stuff.qtpl:47
|
||||
}
|
||||
|
||||
//line templates/stuff.qtpl:45
|
||||
//line templates/stuff.qtpl:47
|
||||
func WriteHyphaListHTML(qq422016 qtio422016.Writer, tbody string, pageCount int) {
|
||||
//line templates/stuff.qtpl:45
|
||||
//line templates/stuff.qtpl:47
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/stuff.qtpl:45
|
||||
//line templates/stuff.qtpl:47
|
||||
StreamHyphaListHTML(qw422016, tbody, pageCount)
|
||||
//line templates/stuff.qtpl:45
|
||||
//line templates/stuff.qtpl:47
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/stuff.qtpl:45
|
||||
//line templates/stuff.qtpl:47
|
||||
}
|
||||
|
||||
//line templates/stuff.qtpl:45
|
||||
//line templates/stuff.qtpl:47
|
||||
func HyphaListHTML(tbody string, pageCount int) string {
|
||||
//line templates/stuff.qtpl:45
|
||||
//line templates/stuff.qtpl:47
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/stuff.qtpl:45
|
||||
//line templates/stuff.qtpl:47
|
||||
WriteHyphaListHTML(qb422016, tbody, pageCount)
|
||||
//line templates/stuff.qtpl:45
|
||||
//line templates/stuff.qtpl:47
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/stuff.qtpl:45
|
||||
//line templates/stuff.qtpl:47
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/stuff.qtpl:45
|
||||
//line templates/stuff.qtpl:47
|
||||
return qs422016
|
||||
//line templates/stuff.qtpl:45
|
||||
//line templates/stuff.qtpl:47
|
||||
}
|
||||
|
||||
//line templates/stuff.qtpl:47
|
||||
//line templates/stuff.qtpl:49
|
||||
func StreamHyphaListRowHTML(qw422016 *qt422016.Writer, hyphaName, binaryMime string, binaryPresent bool) {
|
||||
//line templates/stuff.qtpl:47
|
||||
//line templates/stuff.qtpl:49
|
||||
qw422016.N().S(`
|
||||
<tr>
|
||||
<td><a href="/page/`)
|
||||
//line templates/stuff.qtpl:49
|
||||
//line templates/stuff.qtpl:51
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/stuff.qtpl:49
|
||||
//line templates/stuff.qtpl:51
|
||||
qw422016.N().S(`">`)
|
||||
//line templates/stuff.qtpl:49
|
||||
//line templates/stuff.qtpl:51
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/stuff.qtpl:49
|
||||
//line templates/stuff.qtpl:51
|
||||
qw422016.N().S(`</a></td>
|
||||
`)
|
||||
//line templates/stuff.qtpl:50
|
||||
//line templates/stuff.qtpl:52
|
||||
if binaryPresent {
|
||||
//line templates/stuff.qtpl:50
|
||||
//line templates/stuff.qtpl:52
|
||||
qw422016.N().S(`
|
||||
<td>`)
|
||||
//line templates/stuff.qtpl:51
|
||||
//line templates/stuff.qtpl:53
|
||||
qw422016.E().S(binaryMime)
|
||||
//line templates/stuff.qtpl:51
|
||||
//line templates/stuff.qtpl:53
|
||||
qw422016.N().S(`</td>
|
||||
`)
|
||||
//line templates/stuff.qtpl:52
|
||||
//line templates/stuff.qtpl:54
|
||||
} else {
|
||||
//line templates/stuff.qtpl:52
|
||||
//line templates/stuff.qtpl:54
|
||||
qw422016.N().S(`
|
||||
<td></td>
|
||||
`)
|
||||
//line templates/stuff.qtpl:54
|
||||
//line templates/stuff.qtpl:56
|
||||
}
|
||||
//line templates/stuff.qtpl:54
|
||||
//line templates/stuff.qtpl:56
|
||||
qw422016.N().S(`
|
||||
</tr>
|
||||
`)
|
||||
//line templates/stuff.qtpl:56
|
||||
//line templates/stuff.qtpl:58
|
||||
}
|
||||
|
||||
//line templates/stuff.qtpl:56
|
||||
//line templates/stuff.qtpl:58
|
||||
func WriteHyphaListRowHTML(qq422016 qtio422016.Writer, hyphaName, binaryMime string, binaryPresent bool) {
|
||||
//line templates/stuff.qtpl:56
|
||||
//line templates/stuff.qtpl:58
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/stuff.qtpl:56
|
||||
//line templates/stuff.qtpl:58
|
||||
StreamHyphaListRowHTML(qw422016, hyphaName, binaryMime, binaryPresent)
|
||||
//line templates/stuff.qtpl:56
|
||||
//line templates/stuff.qtpl:58
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/stuff.qtpl:56
|
||||
//line templates/stuff.qtpl:58
|
||||
}
|
||||
|
||||
//line templates/stuff.qtpl:56
|
||||
//line templates/stuff.qtpl:58
|
||||
func HyphaListRowHTML(hyphaName, binaryMime string, binaryPresent bool) string {
|
||||
//line templates/stuff.qtpl:56
|
||||
//line templates/stuff.qtpl:58
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/stuff.qtpl:56
|
||||
//line templates/stuff.qtpl:58
|
||||
WriteHyphaListRowHTML(qb422016, hyphaName, binaryMime, binaryPresent)
|
||||
//line templates/stuff.qtpl:56
|
||||
//line templates/stuff.qtpl:58
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/stuff.qtpl:56
|
||||
//line templates/stuff.qtpl:58
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/stuff.qtpl:56
|
||||
//line templates/stuff.qtpl:58
|
||||
return qs422016
|
||||
//line templates/stuff.qtpl:56
|
||||
//line templates/stuff.qtpl:58
|
||||
}
|
||||
|
||||
//line templates/stuff.qtpl:58
|
||||
//line templates/stuff.qtpl:60
|
||||
func StreamAboutHTML(qw422016 *qt422016.Writer) {
|
||||
//line templates/stuff.qtpl:58
|
||||
//line templates/stuff.qtpl:60
|
||||
qw422016.N().S(`
|
||||
<main>
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
<section>
|
||||
<h1>About `)
|
||||
//line templates/stuff.qtpl:61
|
||||
//line templates/stuff.qtpl:64
|
||||
qw422016.E().S(util.SiteName)
|
||||
//line templates/stuff.qtpl:61
|
||||
//line templates/stuff.qtpl:64
|
||||
qw422016.N().S(`</h1>
|
||||
<ul>
|
||||
<li><b><a href="https://mycorrhiza.lesarbr.es">MycorrhizaWiki</a> version:</b> β 0.13 indev</li>
|
||||
`)
|
||||
//line templates/stuff.qtpl:64
|
||||
//line templates/stuff.qtpl:67
|
||||
if user.AuthUsed {
|
||||
//line templates/stuff.qtpl:64
|
||||
//line templates/stuff.qtpl:67
|
||||
qw422016.N().S(` <li><b>User count:</b> `)
|
||||
//line templates/stuff.qtpl:65
|
||||
//line templates/stuff.qtpl:68
|
||||
qw422016.N().D(user.Count())
|
||||
//line templates/stuff.qtpl:65
|
||||
//line templates/stuff.qtpl:68
|
||||
qw422016.N().S(`</li>
|
||||
<li><b>Home page:</b> <a href="/">`)
|
||||
//line templates/stuff.qtpl:66
|
||||
//line templates/stuff.qtpl:69
|
||||
qw422016.E().S(util.HomePage)
|
||||
//line templates/stuff.qtpl:66
|
||||
//line templates/stuff.qtpl:69
|
||||
qw422016.N().S(`</a></li>
|
||||
<li><b>Administrators:</b>`)
|
||||
//line templates/stuff.qtpl:67
|
||||
//line templates/stuff.qtpl:70
|
||||
for i, username := range user.ListUsersWithGroup("admin") {
|
||||
//line templates/stuff.qtpl:68
|
||||
//line templates/stuff.qtpl:71
|
||||
if i > 0 {
|
||||
//line templates/stuff.qtpl:68
|
||||
//line templates/stuff.qtpl:71
|
||||
qw422016.N().S(`<span aria-hidden="true">, </span>
|
||||
`)
|
||||
//line templates/stuff.qtpl:69
|
||||
//line templates/stuff.qtpl:72
|
||||
}
|
||||
//line templates/stuff.qtpl:69
|
||||
//line templates/stuff.qtpl:72
|
||||
qw422016.N().S(` <a href="/page/`)
|
||||
//line templates/stuff.qtpl:70
|
||||
//line templates/stuff.qtpl:73
|
||||
qw422016.E().S(util.UserHypha)
|
||||
//line templates/stuff.qtpl:70
|
||||
//line templates/stuff.qtpl:73
|
||||
qw422016.N().S(`/`)
|
||||
//line templates/stuff.qtpl:70
|
||||
//line templates/stuff.qtpl:73
|
||||
qw422016.E().S(username)
|
||||
//line templates/stuff.qtpl:70
|
||||
//line templates/stuff.qtpl:73
|
||||
qw422016.N().S(`">`)
|
||||
//line templates/stuff.qtpl:70
|
||||
//line templates/stuff.qtpl:73
|
||||
qw422016.E().S(username)
|
||||
//line templates/stuff.qtpl:70
|
||||
//line templates/stuff.qtpl:73
|
||||
qw422016.N().S(`</a>`)
|
||||
//line templates/stuff.qtpl:70
|
||||
//line templates/stuff.qtpl:73
|
||||
}
|
||||
//line templates/stuff.qtpl:70
|
||||
//line templates/stuff.qtpl:73
|
||||
qw422016.N().S(`</li>
|
||||
`)
|
||||
//line templates/stuff.qtpl:71
|
||||
//line templates/stuff.qtpl:74
|
||||
} else {
|
||||
//line templates/stuff.qtpl:71
|
||||
//line templates/stuff.qtpl:74
|
||||
qw422016.N().S(` <li>This wiki does not use authorization</li>
|
||||
`)
|
||||
//line templates/stuff.qtpl:73
|
||||
//line templates/stuff.qtpl:76
|
||||
}
|
||||
//line templates/stuff.qtpl:73
|
||||
//line templates/stuff.qtpl:76
|
||||
qw422016.N().S(` </ul>
|
||||
<p>See <a href="/list">/list</a> for information about hyphae on this wiki.</p>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
`)
|
||||
//line templates/stuff.qtpl:78
|
||||
//line templates/stuff.qtpl:82
|
||||
}
|
||||
|
||||
//line templates/stuff.qtpl:78
|
||||
//line templates/stuff.qtpl:82
|
||||
func WriteAboutHTML(qq422016 qtio422016.Writer) {
|
||||
//line templates/stuff.qtpl:78
|
||||
//line templates/stuff.qtpl:82
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/stuff.qtpl:78
|
||||
//line templates/stuff.qtpl:82
|
||||
StreamAboutHTML(qw422016)
|
||||
//line templates/stuff.qtpl:78
|
||||
//line templates/stuff.qtpl:82
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/stuff.qtpl:78
|
||||
//line templates/stuff.qtpl:82
|
||||
}
|
||||
|
||||
//line templates/stuff.qtpl:78
|
||||
//line templates/stuff.qtpl:82
|
||||
func AboutHTML() string {
|
||||
//line templates/stuff.qtpl:78
|
||||
//line templates/stuff.qtpl:82
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/stuff.qtpl:78
|
||||
//line templates/stuff.qtpl:82
|
||||
WriteAboutHTML(qb422016)
|
||||
//line templates/stuff.qtpl:78
|
||||
//line templates/stuff.qtpl:82
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/stuff.qtpl:78
|
||||
//line templates/stuff.qtpl:82
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/stuff.qtpl:78
|
||||
//line templates/stuff.qtpl:82
|
||||
return qs422016
|
||||
//line templates/stuff.qtpl:78
|
||||
//line templates/stuff.qtpl:82
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% import "net/http" %}
|
||||
{% func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) %}
|
||||
<main>
|
||||
{%= navHTML(rq, hyphaName, "unattach-ask") %}
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
{%- if isOld -%}
|
||||
<section>
|
||||
<h1>Unattach {%s hyphaName %}?</h1>
|
||||
@ -13,6 +14,7 @@
|
||||
{%= cannotUnattachDueToNonExistence(hyphaName) %}
|
||||
{%- endif -%}
|
||||
</main>
|
||||
</div>
|
||||
{% endfunc %}
|
||||
|
||||
{% func cannotUnattachDueToNonExistence(hyphaName string) %}
|
||||
|
@ -24,125 +24,127 @@ var (
|
||||
func StreamUnattachAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
|
||||
//line templates/unattach.qtpl:2
|
||||
qw422016.N().S(`
|
||||
<main>
|
||||
`)
|
||||
//line templates/unattach.qtpl:4
|
||||
//line templates/unattach.qtpl:3
|
||||
streamnavHTML(qw422016, rq, hyphaName, "unattach-ask")
|
||||
//line templates/unattach.qtpl:4
|
||||
//line templates/unattach.qtpl:3
|
||||
qw422016.N().S(`
|
||||
<div class="layout">
|
||||
<main class="main-width">
|
||||
`)
|
||||
//line templates/unattach.qtpl:5
|
||||
//line templates/unattach.qtpl:6
|
||||
if isOld {
|
||||
//line templates/unattach.qtpl:5
|
||||
//line templates/unattach.qtpl:6
|
||||
qw422016.N().S(` <section>
|
||||
<h1>Unattach `)
|
||||
//line templates/unattach.qtpl:7
|
||||
//line templates/unattach.qtpl:8
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/unattach.qtpl:7
|
||||
//line templates/unattach.qtpl:8
|
||||
qw422016.N().S(`?</h1>
|
||||
<p>Do you really want to unattach hypha <em>`)
|
||||
//line templates/unattach.qtpl:8
|
||||
//line templates/unattach.qtpl:9
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/unattach.qtpl:8
|
||||
//line templates/unattach.qtpl:9
|
||||
qw422016.N().S(`</em>?</p>
|
||||
<p><a href="/unattach-confirm/`)
|
||||
//line templates/unattach.qtpl:9
|
||||
//line templates/unattach.qtpl:10
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/unattach.qtpl:9
|
||||
//line templates/unattach.qtpl:10
|
||||
qw422016.N().S(`"><strong>Confirm</strong></a></p>
|
||||
<p><a href="/page/`)
|
||||
//line templates/unattach.qtpl:10
|
||||
//line templates/unattach.qtpl:11
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/unattach.qtpl:10
|
||||
//line templates/unattach.qtpl:11
|
||||
qw422016.N().S(`">Cancel</a></p>
|
||||
</section>
|
||||
`)
|
||||
//line templates/unattach.qtpl:12
|
||||
//line templates/unattach.qtpl:13
|
||||
} else {
|
||||
//line templates/unattach.qtpl:12
|
||||
//line templates/unattach.qtpl:13
|
||||
qw422016.N().S(` `)
|
||||
//line templates/unattach.qtpl:13
|
||||
//line templates/unattach.qtpl:14
|
||||
streamcannotUnattachDueToNonExistence(qw422016, hyphaName)
|
||||
//line templates/unattach.qtpl:13
|
||||
//line templates/unattach.qtpl:14
|
||||
qw422016.N().S(`
|
||||
`)
|
||||
//line templates/unattach.qtpl:14
|
||||
//line templates/unattach.qtpl:15
|
||||
}
|
||||
//line templates/unattach.qtpl:14
|
||||
//line templates/unattach.qtpl:15
|
||||
qw422016.N().S(`</main>
|
||||
</div>
|
||||
`)
|
||||
//line templates/unattach.qtpl:16
|
||||
//line templates/unattach.qtpl:18
|
||||
}
|
||||
|
||||
//line templates/unattach.qtpl:16
|
||||
//line templates/unattach.qtpl:18
|
||||
func WriteUnattachAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
|
||||
//line templates/unattach.qtpl:16
|
||||
//line templates/unattach.qtpl:18
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/unattach.qtpl:16
|
||||
//line templates/unattach.qtpl:18
|
||||
StreamUnattachAskHTML(qw422016, rq, hyphaName, isOld)
|
||||
//line templates/unattach.qtpl:16
|
||||
//line templates/unattach.qtpl:18
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/unattach.qtpl:16
|
||||
//line templates/unattach.qtpl:18
|
||||
}
|
||||
|
||||
//line templates/unattach.qtpl:16
|
||||
//line templates/unattach.qtpl:18
|
||||
func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
|
||||
//line templates/unattach.qtpl:16
|
||||
//line templates/unattach.qtpl:18
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/unattach.qtpl:16
|
||||
//line templates/unattach.qtpl:18
|
||||
WriteUnattachAskHTML(qb422016, rq, hyphaName, isOld)
|
||||
//line templates/unattach.qtpl:16
|
||||
//line templates/unattach.qtpl:18
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/unattach.qtpl:16
|
||||
//line templates/unattach.qtpl:18
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/unattach.qtpl:16
|
||||
//line templates/unattach.qtpl:18
|
||||
return qs422016
|
||||
//line templates/unattach.qtpl:16
|
||||
//line templates/unattach.qtpl:18
|
||||
}
|
||||
|
||||
//line templates/unattach.qtpl:18
|
||||
//line templates/unattach.qtpl:20
|
||||
func streamcannotUnattachDueToNonExistence(qw422016 *qt422016.Writer, hyphaName string) {
|
||||
//line templates/unattach.qtpl:18
|
||||
//line templates/unattach.qtpl:20
|
||||
qw422016.N().S(`
|
||||
<section>
|
||||
<h1>Cannot unattach `)
|
||||
//line templates/unattach.qtpl:20
|
||||
//line templates/unattach.qtpl:22
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/unattach.qtpl:20
|
||||
//line templates/unattach.qtpl:22
|
||||
qw422016.N().S(`</h1>
|
||||
<p>This hypha does not exist.</p>
|
||||
<p><a href="/page/`)
|
||||
//line templates/unattach.qtpl:22
|
||||
//line templates/unattach.qtpl:24
|
||||
qw422016.E().S(hyphaName)
|
||||
//line templates/unattach.qtpl:22
|
||||
//line templates/unattach.qtpl:24
|
||||
qw422016.N().S(`">Go back</a></p>
|
||||
</section>
|
||||
`)
|
||||
//line templates/unattach.qtpl:24
|
||||
//line templates/unattach.qtpl:26
|
||||
}
|
||||
|
||||
//line templates/unattach.qtpl:24
|
||||
//line templates/unattach.qtpl:26
|
||||
func writecannotUnattachDueToNonExistence(qq422016 qtio422016.Writer, hyphaName string) {
|
||||
//line templates/unattach.qtpl:24
|
||||
//line templates/unattach.qtpl:26
|
||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||
//line templates/unattach.qtpl:24
|
||||
//line templates/unattach.qtpl:26
|
||||
streamcannotUnattachDueToNonExistence(qw422016, hyphaName)
|
||||
//line templates/unattach.qtpl:24
|
||||
//line templates/unattach.qtpl:26
|
||||
qt422016.ReleaseWriter(qw422016)
|
||||
//line templates/unattach.qtpl:24
|
||||
//line templates/unattach.qtpl:26
|
||||
}
|
||||
|
||||
//line templates/unattach.qtpl:24
|
||||
//line templates/unattach.qtpl:26
|
||||
func cannotUnattachDueToNonExistence(hyphaName string) string {
|
||||
//line templates/unattach.qtpl:24
|
||||
//line templates/unattach.qtpl:26
|
||||
qb422016 := qt422016.AcquireByteBuffer()
|
||||
//line templates/unattach.qtpl:24
|
||||
//line templates/unattach.qtpl:26
|
||||
writecannotUnattachDueToNonExistence(qb422016, hyphaName)
|
||||
//line templates/unattach.qtpl:24
|
||||
//line templates/unattach.qtpl:26
|
||||
qs422016 := string(qb422016.B)
|
||||
//line templates/unattach.qtpl:24
|
||||
//line templates/unattach.qtpl:26
|
||||
qt422016.ReleaseByteBuffer(qb422016)
|
||||
//line templates/unattach.qtpl:24
|
||||
//line templates/unattach.qtpl:26
|
||||
return qs422016
|
||||
//line templates/unattach.qtpl:24
|
||||
//line templates/unattach.qtpl:26
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user