summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/template.vala1
-rw-r--r--templates/css/base.css4
-rw-r--r--templates/menu.html7
3 files changed, 12 insertions, 0 deletions
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 @@
<li><a href="/stats/profit_per_product">Graph: Profit / Product</a></li>
</ul>
</li>
+ <li class="{{{MENU.users}}} {{{SUPERUSER}}} dropdown">
+ <a href="#" id="usersmenu" class="dropdown-toggle" data-toggle="dropdown">Users <b class="caret"></b></a>
+ <ul class="dropdown-menu">
+ <li><a href="/users">List</a></li>
+ <li><a href="/users/import">Import</a></li>
+ </ul>
+ </li>
</ul>
{{{AUTH}}}