diff --git a/htdocs/include/header.include.html b/htdocs/include/header.include.html index ac48bc1..c86977c 100644 --- a/htdocs/include/header.include.html +++ b/htdocs/include/header.include.html @@ -17,7 +17,7 @@

Log

Receiver

Map
-
Settings
+ ${settingslink}
diff --git a/owrx/controllers/template.py b/owrx/controllers/template.py index 6746012..4adbe8c 100644 --- a/owrx/controllers/template.py +++ b/owrx/controllers/template.py @@ -1,6 +1,7 @@ from . import Controller import pkg_resources from string import Template +from owrx.config import Config class TemplateController(Controller): @@ -19,7 +20,11 @@ class TemplateController(Controller): class WebpageController(TemplateController): def template_variables(self): - header = self.render_template("include/header.include.html") + settingslink = "" + pm = Config.get() + if "webadmin_enabled" in pm and pm["webadmin_enabled"]: + settingslink = """
Settings
""" + header = self.render_template("include/header.include.html", settingslink=settingslink) return {"header": header}