{% import "github.com/bouncepaw/mycorrhiza/cfg" %} {% import "github.com/bouncepaw/mycorrhiza/user" %} {% import "github.com/bouncepaw/mycorrhiza/util" %} {% func AdminPanelHTML() %}

Administrative functions

Safe things

Dangerous things

Shutdown wiki
Reindex hyphae
{% endfunc %} {% func AdminUsersPanelHTML(userList []*user.User) %}

Manage users

Create a new user

{% for _, u := range userList %} {% endfor %}
Name Group Registered at
{%s u.Name %} {%s u.Group %} {% if u.RegisteredAt.IsZero() %} unknown {% else %} {%s u.RegisteredAt.UTC().Format("2006-01-02 15:04") %} {% endif %} Edit
{% endfunc %} {% func AdminUserNewHTML(f util.FormData) %}

New user

{% if f.HasError() %}
Error: {%s f.Error() %}
{% endif %}
Cancel
{% endfunc %} {% func AdminUserEditHTML(u *user.User, f util.FormData) %}

{%s u.Name %}

Change group

{% if f.HasError() %}
Error: {%s f.Error() %}
{% endif %}

Delete user

Remove the user from the database. Changes made by the user will be preserved. It will be possible to take this username later.

Delete
{% endfunc %} {% func AdminUserDeleteHTML(u *user.User, f util.FormData) %}

Delete user

{% if f.HasError() %}
Error: {%s f.Error() %}
{% endif %}

Are you sure you want to delete {%s u.Name %} from the database? This action is irreversible.

Cancel
{% endfunc %}