Revision 1e38b1cb
b/snf-astakos-app/Changelog | ||
---|---|---|
1 |
v0.3.6 |
|
2 |
====== |
|
3 |
|
|
4 |
- New ASTAKOS_LOGIN_MESSAGES setting to display messages on the login page |
|
5 |
header |
|
6 |
|
|
7 |
|
|
1 | 8 |
v0.3.5 |
2 | 9 |
====== |
3 | 10 |
|
b/snf-astakos-app/astakos/im/context_processors.py | ||
---|---|---|
32 | 32 |
# or implied, of GRNET S.A. |
33 | 33 |
|
34 | 34 |
from astakos.im.settings import IM_MODULES, INVITATIONS_ENABLED, IM_STATIC_URL, \ |
35 |
COOKIE_NAME |
|
35 |
COOKIE_NAME, LOGIN_MESSAGES
|
|
36 | 36 |
from astakos.im.api import get_menu |
37 | 37 |
|
38 | 38 |
from django.conf import settings |
... | ... | |
54 | 54 |
def media(request): |
55 | 55 |
return {'IM_STATIC_URL' : IM_STATIC_URL} |
56 | 56 |
|
57 |
def login_messages(request): |
|
58 |
return {'LOGIN_MESSAGES' : LOGIN_MESSAGES } |
|
59 |
|
|
57 | 60 |
def menu(request): |
58 | 61 |
absolute = lambda (url): request.build_absolute_uri(url) |
59 | 62 |
resp = get_menu(request, True, False) |
b/snf-astakos-app/astakos/im/settings.py | ||
---|---|---|
64 | 64 |
|
65 | 65 |
# Set user email patterns that are automatically activated |
66 | 66 |
RE_USER_EMAIL_PATTERNS = getattr(settings, 'ASTAKOS_RE_USER_EMAIL_PATTERNS', []) |
67 |
|
|
68 |
# messages to display on login page header |
|
69 |
LOGIN_MESSAGES = getattr(settings, 'ASTAKOS_LOGIN_MESSAGES', {}) |
|
70 |
|
b/snf-astakos-app/astakos/im/synnefo_settings.py | ||
---|---|---|
54 | 54 |
'astakos.im.context_processors.code', |
55 | 55 |
'astakos.im.context_processors.invitations', |
56 | 56 |
'astakos.im.context_processors.menu', |
57 |
'astakos.im.context_processors.login_messages', |
|
57 | 58 |
'synnefo.lib.context_processors.cloudbar' |
58 | 59 |
] |
59 | 60 |
|
b/snf-astakos-app/astakos/im/templates/im/base.html | ||
---|---|---|
89 | 89 |
</div> |
90 | 90 |
{% endblock %} |
91 | 91 |
</div> |
92 |
{% if messages %} |
|
92 |
{% if messages or LOGIN_MESSAGES %}
|
|
93 | 93 |
<ul class="messages"> |
94 |
{% block extra_messages %}{% endblock %} |
|
94 | 95 |
{% for message in messages %} |
95 | 96 |
<li{% if message.tags %} |
96 | 97 |
class="{{ message.tags }}"{% endif %}> |
b/snf-astakos-app/astakos/im/templates/im/login.html | ||
---|---|---|
1 | 1 |
{% extends 'im/base_two_cols.html'%} |
2 | 2 |
|
3 |
{% block extra_messages %} |
|
4 |
{% if not messages %} |
|
5 |
{% for msg_type, msg in LOGIN_MESSAGES.items %} |
|
6 |
<li class="{{ msg_type }}">{{ msg|safe }}</li> |
|
7 |
{% endfor %} |
|
8 |
{% endif %} |
|
9 |
{% endblock %} |
|
10 |
|
|
3 | 11 |
{% block signup_class %}hidden{% endblock %} |
4 | 12 |
{% block page.title %} |
5 | 13 |
Login |
b/snf-astakos-app/conf/20-snf-astakos-app-settings.conf | ||
---|---|---|
64 | 64 |
#ASTAKOS_LOGOUT_NEXT = '' |
65 | 65 |
|
66 | 66 |
# Set user email patterns that are automatically activated |
67 |
#RE_USER_EMAIL_PATTERNS = getattr(settings, 'ASTAKOS_RE_USER_EMAIL_PATTERNS', [])
|
|
67 |
#ASTAKOS_RE_USER_EMAIL_PATTERNS = []
|
|
68 | 68 |
|
69 |
# Messages to display on login page header |
|
70 |
# e.g. {'warning': 'This warning message will be displayed on the top of login page'} |
|
71 |
#ASTAKOS_LOGIN_MESSAGES = {} |
Also available in: Unified diff