From 016e4438a08e4ded1286c5e93cbb8a37b1669e0a Mon Sep 17 00:00:00 2001 From: nek0 Date: Tue, 12 Jul 2016 22:07:44 +0200 Subject: [PATCH] link to administration --- Foundation.hs | 7 +++++++ static/css/style-global.css | 5 +++++ templates/default-layout.hamlet | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/Foundation.hs b/Foundation.hs index 9d1299e..6ebbf07 100755 --- a/Foundation.hs +++ b/Foundation.hs @@ -83,6 +83,13 @@ renderLayout widget = do return $ userSlug user Nothing -> return ("" :: T.Text) + madmin <- case msu of + Just a -> do + let uId = getUserIdFromText a + user <- runDB $ getJust uId + return $ Just $ userAdmin user + Nothing -> + return Nothing let block = appSignupBlocked $ appSettings master -- We break up the default layout into two components: diff --git a/static/css/style-global.css b/static/css/style-global.css index 0f0344b..706a4f2 100755 --- a/static/css/style-global.css +++ b/static/css/style-global.css @@ -264,6 +264,11 @@ background: #47d65f url('/static/css/images/overlay.png'); } + .red + { + background: #ffeeee url('/static/css/images/overlay.png') !important; + } + #message { padding: 20px; diff --git a/templates/default-layout.hamlet b/templates/default-layout.hamlet index 73f5ad1..d563c60 100755 --- a/templates/default-layout.hamlet +++ b/templates/default-layout.hamlet @@ -24,6 +24,10 @@
  • Logout + $maybe admin <- madmin +
  • + + Administration $nothing