Commit 25d9d4d0 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

merge with master

parent cc1fc3ed
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
======
......
......@@ -32,7 +32,7 @@
# 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
......@@ -55,6 +55,12 @@ def invitations(request):
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)
......
......@@ -70,3 +70,10 @@ LOGOUT_NEXT = getattr(settings, 'ASTAKOS_LOGOUT_NEXT', '')
# 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', {})
......@@ -208,6 +208,25 @@ textarea {
.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;
......@@ -451,6 +470,25 @@ table .headerSortUp.purple, table .headerSortDown.purple {
.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;
......@@ -955,6 +993,7 @@ form .form-row {
}
form .form-row.submit {
margin-top: 22px;
z-index: 10;
}
form .form-row .extra-link {
color: #808080;
......@@ -1047,9 +1086,27 @@ form input.submit, form input[type="submit"] {
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;
......@@ -1427,46 +1484,6 @@ table tr.consumed td.consumed {
.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;
......
......@@ -428,6 +428,7 @@ form {
position: relative;
&.submit {
margin-top: 1.5*@verticalSpacing;
z-index: 10;
}
.extra-link {
......@@ -763,45 +764,6 @@ table {
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 {
......
......@@ -16,7 +16,6 @@
.button {
#font.main();
background-color: @buttonBg;
.transit(background-color);
color: @buttonColor;
border: none;
padding: 0.8em @gridGutterWidth;
......@@ -26,40 +25,24 @@
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;
}
}
......
......@@ -54,6 +54,7 @@ context_processors = [
'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'
]
......
......@@ -22,5 +22,15 @@
{% 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 %}
......@@ -89,8 +89,9 @@
</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 %}>
......@@ -108,6 +109,11 @@
</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" %}
{% 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 %}
......@@ -64,5 +64,13 @@
#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 = {}
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