diff --git a/project/customer/context_processors.py b/project/customer/context_processors.py index c6725ad..cbc9a05 100644 --- a/project/customer/context_processors.py +++ b/project/customer/context_processors.py @@ -5,11 +5,12 @@ from .models import License def license_check_soon_ends(request): + print 12434674658457 try: license_cookie = request.COOKIES.get('close_message_license') + license_15days = cache.get('license_15_%s' % (request.user.username,), None) if not license_cookie: now = datetime.today() - license_15days = cache.get('license_15_%s' % (request.user.username,), None) if license_15days is None: licenses_ends = License.objects.filter(company=request.user.profile, date_to__lte=now + timedelta(15), status__in=[-1, 1, 2], deleted=False) next_licenses = License.objects.filter(company=request.user.profile, status=1, deleted=False) @@ -20,9 +21,13 @@ def license_check_soon_ends(request): else: license_15days = '' + print '@1!!!!!', license_15days return { - 'license_15days': license_15days + 'license_15days': license_15days, + 'license_days': license_15days } - return { } + print '!!!!!', license_15days + return {'license_days': license_15days} except: + print 123123213 return { } diff --git a/project/static/css/style.css b/project/static/css/style.css index e4a59aa..8ab9fbc 100644 --- a/project/static/css/style.css +++ b/project/static/css/style.css @@ -610,3 +610,14 @@ tr.doc-row:hover {cursor:pointer;} .license-ways .col {width:200px;} .license-ways .mr-5 {margin-right:5px;} .license-ways .col-last {width:185px;} +#cabinet-popup {display:none;position:absolute;top:0;right:0;z-index:99999;margin-top:60px;box-sizing:border-box;padding:20px 25px 25px 25px;width:300px;height:380px;background:url(../img/popup-cabinet.png) center center no-repeat;} +#cabinet-popup h2 {font-size:16px;border-bottom:1px solid #fed13e;padding:0;margin:10px 0;} +.yellow_round {width:80px;height:80px;border-radius:40px;background:#fed13e;text-align:center;font-size:48px;font-weight:bold;line-height:80px;display:inline-block;} +.grey {color:#7d8084;} +a.popup-link {display:block;padding: 5px 0px 5px 25px;text-decoration:none;font-style:italic;color:#51558b;} +a.popup-buy-license {background:url(../img/popup-cart.png) no-repeat 0px center;} +a.popup-my-accs {background:url(../img/popup-list.png) no-repeat 3px center;} +a.popup-history {background:url(../img/popup-clock.png) no-repeat 3px center;} +a.popup-password {background:url(../img/popup-settings.png) no-repeat 3px center;} +a.popup-email {background:url(../img/popup-link.png) no-repeat 3px center;} +a.popup-unreg {background:url(../img/popup-trash.png) no-repeat 3px center;} diff --git a/project/static/img/popup-cabinet.png b/project/static/img/popup-cabinet.png new file mode 100644 index 0000000..b2b2675 Binary files /dev/null and b/project/static/img/popup-cabinet.png differ diff --git a/project/static/img/popup-cart.png b/project/static/img/popup-cart.png new file mode 100644 index 0000000..0083e06 Binary files /dev/null and b/project/static/img/popup-cart.png differ diff --git a/project/static/img/popup-clock.png b/project/static/img/popup-clock.png new file mode 100644 index 0000000..7e045f5 Binary files /dev/null and b/project/static/img/popup-clock.png differ diff --git a/project/static/img/popup-link.png b/project/static/img/popup-link.png new file mode 100644 index 0000000..e517315 Binary files /dev/null and b/project/static/img/popup-link.png differ diff --git a/project/static/img/popup-list.png b/project/static/img/popup-list.png new file mode 100644 index 0000000..3c7ceaa Binary files /dev/null and b/project/static/img/popup-list.png differ diff --git a/project/static/img/popup-settings.png b/project/static/img/popup-settings.png new file mode 100644 index 0000000..91b051d Binary files /dev/null and b/project/static/img/popup-settings.png differ diff --git a/project/static/img/popup-trash.png b/project/static/img/popup-trash.png new file mode 100644 index 0000000..860384c Binary files /dev/null and b/project/static/img/popup-trash.png differ diff --git a/project/static/img/triangle-popup.png b/project/static/img/triangle-popup.png new file mode 100644 index 0000000..0a583ed Binary files /dev/null and b/project/static/img/triangle-popup.png differ diff --git a/project/static/js/commons.js b/project/static/js/commons.js index c1eca14..24d1426 100644 --- a/project/static/js/commons.js +++ b/project/static/js/commons.js @@ -45,6 +45,14 @@ $(document).ready(function() { var close_action = $(this).data('close'); $.cookie(close_action, true, {path: '/'}); }); + $('#cabinet-show').hover(function(e){ + e.preventDefault(); + $('#cabinet-popup').show(); + }); + $('#cabinet-show').mouseout(function(e){ + e.preventDefault(); + //$('#cabinet-popup').hide(); + }); $('.captcha_refresh').click(function(e) { e.preventDefault(); diff --git a/project/templates/base.html b/project/templates/base.html index 27ac732..de684c5 100644 --- a/project/templates/base.html +++ b/project/templates/base.html @@ -47,7 +47,7 @@ {% if user.is_authenticated %}
- {{ request.user.profile.get_company_name|default:'Новый профиль' }} + {{ request.user.profile.get_company_name|default:'Новый профиль' }}  |  Выход
@@ -71,6 +71,21 @@ {% endblock %} {% block content %}{% endblock %} +
+

Платежные данные

+
Тариф:{{ license.tariff }}
+
Осталось
+
+ 26{{ license_days }} +
+ Купить лицензию + Мои счета + История расчетов +

Настройки

+ Сменить пароль + Сменить e-mail + Удалить учётную запись +
{% block bottom_wide %}{% endblock %} {% block footer %}