aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/views/index.rocker.html
diff options
context:
space:
mode:
authorMarvin Borner2019-05-05 22:27:42 +0200
committerMarvin Borner2019-05-05 22:27:42 +0200
commitbd89369b508f30fc987b27cf6b34a22fbc8e5d97 (patch)
tree8bb338a1112b4dae52d9d6d2919be4ce3d9544f9 /src/main/resources/views/index.rocker.html
parent5081b240b07f08e21ad124da8bddf0e11471792d (diff)
Added simple admin interface
Co-authored-by: LarsVomMars <lars@kroenner.eu>
Diffstat (limited to 'src/main/resources/views/index.rocker.html')
-rw-r--r--src/main/resources/views/index.rocker.html4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/resources/views/index.rocker.html b/src/main/resources/views/index.rocker.html
index 98a659e..cc18d3b 100644
--- a/src/main/resources/views/index.rocker.html
+++ b/src/main/resources/views/index.rocker.html
@@ -1,4 +1,5 @@
@import space.anity.DatabaseController
+@import space.anity.UserHandler
@args (String username)
@layout.template("Index", RockerContent.NONE, RockerContent.NONE) -> {
@@ -8,6 +9,9 @@
<div>
@if(username.length() > 0) {
<a class="button" href="/user/logout">Logout</a>
+ @if((new UserHandler()).isAdmin(username)) {
+ <a class="button" href="/admin">Admin</a>
+ }
} else if (!(new DatabaseController()).isSetup()) {
<a class="button" href="/setup">Setup</a>
} else {