+v0.3.7
+======
+
+- New ASTAKOS_PROFILE_EXTRA_LINKS setting to display additional buttons on
+ account pages.
+
+
+v0.3.6
+======
+
+- New ASTAKOS_LOGIN_MESSAGES setting to display messages on the login page
+ header
+- login_base.html to make it easy override the login.html template
+
+
v0.3.5
======
# or implied, of GRNET S.A.
from astakos.im.settings import IM_MODULES, INVITATIONS_ENABLED, IM_STATIC_URL, \
- COOKIE_NAME
+ COOKIE_NAME, LOGIN_MESSAGES, PROFILE_EXTRA_LINKS
from astakos.im.api import get_menu
from django.conf import settings
def media(request):
return {'IM_STATIC_URL' : IM_STATIC_URL}
+def custom_messages(request):
+ return {
+ 'LOGIN_MESSAGES' : LOGIN_MESSAGES,
+ 'PROFILE_EXTRA_LINKS' : PROFILE_EXTRA_LINKS
+ }
+
def menu(request):
absolute = lambda (url): request.build_absolute_uri(url)
resp = get_menu(request, True, False)
# Set user email patterns that are automatically activated
RE_USER_EMAIL_PATTERNS = getattr(settings, 'ASTAKOS_RE_USER_EMAIL_PATTERNS', [])
+
+# messages to display on login page header
+LOGIN_MESSAGES = getattr(settings, 'ASTAKOS_LOGIN_MESSAGES', {})
+
+# messages to display on login page header
+PROFILE_EXTRA_LINKS = getattr(settings, 'ASTAKOS_PROFILE_EXTRA_LINKS', {})
+
.button:hover {
background-color: #f89a1c;
}
+.button.back {
+ text-decoration: none;
+ bottom: 0;
+ float: right;
+ z-index: 500;
+}
+.button.back.right {
+ right: 0;
+}
+.buttons-list {
+ z-index: 300;
+ position: relative;
+}
+.buttons-list .button {
+ margin-left: 10px;
+}
+.buttons-list.fixpos {
+ margin-top: -42px;
+}
a.button {
text-align: center !important;
color: #fff !important;
.button:hover {
background-color: #f89a1c;
}
+.button.back {
+ text-decoration: none;
+ bottom: 0;
+ float: right;
+ z-index: 500;
+}
+.button.back.right {
+ right: 0;
+}
+.buttons-list {
+ z-index: 300;
+ position: relative;
+}
+.buttons-list .button {
+ margin-left: 10px;
+}
+.buttons-list.fixpos {
+ margin-top: -42px;
+}
a.button {
text-align: center !important;
color: #fff !important;
}
form .form-row.submit {
margin-top: 22px;
+ z-index: 10;
}
form .form-row .extra-link {
color: #808080;
form input.submit:hover, form input[type="submit"]:hover {
background-color: #f89a1c;
}
+form input.submit.back, form input[type="submit"].back {
+ text-decoration: none;
+ bottom: 0;
+ float: right;
+ z-index: 500;
+}
+form input.submit.back.right, form input[type="submit"].back.right {
+ right: 0;
+}
form input.submit:hover, form input[type="submit"]:hover {
background-color: #f89a1c;
}
+form input.submit.back, form input[type="submit"].back {
+ text-decoration: none;
+ bottom: 0;
+ float: right;
+ z-index: 500;
+}
+form input.submit.back.right, form input[type="submit"].back.right {
+ right: 0;
+}
form textarea {
height: 200px;
width: 350px !important;
.initial_hidden {
display: none;
}
-/*resources styles*/
-.resources .categories ul {
- zoom: 1;
-}
-.resources .categories ul:before, .resources .categories ul:after {
- display: table;
- content: "";
- zoom: 1;
-}
-.resources .categories ul:after {
- clear: both;
-}
-.resources .categories ul li {
- float: left;
-}
-.resources .categories .title {
- margin-bottom: 7.333333333333333px;
-}
-.resources .categories ul li a {
- text-decoration: none;
- color: #faaf40;
- margin-right: 22px;
-}
-.resources .list {
- margin-top: 58.666666666666664px;
-}
-.resources .list .resource {
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
- *behavior: url(boxsizing.htc);
- width: 33%;
- padding: 29.333333333333332px;
- float: left;
- border: 1px solid #faaf40;
- height: 176px;
-}
-.resources .list .resource .description {
- display: none;
-}
/* recaptcha */
#recaptcha_widget_div {
margin-top: 10px;
position: relative;
&.submit {
margin-top: 1.5*@verticalSpacing;
+ z-index: 10;
}
.extra-link {
display: none;
}
-/*resources styles*/
-
-@resCol: #FAAF40;
-.resources {
-
- .categories {
- ul { .clearfix() }
- ul li { float: left; }
- .title {
- margin-bottom: @verticalSpacing/2;
- }
-
- ul li a {
- text-decoration: none;
- color: @resCol;
- margin-right: @gridGutterWidth;
- }
- }
-
- .list {
-
- margin-top: 4*@verticalSpacing;
-
- .resource {
- .border-box();
- width: 33%;
- padding: 2*@verticalSpacing;
- float: left;
- border: 1px solid @resCol;
- height: 12*@verticalSpacing;
-
- .description {
- display: none;
- }
- }
- }
-
-}
-
/* recaptcha */
#recaptcha_widget_div {
.button {
#font.main();
background-color: @buttonBg;
- .transit(background-color);
color: @buttonColor;
border: none;
padding: 0.8em @gridGutterWidth;
background-color: @linkColor;
}
- a {
- color: @white !important;
- text-decoration: none !important;
- border: none !important;
+ &.back {
+ text-decoration: none;
+ bottom: 0;
+ float: right;
+ &.right { right: 0}
+ z-index: 500;
}
}
-a.button {
- color: @white !important;
- text-decoration: none !important;
- border: none !important;
-}
-
-// specific styles for A buttons
-a.button {
- text-align: center !important;
- color: #fff !important;
- border: none !important;
- display: block !important;
-
- &:hover {
- color: #fff !important;
- }
-}
-
-// specific styles for A buttons
-a.button {
- text-align: center !important;
- color: #fff !important;
- border: none !important;
- display: block !important;
+.buttons-list {
+ z-index: 300;
+ position: relative;
+ .button {
+ margin-left: 10px;
+ }
- &:hover {
- color: #fff !important;
+ &.fixpos {
+ margin-top: -42px;
}
}
'astakos.im.context_processors.code',
'astakos.im.context_processors.invitations',
'astakos.im.context_processors.menu',
+ 'astakos.im.context_processors.custom_messages',
'synnefo.lib.context_processors.cloudbar'
]
{% block page.body %}
<div class="maincol {% block innerpage.class %}full{% endblock %}">
{% block body %}{% endblock %}
+
+ {% if PROFILE_EXTRA_LINKS %}
+ <div class="extra-buttons buttons-list fixpos">
+ {% for href, name in PROFILE_EXTRA_LINKS.items %}
+ <a class="button back right" href="{{ href }}">{{ name }}</a>
+ {% endfor %}
+ </div>
+ {% endif %}
+
</div>
+
{% endblock %}
</div>
{% endblock %}
</div>
- {% if messages %}
+ {% if messages or LOGIN_MESSAGES %}
<ul class="messages">
+ {% block extra_messages %}{% endblock %}
{% for message in messages %}
<li{% if message.tags %}
class="{{ message.tags }}"{% endif %}>
</div>
</div>
<div class="footer">
+ {% block footer_content %}
+ <div class="last row">
+ Copyright 2011-2012 <a href="http://www.grnet.gr" alt="GRNET S.A.">GRNET S.A.</a> All rights reserved.
+ </div>
+ {% endblock %}
</div>
</body>
</html>
-{% extends 'im/base_two_cols.html'%}
-
-{% block signup_class %}hidden{% endblock %}
-{% block page.title %}
-Login
-{% endblock %}
-
-{% block body %}
-<div class="section">
- <img class="pic" src="{{ IM_STATIC_URL }}images/pictures/login_pic.png" />
-</div>
-{% comment %}{% include "im/services_description.html" %}{% endcomment %}
-{% endblock body %}
-
-{% block body.right %}
-<div class="section">
- {% if "local" in im_modules %}
- <form action="{% url astakos.im.target.local.login %}" method="post"
- class="login innerlabels">{% csrf_token %}
- <h2 class="formheader"><span>LOGIN</span></h2>
- {% include "im/form_render.html" %}
- <input type="hidden" name="next" value="{{ next }}">
- <div class="form-row submit">
- <input type="submit" class="submit altcol" value="SUBMIT" />
- <a class="extra-link" href="{% url django.contrib.auth.views.password_reset %}">Forgot your password?</a>
- </div>
- </form>
- {% endif %}
-
- <div class="extralogin">
- {% for o in im_modules %}
- <div>
- {% if o != 'local' %}
- LOGIN using
- <a href="/im/login/{{ o }}{% ifnotequal next "" %}?next={{ next|urlencode }}{% endifnotequal %}"
- alt="{{ o|title }}">{{ o }}</a>
- {% endif %}
- </div>
- {% endfor %}
- </div>
- {% block body.signup %}
- {% for o in im_modules %}
- {% if o != 'local' %}
- <br />
- {% endif %}
- {% endfor %}
- <div class="bottom">
- {% block body.login.signup %}
- new to okeanos ? <a href="{% url astakos.im.views.signup %}">CREATE ACCOUNT</a>
- {% endblock %}
- </div>
- </div>
- {% endblock %}
- </div>
-{% endblock %}
+{% extends "im/login_base.html" %}
--- /dev/null
+{% extends 'im/base_two_cols.html'%}
+
+{% block extra_messages %}
+ {% if not messages %}
+ {% for msg_type, msg in LOGIN_MESSAGES.items %}
+ <li class="{{ msg_type }}">{{ msg|safe }}</li>
+ {% endfor %}
+ {% endif %}
+{% endblock %}
+
+{% block signup_class %}hidden{% endblock %}
+{% block page.title %}
+Login
+{% endblock %}
+
+{% block body %}
+<div class="section">
+ <img class="pic" src="{{ IM_STATIC_URL }}images/pictures/login_pic.png" />
+</div>
+{% comment %}{% include "im/services_description.html" %}{% endcomment %}
+{% endblock body %}
+
+{% block body.right %}
+<div class="section">
+ {% if "local" in im_modules %}
+ <form action="{% url astakos.im.target.local.login %}" method="post"
+ class="login innerlabels">{% csrf_token %}
+ <h2 class="formheader"><span>LOGIN</span></h2>
+ {% include "im/form_render.html" %}
+ <input type="hidden" name="next" value="{{ next }}">
+ <div class="form-row submit">
+ <input type="submit" class="submit altcol" value="SUBMIT" />
+ <a class="extra-link" href="{% url django.contrib.auth.views.password_reset %}">Forgot your password?</a>
+ </div>
+ </form>
+ {% endif %}
+
+ <div class="extralogin">
+ {% for o in im_modules %}
+ <div>
+ {% if o != 'local' %}
+ LOGIN using
+ <a href="/im/login/{{ o }}{% ifnotequal next "" %}?next={{ next|urlencode }}{% endifnotequal %}"
+ alt="{{ o|title }}">{{ o }}</a>
+ {% endif %}
+ </div>
+ {% endfor %}
+ </div>
+ {% block body.signup %}
+ {% for o in im_modules %}
+ {% if o != 'local' %}
+ <br />
+ {% endif %}
+ {% endfor %}
+ <div class="bottom">
+ {% block body.login.signup %}
+ new to okeanos ? <a href="{% url astakos.im.views.signup %}">CREATE ACCOUNT</a>
+ {% endblock %}
+ </div>
+ </div>
+ {% endblock %}
+ </div>
+{% endblock %}
#ASTAKOS_LOGOUT_NEXT = ''
# Set user email patterns that are automatically activated
-#RE_USER_EMAIL_PATTERNS = getattr(settings, 'ASTAKOS_RE_USER_EMAIL_PATTERNS', [])
+#ASTAKOS_RE_USER_EMAIL_PATTERNS = []
+
+# Messages to display on login page header
+# e.g. {'warning': 'This warning message will be displayed on the top of login page'}
+#ASTAKOS_LOGIN_MESSAGES = {}
+
+# messages to display as extra actions in account forms
+# e.g. {'https://cms.okeanos.grnet.gr/': 'Back to ~okeanos'}
+#ASTAKOS_PROFILE_EXTRA_LINKS = {}