diff --git a/templates/asset.qtpl.go b/templates/asset.qtpl.go index 4bd18c4..af57b53 100644 --- a/templates/asset.qtpl.go +++ b/templates/asset.qtpl.go @@ -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; } diff --git a/templates/auth.qtpl b/templates/auth.qtpl index 32ab3d8..d51e588 100644 --- a/templates/auth.qtpl +++ b/templates/auth.qtpl @@ -1,7 +1,8 @@ {% import "github.com/bouncepaw/mycorrhiza/user" %} {% func LoginHTML() %} -
+
+
{% if user.AuthUsed %}

Login

@@ -25,10 +26,12 @@ {% endif %}
+
{% endfunc %} {% func LoginErrorHTML(err string) %} -
+
+
{% switch err %} {% case "unknown username" %} @@ -41,10 +44,12 @@

← Try again

+
{% endfunc %} {% func LogoutHTML(can bool) %} -
+
+
{% if can %}

Log out?

@@ -57,4 +62,5 @@ {% endif %}
+
{% endfunc %} diff --git a/templates/auth.qtpl.go b/templates/auth.qtpl.go index ed88d8d..25bb21a 100644 --- a/templates/auth.qtpl.go +++ b/templates/auth.qtpl.go @@ -24,12 +24,13 @@ var ( func StreamLoginHTML(qw422016 *qt422016.Writer) { //line templates/auth.qtpl:3 qw422016.N().S(` -
+
+
`) -//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(`

Login

@@ -47,172 +48,177 @@ func StreamLoginHTML(qw422016 *qt422016.Writer) { Cancel
`) -//line templates/auth.qtpl:22 +//line templates/auth.qtpl:23 } else { -//line templates/auth.qtpl:22 +//line templates/auth.qtpl:23 qw422016.N().S(`

Administrator of this wiki have not configured any authorization method. You can make edits anonymously.

← Go home

`) -//line templates/auth.qtpl:25 +//line templates/auth.qtpl:26 } -//line templates/auth.qtpl:25 +//line templates/auth.qtpl:26 qw422016.N().S(`
+
`) -//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(` -
+
+
`) -//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(`

Unknown username.

`) -//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(`

Wrong password.

`) -//line templates/auth.qtpl:38 +//line templates/auth.qtpl:41 default: -//line templates/auth.qtpl:38 +//line templates/auth.qtpl:41 qw422016.N().S(`

`) -//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(`

`) -//line templates/auth.qtpl:40 +//line templates/auth.qtpl:43 } -//line templates/auth.qtpl:40 +//line templates/auth.qtpl:43 qw422016.N().S(`

← Try again

+
`) -//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(` -
+
+
`) -//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(`

Log out?

Confirm

Cancel

`) -//line templates/auth.qtpl:53 +//line templates/auth.qtpl:58 } else { -//line templates/auth.qtpl:53 +//line templates/auth.qtpl:58 qw422016.N().S(`

You cannot log out because you are not logged in.

Login

← Home

`) -//line templates/auth.qtpl:57 +//line templates/auth.qtpl:62 } -//line templates/auth.qtpl:57 +//line templates/auth.qtpl:62 qw422016.N().S(`
+
`) -//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 } diff --git a/templates/common.qtpl b/templates/common.qtpl index 2a8585f..1e02c6d 100644 --- a/templates/common.qtpl +++ b/templates/common.qtpl @@ -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) %} + +{% endfunc %} diff --git a/templates/common.qtpl.go b/templates/common.qtpl.go index f06ed24..587d599 100644 --- a/templates/common.qtpl.go +++ b/templates/common.qtpl.go @@ -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(` + +`) +//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 +} diff --git a/templates/default.css b/templates/default.css index c30a6c2..c73c5a1 100644 --- a/templates/default.css +++ b/templates/default.css @@ -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;} diff --git a/templates/delete.qtpl b/templates/delete.qtpl index 1d45e0a..57e21a3 100644 --- a/templates/delete.qtpl +++ b/templates/delete.qtpl @@ -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") %} -
+
+
{% if isOld %}

Delete {%s hyphaName %}?

@@ -16,6 +17,7 @@ This dialog is to be shown to a user when they try to delete a hypha. {%= cannotDeleteDueToNonExistence(hyphaName) %} {% endif %}
+
{% endfunc %} {% func cannotDeleteDueToNonExistence(hyphaName string) %} diff --git a/templates/delete.qtpl.go b/templates/delete.qtpl.go index 1e67350..3609ec1 100644 --- a/templates/delete.qtpl.go +++ b/templates/delete.qtpl.go @@ -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(` -
+
+
`) -//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(`

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(`?

Do you really want to delete hypha `) -//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(`?

In this version of MycorrhizaWiki you cannot undelete a deleted hypha but the history can still be accessed.

Confirm

Cancel

`) -//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(`
+
`) -//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(`

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(`

This hypha does not exist.

Go back

`) -//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 } diff --git a/templates/mutators.qtpl b/templates/mutators.qtpl index 39a37ba..a90b767 100644 --- a/templates/mutators.qtpl +++ b/templates/mutators.qtpl @@ -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") %} -
-

Edit {%s hyphaName %}

+
+
+

Edit {%s util.BeautifulName(hyphaName) %}

{%s= warning %}
@@ -14,11 +16,13 @@ Cancel
+
{% endfunc %} {% func PreviewHTML(rq *http.Request, hyphaName, textAreaFill, warning string, renderedPage string) %} {%s= navHTML(rq, hyphaName, "edit") %} -
+
+

Edit {%s hyphaName %} (preview)

{%s= warning %}
Note that the hypha is not saved yet. You can preview the changes ↓

{%s= renderedPage %}
+
{% endfunc %} diff --git a/templates/mutators.qtpl.go b/templates/mutators.qtpl.go index 7a4ec80..b1642cf 100644 --- a/templates/mutators.qtpl.go +++ b/templates/mutators.qtpl.go @@ -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(` -
-

Edit `) -//line templates/mutators.qtpl:6 - qw422016.E().S(hyphaName) -//line templates/mutators.qtpl:6 +
+
+

Edit `) +//line templates/mutators.qtpl:8 + qw422016.E().S(util.BeautifulName(hyphaName)) +//line templates/mutators.qtpl:8 qw422016.N().S(`

`) -//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(`
Cancel
+
`) -//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(` -
+
+

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)

`) -//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(`

Cancel

Note that the hypha is not saved yet. You can preview the changes ↓

`) -//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(`
+
`) -//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 } diff --git a/templates/readers.qtpl b/templates/readers.qtpl index 6bb8a39..8c06d2f 100644 --- a/templates/readers.qtpl +++ b/templates/readers.qtpl @@ -4,67 +4,65 @@ {% func HistoryHTML(rq *http.Request, hyphaName, list string) %} {%= navHTML(rq, hyphaName, "history") %} -
+
+

History of {%s hyphaName %}

{%s= list %}
+
{% 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) %} -
+
+

Please note that viewing binary parts of hyphae is not supported in history for now.

{%s= naviTitle %} {%s= contents %}
-
-
+{%= relativeHyphae(relatives) %} +
{% 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") %}
-
-
- {%s= naviTitle %} - {% if contents == "" %} -

This hypha has no text. Why not create it?

- {% else %} - {%s= contents %} - {% endif %} -
-
- {% if prevHyphaName != "" %} - - {% endif %} - {% if nextHyphaName != "" %} - - {% endif %} -
- {% if u := user.FromRequest(rq); !user.AuthUsed || u.Group != "anon" %} -
- {% if hasAmnt %} - Unattach current attachment? - {% endif %} - -
- - -
- {% endif %} -
- +
+
+ {%s= naviTitle %} + {% if contents == "" %} +

This hypha has no text. Why not create it?

+ {% else %} + {%s= contents %} + {% endif %} +
+
+ {% if prevHyphaName != "" %} + + {% endif %} + {% if nextHyphaName != "" %} + + {% endif %} +
+{% if u := user.FromRequest(rq); !user.AuthUsed || u.Group != "anon" %} +
+ {% if hasAmnt %} + Unattach current attachment? + {% endif %} + +
+ + +
+{% endif %} +
+{%= relativeHyphae(relatives) %}
{% endfunc %} diff --git a/templates/readers.qtpl.go b/templates/readers.qtpl.go index 3cdbe57..ab43ebe 100644 --- a/templates/readers.qtpl.go +++ b/templates/readers.qtpl.go @@ -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(` -
+
+

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(`

`) -//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(`
+
`) -//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(` -
+
+

Please note that viewing binary parts of hyphae is not supported in history for now.

`) -//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(`
-
-
`) -//line templates/readers.qtpl:28 +//line templates/readers.qtpl:27 + streamrelativeHyphae(qw422016, relatives) +//line templates/readers.qtpl:27 + qw422016.N().S(` +
+`) +//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(`
-
-
- `) -//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(` -

This hypha has no text. Why not create it?

- `) -//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(` -
-
- `) -//line templates/readers.qtpl:44 - if prevHyphaName != "" { -//line templates/readers.qtpl:44 - qw422016.N().S(` - - `) -//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(` - - `) -//line templates/readers.qtpl:49 - } -//line templates/readers.qtpl:49 - qw422016.N().S(` -
- `) -//line templates/readers.qtpl:51 - if u := user.FromRequest(rq); !user.AuthUsed || u.Group != "anon" { -//line templates/readers.qtpl:51 - qw422016.N().S(` -
- `) -//line templates/readers.qtpl:55 - if hasAmnt { -//line templates/readers.qtpl:55 - qw422016.N().S(` - Unattach current attachment? - `) -//line templates/readers.qtpl:57 - } -//line templates/readers.qtpl:57 - qw422016.N().S(` - -
- - -
- `) -//line templates/readers.qtpl:63 - } -//line templates/readers.qtpl:63 - qw422016.N().S(` -
-
`) -//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 } diff --git a/templates/recent_changes.qtpl b/templates/recent_changes.qtpl index 2980fd4..9082e96 100644 --- a/templates/recent_changes.qtpl +++ b/templates/recent_changes.qtpl @@ -1,5 +1,6 @@ {% func RecentChangesHTML(changes []string, n int) %} -
+
+

Recent Changes

← Back

@@ -40,4 +41,5 @@ {% endif %}
+
{% endfunc %} diff --git a/templates/recent_changes.qtpl.go b/templates/recent_changes.qtpl.go index 329ccc5..e3cc346 100644 --- a/templates/recent_changes.qtpl.go +++ b/templates/recent_changes.qtpl.go @@ -21,58 +21,59 @@ var ( func StreamRecentChangesHTML(qw422016 *qt422016.Writer, changes []string, n int) { //line templates/recent_changes.qtpl:1 qw422016.N().S(` -
+
+

Recent Changes

← Back

@@ -80,80 +81,81 @@ func StreamRecentChangesHTML(qw422016 *qt422016.Writer, changes []string, n int)

Subscribe via RSS, Atom or JSON feed.

`) -//line templates/recent_changes.qtpl:28 +//line templates/recent_changes.qtpl:29 qw422016.N().S(`
`) -//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(`

Could not find any recent changes.

`) -//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(`
    `) -//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(`
`) -//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(`
+
`) -//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 } diff --git a/templates/rename.qtpl b/templates/rename.qtpl index aee28ce..8f35d55 100644 --- a/templates/rename.qtpl +++ b/templates/rename.qtpl @@ -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") %} -
+
+
{%- if isOld -%}

Rename {%s hyphaName %}

@@ -26,6 +27,7 @@ This dialog is to be shown to a user when they try to rename a hypha. {%= cannotRenameDueToNonExistence(hyphaName) %} {%- endif -%}
+
{% endfunc %} {% func cannotRenameDueToNonExistence(hyphaName string) %} diff --git a/templates/rename.qtpl.go b/templates/rename.qtpl.go index 2347bcd..973c5f7 100644 --- a/templates/rename.qtpl.go +++ b/templates/rename.qtpl.go @@ -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(` -
+
+
`) -//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(`

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(`

New name
@@ -67,92 +68,93 @@ func StreamRenameAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName
`) -//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(`
+
`) -//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(`

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(`

This hypha does not exist.

Go back

`) -//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 } diff --git a/templates/stuff.qtpl b/templates/stuff.qtpl index 724a925..fce9908 100644 --- a/templates/stuff.qtpl +++ b/templates/stuff.qtpl @@ -27,7 +27,8 @@ {% endfunc %} {% func HyphaListHTML(tbody string, pageCount int) %} -
+
+

List of hyphae

This wiki has {%d pageCount %} hyphae.

@@ -42,6 +43,7 @@
+
{% endfunc %} {% func HyphaListRowHTML(hyphaName, binaryMime string, binaryPresent bool) %} @@ -56,7 +58,8 @@ {% endfunc %} {% func AboutHTML() %} -
+
+

About {%s util.SiteName %}

    @@ -75,4 +78,5 @@

    See /list for information about hyphae on this wiki.

+
{% endfunc %} diff --git a/templates/stuff.qtpl.go b/templates/stuff.qtpl.go index a42f972..0bf3bf1 100644 --- a/templates/stuff.qtpl.go +++ b/templates/stuff.qtpl.go @@ -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(` -
+
+

List of hyphae

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.

@@ -133,203 +134,206 @@ func StreamHyphaListHTML(qw422016 *qt422016.Writer, tbody string, pageCount int) `) -//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(`
+
`) -//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(` `) -//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:50 +//line templates/stuff.qtpl:52 if binaryPresent { -//line templates/stuff.qtpl:50 +//line templates/stuff.qtpl:52 qw422016.N().S(` `) -//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(` `) -//line templates/stuff.qtpl:52 +//line templates/stuff.qtpl:54 } else { -//line templates/stuff.qtpl:52 +//line templates/stuff.qtpl:54 qw422016.N().S(` `) -//line templates/stuff.qtpl:54 +//line templates/stuff.qtpl:56 } -//line templates/stuff.qtpl:54 +//line templates/stuff.qtpl:56 qw422016.N().S(` `) -//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(` -
+
+

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(`

See /list for information about hyphae on this wiki.

+
`) -//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 } diff --git a/templates/unattach.qtpl b/templates/unattach.qtpl index e4f0ae2..8f7fe60 100644 --- a/templates/unattach.qtpl +++ b/templates/unattach.qtpl @@ -1,7 +1,8 @@ {% import "net/http" %} {% func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) %} -
{%= navHTML(rq, hyphaName, "unattach-ask") %} +
+
{%- if isOld -%}

Unattach {%s hyphaName %}?

@@ -13,6 +14,7 @@ {%= cannotUnattachDueToNonExistence(hyphaName) %} {%- endif -%}
+
{% endfunc %} {% func cannotUnattachDueToNonExistence(hyphaName string) %} diff --git a/templates/unattach.qtpl.go b/templates/unattach.qtpl.go index c00bc80..e5bc0d2 100644 --- a/templates/unattach.qtpl.go +++ b/templates/unattach.qtpl.go @@ -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(` -
`) -//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(` +
+
`) -//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(`

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(`?

Do you really want to unattach hypha `) -//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(`?

Confirm

Cancel

`) -//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(`
+
`) -//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(`

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(`

This hypha does not exist.

Go back

`) -//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 }