From c85ef6cddfafd41bbc425794d47fdf0e3c95f4e8 Mon Sep 17 00:00:00 2001 From: PekopT Date: Tue, 30 Aug 2016 12:28:01 +0300 Subject: [PATCH 1/2] #ARC-2 18-20 --- archilance/settings/base.py | 2 ++ templates/partials/footer.html | 5 +++++ templates/registration/registration_form.html | 6 +++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/archilance/settings/base.py b/archilance/settings/base.py index c17774f..af737c0 100644 --- a/archilance/settings/base.py +++ b/archilance/settings/base.py @@ -314,6 +314,8 @@ else: WAGTAIL_SITE_NAME = 'PROEKTON' +REGISTRATION_FORM = 'registration.forms.RegistrationFormTermsOfService' + # class ASCIIFileSystemStorage(FileSystemStorage): # def get_valid_name(self, name): diff --git a/templates/partials/footer.html b/templates/partials/footer.html index b29df6b..f70f86f 100644 --- a/templates/partials/footer.html +++ b/templates/partials/footer.html @@ -41,6 +41,11 @@ Мой офис {% endif %} + {% if request.user.is_staff %} +
  • + Админка +
  • + {% endif %} {% endif %} diff --git a/templates/registration/registration_form.html b/templates/registration/registration_form.html index e6845e6..0177e0e 100644 --- a/templates/registration/registration_form.html +++ b/templates/registration/registration_form.html @@ -89,9 +89,9 @@
    - -

    Регистрируясь, я подтверждаю свое согласие у условиями пользавательского - соглашения

    + +

    Регистрируясь, я подтверждаю свое согласие у условиями пользовательского соглашения

    + {{ form.tos.errors }}
    From 9d76020f9cd92e73d032eba21e186ada3be98e92 Mon Sep 17 00:00:00 2001 From: Mukhtar Date: Tue, 30 Aug 2016 13:10:59 +0300 Subject: [PATCH 2/2] #ARC-18 fixes bugs --- chat/templates/chat_contractor.html | 22 ++++--- chat/templates/chat_customer.html | 64 ++++++++++++++----- chat/templates/reverse_stage_modal.html | 4 +- .../migrations/0022_auto_20160830_0958.py | 25 ++++++++ .../migrations/0023_auto_20160830_1024.py | 20 ++++++ projects/models.py | 2 +- projects/serializers.py | 2 +- 7 files changed, 112 insertions(+), 27 deletions(-) create mode 100644 projects/migrations/0022_auto_20160830_0958.py create mode 100644 projects/migrations/0023_auto_20160830_1024.py diff --git a/chat/templates/chat_contractor.html b/chat/templates/chat_contractor.html index f35bfa1..40a4af6 100644 --- a/chat/templates/chat_contractor.html +++ b/chat/templates/chat_contractor.html @@ -537,10 +537,15 @@ } } + var statusName = ''; + if (v.status == 'completed'){ + statusName = 'Завершен'; + } + htmlInbox += '
    ' + '

    Этап ' + v.pos + '' + v.name + '

    ' + '

    Результаты этапа:' + v.result + '

    ' + - '

    до ' + v.term + '

    ' + v.cost + '
    '; + '

    до ' + v.term + '

    ' + v.cost + '

    '+ statusName +'

    '; }); if (statusNotAgreed) { @@ -562,18 +567,19 @@ if (stagesInWork.length > 0){ $("#completeWork").show(); var stage = stagesInWork[0]; - var stageWork = '

    В работе '+ stage.name +'

    ' + - '

    Результат этапа : '+ stage.result +'

    ' + - '

    Срок сдачи '+ stage.term +' ' + stage.cost + 'р.

    '; + var stageWork = '
    ' + + '

    В работе '+ stage.name +'

    ' + + '

    Результат этапа : '+ stage.result +'

    ' + + '

    Срок сдачи '+ stage.term +' ' + stage.cost + '

    '; if(!stage.close_contractor){ - stageWork += 'Завершить этап'; + stageWork += ''; }else{ - stageWork += '

    Этап ожидает завершения статуса от заказчика

    '; + stageWork += '

    Этап ожидает завершения статуса от заказчика

    '; } if (data.secure) { - stageWork += 'Обратитьсяв арбитраж'; + stageWork += ''; } $("#stagesWork").html(stageWork); }else{ diff --git a/chat/templates/chat_customer.html b/chat/templates/chat_customer.html index 2b0901d..e899a40 100644 --- a/chat/templates/chat_customer.html +++ b/chat/templates/chat_customer.html @@ -113,12 +113,22 @@

    Заказы

    {% for order in orders %}
    + id="orderBlock{{ order.order.id }}" data-secure-deal="{% if order.order.secure %}true{% else %}false{% endif %}" + {% if order.order.contractor %} + data-recipent-id="{{ order.order.contractor.pk }}" + {% else %} + data-recipent-id="{{ order.order.team.pk }}" + {% endif %}data-id="{{ order.order.id }}">

    {{ order }}

    - Исполнитель: {{ order.order.contractor.get_full_name }} + Исполнитель: + {% if order.order.contractor %} + {{ order.order.contractor.get_full_name }} + {% else %} + {{ order.order.team.name }} + {% endif %}

    @@ -161,9 +171,10 @@
    '; } + if(data.secure) { + if (v.is_paid) { + stagesReservedHtml += '
  • Сумма за этап ' + v.pos + '.Зарезервирована.
  • '; + } else { + stagesReservedHtml += '
  • Сумма за этап ' + v.pos + '.Не зарезервирована.
  • '; + } + } }); + + if (statusNotAgreed) { if(!data.secure) { htmlInbox += '
    ' + @@ -390,17 +420,19 @@ if(stagesInWork.length > 0){ $("#completeWork").show(); var stage = stagesInWork[0]; - var stageWork = '

    В работе '+ stage.name +'

    ' + - '

    Результат этапа : '+ stage.result +'

    ' + - '

    Срок сдачи '+ stage.term +'' + stage.cost + 'р.

    '; + var stageWork = '
    ' + + '

    В работе '+ stage.name +'

    ' + + '

    Результат этапа : '+ stage.result +'

    ' + + '

    Срок сдачи '+ stage.term +'

    ' + stage.cost + '
    ' + + '
    '; if (stage.close_contractor){ - stageWork += '
    Закрыть этап '+ stage.pos +''; + stageWork += ''; } if (data.secure){ - stageWork += 'Обратитьсяв арбитраж'; + stageWork += ''; } $("#stagesWork").html(stageWork); } @@ -421,6 +453,8 @@ $("#leaveReview").hide(); } + $(".stages-paid").html(stagesReservedHtml); + }); } diff --git a/chat/templates/reverse_stage_modal.html b/chat/templates/reverse_stage_modal.html index cbafce2..1dd33d8 100644 --- a/chat/templates/reverse_stage_modal.html +++ b/chat/templates/reverse_stage_modal.html @@ -9,7 +9,7 @@