From b58464addbe0be591c257f244e8bc5f53f15d89d Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Fri, 14 Feb 2020 14:08:53 -0500 Subject: [PATCH] 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 --- config/config.go | 1 + templates/user/include/header.tmpl | 2 ++ 2 files changed, 3 insertions(+) diff --git a/config/config.go b/config/config.go index 2616e9e..2313732 100644 --- a/config/config.go +++ b/config/config.go @@ -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 diff --git a/templates/user/include/header.tmpl b/templates/user/include/header.tmpl index f7c06ef..d818336 100644 --- a/templates/user/include/header.tmpl +++ b/templates/user/include/header.tmpl @@ -104,7 +104,9 @@ Users Pages {{end}} + {{if not .Forest}} Monitor + {{end}} {{end}}