Browse Source

Add customisable pages and add somthing translates.

devel
bashmak 8 years ago
parent
commit
1471437d8a
  1. 212
      clientsideapp/locale/ru/LC_MESSAGES/django.po
  2. 1
      clientsideapp/templates/clientsideapp/custom_pages/footer.htm
  3. 1
      clientsideapp/templates/clientsideapp/custom_pages/main_page.htm
  4. 2
      clientsideapp/templates/clientsideapp/custom_pages/service.htm
  5. 1
      clientsideapp/templates/clientsideapp/custom_pages/service_bottom.htm
  6. 8
      clientsideapp/templates/clientsideapp/debt_buy.html
  7. 25
      clientsideapp/templates/clientsideapp/debts.html
  8. 47
      clientsideapp/templates/clientsideapp/ext.html
  9. 71
      clientsideapp/templates/clientsideapp/index.html
  10. 4
      clientsideapp/templates/clientsideapp/modal_service_buy.html
  11. 44
      clientsideapp/templates/clientsideapp/services.html
  12. 2
      djing/local_settings.py.template
  13. 6
      djing/settings.py
  14. 0
      djing/templatetags/__init__.py
  15. 9
      djing/templatetags/globaltags.py
  16. BIN
      static/clientside/bc.png
  17. BIN
      static/img/bcgr.png
  18. 6
      templates/all_base.html

212
clientsideapp/locale/ru/LC_MESSAGES/django.po

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-02-28 12:46+0300\n"
"POT-Creation-Date: 2018-03-13 11:49+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Dmitry Novikov nerosketch@gmail.com\n"
"Language: ru\n"
@ -19,121 +19,229 @@ msgstr ""
"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n"
"%100>=11 && n%100<=14)? 2 : 3);\n"
#: clientsideapp/templates/clientsideapp/debt_buy.html:6
#: templates/clientsideapp/debt_buy.html:6
msgid "Debts"
msgstr "Задолженность"
#: clientsideapp/templates/clientsideapp/debt_buy.html:11
#: templates/clientsideapp/debt_buy.html:11
msgid "repayment of debts"
msgstr "Оплатить задолженность"
#: clientsideapp/templates/clientsideapp/debt_buy.html:18
#: templates/clientsideapp/debt_buy.html:18
msgid "Are you sure you want to spend a payment?"
msgstr "Вы уверены что хотите провести платёж?"
#: clientsideapp/templates/clientsideapp/debt_buy.html:21
#, fuzzy, python-format
#| msgid ""
#| "From your account, they withdraw funds in <b>%(amount)s</b> rub. <br/>\n"
#| "As a result, you will remain on your account %(ballance_after)s rubles. "
#| "<br/>\n"
#| "The administrator can immediately see that you shut down the debt."
#: templates/clientsideapp/debt_buy.html:22
msgid ""
"From your account, they withdraw funds in <b>%(amount)s</b> rub.<br/>\n"
"As a result, you will remain on your account %(ballance_after)s rubles.<br/"
">\n"
"The administrator can immediately see that you shut down the debt."
"From your account, they withdraw funds in <b>%(amount)s</b> rub.<br/> As a "
"result, you will remain on your account %(ballance_after)s rubles.<br/> The "
"administrator can immediately see that you shut down the debt."
msgstr ""
"С вашего счёта снимутся средства в размере <b>%(amount)s</b> руб.<br/>\n"
"В результате у вас на счету останется %(ballance_after)s руб.<br/>\n"
"Администратор сразу сможет видеть что у вас закрыта задолженность."
#: clientsideapp/templates/clientsideapp/debt_buy.html:24
#: templates/clientsideapp/debt_buy.html:28
msgid "Description of payment"
msgstr "Описание платежа"
#: clientsideapp/templates/clientsideapp/debt_buy.html:32
#: templates/clientsideapp/debt_buy.html:36
msgid "Confirm"
msgstr "Подтвердить"
#: clientsideapp/templates/clientsideapp/debt_buy.html:35
#: templates/clientsideapp/debt_buy.html:39
msgid "Cancel"
msgstr "Отменить"
#: clientsideapp/templates/clientsideapp/modal_service_buy.html:5
#: templates/clientsideapp/debts.html:6
msgid "Your debt"
msgstr "Ваши долги"
#: templates/clientsideapp/debts.html:11
msgid "State"
msgstr "Состояние"
#: templates/clientsideapp/debts.html:12
msgid "Summ"
msgstr "Сумма"
#: templates/clientsideapp/debts.html:13
msgid "Description"
msgstr "Описание"
#: templates/clientsideapp/debts.html:14
msgid "Date of create"
msgstr "Дата создания"
#: templates/clientsideapp/debts.html:15
msgid "Date of pay"
msgstr "Дата платежа"
#: templates/clientsideapp/debts.html:16 templates/clientsideapp/debts.html:38
msgid "Pay"
msgstr "Оплатить"
#: templates/clientsideapp/debts.html:23 templates/clientsideapp/ext.html:63
#: templates/clientsideapp/modal_service_buy.html:18
#: templates/clientsideapp/services.html:26
#: templates/clientsideapp/services.html:55
msgid "currency"
msgstr "руб."
#: templates/clientsideapp/debts.html:31
msgid "Created paid"
msgstr "Создан оплаченным"
#: templates/clientsideapp/debts.html:33
msgid "Not yet paid"
msgstr "Ещё не оплачен"
#: templates/clientsideapp/debts.html:45
msgid "You have no debt"
msgstr "У вас нет долгов"
#: templates/clientsideapp/ext.html:7 templates/clientsideapp/ext.html:41
msgid "Personal account"
msgstr "Личный кабинет"
#: templates/clientsideapp/ext.html:46
msgid "Pays"
msgstr "Платежи"
#: templates/clientsideapp/ext.html:51
msgid "Services"
msgstr "Услуги"
#: templates/clientsideapp/ext.html:55
msgid "Other"
msgstr "Другое"
#: templates/clientsideapp/ext.html:57
msgid "Show debts and pay it"
msgstr "Посмотреть долги и оплатить"
#: templates/clientsideapp/ext.html:58
msgid "Quit"
msgstr "Выйти"
#: templates/clientsideapp/ext.html:63
#, python-format
msgid "Your balance is <b>%(ballance)s</b>"
msgstr "Ваш балланс <b>%(ballance)s</b>"
#: templates/clientsideapp/ext.html:74
msgid ""
"<strong>Attantion!</strong> You are is admin, and do not be active here, "
"please back to admin side. Client side to you for reference only."
msgstr ""
"<strong>Кстати.</strong> Вы администратор, и не должны производить действия "
"из кабинета пользователя, производите их из админки. Кабинет клиента для вас "
"только для ознакомления."
#: templates/clientsideapp/modal_service_buy.html:5
msgid "Pick service"
msgstr "Заказать услугу"
#: clientsideapp/templates/clientsideapp/modal_service_buy.html:8
#: templates/clientsideapp/modal_service_buy.html:8
msgid "Are you sure you want to order the service?"
msgstr "Вы уверены что хотите заказать услугу?"
#: templates/clientsideapp/modal_service_buy.html:9
msgid ""
"Be careful, after purchasing the service you will <b>withdraw money</b>, and "
"you will be able to use the purchased service."
msgstr ""
"Будте внимательны, после заказа услуги с вашего счёта <b>снимутся средства</b>, "
"и вы сможете пользоваться купленной услугой."
#: clientsideapp/templates/clientsideapp/modal_service_buy.html:28
#: templates/clientsideapp/modal_service_buy.html:15
#, python-format
msgid ""
"Inbound speed: %(speedIn)s MBit/s<br>\n"
"Outgoing speed: %(speedOut)s MBit/s<br>\n"
"Cost: %(amount)s rubles."
msgstr ""
#: templates/clientsideapp/modal_service_buy.html:18
#, python-format
msgid "The cost is %(amount)s"
msgstr "Стоимость %(amount)s"
#: templates/clientsideapp/modal_service_buy.html:22
#: templates/clientsideapp/services.html:63
msgid "Pick"
msgstr "Заказать"
#: clientsideapp/templates/clientsideapp/modal_service_buy.html:30
#: templates/clientsideapp/modal_service_buy.html:24
msgid "Close"
msgstr "Закрыть"
#: clientsideapp/templates/clientsideapp/pays.html:6
#: templates/clientsideapp/pays.html:6
msgid "conducted payments"
msgstr "Проведённые платежи"
#: clientsideapp/templates/clientsideapp/pays.html:11
#: templates/clientsideapp/pays.html:11
msgid "Transaction Amount (rubles)"
msgstr "Сумма транзакции (руб)"
#: clientsideapp/templates/clientsideapp/pays.html:12
#: templates/clientsideapp/pays.html:12
msgid "Date of transaction"
msgstr "Дата транзакции"
#: clientsideapp/templates/clientsideapp/pays.html:13
#: templates/clientsideapp/pays.html:13
msgid "Comment"
msgstr "Комментарий"
#: clientsideapp/templates/clientsideapp/pays.html:25
#: templates/clientsideapp/pays.html:25
msgid "You have not spent payments"
msgstr "У вас нет проведённых платежей"
#: clientsideapp/views.py:53
#, python-format
msgid "Buy the service via user side, service '%s'"
msgstr "Покупка тарифного плана через личный кабинет, тариф '%s'"
#: templates/clientsideapp/services.html:14
msgid "Your current service"
msgstr "Ваша текущая услуга"
#: clientsideapp/views.py:82
#, python-format
msgid "Service '%s' has been finished"
msgstr "Услуга '%s' успешно завершена"
#: templates/clientsideapp/services.html:19
msgid "The date of connection"
msgstr "Дата подключения"
#: clientsideapp/views.py:87
#, python-format
msgid "Early terminated service '%s' via client side"
msgstr "Досрочное завершение услуги '%s' из личного кабинета"
#: templates/clientsideapp/services.html:22
msgid "The date of finish service"
msgstr "Дата завершения услуги"
#: templates/clientsideapp/services.html:25
msgid "Cost"
msgstr "Стоимость"
#: templates/clientsideapp/services.html:35
msgid ""
"<strong>Attantion!</strong> You have not yet a service, for use the services "
"please purchase service you want."
msgstr ""
"<strong>Внимание!</strong> У вас нет услуги, для использования ресурсов приобретите "
"нужную услугу из представленных тут."
#: clientsideapp/views.py:90 clientsideapp/views.py:119
#: clientsideapp/views.py:147
msgid "Act is not confirmed"
msgstr "Действие не подтверждено"
#: templates/clientsideapp/services.html:46
msgid "Services available for ordering"
msgstr "Доступные для заказа услуги"
#: clientsideapp/views.py:103 clientsideapp/views.py:130
msgid "Temporary network bug"
msgstr "Временные неполадки в сети"
#: templates/clientsideapp/services.html:68
msgid "No services available for ordering"
msgstr "Нет доступных для заказа услуг"
#: clientsideapp/views.py:126
msgid "The service was not found"
msgstr "Указанная подписка на услугу не найдена"
#: views.py:51
#, python-format
msgid "Buy the service via user side, service '%s'"
msgstr "Покупка тарифного плана через личный кабинет, тариф '%s'"
#: clientsideapp/views.py:145
#: views.py:53
#, python-format
msgid "The service '%s' wan successfully activated"
msgstr "Услуга '%s' успешно подключена"
#: clientsideapp/views.py:181
#: views.py:83
msgid "Are you not sure that you want buy the service?"
msgstr "Вы не уверены что хотите оплатить долг?"
#: clientsideapp/views.py:183
#: views.py:85
msgid "Your account have not enough money"
msgstr "Недостаточно средств на счету"

1
clientsideapp/templates/clientsideapp/custom_pages/footer.htm

@ -0,0 +1 @@
Your custom content <i>here</i>.

1
clientsideapp/templates/clientsideapp/custom_pages/main_page.htm

@ -0,0 +1 @@
<h1>You can change this page</h1>

2
clientsideapp/templates/clientsideapp/custom_pages/service.htm

@ -0,0 +1,2 @@
<h1>Your custom content</h1>
<p>You have service variable {{ active_service }}</p>

1
clientsideapp/templates/clientsideapp/custom_pages/service_bottom.htm

@ -0,0 +1 @@
<h1>Your custom content on bottom</h1>

8
clientsideapp/templates/clientsideapp/debt_buy.html

@ -18,9 +18,13 @@
{% trans 'Are you sure you want to spend a payment?' %}
</label>
</div>
<p>{% blocktrans %}From your account, they withdraw funds in <b>{{ amount }}</b> rub.<br/>
<p>
{% blocktrans trimmed %}
From your account, they withdraw funds in <b>{{ amount }}</b> rub.<br/>
As a result, you will remain on your account {{ ballance_after }} rubles.<br/>
The administrator can immediately see that you shut down the debt.{% endblocktrans %}</p>
The administrator can immediately see that you shut down the debt.
{% endblocktrans %}
</p>
<h4>{% trans 'Description of payment' %}</h4>
<div class="alert alert-info">

25
clientsideapp/templates/clientsideapp/debts.html

@ -1,25 +1,26 @@
{% extends 'clientsideapp/ext.html' %}
{% load i18n %}
{% block client_main %}
<div class="page-header">
<h3>Ваши долги</h3>
<h3>{% trans 'Your debt' %}</h3>
</div>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th class="col-xs-1">Состояние</th>
<th>Сумма</th>
<th>Описание</th>
<th>Дата создания</th>
<th>Дата платежа</th>
<th class="col-xs-1">Оплатить</th>
<th class="col-xs-1">{% trans 'State' %}</th>
<th>{% trans 'Summ' %}</th>
<th>{% trans 'Description' %}</th>
<th>{% trans 'Date of create' %}</th>
<th>{% trans 'Date of pay' %}</th>
<th class="col-xs-1">{% trans 'Pay' %}</th>
</tr>
</thead>
<tbody>
{% for debt in debts %}
<tr>
<td class="text-center"><span class="glyphicon glyphicon-{{ debt.status|yesno:'ok,time' }}"></span></td>
<td>{{ debt.amount }} руб.</td>
<td>{{ debt.amount }} {% trans 'currency' %}</td>
<td>{{ debt.comment }}</td>
<td>{{ debt.date_create|date:'d b H:i' }}</td>
<td>
@ -27,21 +28,21 @@
{{ debt.date_pay|date:'d b H:i' }}
{% else %}
{% if debt.status %}
Создан оплаченным
{% trans 'Created paid' %}
{% else %}
Ещё не оплачен
{% trans 'Not yet paid' %}
{% endif %}
{% endif %}
</td>
<td class="text-center">
<a href="{% url 'client_side:debt_buy' debt.id %}" class="btn btn-sm btn-success" title="Оплатить">
<a href="{% url 'client_side:debt_buy' debt.id %}" class="btn btn-sm btn-success" title="{% trans 'Pay' %}">
<span class="glyphicon glyphicon-usd"></span>
</a>
</td>
</tr>
{% empty %}
<tr>
<td colspan="6">У вас нет долгов <span class="glyphicon glyphicon-ok"></span></td>
<td colspan="6">{% trans 'You have no debt' %} <span class="glyphicon glyphicon-ok"></span></td>
</tr>
{% endfor %}
</tbody>

47
clientsideapp/templates/clientsideapp/ext.html

@ -1,10 +1,10 @@
<!DOCTYPE HTML>
<!DOCTYPE HTML>{% load globaltags %}{% load i18n %}
<html lang="ru">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Личный кабинет</title>
<title>{% global_var 'COMPANY_NAME' %} - {% trans 'Personal account' %}</title>
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
<link href="/static/clientside/custom.css" rel="stylesheet">
<script src="/static/js/jquery-2.2.4.min.js"></script>
@ -19,6 +19,8 @@
<div class="modal-content" id="modContent"></div>
</div>
</div>
{% url 'client_side:home' as client_side_home %}
<!-- Fixed navbar -->
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
@ -30,48 +32,36 @@
<span class="icon-bar"></span>
</button>
<img src="/static/clientside/bc.png" class="navbar-brand">
<a class="navbar-brand hidden-xs" href="{{ client_side_home }}">{% global_var 'COMPANY_NAME' %}</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
{% url 'client_side:home' as client_side_home %}
<li{% if client_side_home == request.path %} class="active"{% endif %}>
<a href="{{ client_side_home }}">Личный кабинет</a>
<a href="{{ client_side_home }}">{% trans 'Personal account' %}</a>
</li>
{% url 'client_side:pays' as client_side_pays %}
<li{% if client_side_pays == request.path %} class="active"{% endif %}>
<a href="{{ client_side_pays }}">Платежи</a>
<a href="{{ client_side_pays }}">{% trans 'Pays' %}</a>
</li>
{% url 'client_side:services' as client_side_services %}
<li{% if client_side_services == request.path %} class="active"{% endif %}>
<a href="{{ client_side_services }}">Услуги</a>
</li>
<!--<li>
<a href="#">
Сообщения из администрации
<span class="badge">14</span>
</a>
<a href="{{ client_side_services }}">{% trans 'Services' %}</a>
</li>
<li><a href="#contact">График трафика</a></li>-->
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Другое <b class="caret"></b></a>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{% trans 'Other' %} <b class="caret"></b></a>
<ul class="dropdown-menu">
<!--<li><a href="#">Подать заявку</a></li>-->
<li><a href="{% url 'client_side:debts' %}">Просмотреть и оплатить долги</a></li>
<!--<li><a href="#">Сеансы подключений</a></li>
<li class="divider"></li>
<li class="dropdown-header">Nav header</li>
<li><a href="#">Separated link</a></li>-->
<li><a href="{% url 'acc_app:logout' %}">Выйти</a></li>
<li><a href="{% url 'client_side:debts' %}">{% trans 'Show debts and pay it' %}</a></li>
<li><a href="{% url 'acc_app:logout' %}">{% trans 'Quit' %}</a></li>
</ul>
</li>
</ul>
<span class="navbar-text">Ваш балланс <b>{{ subscriber.ballance|floatformat:2 }}</b> руб.</span>
<span class="navbar-text">
{% blocktrans with ballance=subscriber.ballance|floatformat:2 %}Your balance is <b>{{ ballance }}</b>{% endblocktrans %} {% trans 'currency' %}
</span>
</div><!--/.nav-collapse -->
</div>
</div>
@ -81,9 +71,10 @@
{% if request.user.is_staff %}
<div class="alert alert-info">
<strong>Кстати.</strong>
Вы администратор, и не должны производить действия из кабинета пользователя, производите их из админки.
Кабинет клиента для вас только для ознакомления.
{% blocktrans trimmed %}
<strong>Attantion!</strong>
You are is admin, and do not be active here, please back to admin side. Client side to you for reference only.
{% endblocktrans %}
</div>
{% endif %}
@ -95,7 +86,7 @@
<div id="footer">
<div class="container">
<p class="text-muted">
Напишите разработчику <i>is-ttk@ya.ru</i>.
{% include 'clientsideapp/custom_pages/footer.htm' %}
</p>
</div>
</div>

71
clientsideapp/templates/clientsideapp/index.html

@ -1,73 +1,4 @@
{% extends 'clientsideapp/ext.html' %}
{% block client_main %}
<div class="panel panel-primary">
<div class="panel-heading">Наши реквизиты</div>
<div class="panel-body">
<ul>
<li><b>Режим работы:</b> с 9:00 до 22:00</li>
<li><b>Телефоны:</b> +79788328885, +79788318999</li>
<li><b>Адрес:</b> пос. Нижнегорский, ул. Победы 38. 2й этаж старого дома быта, возле рынка</li>
</ul>
<script type="text/javascript" charset="utf-8" async src="https://api-maps.yandex.ru/services/constructor/1.0/js/?um=constructor%3A62221c38a606ad870f2cabc9fd476c8ae1a532993915b73553693f7fb5c7de68&amp;width=100%25&amp;height=654&amp;lang=ru_RU&amp;scroll=true"></script>
</div>
</div>
<div class="page-header">
<h3 class="page-header">Тарифы на дополнительные услуги</h3>
<!--Скачать <a href="/static/clientside/ISPlaylist.m3u">IPTV список каналов</a>, кодировка UTF-8</p>-->
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Услуга</th>
<th>Стоимость (руб)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Выезд мастера. Цена зависит от удалённости от Нижнегорска</td>
<td>100-200</td>
</tr>
<tr>
<td>Настройка роутера</td>
<td>300</td>
</tr>
<tr>
<td>Установка и восстановление сетевых настроек</td>
<td>100</td>
</tr>
<tr>
<td>Замена кабеля (витая пара)</td>
<td>30 руб/метр</td>
</tr>
<tr>
<td>Замена конектора <a href="/static/clientside/rj45.png" target="_blank">RJ-45</a></td>
<td>50</td>
</tr>
<tr>
<td>Роутер <a href="/static/clientside/TL-WR840N-v2.jpg" target="_blank">TL-WR840N</a> + настройка</td>
<td>1800</td>
</tr>
<tr>
<td>Установка драйвера (с настройкой сетевых установок)</td>
<td>100</td>
</tr>
<tr>
<td>"Что-то не работает" &#8211; по договорённости</td>
<td>~</td>
</tr>
<tr>
<td>Замена блока питания</td>
<td>200</td>
</tr>
<tr>
<td>Замена оптоволоконных линий связи</td>
<td>от 500</td>
</tr>
</tbody>
</table>
</div>
{% include 'clientsideapp/custom_pages/main_page.htm' %}
{% endblock %}

4
clientsideapp/templates/clientsideapp/modal_service_buy.html

@ -6,7 +6,7 @@
</div>
<div class="modal-body">
<h3>{% trans 'Are you sure you want to order the service?' %}</h3>
<p>Будте внимательны, после заказа услуги с вашего счёта <b>снимутся средства</b>, и вы сможете пользоваться купленной услугой.</p>
<p>{% trans 'Be careful, after purchasing the service you will <b>withdraw money</b>, and you will be able to use the purchased service.' %}</p>
<h3>{{ service.title }}</h3>
@ -15,7 +15,7 @@
<!--<p>{% blocktrans with speedIn=service.speedIn speedOut=service.speedOut amount=service.amount %}Inbound speed: {{ speedIn }} MBit/s<br>
Outgoing speed: {{ speedOut }} MBit/s<br>
Cost: {{ amount }} rubles.{% endblocktrans %}</p>-->
<p>Стоимость {{ service.amount }} руб.</p>
<p>{% blocktrans with amount=service.amount|floatformat:2 %}The cost is {{ amount }}{% endblocktrans %} {% trans 'currency' %}</p>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-sm btn-primary">

44
clientsideapp/templates/clientsideapp/services.html

@ -8,38 +8,42 @@
<div class="row">
<div class="col-lg-7">
{% if current_service %}
<div class="panel panel-default">
<div class="panel-heading">
Ваша текущая услуга
{% trans 'Your current service' %}
</div>
<div class="panel-body">
<h3 class="panel-title">{{ current_service.tariff.title }}</h3><br>
<dl class="dl-horizontal">
<dt>Дата подключения</dt>
<dt>{% trans 'The date of connection' %}</dt>
<dd>{{ current_service.time_start|date:"d E Y, l" }}</dd>
<dt>Время завершения услуги</dt>
<dt>{% trans 'The date of finish service' %}</dt>
<dd>{{ current_service.deadline|date:"d E Y, l" }}</dd>
<dt>Стоимость</dt>
<dt>{% trans 'Cost' %}</dt>
<dd>{{ current_service.tariff.amount }} {% trans 'currency' %}</dd>
</dl>
<p>{{ current_service.tariff.descr }}</p>
</div>
</div>
{% else %}
<div class="alert alert-warning" role="alert">
<span class="glyphicon glyphicon-exclamation-sign"></span>
<strong>Внимание!</strong> У вас нет услуги, для использования ресурсов приобретите нужную услугу из представленных тут.
{% blocktrans trimmed %}
<strong>Attantion!</strong>
You have not yet a service, for use the services please purchase service you want.
{% endblocktrans %}
</div>
{% endif %}
</div>
<div class="col-lg-5">
<div class="panel panel-default">
<div class="panel-heading">
Доступные для заказа услуги
{% trans 'Services available for ordering' %}
</div>
<div class="panel-body">
<div class="container-fluid">
@ -48,7 +52,7 @@
<div class="col-lg-12">
<h3>{{ tarif.title }}</h3>
<i>{{ tarif.amount }} руб.</i>
<i>{{ tarif.amount }} {% trans 'currency' %}</i>
<p>{{ tarif.descr }}</p>
{% if request.user.is_staff or current_service %}
@ -61,7 +65,7 @@
</div>
{% empty %}
<div class="col-lg-4">
<h3 class="panel-title">Нет доступных услуг для заказа</h3>
<h3 class="panel-title">{% trans 'No services available for ordering' %}</h3>
</div>
{% endfor %}
</div>
@ -70,28 +74,10 @@
</div>
</div>
</div>
{% include 'clientsideapp/services_ext.txt' %}
{% include 'clientsideapp/custom_pages/service.htm' with active_service=current_service %}
</div>
</div>
{% include 'clientsideapp/custom_pages/service_bottom.htm' %}
<div class="row">
<div class="col-sm-12">
<div class="panel panel-info">
<div class="panel-heading">
<span class="glyphicon glyphicon-info-sign"></span>
Как работает личный кабинет, раздел услуг
</div>
<div class="panel-body">
<p>Перед вами находится 2 столбца, в левом ваша текущая подключённая услуга, а в правом доступные для заказа услуги.
Когда у вас уже есть подключённая услуга то заказать новую вы не можете пока не завершится текущая.</p>
<p>Когда у вас нет действующей подключённой услуги то кнопка заказа станет активной, и вы сможете заказать для себя услугу.
Обратите внимание что именно в этот момент с вашего счёта снимутся деньги в соответствии со стоимостью услуги.
</p>
</div>
</div>
</div>
</div>
{% endblock %}

2
djing/local_settings.py.template

@ -57,3 +57,5 @@ API_AUTH_SECRET = 'your api secret'
# Allowed subnet for api
API_AUTH_SUBNET = '127.0.0.0/8'
# Company name
COMPANY_NAME = 'Your company name'

6
djing/settings.py

@ -86,6 +86,9 @@ TEMPLATES = [
'global_context_processors.context_processor_additional_profile',
'msg_app.context_processors.get_new_messages_count'
],
'libraries': {
'globaltags': 'djing.templatetags.globaltags',
}
},
},
]
@ -187,3 +190,6 @@ API_AUTH_SECRET = local_settings.API_AUTH_SECRET
# Allowed subnet for api
API_AUTH_SUBNET = local_settings.API_AUTH_SUBNET
# Company name
COMPANY_NAME = local_settings.COMPANY_NAME

0
djing/templatetags/__init__.py

9
djing/templatetags/globaltags.py

@ -0,0 +1,9 @@
from django import template
from django.conf import settings
register = template.Library()
@register.simple_tag
def global_var(var_name):
return getattr(settings, var_name, '')

BIN
static/clientside/bc.png

Before

Width: 80  |  Height: 71  |  Size: 8.7 KiB

After

Width: 80  |  Height: 80  |  Size: 4.2 KiB

BIN
static/img/bcgr.png

Before

Width: 57  |  Height: 50  |  Size: 6.0 KiB

After

Width: 50  |  Height: 49  |  Size: 2.0 KiB

6
templates/all_base.html

@ -1,7 +1,7 @@
<!DOCTYPE html>
<!DOCTYPE html>{% load globaltags %}
<html lang="ru_RU">
<head>
<title>InternetService - Админка</title>
<title>{% global_var 'COMPANY_NAME' %} - Админка</title>
<meta charset="UTF-8">
<!--[if lt IE 9]><meta http-equiv="refresh" content="0;URL=/static/bad_ie.html" /><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -37,7 +37,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand hidden-xs" href="{% url 'acc_app:other_profile' request.user.id %}">InternetService</a>
<a class="navbar-brand hidden-xs" href="{% url 'acc_app:other_profile' request.user.id %}">{% global_var 'COMPANY_NAME' %}</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">

Loading…
Cancel
Save