- History of {%s util.BeautifulName(hyphaName) %}
+ History of {%s= beautifulLink(hyphaName) %}
{%s= list %}
diff --git a/views/history.qtpl.go b/views/history.qtpl.go
index d012749..d5ef401 100644
--- a/views/history.qtpl.go
+++ b/views/history.qtpl.go
@@ -17,96 +17,93 @@ import "time"
import "github.com/bouncepaw/mycorrhiza/cfg"
//line views/history.qtpl:6
-import "github.com/bouncepaw/mycorrhiza/util"
-
-//line views/history.qtpl:7
import "github.com/bouncepaw/mycorrhiza/user"
-//line views/history.qtpl:8
+//line views/history.qtpl:7
import "github.com/bouncepaw/mycorrhiza/hyphae"
-//line views/history.qtpl:9
+//line views/history.qtpl:8
import "github.com/bouncepaw/mycorrhiza/history"
-//line views/history.qtpl:12
+//line views/history.qtpl:11
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
-//line views/history.qtpl:12
+//line views/history.qtpl:11
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
-//line views/history.qtpl:12
+//line views/history.qtpl:11
func StreamPrimitiveDiffHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) {
-//line views/history.qtpl:12
+//line views/history.qtpl:11
qw422016.N().S(`
`)
-//line views/history.qtpl:14
+//line views/history.qtpl:13
text, err := history.PrimitiveDiffAtRevision(h.TextPartPath(), hash)
if err != nil {
text = err.Error()
}
-//line views/history.qtpl:18
+//line views/history.qtpl:17
qw422016.N().S(`
Diff `)
-//line views/history.qtpl:22
- qw422016.E().S(util.BeautifulName(h.Name))
-//line views/history.qtpl:22
+//line views/history.qtpl:21
+ qw422016.N().S(beautifulLink(h.Name))
+//line views/history.qtpl:21
qw422016.N().S(` at `)
-//line views/history.qtpl:22
+//line views/history.qtpl:21
qw422016.E().S(hash)
-//line views/history.qtpl:22
+//line views/history.qtpl:21
qw422016.N().S(`
`)
-//line views/history.qtpl:23
+//line views/history.qtpl:22
qw422016.E().S(text)
-//line views/history.qtpl:23
+//line views/history.qtpl:22
qw422016.N().S(`
`)
-//line views/history.qtpl:27
+//line views/history.qtpl:26
}
-//line views/history.qtpl:27
+//line views/history.qtpl:26
func WritePrimitiveDiffHTML(qq422016 qtio422016.Writer, rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) {
-//line views/history.qtpl:27
+//line views/history.qtpl:26
qw422016 := qt422016.AcquireWriter(qq422016)
-//line views/history.qtpl:27
+//line views/history.qtpl:26
StreamPrimitiveDiffHTML(qw422016, rq, h, u, hash)
-//line views/history.qtpl:27
+//line views/history.qtpl:26
qt422016.ReleaseWriter(qw422016)
-//line views/history.qtpl:27
+//line views/history.qtpl:26
}
-//line views/history.qtpl:27
+//line views/history.qtpl:26
func PrimitiveDiffHTML(rq *http.Request, h *hyphae.Hypha, u *user.User, hash string) string {
-//line views/history.qtpl:27
+//line views/history.qtpl:26
qb422016 := qt422016.AcquireByteBuffer()
-//line views/history.qtpl:27
+//line views/history.qtpl:26
WritePrimitiveDiffHTML(qb422016, rq, h, u, hash)
-//line views/history.qtpl:27
+//line views/history.qtpl:26
qs422016 := string(qb422016.B)
-//line views/history.qtpl:27
+//line views/history.qtpl:26
qt422016.ReleaseByteBuffer(qb422016)
-//line views/history.qtpl:27
+//line views/history.qtpl:26
return qs422016
-//line views/history.qtpl:27
+//line views/history.qtpl:26
}
-//line views/history.qtpl:29
+//line views/history.qtpl:28
func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int) {
-//line views/history.qtpl:29
+//line views/history.qtpl:28
qw422016.N().S(`
@@ -115,54 +112,54 @@ func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int) {
See
`)
-//line views/history.qtpl:36
+//line views/history.qtpl:35
for i, m := range []int{20, 50, 100} {
-//line views/history.qtpl:36
+//line views/history.qtpl:35
qw422016.N().S(`
`)
-//line views/history.qtpl:37
+//line views/history.qtpl:36
if i > 0 {
-//line views/history.qtpl:37
+//line views/history.qtpl:36
qw422016.N().S(`
|
`)
-//line views/history.qtpl:39
+//line views/history.qtpl:38
}
-//line views/history.qtpl:39
+//line views/history.qtpl:38
qw422016.N().S(`
`)
-//line views/history.qtpl:40
+//line views/history.qtpl:39
if m == n {
-//line views/history.qtpl:40
+//line views/history.qtpl:39
qw422016.N().S(`
`)
-//line views/history.qtpl:41
+//line views/history.qtpl:40
qw422016.N().D(m)
-//line views/history.qtpl:41
+//line views/history.qtpl:40
qw422016.N().S(`
`)
-//line views/history.qtpl:42
+//line views/history.qtpl:41
} else {
-//line views/history.qtpl:42
+//line views/history.qtpl:41
qw422016.N().S(`
`)
-//line views/history.qtpl:43
+//line views/history.qtpl:42
qw422016.N().D(m)
-//line views/history.qtpl:43
+//line views/history.qtpl:42
qw422016.N().S(`
`)
-//line views/history.qtpl:44
+//line views/history.qtpl:43
}
-//line views/history.qtpl:44
+//line views/history.qtpl:43
qw422016.N().S(`
`)
-//line views/history.qtpl:45
+//line views/history.qtpl:44
}
-//line views/history.qtpl:45
+//line views/history.qtpl:44
qw422016.N().S(`
recent changes
@@ -170,266 +167,266 @@ func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int) {
Subscribe via RSS , Atom or JSON feed .
`)
-//line views/history.qtpl:56
+//line views/history.qtpl:55
qw422016.N().S(`
`)
-//line views/history.qtpl:59
+//line views/history.qtpl:58
changes := history.RecentChanges(n)
var year, day int
var month time.Month
-//line views/history.qtpl:62
+//line views/history.qtpl:61
qw422016.N().S(`
`)
-//line views/history.qtpl:64
+//line views/history.qtpl:63
if len(changes) == 0 {
-//line views/history.qtpl:64
+//line views/history.qtpl:63
qw422016.N().S(`
Could not find any recent changes.
`)
-//line views/history.qtpl:66
+//line views/history.qtpl:65
} else {
-//line views/history.qtpl:66
+//line views/history.qtpl:65
qw422016.N().S(`
`)
-//line views/history.qtpl:67
+//line views/history.qtpl:66
for i, entry := range changes {
-//line views/history.qtpl:67
+//line views/history.qtpl:66
qw422016.N().S(`
`)
-//line views/history.qtpl:69
+//line views/history.qtpl:68
y, m, d := entry.Time.UTC().Date()
-//line views/history.qtpl:69
+//line views/history.qtpl:68
qw422016.N().S(`
`)
-//line views/history.qtpl:70
+//line views/history.qtpl:69
if d != day || m != month || y != year {
-//line views/history.qtpl:70
+//line views/history.qtpl:69
qw422016.N().S(`
`)
-//line views/history.qtpl:72
+//line views/history.qtpl:71
qw422016.E().S(fmt.Sprintf("%04d-%02d-%02d", y, m, d))
-//line views/history.qtpl:72
+//line views/history.qtpl:71
qw422016.N().S(`
`)
-//line views/history.qtpl:74
+//line views/history.qtpl:73
year, month, day = y, m, d
-//line views/history.qtpl:74
+//line views/history.qtpl:73
qw422016.N().S(`
`)
-//line views/history.qtpl:75
+//line views/history.qtpl:74
}
-//line views/history.qtpl:75
+//line views/history.qtpl:74
qw422016.N().S(`
`)
-//line views/history.qtpl:79
+//line views/history.qtpl:78
qw422016.N().S(recentChangesEntry(entry))
-//line views/history.qtpl:79
+//line views/history.qtpl:78
qw422016.N().S(`
`)
-//line views/history.qtpl:82
+//line views/history.qtpl:81
}
-//line views/history.qtpl:82
+//line views/history.qtpl:81
qw422016.N().S(`
`)
-//line views/history.qtpl:83
+//line views/history.qtpl:82
}
-//line views/history.qtpl:83
+//line views/history.qtpl:82
qw422016.N().S(`
`)
-//line views/history.qtpl:84
+//line views/history.qtpl:83
qw422016.N().S(helpTopicBadgeHTML("en", "recent_changes"))
-//line views/history.qtpl:84
+//line views/history.qtpl:83
qw422016.N().S(`
`)
-//line views/history.qtpl:88
+//line views/history.qtpl:87
}
-//line views/history.qtpl:88
+//line views/history.qtpl:87
func WriteRecentChangesHTML(qq422016 qtio422016.Writer, n int) {
-//line views/history.qtpl:88
+//line views/history.qtpl:87
qw422016 := qt422016.AcquireWriter(qq422016)
-//line views/history.qtpl:88
+//line views/history.qtpl:87
StreamRecentChangesHTML(qw422016, n)
-//line views/history.qtpl:88
+//line views/history.qtpl:87
qt422016.ReleaseWriter(qw422016)
-//line views/history.qtpl:88
+//line views/history.qtpl:87
}
-//line views/history.qtpl:88
+//line views/history.qtpl:87
func RecentChangesHTML(n int) string {
-//line views/history.qtpl:88
+//line views/history.qtpl:87
qb422016 := qt422016.AcquireByteBuffer()
-//line views/history.qtpl:88
+//line views/history.qtpl:87
WriteRecentChangesHTML(qb422016, n)
-//line views/history.qtpl:88
+//line views/history.qtpl:87
qs422016 := string(qb422016.B)
-//line views/history.qtpl:88
+//line views/history.qtpl:87
qt422016.ReleaseByteBuffer(qb422016)
-//line views/history.qtpl:88
+//line views/history.qtpl:87
return qs422016
-//line views/history.qtpl:88
+//line views/history.qtpl:87
}
-//line views/history.qtpl:90
+//line views/history.qtpl:89
func streamrecentChangesEntry(qw422016 *qt422016.Writer, rev history.Revision) {
-//line views/history.qtpl:90
+//line views/history.qtpl:89
qw422016.N().S(`
`)
-//line views/history.qtpl:93
+//line views/history.qtpl:92
qw422016.E().S(rev.Time.UTC().Format("15:04 UTC"))
-//line views/history.qtpl:93
+//line views/history.qtpl:92
qw422016.N().S(`
`)
-//line views/history.qtpl:95
+//line views/history.qtpl:94
qw422016.E().S(rev.Hash)
-//line views/history.qtpl:95
+//line views/history.qtpl:94
qw422016.N().S(`
`)
-//line views/history.qtpl:97
+//line views/history.qtpl:96
if rev.Username != "anon" {
-//line views/history.qtpl:97
+//line views/history.qtpl:96
qw422016.N().S(`
— `)
-//line views/history.qtpl:99
+//line views/history.qtpl:98
qw422016.E().S(rev.Username)
-//line views/history.qtpl:99
+//line views/history.qtpl:98
qw422016.N().S(`
`)
-//line views/history.qtpl:101
+//line views/history.qtpl:100
}
-//line views/history.qtpl:101
+//line views/history.qtpl:100
qw422016.N().S(`
`)
-//line views/history.qtpl:105
+//line views/history.qtpl:104
qw422016.N().S(rev.HyphaeLinksHTML())
-//line views/history.qtpl:105
+//line views/history.qtpl:104
qw422016.N().S(`
`)
-//line views/history.qtpl:108
+//line views/history.qtpl:107
qw422016.E().S(rev.Message)
-//line views/history.qtpl:108
+//line views/history.qtpl:107
qw422016.N().S(`
`)
-//line views/history.qtpl:111
+//line views/history.qtpl:110
}
-//line views/history.qtpl:111
+//line views/history.qtpl:110
func writerecentChangesEntry(qq422016 qtio422016.Writer, rev history.Revision) {
-//line views/history.qtpl:111
+//line views/history.qtpl:110
qw422016 := qt422016.AcquireWriter(qq422016)
-//line views/history.qtpl:111
+//line views/history.qtpl:110
streamrecentChangesEntry(qw422016, rev)
-//line views/history.qtpl:111
+//line views/history.qtpl:110
qt422016.ReleaseWriter(qw422016)
-//line views/history.qtpl:111
+//line views/history.qtpl:110
}
-//line views/history.qtpl:111
+//line views/history.qtpl:110
func recentChangesEntry(rev history.Revision) string {
-//line views/history.qtpl:111
+//line views/history.qtpl:110
qb422016 := qt422016.AcquireByteBuffer()
-//line views/history.qtpl:111
+//line views/history.qtpl:110
writerecentChangesEntry(qb422016, rev)
-//line views/history.qtpl:111
+//line views/history.qtpl:110
qs422016 := string(qb422016.B)
-//line views/history.qtpl:111
+//line views/history.qtpl:110
qt422016.ReleaseByteBuffer(qb422016)
-//line views/history.qtpl:111
+//line views/history.qtpl:110
return qs422016
-//line views/history.qtpl:111
+//line views/history.qtpl:110
}
-//line views/history.qtpl:113
+//line views/history.qtpl:112
func StreamHistoryHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, list string) {
-//line views/history.qtpl:113
+//line views/history.qtpl:112
qw422016.N().S(`
History of `)
-//line views/history.qtpl:117
- qw422016.E().S(util.BeautifulName(hyphaName))
-//line views/history.qtpl:117
+//line views/history.qtpl:116
+ qw422016.N().S(beautifulLink(hyphaName))
+//line views/history.qtpl:116
qw422016.N().S(`
`)
-//line views/history.qtpl:118
+//line views/history.qtpl:117
qw422016.N().S(list)
-//line views/history.qtpl:118
+//line views/history.qtpl:117
qw422016.N().S(`
`)
-//line views/history.qtpl:122
+//line views/history.qtpl:121
}
-//line views/history.qtpl:122
+//line views/history.qtpl:121
func WriteHistoryHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, list string) {
-//line views/history.qtpl:122
+//line views/history.qtpl:121
qw422016 := qt422016.AcquireWriter(qq422016)
-//line views/history.qtpl:122
+//line views/history.qtpl:121
StreamHistoryHTML(qw422016, rq, hyphaName, list)
-//line views/history.qtpl:122
+//line views/history.qtpl:121
qt422016.ReleaseWriter(qw422016)
-//line views/history.qtpl:122
+//line views/history.qtpl:121
}
-//line views/history.qtpl:122
+//line views/history.qtpl:121
func HistoryHTML(rq *http.Request, hyphaName, list string) string {
-//line views/history.qtpl:122
+//line views/history.qtpl:121
qb422016 := qt422016.AcquireByteBuffer()
-//line views/history.qtpl:122
+//line views/history.qtpl:121
WriteHistoryHTML(qb422016, rq, hyphaName, list)
-//line views/history.qtpl:122
+//line views/history.qtpl:121
qs422016 := string(qb422016.B)
-//line views/history.qtpl:122
+//line views/history.qtpl:121
qt422016.ReleaseByteBuffer(qb422016)
-//line views/history.qtpl:122
+//line views/history.qtpl:121
return qs422016
-//line views/history.qtpl:122
+//line views/history.qtpl:121
}
diff --git a/views/hypha.qtpl b/views/hypha.qtpl
index 862c7ac..5816ba1 100644
--- a/views/hypha.qtpl
+++ b/views/hypha.qtpl
@@ -6,6 +6,9 @@
{% import "github.com/bouncepaw/mycorrhiza/user" %}
{% import "github.com/bouncepaw/mycorrhiza/util" %}
+{% func beautifulLink(hyphaName string) %}
+
{%s util.BeautifulName(hyphaName) %} {% endfunc %}
+
{% func nonExistentHyphaNotice(h *hyphae.Hypha, u *user.User) %}
This hypha does not exist
diff --git a/views/hypha.qtpl.go b/views/hypha.qtpl.go
index 87783d1..7d029bf 100644
--- a/views/hypha.qtpl.go
+++ b/views/hypha.qtpl.go
@@ -36,33 +36,75 @@ var (
)
//line views/hypha.qtpl:9
-func streamnonExistentHyphaNotice(qw422016 *qt422016.Writer, h *hyphae.Hypha, u *user.User) {
+func streambeautifulLink(qw422016 *qt422016.Writer, hyphaName string) {
//line views/hypha.qtpl:9
qw422016.N().S(`
+`)
+//line views/hypha.qtpl:10
+ qw422016.E().S(util.BeautifulName(hyphaName))
+//line views/hypha.qtpl:10
+ qw422016.N().S(` `)
+//line views/hypha.qtpl:10
+}
+
+//line views/hypha.qtpl:10
+func writebeautifulLink(qq422016 qtio422016.Writer, hyphaName string) {
+//line views/hypha.qtpl:10
+ qw422016 := qt422016.AcquireWriter(qq422016)
+//line views/hypha.qtpl:10
+ streambeautifulLink(qw422016, hyphaName)
+//line views/hypha.qtpl:10
+ qt422016.ReleaseWriter(qw422016)
+//line views/hypha.qtpl:10
+}
+
+//line views/hypha.qtpl:10
+func beautifulLink(hyphaName string) string {
+//line views/hypha.qtpl:10
+ qb422016 := qt422016.AcquireByteBuffer()
+//line views/hypha.qtpl:10
+ writebeautifulLink(qb422016, hyphaName)
+//line views/hypha.qtpl:10
+ qs422016 := string(qb422016.B)
+//line views/hypha.qtpl:10
+ qt422016.ReleaseByteBuffer(qb422016)
+//line views/hypha.qtpl:10
+ return qs422016
+//line views/hypha.qtpl:10
+}
+
+//line views/hypha.qtpl:12
+func streamnonExistentHyphaNotice(qw422016 *qt422016.Writer, h *hyphae.Hypha, u *user.User) {
+//line views/hypha.qtpl:12
+ qw422016.N().S(`
This hypha does not exist
`)
-//line views/hypha.qtpl:12
+//line views/hypha.qtpl:15
if cfg.UseAuth && u.Group == "anon" {
-//line views/hypha.qtpl:12
+//line views/hypha.qtpl:15
qw422016.N().S(`
You are not authorized to create new hyphae. Here is what you can do:
Log in to your account, if you have one
`)
-//line views/hypha.qtpl:16
+//line views/hypha.qtpl:19
if cfg.AllowRegistration {
-//line views/hypha.qtpl:16
+//line views/hypha.qtpl:19
qw422016.N().S(`Register a new account `)
-//line views/hypha.qtpl:16
+//line views/hypha.qtpl:19
}
-//line views/hypha.qtpl:16
+//line views/hypha.qtpl:19
qw422016.N().S(`
`)
-//line views/hypha.qtpl:18
+//line views/hypha.qtpl:21
} else {
-//line views/hypha.qtpl:18
+//line views/hypha.qtpl:21
qw422016.N().S(`
@@ -71,9 +113,9 @@ func streamnonExistentHyphaNotice(qw422016 *qt422016.Writer, h *hyphae.Hypha, u
Write a note, a diary, an article, a story or anything textual using Mycomarkup . Full history of edits to the document will be saved.
Make sure to follow this wiki's writing conventions if there are any.
Create
@@ -81,9 +123,9 @@ func streamnonExistentHyphaNotice(qw422016 *qt422016.Writer, h *hyphae.Hypha, u
🖼 Upload a media
Upload a picture, a video or an audio. Most common formats can be accessed from the browser, others can be only downloaded afterwards. You can write a description for the media later.
`)
-//line views/hypha.qtpl:41
+//line views/hypha.qtpl:44
}
-//line views/hypha.qtpl:41
+//line views/hypha.qtpl:44
qw422016.N().S(`
`)
-//line views/hypha.qtpl:43
+//line views/hypha.qtpl:46
}
-//line views/hypha.qtpl:43
+//line views/hypha.qtpl:46
func writenonExistentHyphaNotice(qq422016 qtio422016.Writer, h *hyphae.Hypha, u *user.User) {
-//line views/hypha.qtpl:43
+//line views/hypha.qtpl:46
qw422016 := qt422016.AcquireWriter(qq422016)
-//line views/hypha.qtpl:43
+//line views/hypha.qtpl:46
streamnonExistentHyphaNotice(qw422016, h, u)
-//line views/hypha.qtpl:43
+//line views/hypha.qtpl:46
qt422016.ReleaseWriter(qw422016)
-//line views/hypha.qtpl:43
+//line views/hypha.qtpl:46
}
-//line views/hypha.qtpl:43
+//line views/hypha.qtpl:46
func nonExistentHyphaNotice(h *hyphae.Hypha, u *user.User) string {
-//line views/hypha.qtpl:43
+//line views/hypha.qtpl:46
qb422016 := qt422016.AcquireByteBuffer()
-//line views/hypha.qtpl:43
+//line views/hypha.qtpl:46
writenonExistentHyphaNotice(qb422016, h, u)
-//line views/hypha.qtpl:43
+//line views/hypha.qtpl:46
qs422016 := string(qb422016.B)
-//line views/hypha.qtpl:43
+//line views/hypha.qtpl:46
qt422016.ReleaseByteBuffer(qb422016)
-//line views/hypha.qtpl:43
+//line views/hypha.qtpl:46
return qs422016
-//line views/hypha.qtpl:43
+//line views/hypha.qtpl:46
}
-//line views/hypha.qtpl:45
+//line views/hypha.qtpl:48
func StreamNaviTitleHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) {
-//line views/hypha.qtpl:45
+//line views/hypha.qtpl:48
qw422016.N().S(`
`)
-//line views/hypha.qtpl:47
+//line views/hypha.qtpl:50
var (
prevAcc = "/hypha/"
parts = strings.Split(h.Name, "/")
)
-//line views/hypha.qtpl:51
+//line views/hypha.qtpl:54
qw422016.N().S(`
`)
-//line views/hypha.qtpl:53
+//line views/hypha.qtpl:56
qw422016.N().S(``)
-//line views/hypha.qtpl:55
+//line views/hypha.qtpl:58
qw422016.N().S(cfg.NaviTitleIcon)
-//line views/hypha.qtpl:55
+//line views/hypha.qtpl:58
qw422016.N().S(`: `)
-//line views/hypha.qtpl:59
+//line views/hypha.qtpl:62
for i, part := range parts {
-//line views/hypha.qtpl:60
+//line views/hypha.qtpl:63
if i > 0 {
-//line views/hypha.qtpl:60
+//line views/hypha.qtpl:63
qw422016.N().S(`/ `)
-//line views/hypha.qtpl:62
+//line views/hypha.qtpl:65
}
-//line views/hypha.qtpl:62
+//line views/hypha.qtpl:65
qw422016.N().S(``)
-//line views/hypha.qtpl:65
- qw422016.N().S(util.BeautifulName(part))
-//line views/hypha.qtpl:65
- qw422016.N().S(` `)
//line views/hypha.qtpl:67
+ qw422016.E().S(prevAcc + part)
+//line views/hypha.qtpl:67
+ qw422016.N().S(`" rel="`)
+//line views/hypha.qtpl:67
+ if i == len(parts)-1 {
+//line views/hypha.qtpl:67
+ qw422016.N().S(`bookmark`)
+//line views/hypha.qtpl:67
+ } else {
+//line views/hypha.qtpl:67
+ qw422016.N().S(`up`)
+//line views/hypha.qtpl:67
+ }
+//line views/hypha.qtpl:67
+ qw422016.N().S(`">`)
+//line views/hypha.qtpl:68
+ qw422016.N().S(util.BeautifulName(part))
+//line views/hypha.qtpl:68
+ qw422016.N().S(``)
+//line views/hypha.qtpl:70
prevAcc += part + "/"
-//line views/hypha.qtpl:68
+//line views/hypha.qtpl:71
}
-//line views/hypha.qtpl:69
+//line views/hypha.qtpl:72
qw422016.N().S(`
`)
-//line views/hypha.qtpl:71
+//line views/hypha.qtpl:74
}
-//line views/hypha.qtpl:71
+//line views/hypha.qtpl:74
func WriteNaviTitleHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) {
-//line views/hypha.qtpl:71
+//line views/hypha.qtpl:74
qw422016 := qt422016.AcquireWriter(qq422016)
-//line views/hypha.qtpl:71
+//line views/hypha.qtpl:74
StreamNaviTitleHTML(qw422016, h)
-//line views/hypha.qtpl:71
+//line views/hypha.qtpl:74
qt422016.ReleaseWriter(qw422016)
-//line views/hypha.qtpl:71
+//line views/hypha.qtpl:74
}
-//line views/hypha.qtpl:71
+//line views/hypha.qtpl:74
func NaviTitleHTML(h *hyphae.Hypha) string {
-//line views/hypha.qtpl:71
+//line views/hypha.qtpl:74
qb422016 := qt422016.AcquireByteBuffer()
-//line views/hypha.qtpl:71
+//line views/hypha.qtpl:74
WriteNaviTitleHTML(qb422016, h)
-//line views/hypha.qtpl:71
+//line views/hypha.qtpl:74
qs422016 := string(qb422016.B)
-//line views/hypha.qtpl:71
+//line views/hypha.qtpl:74
qt422016.ReleaseByteBuffer(qb422016)
-//line views/hypha.qtpl:71
+//line views/hypha.qtpl:74
return qs422016
-//line views/hypha.qtpl:71
+//line views/hypha.qtpl:74
}
-//line views/hypha.qtpl:73
+//line views/hypha.qtpl:76
func StreamAttachmentHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) {
-//line views/hypha.qtpl:73
+//line views/hypha.qtpl:76
qw422016.N().S(`
`)
-//line views/hypha.qtpl:74
+//line views/hypha.qtpl:77
switch filepath.Ext(h.BinaryPath) {
-//line views/hypha.qtpl:76
+//line views/hypha.qtpl:79
case ".jpg", ".gif", ".png", ".webp", ".svg", ".ico":
-//line views/hypha.qtpl:76
+//line views/hypha.qtpl:79
qw422016.N().S(`
`)
-//line views/hypha.qtpl:81
+//line views/hypha.qtpl:84
case ".ogg", ".webm", ".mp4":
-//line views/hypha.qtpl:81
+//line views/hypha.qtpl:84
qw422016.N().S(`
`)
-//line views/hypha.qtpl:89
+//line views/hypha.qtpl:92
case ".mp3":
-//line views/hypha.qtpl:89
+//line views/hypha.qtpl:92
qw422016.N().S(`
`)
-//line views/hypha.qtpl:97
+//line views/hypha.qtpl:100
default:
-//line views/hypha.qtpl:97
+//line views/hypha.qtpl:100
qw422016.N().S(`
`)
-//line views/hypha.qtpl:101
+//line views/hypha.qtpl:104
}
-//line views/hypha.qtpl:101
+//line views/hypha.qtpl:104
qw422016.N().S(`
`)
-//line views/hypha.qtpl:102
+//line views/hypha.qtpl:105
}
-//line views/hypha.qtpl:102
+//line views/hypha.qtpl:105
func WriteAttachmentHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) {
-//line views/hypha.qtpl:102
+//line views/hypha.qtpl:105
qw422016 := qt422016.AcquireWriter(qq422016)
-//line views/hypha.qtpl:102
+//line views/hypha.qtpl:105
StreamAttachmentHTML(qw422016, h)
-//line views/hypha.qtpl:102
+//line views/hypha.qtpl:105
qt422016.ReleaseWriter(qw422016)
-//line views/hypha.qtpl:102
+//line views/hypha.qtpl:105
}
-//line views/hypha.qtpl:102
+//line views/hypha.qtpl:105
func AttachmentHTML(h *hyphae.Hypha) string {
-//line views/hypha.qtpl:102
+//line views/hypha.qtpl:105
qb422016 := qt422016.AcquireByteBuffer()
-//line views/hypha.qtpl:102
+//line views/hypha.qtpl:105
WriteAttachmentHTML(qb422016, h)
-//line views/hypha.qtpl:102
+//line views/hypha.qtpl:105
qs422016 := string(qb422016.B)
-//line views/hypha.qtpl:102
+//line views/hypha.qtpl:105
qt422016.ReleaseByteBuffer(qb422016)
-//line views/hypha.qtpl:102
+//line views/hypha.qtpl:105
return qs422016
-//line views/hypha.qtpl:102
+//line views/hypha.qtpl:105
}
diff --git a/views/modal.qtpl b/views/modal.qtpl
index e0d4146..2f9f91a 100644
--- a/views/modal.qtpl
+++ b/views/modal.qtpl
@@ -1,12 +1,11 @@
{% import "net/http" %}
-{% import "github.com/bouncepaw/mycorrhiza/util" %}
{% func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) %}
{%= modalBegin(
"delete-confirm",
hyphaName,
"",
- "Delete "+util.BeautifulName(hyphaName)+"?") %}
+ "Delete "+beautifulLink(hyphaName)+"?") %}
{%= modalReallyWant(hyphaName, "unattach") %}
In this version of Mycorrhiza Wiki you cannot undelete a deleted hypha but the history can still be accessed.
{%= modalEnd(hyphaName, true) %}
@@ -17,7 +16,7 @@
"unattach",
hyphaName,
"",
- "Unattach "+util.BeautifulName(hyphaName)+"?") %}
+ "Unattach "+beautifulLink(hyphaName)+"?") %}
{%= modalReallyWant(hyphaName, "unattach") %}
{%= modalEnd(hyphaName, true) %}
{% endfunc %}
@@ -27,7 +26,7 @@
"rename-confirm",
hyphaName,
` method="post" enctype="multipart/form-data"`,
- "Rename "+util.BeautifulName(hyphaName)) %}
+ "Rename "+beautifulLink(hyphaName)) %}
New name
diff --git a/views/modal.qtpl.go b/views/modal.qtpl.go
index 15fab62..9b82733 100644
--- a/views/modal.qtpl.go
+++ b/views/modal.qtpl.go
@@ -7,147 +7,144 @@ package views
//line views/modal.qtpl:1
import "net/http"
-//line views/modal.qtpl:2
-import "github.com/bouncepaw/mycorrhiza/util"
-
-//line views/modal.qtpl:4
+//line views/modal.qtpl:3
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
-//line views/modal.qtpl:4
+//line views/modal.qtpl:3
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
-//line views/modal.qtpl:4
+//line views/modal.qtpl:3
func StreamDeleteAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
-//line views/modal.qtpl:4
+//line views/modal.qtpl:3
qw422016.N().S(`
`)
-//line views/modal.qtpl:5
+//line views/modal.qtpl:4
streammodalBegin(qw422016,
"delete-confirm",
hyphaName,
"",
- "Delete "+util.BeautifulName(hyphaName)+"?")
-//line views/modal.qtpl:9
+ "Delete "+beautifulLink(hyphaName)+"?")
+//line views/modal.qtpl:8
qw422016.N().S(`
`)
-//line views/modal.qtpl:10
+//line views/modal.qtpl:9
streammodalReallyWant(qw422016, hyphaName, "unattach")
-//line views/modal.qtpl:10
+//line views/modal.qtpl:9
qw422016.N().S(`
In this version of Mycorrhiza Wiki you cannot undelete a deleted hypha but the history can still be accessed.
`)
-//line views/modal.qtpl:12
+//line views/modal.qtpl:11
streammodalEnd(qw422016, hyphaName, true)
+//line views/modal.qtpl:11
+ qw422016.N().S(`
+`)
//line views/modal.qtpl:12
- qw422016.N().S(`
-`)
-//line views/modal.qtpl:13
}
-//line views/modal.qtpl:13
+//line views/modal.qtpl:12
func WriteDeleteAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
-//line views/modal.qtpl:13
+//line views/modal.qtpl:12
qw422016 := qt422016.AcquireWriter(qq422016)
-//line views/modal.qtpl:13
+//line views/modal.qtpl:12
StreamDeleteAskHTML(qw422016, rq, hyphaName, isOld)
-//line views/modal.qtpl:13
+//line views/modal.qtpl:12
qt422016.ReleaseWriter(qw422016)
-//line views/modal.qtpl:13
+//line views/modal.qtpl:12
}
-//line views/modal.qtpl:13
+//line views/modal.qtpl:12
func DeleteAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
-//line views/modal.qtpl:13
+//line views/modal.qtpl:12
qb422016 := qt422016.AcquireByteBuffer()
-//line views/modal.qtpl:13
+//line views/modal.qtpl:12
WriteDeleteAskHTML(qb422016, rq, hyphaName, isOld)
-//line views/modal.qtpl:13
+//line views/modal.qtpl:12
qs422016 := string(qb422016.B)
-//line views/modal.qtpl:13
+//line views/modal.qtpl:12
qt422016.ReleaseByteBuffer(qb422016)
-//line views/modal.qtpl:13
+//line views/modal.qtpl:12
return qs422016
-//line views/modal.qtpl:13
+//line views/modal.qtpl:12
}
-//line views/modal.qtpl:15
+//line views/modal.qtpl:14
func StreamUnattachAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
-//line views/modal.qtpl:15
+//line views/modal.qtpl:14
qw422016.N().S(`
`)
-//line views/modal.qtpl:16
+//line views/modal.qtpl:15
streammodalBegin(qw422016,
"unattach",
hyphaName,
"",
- "Unattach "+util.BeautifulName(hyphaName)+"?")
+ "Unattach "+beautifulLink(hyphaName)+"?")
+//line views/modal.qtpl:19
+ qw422016.N().S(`
+`)
+//line views/modal.qtpl:20
+ streammodalReallyWant(qw422016, hyphaName, "unattach")
//line views/modal.qtpl:20
qw422016.N().S(`
`)
//line views/modal.qtpl:21
- streammodalReallyWant(qw422016, hyphaName, "unattach")
+ streammodalEnd(qw422016, hyphaName, true)
//line views/modal.qtpl:21
qw422016.N().S(`
`)
//line views/modal.qtpl:22
- streammodalEnd(qw422016, hyphaName, true)
+}
+
//line views/modal.qtpl:22
- qw422016.N().S(`
-`)
-//line views/modal.qtpl:23
-}
-
-//line views/modal.qtpl:23
func WriteUnattachAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
-//line views/modal.qtpl:23
+//line views/modal.qtpl:22
qw422016 := qt422016.AcquireWriter(qq422016)
-//line views/modal.qtpl:23
+//line views/modal.qtpl:22
StreamUnattachAskHTML(qw422016, rq, hyphaName, isOld)
-//line views/modal.qtpl:23
+//line views/modal.qtpl:22
qt422016.ReleaseWriter(qw422016)
-//line views/modal.qtpl:23
+//line views/modal.qtpl:22
}
-//line views/modal.qtpl:23
+//line views/modal.qtpl:22
func UnattachAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
-//line views/modal.qtpl:23
+//line views/modal.qtpl:22
qb422016 := qt422016.AcquireByteBuffer()
-//line views/modal.qtpl:23
+//line views/modal.qtpl:22
WriteUnattachAskHTML(qb422016, rq, hyphaName, isOld)
-//line views/modal.qtpl:23
+//line views/modal.qtpl:22
qs422016 := string(qb422016.B)
-//line views/modal.qtpl:23
+//line views/modal.qtpl:22
qt422016.ReleaseByteBuffer(qb422016)
-//line views/modal.qtpl:23
+//line views/modal.qtpl:22
return qs422016
-//line views/modal.qtpl:23
+//line views/modal.qtpl:22
}
-//line views/modal.qtpl:25
+//line views/modal.qtpl:24
func StreamRenameAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
-//line views/modal.qtpl:25
+//line views/modal.qtpl:24
qw422016.N().S(`
`)
-//line views/modal.qtpl:26
+//line views/modal.qtpl:25
streammodalBegin(qw422016,
"rename-confirm",
hyphaName,
` method="post" enctype="multipart/form-data"`,
- "Rename "+util.BeautifulName(hyphaName))
-//line views/modal.qtpl:30
+ "Rename "+beautifulLink(hyphaName))
+//line views/modal.qtpl:29
qw422016.N().S(`
New name
@@ -155,186 +152,186 @@ func StreamRenameAskHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName
If you rename this hypha, all incoming links and all relative outcoming links will break. You will also lose all history for the new name. Rename carefully.
`)
-//line views/modal.qtpl:38
+//line views/modal.qtpl:37
streammodalEnd(qw422016, hyphaName, false)
-//line views/modal.qtpl:38
+//line views/modal.qtpl:37
qw422016.N().S(`
`)
-//line views/modal.qtpl:39
+//line views/modal.qtpl:38
}
-//line views/modal.qtpl:39
+//line views/modal.qtpl:38
func WriteRenameAskHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName string, isOld bool) {
-//line views/modal.qtpl:39
+//line views/modal.qtpl:38
qw422016 := qt422016.AcquireWriter(qq422016)
-//line views/modal.qtpl:39
+//line views/modal.qtpl:38
StreamRenameAskHTML(qw422016, rq, hyphaName, isOld)
-//line views/modal.qtpl:39
+//line views/modal.qtpl:38
qt422016.ReleaseWriter(qw422016)
-//line views/modal.qtpl:39
+//line views/modal.qtpl:38
}
-//line views/modal.qtpl:39
+//line views/modal.qtpl:38
func RenameAskHTML(rq *http.Request, hyphaName string, isOld bool) string {
-//line views/modal.qtpl:39
+//line views/modal.qtpl:38
qb422016 := qt422016.AcquireByteBuffer()
-//line views/modal.qtpl:39
+//line views/modal.qtpl:38
WriteRenameAskHTML(qb422016, rq, hyphaName, isOld)
-//line views/modal.qtpl:39
+//line views/modal.qtpl:38
qs422016 := string(qb422016.B)
-//line views/modal.qtpl:39
+//line views/modal.qtpl:38
qt422016.ReleaseByteBuffer(qb422016)
-//line views/modal.qtpl:39
+//line views/modal.qtpl:38
return qs422016
-//line views/modal.qtpl:39
+//line views/modal.qtpl:38
}
-//line views/modal.qtpl:41
+//line views/modal.qtpl:40
func streammodalReallyWant(qw422016 *qt422016.Writer, hyphaName, verb string) {
-//line views/modal.qtpl:41
+//line views/modal.qtpl:40
qw422016.N().S(`
Do you really want to `)
-//line views/modal.qtpl:42
+//line views/modal.qtpl:41
qw422016.E().S(verb)
-//line views/modal.qtpl:42
+//line views/modal.qtpl:41
qw422016.N().S(` hypha `)
-//line views/modal.qtpl:42
+//line views/modal.qtpl:41
qw422016.E().S(hyphaName)
-//line views/modal.qtpl:42
+//line views/modal.qtpl:41
qw422016.N().S(` ?
`)
-//line views/modal.qtpl:43
+//line views/modal.qtpl:42
}
-//line views/modal.qtpl:43
+//line views/modal.qtpl:42
func writemodalReallyWant(qq422016 qtio422016.Writer, hyphaName, verb string) {
-//line views/modal.qtpl:43
+//line views/modal.qtpl:42
qw422016 := qt422016.AcquireWriter(qq422016)
-//line views/modal.qtpl:43
+//line views/modal.qtpl:42
streammodalReallyWant(qw422016, hyphaName, verb)
-//line views/modal.qtpl:43
+//line views/modal.qtpl:42
qt422016.ReleaseWriter(qw422016)
-//line views/modal.qtpl:43
+//line views/modal.qtpl:42
}
-//line views/modal.qtpl:43
+//line views/modal.qtpl:42
func modalReallyWant(hyphaName, verb string) string {
-//line views/modal.qtpl:43
+//line views/modal.qtpl:42
qb422016 := qt422016.AcquireByteBuffer()
-//line views/modal.qtpl:43
+//line views/modal.qtpl:42
writemodalReallyWant(qb422016, hyphaName, verb)
-//line views/modal.qtpl:43
+//line views/modal.qtpl:42
qs422016 := string(qb422016.B)
-//line views/modal.qtpl:43
+//line views/modal.qtpl:42
qt422016.ReleaseByteBuffer(qb422016)
-//line views/modal.qtpl:43
+//line views/modal.qtpl:42
return qs422016
-//line views/modal.qtpl:43
+//line views/modal.qtpl:42
}
-//line views/modal.qtpl:45
+//line views/modal.qtpl:44
func streammodalBegin(qw422016 *qt422016.Writer, path, hyphaName, formAttrs, legend string) {
-//line views/modal.qtpl:45
+//line views/modal.qtpl:44
qw422016.N().S(`
`)
-//line views/modal.qtpl:60
+//line views/modal.qtpl:59
}
-//line views/modal.qtpl:60
+//line views/modal.qtpl:59
func writemodalEnd(qq422016 qtio422016.Writer, hyphaName string, shouldFocusOnConfirm bool) {
-//line views/modal.qtpl:60
+//line views/modal.qtpl:59
qw422016 := qt422016.AcquireWriter(qq422016)
-//line views/modal.qtpl:60
+//line views/modal.qtpl:59
streammodalEnd(qw422016, hyphaName, shouldFocusOnConfirm)
-//line views/modal.qtpl:60
+//line views/modal.qtpl:59
qt422016.ReleaseWriter(qw422016)
-//line views/modal.qtpl:60
+//line views/modal.qtpl:59
}
-//line views/modal.qtpl:60
+//line views/modal.qtpl:59
func modalEnd(hyphaName string, shouldFocusOnConfirm bool) string {
-//line views/modal.qtpl:60
+//line views/modal.qtpl:59
qb422016 := qt422016.AcquireByteBuffer()
-//line views/modal.qtpl:60
+//line views/modal.qtpl:59
writemodalEnd(qb422016, hyphaName, shouldFocusOnConfirm)
-//line views/modal.qtpl:60
+//line views/modal.qtpl:59
qs422016 := string(qb422016.B)
-//line views/modal.qtpl:60
+//line views/modal.qtpl:59
qt422016.ReleaseByteBuffer(qb422016)
-//line views/modal.qtpl:60
+//line views/modal.qtpl:59
return qs422016
-//line views/modal.qtpl:60
+//line views/modal.qtpl:59
}
diff --git a/views/mutators.qtpl b/views/mutators.qtpl
index d9274f1..715b553 100644
--- a/views/mutators.qtpl
+++ b/views/mutators.qtpl
@@ -1,7 +1,6 @@
{% import "net/http" %}
{% import "github.com/bouncepaw/mycorrhiza/cfg" %}
-{% import "github.com/bouncepaw/mycorrhiza/util" %}
{% import "github.com/bouncepaw/mycorrhiza/user" %}
{% func Toolbar(u *user.User) %}
@@ -72,7 +71,7 @@
{% func EditHTML(rq *http.Request, hyphaName, textAreaFill, warning string) %}
- Edit {%s util.BeautifulName(hyphaName) %}
+ Edit {%s= beautifulLink(hyphaName) %}
{%s= warning %}