diff --git a/history/information.go b/history/information.go index 5c39cbf..3d8342e 100644 --- a/history/information.go +++ b/history/information.go @@ -141,7 +141,7 @@ func (rev *Revision) asHistoryEntry(hyphaName string) (html string) { author := "" if rev.Username != "anon" { author = fmt.Sprintf(` - by
  • Cancel + Cancel {%s= Toolbar(user.FromRequest(rq)) %} @@ -106,7 +106,7 @@

    - Cancel + Cancel

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

    {%s= renderedPage %}
    diff --git a/views/mutators.qtpl.go b/views/mutators.qtpl.go index 8d513a7..f0d0363 100644 --- a/views/mutators.qtpl.go +++ b/views/mutators.qtpl.go @@ -210,8 +210,8 @@ func StreamEditHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, text

    - Cancel @@ -300,8 +300,8 @@ func StreamPreviewHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, t

    - Cancel diff --git a/views/nav.qtpl b/views/nav.qtpl index eaad97e..90f6d22 100644 --- a/views/nav.qtpl +++ b/views/nav.qtpl @@ -11,7 +11,7 @@ type navEntry struct { title string } var navEntries = []navEntry{ - {"page", "Hypha"}, + {"hypha", "Hypha"}, {"edit", "Edit"}, {"attachment", "Attachment"}, {"history", "History"}, diff --git a/views/nav.qtpl.go b/views/nav.qtpl.go index 1011440..331b342 100644 --- a/views/nav.qtpl.go +++ b/views/nav.qtpl.go @@ -41,7 +41,7 @@ type navEntry struct { } var navEntries = []navEntry{ - {"page", "Hypha"}, + {"hypha", "Hypha"}, {"edit", "Edit"}, {"attachment", "Attachment"}, {"history", "History"}, diff --git a/views/readers.qtpl b/views/readers.qtpl index 7d22dda..6f2b1d3 100644 --- a/views/readers.qtpl +++ b/views/readers.qtpl @@ -80,7 +80,7 @@ If `contents` == "", a helpful message is shown instead. relatives, subhyphae, prevHyphaName, nextHyphaName := tree.Tree(h.Name) u := user.FromRequest(rq) %} -{%= NavHTML(rq, h.Name, "page") %} +{%= NavHTML(rq, h.Name, "hypha") %}
    diff --git a/views/readers.qtpl.go b/views/readers.qtpl.go index fd58941..ef8d7d1 100644 --- a/views/readers.qtpl.go +++ b/views/readers.qtpl.go @@ -241,7 +241,7 @@ func StreamHyphaHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.Hyph qw422016.N().S(` `) //line views/readers.qtpl:83 - StreamNavHTML(qw422016, rq, h.Name, "page") + StreamNavHTML(qw422016, rq, h.Name, "hypha") //line views/readers.qtpl:83 qw422016.N().S(`
    diff --git a/views/stuff.qtpl b/views/stuff.qtpl index 0e75d94..f0169d2 100644 --- a/views/stuff.qtpl +++ b/views/stuff.qtpl @@ -28,6 +28,17 @@ {%s= body %} + {%= omnipresentScripts() %} @@ -57,19 +68,19 @@ for u := range user.YieldUsers() {

    Admins

      {% for _, name := range admins %} -
    1. {%s name %}
    2. +
    3. {%s name %}
    4. {% endfor %}

    Moderators

      {% for _, name := range moderators %} -
    1. {%s name %}
    2. +
    3. {%s name %}
    4. {% endfor %}

    Editors

      {% for _, name := range editors %} -
    1. {%s name %}
    2. +
    3. {%s name %}
    4. {% endfor %}
    @@ -108,7 +119,7 @@ for u := range user.YieldUsers() {
  • Administrators: {%- for i, username := range user.ListUsersWithGroup("admin") -%} {%- if i > 0 -%} {%- endif -%} - {%s username %}{%- endfor -%}
  • + {%s username %}{%- endfor -%} {%- else -%}
  • This wiki does not use authorization
  • {%- endif -%} diff --git a/views/stuff.qtpl.go b/views/stuff.qtpl.go index 5a255bb..3696e10 100644 --- a/views/stuff.qtpl.go +++ b/views/stuff.qtpl.go @@ -93,52 +93,63 @@ func StreamBaseHTML(qw422016 *qt422016.Writer, title, body string, u *user.User, qw422016.N().S(body) //line views/stuff.qtpl:30 qw422016.N().S(` + `) -//line views/stuff.qtpl:31 +//line views/stuff.qtpl:42 streamomnipresentScripts(qw422016) -//line views/stuff.qtpl:31 +//line views/stuff.qtpl:42 qw422016.N().S(` `) -//line views/stuff.qtpl:34 +//line views/stuff.qtpl:45 } -//line views/stuff.qtpl:34 +//line views/stuff.qtpl:45 func WriteBaseHTML(qq422016 qtio422016.Writer, title, body string, u *user.User, headElements ...string) { -//line views/stuff.qtpl:34 +//line views/stuff.qtpl:45 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/stuff.qtpl:34 +//line views/stuff.qtpl:45 StreamBaseHTML(qw422016, title, body, u, headElements...) -//line views/stuff.qtpl:34 +//line views/stuff.qtpl:45 qt422016.ReleaseWriter(qw422016) -//line views/stuff.qtpl:34 +//line views/stuff.qtpl:45 } -//line views/stuff.qtpl:34 +//line views/stuff.qtpl:45 func BaseHTML(title, body string, u *user.User, headElements ...string) string { -//line views/stuff.qtpl:34 +//line views/stuff.qtpl:45 qb422016 := qt422016.AcquireByteBuffer() -//line views/stuff.qtpl:34 +//line views/stuff.qtpl:45 WriteBaseHTML(qb422016, title, body, u, headElements...) -//line views/stuff.qtpl:34 +//line views/stuff.qtpl:45 qs422016 := string(qb422016.B) -//line views/stuff.qtpl:34 +//line views/stuff.qtpl:45 qt422016.ReleaseByteBuffer(qb422016) -//line views/stuff.qtpl:34 +//line views/stuff.qtpl:45 return qs422016 -//line views/stuff.qtpl:34 +//line views/stuff.qtpl:45 } -//line views/stuff.qtpl:36 +//line views/stuff.qtpl:47 func StreamUserListHTML(qw422016 *qt422016.Writer) { -//line views/stuff.qtpl:36 +//line views/stuff.qtpl:47 qw422016.N().S(`

    List of users

    `) -//line views/stuff.qtpl:41 +//line views/stuff.qtpl:52 var ( admins = make([]string, 0) moderators = make([]string, 0) @@ -155,303 +166,303 @@ func StreamUserListHTML(qw422016 *qt422016.Writer) { } } -//line views/stuff.qtpl:56 +//line views/stuff.qtpl:67 qw422016.N().S(`

    Admins

      `) -//line views/stuff.qtpl:59 +//line views/stuff.qtpl:70 for _, name := range admins { -//line views/stuff.qtpl:59 +//line views/stuff.qtpl:70 qw422016.N().S(` -
    1. `) -//line views/stuff.qtpl:60 +//line views/stuff.qtpl:71 qw422016.E().S(name) -//line views/stuff.qtpl:60 +//line views/stuff.qtpl:71 qw422016.N().S(`
    2. `) -//line views/stuff.qtpl:61 +//line views/stuff.qtpl:72 } -//line views/stuff.qtpl:61 +//line views/stuff.qtpl:72 qw422016.N().S(`

    Moderators

      `) -//line views/stuff.qtpl:65 +//line views/stuff.qtpl:76 for _, name := range moderators { -//line views/stuff.qtpl:65 +//line views/stuff.qtpl:76 qw422016.N().S(` -
    1. `) -//line views/stuff.qtpl:66 +//line views/stuff.qtpl:77 qw422016.E().S(name) -//line views/stuff.qtpl:66 +//line views/stuff.qtpl:77 qw422016.N().S(`
    2. `) -//line views/stuff.qtpl:67 +//line views/stuff.qtpl:78 } -//line views/stuff.qtpl:67 +//line views/stuff.qtpl:78 qw422016.N().S(`

    Editors

      `) -//line views/stuff.qtpl:71 +//line views/stuff.qtpl:82 for _, name := range editors { -//line views/stuff.qtpl:71 +//line views/stuff.qtpl:82 qw422016.N().S(` -
    1. `) -//line views/stuff.qtpl:72 +//line views/stuff.qtpl:83 qw422016.E().S(name) -//line views/stuff.qtpl:72 +//line views/stuff.qtpl:83 qw422016.N().S(`
    2. `) -//line views/stuff.qtpl:73 +//line views/stuff.qtpl:84 } -//line views/stuff.qtpl:73 +//line views/stuff.qtpl:84 qw422016.N().S(`
    `) -//line views/stuff.qtpl:77 +//line views/stuff.qtpl:88 } -//line views/stuff.qtpl:77 +//line views/stuff.qtpl:88 func WriteUserListHTML(qq422016 qtio422016.Writer) { -//line views/stuff.qtpl:77 +//line views/stuff.qtpl:88 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/stuff.qtpl:77 +//line views/stuff.qtpl:88 StreamUserListHTML(qw422016) -//line views/stuff.qtpl:77 +//line views/stuff.qtpl:88 qt422016.ReleaseWriter(qw422016) -//line views/stuff.qtpl:77 +//line views/stuff.qtpl:88 } -//line views/stuff.qtpl:77 +//line views/stuff.qtpl:88 func UserListHTML() string { -//line views/stuff.qtpl:77 +//line views/stuff.qtpl:88 qb422016 := qt422016.AcquireByteBuffer() -//line views/stuff.qtpl:77 +//line views/stuff.qtpl:88 WriteUserListHTML(qb422016) -//line views/stuff.qtpl:77 +//line views/stuff.qtpl:88 qs422016 := string(qb422016.B) -//line views/stuff.qtpl:77 +//line views/stuff.qtpl:88 qt422016.ReleaseByteBuffer(qb422016) -//line views/stuff.qtpl:77 +//line views/stuff.qtpl:88 return qs422016 -//line views/stuff.qtpl:77 +//line views/stuff.qtpl:88 } -//line views/stuff.qtpl:79 +//line views/stuff.qtpl:90 func StreamHyphaListHTML(qw422016 *qt422016.Writer) { -//line views/stuff.qtpl:79 +//line views/stuff.qtpl:90 qw422016.N().S(`

    List of hyphae

    This wiki has `) -//line views/stuff.qtpl:83 +//line views/stuff.qtpl:94 qw422016.N().D(hyphae.Count()) -//line views/stuff.qtpl:83 +//line views/stuff.qtpl:94 qw422016.N().S(` hyphae.

    `) -//line views/stuff.qtpl:96 +//line views/stuff.qtpl:107 } -//line views/stuff.qtpl:96 +//line views/stuff.qtpl:107 func WriteHyphaListHTML(qq422016 qtio422016.Writer) { -//line views/stuff.qtpl:96 +//line views/stuff.qtpl:107 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/stuff.qtpl:96 +//line views/stuff.qtpl:107 StreamHyphaListHTML(qw422016) -//line views/stuff.qtpl:96 +//line views/stuff.qtpl:107 qt422016.ReleaseWriter(qw422016) -//line views/stuff.qtpl:96 +//line views/stuff.qtpl:107 } -//line views/stuff.qtpl:96 +//line views/stuff.qtpl:107 func HyphaListHTML() string { -//line views/stuff.qtpl:96 +//line views/stuff.qtpl:107 qb422016 := qt422016.AcquireByteBuffer() -//line views/stuff.qtpl:96 +//line views/stuff.qtpl:107 WriteHyphaListHTML(qb422016) -//line views/stuff.qtpl:96 +//line views/stuff.qtpl:107 qs422016 := string(qb422016.B) -//line views/stuff.qtpl:96 +//line views/stuff.qtpl:107 qt422016.ReleaseByteBuffer(qb422016) -//line views/stuff.qtpl:96 +//line views/stuff.qtpl:107 return qs422016 -//line views/stuff.qtpl:96 +//line views/stuff.qtpl:107 } -//line views/stuff.qtpl:98 +//line views/stuff.qtpl:109 func StreamAboutHTML(qw422016 *qt422016.Writer) { -//line views/stuff.qtpl:98 +//line views/stuff.qtpl:109 qw422016.N().S(`

    About `) -//line views/stuff.qtpl:102 +//line views/stuff.qtpl:113 qw422016.E().S(cfg.WikiName) -//line views/stuff.qtpl:102 +//line views/stuff.qtpl:113 qw422016.N().S(`

    See /list for information about hyphae on this wiki.

    `) -//line views/stuff.qtpl:120 +//line views/stuff.qtpl:131 } -//line views/stuff.qtpl:120 +//line views/stuff.qtpl:131 func WriteAboutHTML(qq422016 qtio422016.Writer) { -//line views/stuff.qtpl:120 +//line views/stuff.qtpl:131 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/stuff.qtpl:120 +//line views/stuff.qtpl:131 StreamAboutHTML(qw422016) -//line views/stuff.qtpl:120 +//line views/stuff.qtpl:131 qt422016.ReleaseWriter(qw422016) -//line views/stuff.qtpl:120 +//line views/stuff.qtpl:131 } -//line views/stuff.qtpl:120 +//line views/stuff.qtpl:131 func AboutHTML() string { -//line views/stuff.qtpl:120 +//line views/stuff.qtpl:131 qb422016 := qt422016.AcquireByteBuffer() -//line views/stuff.qtpl:120 +//line views/stuff.qtpl:131 WriteAboutHTML(qb422016) -//line views/stuff.qtpl:120 +//line views/stuff.qtpl:131 qs422016 := string(qb422016.B) -//line views/stuff.qtpl:120 +//line views/stuff.qtpl:131 qt422016.ReleaseByteBuffer(qb422016) -//line views/stuff.qtpl:120 +//line views/stuff.qtpl:131 return qs422016 -//line views/stuff.qtpl:120 +//line views/stuff.qtpl:131 } -//line views/stuff.qtpl:122 +//line views/stuff.qtpl:133 func StreamAdminPanelHTML(qw422016 *qt422016.Writer) { -//line views/stuff.qtpl:122 +//line views/stuff.qtpl:133 qw422016.N().S(`
    @@ -488,80 +499,80 @@ func StreamAdminPanelHTML(qw422016 *qt422016.Writer) {
    `) -//line views/stuff.qtpl:157 +//line views/stuff.qtpl:168 } -//line views/stuff.qtpl:157 +//line views/stuff.qtpl:168 func WriteAdminPanelHTML(qq422016 qtio422016.Writer) { -//line views/stuff.qtpl:157 +//line views/stuff.qtpl:168 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/stuff.qtpl:157 +//line views/stuff.qtpl:168 StreamAdminPanelHTML(qw422016) -//line views/stuff.qtpl:157 +//line views/stuff.qtpl:168 qt422016.ReleaseWriter(qw422016) -//line views/stuff.qtpl:157 +//line views/stuff.qtpl:168 } -//line views/stuff.qtpl:157 +//line views/stuff.qtpl:168 func AdminPanelHTML() string { -//line views/stuff.qtpl:157 +//line views/stuff.qtpl:168 qb422016 := qt422016.AcquireByteBuffer() -//line views/stuff.qtpl:157 +//line views/stuff.qtpl:168 WriteAdminPanelHTML(qb422016) -//line views/stuff.qtpl:157 +//line views/stuff.qtpl:168 qs422016 := string(qb422016.B) -//line views/stuff.qtpl:157 +//line views/stuff.qtpl:168 qt422016.ReleaseByteBuffer(qb422016) -//line views/stuff.qtpl:157 +//line views/stuff.qtpl:168 return qs422016 -//line views/stuff.qtpl:157 +//line views/stuff.qtpl:168 } -//line views/stuff.qtpl:159 +//line views/stuff.qtpl:170 func streamomnipresentScripts(qw422016 *qt422016.Writer) { -//line views/stuff.qtpl:159 +//line views/stuff.qtpl:170 qw422016.N().S(` `) -//line views/stuff.qtpl:160 +//line views/stuff.qtpl:171 for _, scriptPath := range cfg.OmnipresentScripts { -//line views/stuff.qtpl:160 +//line views/stuff.qtpl:171 qw422016.N().S(` `) -//line views/stuff.qtpl:162 +//line views/stuff.qtpl:173 } -//line views/stuff.qtpl:162 +//line views/stuff.qtpl:173 qw422016.N().S(` `) -//line views/stuff.qtpl:163 +//line views/stuff.qtpl:174 } -//line views/stuff.qtpl:163 +//line views/stuff.qtpl:174 func writeomnipresentScripts(qq422016 qtio422016.Writer) { -//line views/stuff.qtpl:163 +//line views/stuff.qtpl:174 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/stuff.qtpl:163 +//line views/stuff.qtpl:174 streamomnipresentScripts(qw422016) -//line views/stuff.qtpl:163 +//line views/stuff.qtpl:174 qt422016.ReleaseWriter(qw422016) -//line views/stuff.qtpl:163 +//line views/stuff.qtpl:174 } -//line views/stuff.qtpl:163 +//line views/stuff.qtpl:174 func omnipresentScripts() string { -//line views/stuff.qtpl:163 +//line views/stuff.qtpl:174 qb422016 := qt422016.AcquireByteBuffer() -//line views/stuff.qtpl:163 +//line views/stuff.qtpl:174 writeomnipresentScripts(qb422016) -//line views/stuff.qtpl:163 +//line views/stuff.qtpl:174 qs422016 := string(qb422016.B) -//line views/stuff.qtpl:163 +//line views/stuff.qtpl:174 qt422016.ReleaseByteBuffer(qb422016) -//line views/stuff.qtpl:163 +//line views/stuff.qtpl:174 return qs422016 -//line views/stuff.qtpl:163 +//line views/stuff.qtpl:174 } diff --git a/web/web.go b/web/web.go index ed0ca78..d76c2a2 100644 --- a/web/web.go +++ b/web/web.go @@ -30,7 +30,7 @@ func httpErr(w http.ResponseWriter, status int, name, title, errMsg string) { views.BaseHTML( title, fmt.Sprintf( - `

    %s. Go back to the hypha.

    `, + `

    %s. Go back to the hypha.

    `, errMsg, name, ),