{% import "path/filepath" %} {% import "github.com/bouncepaw/mycorrhiza/hyphae" %} {% import "github.com/bouncepaw/mycorrhiza/user" %} {% import "github.com/bouncepaw/mycorrhiza/util" %} {% func BaseHTML(title, body string, u *user.User, headElements ...string) %} {%s title %} {% for _, el := range headElements %}{%s= el %}{% endfor %}
{%s= body %} {% endfunc %} {% func UserListHTML() %}

List of users

{% code var ( admins = make([]string, 0) moderators = make([]string, 0) editors = make([]string, 0) ) for u := range user.YieldUsers() { switch u.Group { case "admin": admins = append(admins, u.Name) case "moderator": moderators = append(moderators, u.Name) case "editor", "trusted": editors = append(editors, u.Name) } } %}

Admins

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

Moderators

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

Editors

    {% for _, name := range editors %}
  1. {%s name %}
  2. {% endfor %}
{% endfunc %} {% func HyphaListHTML() %}

List of hyphae

This wiki has {%d hyphae.Count() %} hyphae.

{% endfunc %} {% func AboutHTML() %}

About {%s util.SiteName %}

  • MycorrhizaWiki version: β 0.13
  • {%- if user.AuthUsed -%}
  • User count: {%d user.Count() %}
  • Home page: {%s util.HomePage %}
  • Administrators: {%- for i, username := range user.ListUsersWithGroup("admin") -%} {%- if i > 0 -%} {%- endif -%} {%s username %}{%- endfor -%}
  • {%- else -%}
  • This wiki does not use authorization
  • {%- endif -%}

See /list for information about hyphae on this wiki.

{% endfunc %} {% func AdminPanelHTML() %}

Admininstrative functions

Safe things

Dangerous things

Shutdown wiki
Reindex hyphae
{% endfunc %}