From 98f7f401e46a03fb23d96140a4b22813144cf125 Mon Sep 17 00:00:00 2001 From: Sebastian Reichel Date: Fri, 5 Oct 2012 19:50:35 +0200 Subject: add users menu for admins --- src/template.vala | 1 + templates/css/base.css | 4 ++++ templates/menu.html | 7 +++++++ 3 files changed, 12 insertions(+) diff --git a/src/template.vala b/src/template.vala index ef7e43d..8fe56d0 100644 --- a/src/template.vala +++ b/src/template.vala @@ -66,6 +66,7 @@ public class WebTemplate { this.template = this.template.replace("{{{CONTENT}}}", ((string) template)); this.template = this.template.replace("{{{USERNAME}}}", login.name); this.template = this.template.replace("{{{USERID}}}", "%d".printf(login.user)); + this.template = this.template.replace("{{{SUPERUSER}}}", login.superuser ? "" : "hidden"); } public WebTemplate.DATA(string file) throws TemplateError { diff --git a/templates/css/base.css b/templates/css/base.css index fd4ad8e..48407c8 100644 --- a/templates/css/base.css +++ b/templates/css/base.css @@ -63,3 +63,7 @@ float: left; display: inline; } + +.hidden { + display: none; +} diff --git a/templates/menu.html b/templates/menu.html index 1a2de27..246f46a 100644 --- a/templates/menu.html +++ b/templates/menu.html @@ -14,6 +14,13 @@
  • Graph: Profit / Product
  • + {{{AUTH}}} -- cgit v1.2.3