Revision b78fc030

b/snf-astakos-app/Changelog
1
v0.3.7
2
======
3

  
4
- New ASTAKOS_PROFILE_EXTRA_LINKS setting to display additional buttons on
5
  account pages.
6

  
7

  
1 8
v0.3.6
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, LOGIN_MESSAGES
35
        COOKIE_NAME, LOGIN_MESSAGES, PROFILE_EXTRA_LINKS
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 }
57
def custom_messages(request):
58
    return {
59
            'LOGIN_MESSAGES' : LOGIN_MESSAGES,
60
            'PROFILE_EXTRA_LINKS' : PROFILE_EXTRA_LINKS
61
           }
59 62

  
60 63
def menu(request):
61 64
    absolute = lambda (url): request.build_absolute_uri(url)
b/snf-astakos-app/astakos/im/settings.py
68 68
# messages to display on login page header
69 69
LOGIN_MESSAGES = getattr(settings, 'ASTAKOS_LOGIN_MESSAGES', {})
70 70

  
71
# messages to display on login page header
72
PROFILE_EXTRA_LINKS = getattr(settings, 'ASTAKOS_PROFILE_EXTRA_LINKS', {})
73

  
b/snf-astakos-app/astakos/im/static/im/css/styles.css
208 208
.button:hover {
209 209
  background-color: #f89a1c;
210 210
}
211
.button.back {
212
  text-decoration: none;
213
  bottom: 0;
214
  float: right;
215
  z-index: 500;
216
}
217
.button.back.right {
218
  right: 0;
219
}
220
.buttons-list {
221
  z-index: 300;
222
  position: relative;
223
}
224
.buttons-list .button {
225
  margin-left: 10px;
226
}
227
.buttons-list.fixpos {
228
  margin-top: -42px;
229
}
211 230
a.button {
212 231
  text-align: center !important;
213 232
  color: #fff !important;
......
451 470
.button:hover {
452 471
  background-color: #f89a1c;
453 472
}
473
.button.back {
474
  text-decoration: none;
475
  bottom: 0;
476
  float: right;
477
  z-index: 500;
478
}
479
.button.back.right {
480
  right: 0;
481
}
482
.buttons-list {
483
  z-index: 300;
484
  position: relative;
485
}
486
.buttons-list .button {
487
  margin-left: 10px;
488
}
489
.buttons-list.fixpos {
490
  margin-top: -42px;
491
}
454 492
a.button {
455 493
  text-align: center !important;
456 494
  color: #fff !important;
......
955 993
}
956 994
form .form-row.submit {
957 995
  margin-top: 22px;
996
  z-index: 10;
958 997
}
959 998
form .form-row .extra-link {
960 999
  color: #808080;
......
1047 1086
form input.submit:hover, form input[type="submit"]:hover {
1048 1087
  background-color: #f89a1c;
1049 1088
}
1089
form input.submit.back, form input[type="submit"].back {
1090
  text-decoration: none;
1091
  bottom: 0;
1092
  float: right;
1093
  z-index: 500;
1094
}
1095
form input.submit.back.right, form input[type="submit"].back.right {
1096
  right: 0;
1097
}
1050 1098
form input.submit:hover, form input[type="submit"]:hover {
1051 1099
  background-color: #f89a1c;
1052 1100
}
1101
form input.submit.back, form input[type="submit"].back {
1102
  text-decoration: none;
1103
  bottom: 0;
1104
  float: right;
1105
  z-index: 500;
1106
}
1107
form input.submit.back.right, form input[type="submit"].back.right {
1108
  right: 0;
1109
}
1053 1110
form textarea {
1054 1111
  height: 200px;
1055 1112
  width: 350px !important;
......
1427 1484
.initial_hidden {
1428 1485
  display: none;
1429 1486
}
1430
/*resources styles*/
1431
.resources .categories ul {
1432
  zoom: 1;
1433
}
1434
.resources .categories ul:before, .resources .categories ul:after {
1435
  display: table;
1436
  content: "";
1437
  zoom: 1;
1438
}
1439
.resources .categories ul:after {
1440
  clear: both;
1441
}
1442
.resources .categories ul li {
1443
  float: left;
1444
}
1445
.resources .categories .title {
1446
  margin-bottom: 7.333333333333333px;
1447
}
1448
.resources .categories ul li a {
1449
  text-decoration: none;
1450
  color: #faaf40;
1451
  margin-right: 22px;
1452
}
1453
.resources .list {
1454
  margin-top: 58.666666666666664px;
1455
}
1456
.resources .list .resource {
1457
  -moz-box-sizing: border-box;
1458
  -webkit-box-sizing: border-box;
1459
  box-sizing: border-box;
1460
  *behavior: url(boxsizing.htc);
1461
  width: 33%;
1462
  padding: 29.333333333333332px;
1463
  float: left;
1464
  border: 1px solid #faaf40;
1465
  height: 176px;
1466
}
1467
.resources .list .resource .description {
1468
  display: none;
1469
}
1470 1487
/* recaptcha */
1471 1488
#recaptcha_widget_div {
1472 1489
  margin-top: 10px;
b/snf-astakos-app/astakos/im/static/im/css/styles.less
428 428
        position: relative;
429 429
        &.submit {
430 430
            margin-top: 1.5*@verticalSpacing;
431
            z-index: 10;
431 432
        }
432 433

  
433 434
        .extra-link {
......
763 764
    display: none;    
764 765
}
765 766

  
766
/*resources styles*/
767

  
768
@resCol: #FAAF40;
769
.resources {
770
    
771
    .categories {
772
        ul { .clearfix() }
773
        ul li { float: left; }
774
        .title {
775
            margin-bottom: @verticalSpacing/2;    
776
        }
777

  
778
        ul li a {
779
            text-decoration: none;
780
            color: @resCol;
781
            margin-right: @gridGutterWidth;
782
        }
783
    }
784

  
785
    .list {
786
        
787
        margin-top: 4*@verticalSpacing;
788

  
789
        .resource {
790
            .border-box();
791
            width: 33%;
792
            padding: 2*@verticalSpacing;
793
            float: left;
794
            border: 1px solid @resCol;
795
            height: 12*@verticalSpacing;
796

  
797
            .description {
798
                display: none;    
799
            }
800
        }    
801
    }
802
    
803
}
804

  
805 767
 
806 768
/* recaptcha */
807 769
#recaptcha_widget_div {
b/snf-astakos-app/astakos/im/static/im/less/xtra.less
24 24
    &:hover {
25 25
        background-color: @linkColor;    
26 26
    }
27

  
28
    &.back {
29
        text-decoration: none;
30
        bottom: 0;
31
        float: right;
32
        &.right { right: 0}
33
        z-index: 500;
34
    }
35
}
36

  
37
.buttons-list {
38
    z-index: 300;
39
    position: relative;
40
    .button {
41
        margin-left: 10px;    
42
    }    
43

  
44
    &.fixpos {
45
        margin-top: -42px;    
46
    }
27 47
}
28 48

  
29 49
// specific styles for A buttons
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
    'astakos.im.context_processors.custom_messages',
58 58
    'synnefo.lib.context_processors.cloudbar'
59 59
]
60 60

  
b/snf-astakos-app/astakos/im/templates/im/account_base.html
22 22
{% block page.body %}
23 23
<div class="maincol {% block innerpage.class %}full{% endblock %}">
24 24
{% block body %}{% endblock %}
25

  
26
    {% if PROFILE_EXTRA_LINKS %}
27
    <div class="extra-buttons buttons-list fixpos">
28
        {% for href, name in PROFILE_EXTRA_LINKS.items %}
29
            <a class="button back right" href="{{ href }}">{{ name }}</a>
30
        {% endfor %}
31
    </div>
32
    {% endif %}
33

  
25 34
</div>
35

  
26 36
{% endblock %}
b/snf-astakos-app/conf/20-snf-astakos-app-settings.conf
69 69
# Messages to display on login page header
70 70
# e.g. {'warning': 'This warning message will be displayed on the top of login page'}
71 71
#ASTAKOS_LOGIN_MESSAGES = {}
72

  
73
# messages to display as extra actions in account forms
74
# e.g. {'https://cms.okeanos.grnet.gr/': 'Back to ~okeanos'}
75
#ASTAKOS_PROFILE_EXTRA_LINKS = {}
76

  

Also available in: Unified diff