diff --git a/archilance/settings/base.py b/archilance/settings/base.py index 4327834..72aa5ba 100644 --- a/archilance/settings/base.py +++ b/archilance/settings/base.py @@ -43,16 +43,16 @@ THIRD_PARTY_APPS = [ ] LOCAL_APPS = [ - 'api', - 'common', - 'work_sell', - 'archilance', - 'projects', - 'specializations', - 'users', - 'reviews', - 'chat', - 'wallets', + 'specializations', + 'api', + 'common', + 'work_sell', + 'archilance', + 'projects', + 'users', + 'reviews', + 'chat', + 'wallets', ] INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS diff --git a/assets/css/extra.css b/assets/css/extra.css index 3a87ae4..c1aa855 100644 --- a/assets/css/extra.css +++ b/assets/css/extra.css @@ -4,11 +4,11 @@ border-radius: 40px; font-size: 15px; font-family: 'Arial-MT-Regular', sans-serif; -} +} .btn-group.valProject2 a.btn span mark { background: none; - color: #ff2c2c; + color: #ff2c2c; } .btn-group.valProject2 a.btn > span { @@ -34,32 +34,35 @@ * Simple fade transition, */ .mfp-fade.mfp-bg { - opacity: 0; - -webkit-transition: all 0.15s ease-out; - -moz-transition: all 0.15s ease-out; - transition: all 0.15s ease-out; + opacity: 0; + -webkit-transition: all 0.15s ease-out; + -moz-transition: all 0.15s ease-out; + transition: all 0.15s ease-out; } + .mfp-fade.mfp-bg.mfp-ready { - opacity: 0.8; + opacity: 0.8; } + .mfp-fade.mfp-bg.mfp-removing { - opacity: 0; + opacity: 0; } .mfp-fade.mfp-wrap .mfp-content { - opacity: 0; - -webkit-transition: all 0.15s ease-out; - -moz-transition: all 0.15s ease-out; - transition: all 0.15s ease-out; + opacity: 0; + -webkit-transition: all 0.15s ease-out; + -moz-transition: all 0.15s ease-out; + transition: all 0.15s ease-out; } + .mfp-fade.mfp-wrap.mfp-ready .mfp-content { - opacity: 1; + opacity: 1; } + .mfp-fade.mfp-wrap.mfp-removing .mfp-content { - opacity: 0; + opacity: 0; } - #jGrowl .jGrowl-notification { background-color: #00bb7b; font-size: 17px; @@ -69,16 +72,27 @@ margin: 0; } - .stepssBlock ul li.reserved::before { - background: rgba(0, 0, 0, 0) url("../img/reserved2.png") no-repeat scroll center center / cover ; + background: rgba(0, 0, 0, 0) url("../img/reserved2.png") no-repeat scroll center center / cover; height: 16px; width: 17px; } - .stepssBlock ul li.unreserved::before { - background: rgba(0, 0, 0, 0) url("../img/reserved.png") no-repeat scroll center center / cover ; + background: rgba(0, 0, 0, 0) url("../img/reserved.png") no-repeat scroll center center / cover; height: 14px; width: 13px; } + +.chat-textarea { + width: 100%; + height: 110px; + border: 1px solid #cdcdcd; + resize: none; + padding: 10px 15px; + color: #3c1a06; + font-family: 'Arial-MT-Regular', sans-serif; + font-size: 14px; + float: left; + margin: 33px 0 0 0; +} diff --git a/assets/index.js b/assets/index.js index 04d372e..7c2ac93 100644 --- a/assets/index.js +++ b/assets/index.js @@ -547,3 +547,6 @@ function getCookie(name) { } return cookieValue; } + + + diff --git a/chat/models.py b/chat/models.py index 2901f26..c82312e 100644 --- a/chat/models.py +++ b/chat/models.py @@ -36,6 +36,17 @@ class Notes(models.Model): verbose_name = 'Заметка' verbose_name_plural = 'Заметки' -# class Channel(models.Model): -# owner = models.ForeignKey(User, related_name='chanells') -# companion = models.ForeignKey(User, related_name='companion_channels') + +class Documents(models.Model): + file = models.FileField(upload_to='chat/documents/') + order = models.ForeignKey(Order, related_name='order_documents',null=True, blank=True) + team = models.ForeignKey(Team, related_name='team_documents',null=True, blank=True) + sender = models.ForeignKey(User, related_name='sender_documents') + recipent = models.ForeignKey(User, related_name='recipent_documents') + + def __str__(self): + return self.file.url + + class Meta: + verbose_name = 'Входящие Документы' + verbose_name_plural = 'Входящие Документы' diff --git a/chat/templates/chat_contractor.html b/chat/templates/chat_contractor.html index f5888b4..6f1aef3 100644 --- a/chat/templates/chat_contractor.html +++ b/chat/templates/chat_contractor.html @@ -47,8 +47,7 @@ {% endthumbnail %}

- - {{ contact.username }}{{ contact.username }}{{ contact.first_name }} {{ contact.last_name }} +

{{ contact.username }}

Контакты @@ -172,7 +171,7 @@

Заказы

{% for torder in team_orders %} -
+

{{ torder }} @@ -184,14 +183,16 @@

    {% for tuser in torder.team.users.all %} -
  • {{ tuser }}
  • +
  • {{ tuser }}
  • {% endfor %}

Чаты: {% for tuser in torder.team.users.all %} + {% if request.user.pk != tuser.pk %} {{ tuser.username }}, + {% endif %} {% endfor %}

@@ -204,19 +205,21 @@
+
- +
- @@ -238,6 +241,11 @@ {# #} diff --git a/users/models.py b/users/models.py index 1191bdf..8b91650 100644 --- a/users/models.py +++ b/users/models.py @@ -20,6 +20,7 @@ class UserManager(BaseUserManager): user = self.model(username=username, email=UserManager.normalize_email(email),) + user.set_password(password) user.save(using=self._db) return user diff --git a/users/templates/contractor_profile.html b/users/templates/contractor_profile.html index 7742498..739f94e 100644 --- a/users/templates/contractor_profile.html +++ b/users/templates/contractor_profile.html @@ -432,25 +432,8 @@ {% block js_block %}