From 8005a56625c60c8fa86e846066d90e7ac0321759 Mon Sep 17 00:00:00 2001 From: Mukhtar Date: Fri, 12 Aug 2016 19:33:24 +0300 Subject: [PATCH] #ARC-15 jquery-sortable add --- .../migrations/0005_auto_20160812_1931.py | 19 ++++ projects/models.py | 3 +- projects/templates/comparison.html | 103 +++++++++++------- projects/views.py | 1 + users/templates/contractor_profile.html | 3 +- work_sell/templates/worksell_edit.html | 5 +- 6 files changed, 93 insertions(+), 41 deletions(-) create mode 100644 projects/migrations/0005_auto_20160812_1931.py diff --git a/projects/migrations/0005_auto_20160812_1931.py b/projects/migrations/0005_auto_20160812_1931.py new file mode 100644 index 0000000..243034b --- /dev/null +++ b/projects/migrations/0005_auto_20160812_1931.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.7 on 2016-08-12 16:31 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('projects', '0004_merge'), + ] + + operations = [ + migrations.AlterModelOptions( + name='candidate', + options={'ordering': ('position',), 'verbose_name': 'Кандидат', 'verbose_name_plural': 'Кандидаты'}, + ), + ] diff --git a/projects/models.py b/projects/models.py index da2b19b..d1095f9 100644 --- a/projects/models.py +++ b/projects/models.py @@ -206,9 +206,10 @@ class Candidate(models.Model): position = models.PositiveIntegerField(default=0) def __str__(self): - return self.answer.user.get_full_name() + return str(self.answer.pk) class Meta: + ordering = ('position',) verbose_name = 'Кандидат' verbose_name_plural = 'Кандидаты' diff --git a/projects/templates/comparison.html b/projects/templates/comparison.html index 8d4cf33..09b23e7 100644 --- a/projects/templates/comparison.html +++ b/projects/templates/comparison.html @@ -4,44 +4,47 @@ {% block content %} {% include 'partials/header.html' %} - -
-
-
-

Сравнение кандидатов по проекту

-
- -
-
-

{{ object }}

- - - - - - - - - - - + +
+
+
+

Сравнение кандидатов по проекту

+
+ +
+
+

{{ object }}

+
КандидатЦенаСрокОписаниеРейтинги/отзывыБезопасные сделкиРешение
+ + + + + + + + + + + + + {% for cand in object.candidates.all %} - + - + - + - + - + - + - + {% endfor %} -
КандидатЦенаСрокОписаниеРейтинги/отзывыБезопасные сделкиРешение
{{ forloop.counter }} - {{ cand.answer.contractor.get_full_name }} + {{ cand.answer.contractor.get_full_name }} {{ cand.answer.contractor.username }} {{ cand.answer.budget }} {{ cand.answer.term }}
{{ cand.answer.term_type }}
  • 0
  • @@ -51,18 +54,18 @@ - 0 {% if cand.answer.contractor.cro %} -
  • - СРО -
  • +
  • + СРО +
  • {% endif %}
0
Готов работать по безопасной сделке
@@ -73,10 +76,36 @@
-
- + + +
+ {% include 'partials/footer.html' %} -
- + + +{% endblock %} +{% block js_block %} + + {% endblock %} diff --git a/projects/views.py b/projects/views.py index dba295b..9710ce5 100644 --- a/projects/views.py +++ b/projects/views.py @@ -411,6 +411,7 @@ class ContractorPortfolioTrashView(View): redirect_to = request.POST.get('next') return redirect(redirect_to) + class CustomerProjectTrashView(View): form_class = CustomerProjectTrashForm diff --git a/users/templates/contractor_profile.html b/users/templates/contractor_profile.html index 1b2d16a..a0217b7 100644 --- a/users/templates/contractor_profile.html +++ b/users/templates/contractor_profile.html @@ -201,13 +201,14 @@ {% for ws in user.work_sell.all %}
- + {% thumbnail ws.get_cover "224x224" crop="center" as im %}
{% endthumbnail %} +
diff --git a/work_sell/templates/worksell_edit.html b/work_sell/templates/worksell_edit.html index 9592bc5..ef67592 100644 --- a/work_sell/templates/worksell_edit.html +++ b/work_sell/templates/worksell_edit.html @@ -83,9 +83,10 @@ {{ form.building_classification}}
-
- +
+ {% form.ins %}
+