Optionally hide Monitor page in Admin nav

This adds a new config option that signifies the admin doesn't need to
see deeply technical things, like application resource usage. In the
[app] section, set forest = true to enable this.

Ref T694
This commit is contained in:
Matt Baer 2020-02-14 14:08:53 -05:00
parent 92da069ce4
commit b58464addb
2 changed files with 3 additions and 0 deletions

View File

@ -93,6 +93,7 @@ type (
// Site functionality
Chorus bool `ini:"chorus"`
Forest bool `ini:"forest"` // The admin cares about the forest, not the trees. Hide unnecessary technical info.
DisableDrafts bool `ini:"disable_drafts"`
// Users

View File

@ -104,7 +104,9 @@
<a href="/admin/users" {{if eq .Path "/admin/users"}}class="selected"{{end}}>Users</a>
<a href="/admin/pages" {{if eq .Path "/admin/pages"}}class="selected"{{end}}>Pages</a>
{{end}}
{{if not .Forest}}
<a href="/admin/monitor" {{if eq .Path "/admin/monitor"}}class="selected"{{end}}>Monitor</a>
{{end}}
</nav>
</header>
{{end}}