Commit 9f2e1b1e authored by Gabriel Detraz's avatar Gabriel Detraz Committed by Admin Y Strator

Possibilité de display un message général sur l'intranet

parent 3b47eb48
......@@ -18,3 +18,6 @@ def app_list(request):
def password_hint(request):
"""Phrase explicative qui donne le mot de passe potentiel, en env de test"""
return {'password_hint': u'(hint: %s)' % ldap_test_password}
def global_message(request):
return {'intranet_message' : settings.GLOBAL_MESSAGES}
......@@ -165,6 +165,7 @@ TPL_CONTEXT_PROCESSORS = (
TPL_CONTEXT_PROCESSORS += (
'intranet.custom_context_processor.app_list',
'intranet.custom_context_processor.global_message',
)
if os.getenv('DBG_LDAP'):
TPL_CONTEXT_PROCESSORS += (
......@@ -481,3 +482,5 @@ SILENCED_SYSTEM_CHECKS = ["1_6.W001"]
###############################################################################
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'
#Message global à afficher sur le site
GLOBAL_MESSAGES = None
......@@ -83,6 +83,17 @@
<div class="container">
<div id="main_title"><h1>{% block h1 %}{% trans "Intranet Crans" %}{% endblock %}</h1></div>
{% if intranet_message %}
<div id="django-messages">
<label for="success_checkbox" type="checkbox">
</label>
<ul class="warning">
<li>{{ intranet_message }}</li>
</ul>
</div>
{% endif %}
<div id="django-messages">
{% regroup messages by tags as message_tags %}
{% for tag in message_tags %}
......@@ -95,6 +106,7 @@
</ul>
{% endfor %}
</div>
<div class="main_div">
{% block content %}{% endblock %}
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment