cabinet layout

remotes/origin/yandex
Bachurin Sergey 11 years ago
parent 2769fa5b79
commit 2e74d18787
  1. 11
      project/customer/context_processors.py
  2. 11
      project/static/css/style.css
  3. BIN
      project/static/img/popup-cabinet.png
  4. BIN
      project/static/img/popup-cart.png
  5. BIN
      project/static/img/popup-clock.png
  6. BIN
      project/static/img/popup-link.png
  7. BIN
      project/static/img/popup-list.png
  8. BIN
      project/static/img/popup-settings.png
  9. BIN
      project/static/img/popup-trash.png
  10. BIN
      project/static/img/triangle-popup.png
  11. 8
      project/static/js/commons.js
  12. 17
      project/templates/base.html

@ -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 { }

@ -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;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

@ -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();

@ -47,7 +47,7 @@
</div>
{% if user.is_authenticated %}
<div class="auth_block right">
<a href="{% url 'customer_index' %}">{{ request.user.profile.get_company_name|default:'Новый профиль' }}</a>
<a href="{% url 'customer_index' %}" id="cabinet-show">{{ request.user.profile.get_company_name|default:'Новый профиль' }}</a>
&nbsp;|&nbsp;
<a href="{% url 'auth_logout' %}">Выход</a>
</div>
@ -71,6 +71,21 @@
{% endblock %}
{% block content %}{% endblock %}
<div id="cabinet-popup">
<h2>Платежные данные</h2>
<div><span class='grey'>Тариф:</span><span class='italic'>{{ license.tariff }}</span></div>
<div class='grey center'>Осталось</div>
<div class='center'>
<span class='yellow_round'>26{{ license_days }}</span>
</div>
<a href='{% url "customer_order_license" %}' class='popup-link popup-buy-license'>Купить лицензию</a>
<a href='{% url "customer_bank_accounts_list" %}' class='popup-link popup-my-accs'>Мои счета</a>
<a href='{% url "customer_paid_list" %}' class='popup-link popup-history'>История расчетов</a>
<h2>Настройки</h2>
<a href='{% url "myauth_change_password" %}' class='popup-link popup-password'>Сменить пароль</a>
<a href='{% url "myauth_change_email" %}' class='popup-link popup-email'>Сменить e-mail</a>
<a href='#' class='popup-link popup-unreg'>Удалить учётную запись</a>
</div>
</div>
{% block bottom_wide %}{% endblock %}
{% block footer %}

Loading…
Cancel
Save