diff --git a/mamweb/settings_common.py b/mamweb/settings_common.py index 58e8c638..ce028bc2 100644 --- a/mamweb/settings_common.py +++ b/mamweb/settings_common.py @@ -79,6 +79,7 @@ TEMPLATES = [ 'django.contrib.messages.context_processors.messages', 'sekizai.context_processors.sekizai', 'header_fotky.context_processors.vzhled', + 'various.context_processors.rozliseni', 'various.context_processors.april', ) }, diff --git a/mamweb/settings_local.py b/mamweb/settings_local.py index 0aadd27e..85058c9f 100644 --- a/mamweb/settings_local.py +++ b/mamweb/settings_local.py @@ -97,3 +97,4 @@ LOGGING = { # E-maily posílat chceme, ale do terminálu :-) EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' SEND_EMAIL_NOTIFICATIONS = True +LOCAL_TEST_PROD = "local" diff --git a/mamweb/settings_prod.py b/mamweb/settings_prod.py index 0374d88b..e674ab05 100644 --- a/mamweb/settings_prod.py +++ b/mamweb/settings_prod.py @@ -67,3 +67,4 @@ LOGGING['handlers']['registration_error_log']['filename'] = '/home/mam-web/logs/ # E-MAIL NOTIFICATIONS POSLI_MAILOVOU_NOTIFIKACI = True +LOCAL_TEST_PROD = "prod" diff --git a/mamweb/settings_test.py b/mamweb/settings_test.py index f8fd844e..365664d2 100644 --- a/mamweb/settings_test.py +++ b/mamweb/settings_test.py @@ -76,3 +76,4 @@ EMAIL_BACKEND = 'various.mail_prefixer.PrefixingMailBackend' # TODO Pouze na otestování testu… Zvolit konferu! # XXX: Je to pole, protože implementační detail backendu. TESTOVACI_EMAILOVA_KONFERENCE = ['betatest@mam.mff.cuni.cz'] +LOCAL_TEST_PROD = "test" diff --git a/mamweb/static/css/mamweb.css b/mamweb/static/css/mamweb.css index 8b19fb80..26baccbd 100644 --- a/mamweb/static/css/mamweb.css +++ b/mamweb/static/css/mamweb.css @@ -1182,3 +1182,21 @@ div.gdpr { label[for=id_skola] { font-weight: bold; } + +.localweb { + border-left: 20px solid greenyellow; + border-right: 20px solid greenyellow; +} + +.localweb .login-bar { + margin-left: -20px; +} + +.testweb { + border-left: 20px solid darkorange; + border-right: 20px solid darkorange; +} + +.testweb .login-bar { + margin-left: -20px; +} diff --git a/mamweb/templates/base.html b/mamweb/templates/base.html index 1d292f95..85cb9e12 100644 --- a/mamweb/templates/base.html +++ b/mamweb/templates/base.html @@ -36,7 +36,7 @@ {% block script %}{% endblock %} -
+ {% if user.is_staff %}