From d29b2e3e482e8292cd1e0316309ae1802d7579ce Mon Sep 17 00:00:00 2001 From: Lova Andriarimalala <43842786+Xpirix@users.noreply.github.com> Date: Wed, 2 Oct 2024 17:50:03 +0300 Subject: [PATCH] Add admin button --- .../style/scss/bulma/components/navbar.sass | 2 +- qgis-app/static/style/scss/style.scss | 2 +- qgis-app/templates/layouts/header.html | 20 +++++++++++++++++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/qgis-app/static/style/scss/bulma/components/navbar.sass b/qgis-app/static/style/scss/bulma/components/navbar.sass index f21ba45d..4af983fc 100644 --- a/qgis-app/static/style/scss/bulma/components/navbar.sass +++ b/qgis-app/static/style/scss/bulma/components/navbar.sass @@ -167,7 +167,7 @@ body color: $navbar-item-color display: block line-height: 1.5 - padding: 0.5rem 1.75rem + padding: 0.5rem 1rem position: relative .icon &:only-child diff --git a/qgis-app/static/style/scss/style.scss b/qgis-app/static/style/scss/style.scss index 844c5b03..da60d842 100644 --- a/qgis-app/static/style/scss/style.scss +++ b/qgis-app/static/style/scss/style.scss @@ -179,7 +179,7 @@ p { &.is-active { display: block; position: fixed; - height: 88dvh; + height: calc(100% - 112px); overflow: auto; left: 0; animation: slideInFromLeft 0.3s ease-out forwards; diff --git a/qgis-app/templates/layouts/header.html b/qgis-app/templates/layouts/header.html index 1ec54304..0dbd9560 100644 --- a/qgis-app/templates/layouts/header.html +++ b/qgis-app/templates/layouts/header.html @@ -65,6 +65,12 @@ {% endif %} + {% if user.is_authenticated and user.is_staff %} + + + {% trans "Admin" %} + + {% endif %}