diff --git a/templates/partials/header.html b/templates/partials/header.html
index b0f5a82..e48fb27 100644
--- a/templates/partials/header.html
+++ b/templates/partials/header.html
@@ -119,12 +119,6 @@
{% contractor_indicator request.user %}
{% endif %}
-
-
- {% if request.user.is_contractor %}
-
- {% endif %}
-
{% else %}
Регистрация
diff --git a/templates/partials/sass/header.sass b/templates/partials/sass/header.sass
index 7fc4ff5..052941a 100644
--- a/templates/partials/sass/header.sass
+++ b/templates/partials/sass/header.sass
@@ -169,14 +169,17 @@ header
position: relative
cursor: pointer
margin-left: 10px
-
- .ratingInset
+ .ratingInset-wrapper
+ position: relative
width: 46px
height: 46px
+ .ratingInset
+ width: 100%
+ height: 100%
border-radius: 100%
background-color: #FF0027
display: inline-block
- /* position: absolute; */
+ position: absolute
/* left: -1.859px; */
/* bottom: 3px; */
clip: rect(0, 22px, 50px, 0)
diff --git a/users/templates/contractor_profile.html b/users/templates/contractor_profile.html
index 996e553..392c6ce 100644
--- a/users/templates/contractor_profile.html
+++ b/users/templates/contractor_profile.html
@@ -803,7 +803,6 @@
data: dataSerializer,
dataType: 'json',
success: function (data) {
- consoCoole.log(data);
if (data.status == 'ok') {
$("#resume-text-out").html(data.text);
$("#resume-text-edit").modal('hide');
diff --git a/users/templates/templatetags/contractor_indicator.html b/users/templates/templatetags/contractor_indicator.html
index 838e613..b90d774 100644
--- a/users/templates/templatetags/contractor_indicator.html
+++ b/users/templates/templatetags/contractor_indicator.html
@@ -1,5 +1,7 @@
-
+
{{ current_indicator }}%
diff --git a/users/templatetags/user_tags.py b/users/templatetags/user_tags.py
index 55e312b..2bbf2af 100644
--- a/users/templatetags/user_tags.py
+++ b/users/templatetags/user_tags.py
@@ -15,16 +15,27 @@ register = template.Library()
@register.inclusion_tag('templatetags/contractor_indicator.html', takes_context=True)
def contractor_indicator(context, contractor):
- fields = ['avatar', 'cro', 'first_name', 'gender',
+ fields = ['avatar', 'first_name', 'gender',
'last_name', 'patronym', 'phone',
- 'skype', 'website', 'location']
+ 'skype', 'website', 'location',
+ 'contractor_specializations', 'contractor_building_classifications', 'contractor_construction_types',
+ 'contractor_resume__text']
indicator_sum = 0
for f in fields:
if hasattr(contractor, f) and getattr(contractor, f):
+ try:
+ if not getattr(contractor, f).all():
+ continue
+ except AttributeError:
+ pass
indicator_sum += 1
- current_indicator = math.ceil(math.ceil(100 / len(fields)) * indicator_sum)
+ # Если в резюме > 100 символов - считаем его заполненным
+ if len(getattr(contractor, 'contractor_resume').text) > 100:
+ indicator_sum += 1
+
+ current_indicator = math.ceil(math.ceil(100 / len(fields) * indicator_sum))
current_indicator_px = math.ceil(current_indicator / 2)
return {
'current_indicator': current_indicator,