diff --git a/clientsideapp/locale/ru/LC_MESSAGES/django.po b/clientsideapp/locale/ru/LC_MESSAGES/django.po index 9fcf3b2..a5706a5 100644 --- a/clientsideapp/locale/ru/LC_MESSAGES/django.po +++ b/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 %(amount)s rub.
\n" -#| "As a result, you will remain on your account %(ballance_after)s rubles. " -#| "
\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 %(amount)s rub.
\n" -"As a result, you will remain on your account %(ballance_after)s rubles.
\n" -"The administrator can immediately see that you shut down the debt." +"From your account, they withdraw funds in %(amount)s rub.
As a " +"result, you will remain on your account %(ballance_after)s rubles.
The " +"administrator can immediately see that you shut down the debt." msgstr "" "С вашего счёта снимутся средства в размере %(amount)s руб.
\n" "В результате у вас на счету останется %(ballance_after)s руб.
\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 %(ballance)s" +msgstr "Ваш балланс %(ballance)s" + +#: templates/clientsideapp/ext.html:74 +msgid "" +"Attantion! You are is admin, and do not be active here, " +"please back to admin side. Client side to you for reference only." +msgstr "" +"Кстати. Вы администратор, и не должны производить действия " +"из кабинета пользователя, производите их из админки. Кабинет клиента для вас " +"только для ознакомления." + +#: 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 withdraw money, and " +"you will be able to use the purchased service." +msgstr "" +"Будте внимательны, после заказа услуги с вашего счёта снимутся средства, " +"и вы сможете пользоваться купленной услугой." -#: clientsideapp/templates/clientsideapp/modal_service_buy.html:28 +#: templates/clientsideapp/modal_service_buy.html:15 +#, python-format +msgid "" +"Inbound speed: %(speedIn)s MBit/s
\n" +"Outgoing speed: %(speedOut)s MBit/s
\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 "" +"Attantion! You have not yet a service, for use the services " +"please purchase service you want." +msgstr "" +"Внимание! У вас нет услуги, для использования ресурсов приобретите " +"нужную услугу из представленных тут." -#: 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 "Недостаточно средств на счету" diff --git a/clientsideapp/templates/clientsideapp/custom_pages/footer.htm b/clientsideapp/templates/clientsideapp/custom_pages/footer.htm new file mode 100644 index 0000000..55ce634 --- /dev/null +++ b/clientsideapp/templates/clientsideapp/custom_pages/footer.htm @@ -0,0 +1 @@ +Your custom content here. \ No newline at end of file diff --git a/clientsideapp/templates/clientsideapp/custom_pages/main_page.htm b/clientsideapp/templates/clientsideapp/custom_pages/main_page.htm new file mode 100644 index 0000000..27e1fca --- /dev/null +++ b/clientsideapp/templates/clientsideapp/custom_pages/main_page.htm @@ -0,0 +1 @@ +

You can change this page

\ No newline at end of file diff --git a/clientsideapp/templates/clientsideapp/custom_pages/service.htm b/clientsideapp/templates/clientsideapp/custom_pages/service.htm new file mode 100644 index 0000000..a987da4 --- /dev/null +++ b/clientsideapp/templates/clientsideapp/custom_pages/service.htm @@ -0,0 +1,2 @@ +

Your custom content

+

You have service variable {{ active_service }}

\ No newline at end of file diff --git a/clientsideapp/templates/clientsideapp/custom_pages/service_bottom.htm b/clientsideapp/templates/clientsideapp/custom_pages/service_bottom.htm new file mode 100644 index 0000000..89cbb76 --- /dev/null +++ b/clientsideapp/templates/clientsideapp/custom_pages/service_bottom.htm @@ -0,0 +1 @@ +

Your custom content on bottom

\ No newline at end of file diff --git a/clientsideapp/templates/clientsideapp/debt_buy.html b/clientsideapp/templates/clientsideapp/debt_buy.html index 510fbe8..a607273 100644 --- a/clientsideapp/templates/clientsideapp/debt_buy.html +++ b/clientsideapp/templates/clientsideapp/debt_buy.html @@ -18,9 +18,13 @@ {% trans 'Are you sure you want to spend a payment?' %} -

{% blocktrans %}From your account, they withdraw funds in {{ amount }} rub.
-As a result, you will remain on your account {{ ballance_after }} rubles.
-The administrator can immediately see that you shut down the debt.{% endblocktrans %}

+

+ {% blocktrans trimmed %} + From your account, they withdraw funds in {{ amount }} rub.
+ As a result, you will remain on your account {{ ballance_after }} rubles.
+ The administrator can immediately see that you shut down the debt. + {% endblocktrans %} +

{% trans 'Description of payment' %}

diff --git a/clientsideapp/templates/clientsideapp/debts.html b/clientsideapp/templates/clientsideapp/debts.html index d7d1038..18563e3 100644 --- a/clientsideapp/templates/clientsideapp/debts.html +++ b/clientsideapp/templates/clientsideapp/debts.html @@ -1,25 +1,26 @@ {% extends 'clientsideapp/ext.html' %} +{% load i18n %} {% block client_main %} - - - - - - + + + + + + {% for debt in debts %} - + {% empty %} - + {% endfor %} diff --git a/clientsideapp/templates/clientsideapp/ext.html b/clientsideapp/templates/clientsideapp/ext.html index bdd7c4d..2ee4627 100644 --- a/clientsideapp/templates/clientsideapp/ext.html +++ b/clientsideapp/templates/clientsideapp/ext.html @@ -1,10 +1,10 @@ - +{% load globaltags %}{% load i18n %} - Личный кабинет + {% global_var 'COMPANY_NAME' %} - {% trans 'Personal account' %} @@ -19,6 +19,8 @@ + +{% url 'client_side:home' as client_side_home %} @@ -80,11 +70,12 @@
{% if request.user.is_staff %} -
- Кстати. - Вы администратор, и не должны производить действия из кабинета пользователя, производите их из админки. - Кабинет клиента для вас только для ознакомления. -
+
+ {% blocktrans trimmed %} + Attantion! + You are is admin, and do not be active here, please back to admin side. Client side to you for reference only. + {% endblocktrans %} +
{% endif %} {% include 'message_block.html' %} @@ -95,7 +86,7 @@ diff --git a/clientsideapp/templates/clientsideapp/index.html b/clientsideapp/templates/clientsideapp/index.html index a0ff0b2..a881d0e 100644 --- a/clientsideapp/templates/clientsideapp/index.html +++ b/clientsideapp/templates/clientsideapp/index.html @@ -1,73 +1,4 @@ {% extends 'clientsideapp/ext.html' %} {% block client_main %} - -
-
Наши реквизиты
-
-
    -
  • Режим работы: с 9:00 до 22:00
  • -
  • Телефоны: +79788328885, +79788318999
  • -
  • Адрес: пос. Нижнегорский, ул. Победы 38. 2й этаж старого дома быта, возле рынка
  • -
- -
-
- -
СостояниеСуммаОписаниеДата созданияДата платежаОплатить{% trans 'State' %}{% trans 'Summ' %}{% trans 'Description' %}{% trans 'Date of create' %}{% trans 'Date of pay' %}{% trans 'Pay' %}
{{ debt.amount }} руб.{{ debt.amount }} {% trans 'currency' %} {{ debt.comment }} {{ debt.date_create|date:'d b H:i' }} @@ -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 %} - +
У вас нет долгов {% trans 'You have no debt' %}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
УслугаСтоимость (руб)
Выезд мастера. Цена зависит от удалённости от Нижнегорска100-200
Настройка роутера300
Установка и восстановление сетевых настроек100
Замена кабеля (витая пара)30 руб/метр
Замена конектора RJ-4550
Роутер TL-WR840N + настройка1800
Установка драйвера (с настройкой сетевых установок)100
"Что-то не работает" – по договорённости~
Замена блока питания200
Замена оптоволоконных линий связиот 500
-
- + {% include 'clientsideapp/custom_pages/main_page.htm' %} {% endblock %} diff --git a/clientsideapp/templates/clientsideapp/modal_service_buy.html b/clientsideapp/templates/clientsideapp/modal_service_buy.html index 93d6d7d..4c46754 100644 --- a/clientsideapp/templates/clientsideapp/modal_service_buy.html +++ b/clientsideapp/templates/clientsideapp/modal_service_buy.html @@ -6,7 +6,7 @@ + {% include 'clientsideapp/custom_pages/service_bottom.htm' %} - - -
-
-
-
- - Как работает личный кабинет, раздел услуг -
-
-

Перед вами находится 2 столбца, в левом ваша текущая подключённая услуга, а в правом доступные для заказа услуги. - Когда у вас уже есть подключённая услуга то заказать новую вы не можете пока не завершится текущая.

-

Когда у вас нет действующей подключённой услуги то кнопка заказа станет активной, и вы сможете заказать для себя услугу. - Обратите внимание что именно в этот момент с вашего счёта снимутся деньги в соответствии со стоимостью услуги. -

-
-
-
-
{% endblock %} diff --git a/djing/local_settings.py.template b/djing/local_settings.py.template index 8f251a4..f3ac692 100644 --- a/djing/local_settings.py.template +++ b/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' diff --git a/djing/settings.py b/djing/settings.py index cdeb813..ef5e0bc 100644 --- a/djing/settings.py +++ b/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 diff --git a/djing/templatetags/__init__.py b/djing/templatetags/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/djing/templatetags/globaltags.py b/djing/templatetags/globaltags.py new file mode 100644 index 0000000..9b36fd9 --- /dev/null +++ b/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, '') diff --git a/static/clientside/bc.png b/static/clientside/bc.png index d61c54d..c0e9ec3 100644 Binary files a/static/clientside/bc.png and b/static/clientside/bc.png differ diff --git a/static/img/bcgr.png b/static/img/bcgr.png index ebe8b5e..b70f55d 100644 Binary files a/static/img/bcgr.png and b/static/img/bcgr.png differ diff --git a/templates/all_base.html b/templates/all_base.html index 0f9769b..3ac6aae 100644 --- a/templates/all_base.html +++ b/templates/all_base.html @@ -1,7 +1,7 @@ - +{% load globaltags %} - InternetService - Админка + {% global_var 'COMPANY_NAME' %} - Админка @@ -37,7 +37,7 @@ - +