{% import "github.com/bouncepaw/mycorrhiza/util" %} {% import "github.com/bouncepaw/mycorrhiza/user" %} {% 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(tbody string, pageCount int) %}

List of hyphae

This wiki has {%d pageCount %} hyphae.

{%s= tbody %}
Full name Binary part type
{% endfunc %} {% func HyphaListRowHTML(hyphaName, binaryMime string, binaryPresent bool) %} {%s hyphaName %} {% if binaryPresent %} {%s binaryMime %} {% else %} {% endif %} {% endfunc %} {% func AboutHTML() %}

About {%s util.SiteName %}

  • MycorrhizaWiki version: β 0.13 indev
  • {%- 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 %}