PR-14-mod Модификация шапки аккаунт Исполнителя (доработка)

Исправлены визуальные недоработки
Реализованы М/Ж иконки аватаров по умолчанию
remotes/origin/PR-58
booblegum 9 years ago
parent 02898366b3
commit 5813749813
  1. 40
      assets/css/main.css
  2. BIN
      assets/img/avatars/avatar-female.jpg
  3. BIN
      assets/img/avatars/avatar-male.jpg
  4. 7
      assets/js/chat.js
  5. 6
      chat/templates/inc-contact-card.html
  6. 54
      projects/templates/project_detail.html
  7. 32
      templates/partials/header.html
  8. 14
      templates/partials/trash/header.html
  9. 12
      users/templates/contractor_filter.html
  10. 33
      users/templates/contractor_office.html
  11. 734
      users/templates/contractor_profile.html
  12. 6
      users/templates/partials/inc-customer_profile-info.html
  13. 164
      users/templates/team_profile.html
  14. 6
      users/templates/trash/customer_profile_info_block.html
  15. 76
      users/templates/user_financial_info_edit.html
  16. 6
      users/templates/user_profile_edit.html
  17. 6
      users/templates/user_profile_edit_old.html

@ -355,46 +355,6 @@ a, a:hover, a:focus, a:active {
background-color: rgb(255,0,39); background-color: rgb(255,0,39);
} }
.rating {
width: 46px;
height: 46px;
float: right;
border-radius: 100%;
background-color: #4D4D4D;
margin: 15px 0 0 10px;
position: relative;
}
.ratingInset {
width: 46px;
height: 46px;
border-radius: 100%;
background-color: #FF0027;
position: absolute;
/*left:-1.859px;*/
/*bottom: 3px;*/
clip: rect(0, 22px, 50px, 0);
transform: rotate(-90deg);
}
.iconRating {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background: url('../img/button12.png') no-repeat center;
}
.ratingPer {
color: #ff2c2c;
font-size: 18px;
font-family: 'pfdintextcomppro-regular', sans-serif;
float: right;
margin: 28px 0 0 9px;
cursor: pointer;
}
.mainScore { .mainScore {
position: relative; position: relative;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

@ -121,7 +121,10 @@ function updateCounts() {
} }
$(function () { $(function () {
function dialog (message, yesCallback, notCallback) { window.onhashchange = function (e) {
$('a[data-toggle="tab"][href="#'+location.hash.slice(1)+'"]').trigger("click");
};
function dialog(message, yesCallback, notCallback) {
$("#dialog_delete .modal-title").html(message); $("#dialog_delete .modal-title").html(message);
$("#dialog_delete").modal('show'); $("#dialog_delete").modal('show');
$("#btnYes").click(function (e) { $("#btnYes").click(function (e) {
@ -138,6 +141,7 @@ function dialog (message, yesCallback, notCallback) {
var currentHash = URI(location.href).hash(); var currentHash = URI(location.href).hash();
$('a[data-toggle="tab"]').on('show.bs.tab', function (e) { $('a[data-toggle="tab"]').on('show.bs.tab', function (e) {
console.log("TAB!");
var activeTab = $(this).attr('href').substring(1); var activeTab = $(this).attr('href').substring(1);
var liveHash = URI(location.href).hash(); var liveHash = URI(location.href).hash();
@ -155,7 +159,6 @@ function dialog (message, yesCallback, notCallback) {
case 'tab2': case 'tab2':
console.log("tab2"); console.log("tab2");
// /api/message?recipent__id=5
updateCounts(); updateCounts();
setTimeout(function () { setTimeout(function () {
if (liveHash.indexOf("#order") == 0) { if (liveHash.indexOf("#order") == 0) {

@ -28,7 +28,11 @@
<img src="{{ im.url }}" alt="mess-image"> <img src="{{ im.url }}" alt="mess-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="mess-image"> {% if contact.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="mess-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="mess-image">
{% endif %}
{% endif %} {% endif %}
</div> </div>
<p class="nameMess"> <p class="nameMess">

@ -41,7 +41,11 @@
<img src="{{ im.url }}" alt="execitor-image"> <img src="{{ im.url }}" alt="execitor-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="execitor-image"> {% if project.customer.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="execitor-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="execitor-image">
{% endif %}
{% endif %} {% endif %}
</div> </div>
</a> </a>
@ -235,7 +239,11 @@
<img src="{{ avatar.url }}" alt="execitor-image"> <img src="{{ avatar.url }}" alt="execitor-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="execitor-image"> {% if answer.author.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="mess-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="mess-image">
{% endif %}
{% endif %} {% endif %}
</div> </div>
</a> </a>
@ -252,7 +260,11 @@
<img src="{{ avatar.url }}" alt="execitor-image"> <img src="{{ avatar.url }}" alt="execitor-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="execitor-image"> {% if answer.author.owner.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="mess-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="mess-image">
{% endif %}
{% endif %} {% endif %}
</div> </div>
</a> </a>
@ -613,7 +625,11 @@
<img src="{{ avatar.url }}" alt="execitor-image"> <img src="{{ avatar.url }}" alt="execitor-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="execitor-image"> {% if answer.author.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="mess-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="mess-image">
{% endif %}
{% endif %} {% endif %}
</div> </div>
</a> </a>
@ -630,7 +646,11 @@
<img src="{{ avatar.url }}" alt="execitor-image"> <img src="{{ avatar.url }}" alt="execitor-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="execitor-image"> {% if answer.author.owner.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="profile-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="profile-image">
{% endif %}
{% endif %} {% endif %}
</div> </div>
</a> </a>
@ -827,7 +847,11 @@
<img src="{{ avatar.url }}" alt="execitor-image"> <img src="{{ avatar.url }}" alt="execitor-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="execitor-image"> {% if answer.author.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="profile-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="profile-image">
{% endif %}
{% endif %} {% endif %}
</div> </div>
</a> </a>
@ -844,7 +868,11 @@
<img src="{{ avatar.url }}" alt="execitor-image"> <img src="{{ avatar.url }}" alt="execitor-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="execitor-image"> {% if answer.author.owner.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="profile-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="profile-image">
{% endif %}
{% endif %} {% endif %}
</div> </div>
</a> </a>
@ -1044,7 +1072,11 @@
<img src="{{ avatar.url }}" alt="execitor-image"> <img src="{{ avatar.url }}" alt="execitor-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="execitor-image"> {% if answer.author.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="profile-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="profile-image">
{% endif %}
{% endif %} {% endif %}
</div> </div>
</a> </a>
@ -1061,7 +1093,11 @@
<img src="{{ avatar.url }}" alt="execitor-image"> <img src="{{ avatar.url }}" alt="execitor-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="execitor-image"> {% if answer.author.owner.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="profile-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="profile-image">
{% endif %}
{% endif %} {% endif %}
</div> </div>
</a> </a>

@ -27,7 +27,7 @@
<div class="user-info"> <div class="user-info">
<a href="{% url 'wallets:score-detail' pk=request.user.pk %}" <a href="{% url 'wallets:score-detail' pk=request.user.pk %}"
class="cash">{{ user_balance|floatformat:2 }}р</a> class="cash">{{ user_balance|floatformat:2 }}р</a>
<a href="{% url 'chat:chat-user' %}#order{{ fist_order_id }}" <a href="{% url 'chat:chat-user' %}#tab2"
class="icon_hand">{{ num_orders_in_work }}</a> class="icon_hand">{{ num_orders_in_work }}</a>
<a href="{% url 'chat:chat-user' %}" class="icon_chat js-all-messages"> <a href="{% url 'chat:chat-user' %}" class="icon_chat js-all-messages">
{{ new_messages_count| max_count:99 }} {{ new_messages_count| max_count:99 }}
@ -37,27 +37,19 @@
{% endif %} {% endif %}
<li> <li>
<div class="imgProfile"> <div class="imgProfile">
{% if request.user.is_contractor %} <a href="{{ profile_url }}">
<a href="{{ profile_url }}"> {% if request.user.avatar %}
{% if request.user.avatar %} {% thumbnail request.user.avatar "75x75" crop="center" as im %}
{% thumbnail request.user.avatar "75x75" crop="center" as im %} <img src="{{ im.url }}" alt="profile-image">
<img src="{{ im.url }}" alt="profile-image"> {% endthumbnail %}
{% endthumbnail %} {% else %}
{% else %} {% if request.user.gender == "female" %}
<img src="{% static 'img/profile.jpg' %}" alt="profile-image"> <img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="profile-image">
{% endif %}
</a>
{% elif request.user.is_customer %}
<a href="{{ profile_url }}">
{% if request.user.avatar %}
{% thumbnail request.user.avatar "75x75" crop="center" as im %}
<img src="{{ im.url }}" alt="profile-image">
{% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="profile-image"> <img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="profile-image">
{% endif %} {% endif %}
</a> {% endif %}
{% endif %} </a>
</div> <!-- //imgProfile --> </div> <!-- //imgProfile -->
</li> </li>
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}

@ -113,7 +113,7 @@
<a href="{% url 'chat:chat-user' %}">Сообщения<span></span></a> <a href="{% url 'chat:chat-user' %}">Сообщения<span></span></a>
{% if request.user %} {% if request.user %}
<div class="circle js-all-messages">{{ new_messages_count| max_count:99 }}</div> <div class="circle js-all-messages">{{ new_messages_count| max_count:99 }}</div>
{# {% count_new_message request.user %}#} {# {% count_new_message request.user %}#}
{% endif %} {% endif %}
</li> </li>
<li class="icon_mm4"> <li class="icon_mm4">
@ -147,7 +147,11 @@
<img src="{{ im.url }}" alt="profile-image"> <img src="{{ im.url }}" alt="profile-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="profile-image"> {% if request.user.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="profile-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="profile-image">
{% endif %}
{% endif %} {% endif %}
</a> </a>
{% elif request.user.is_customer %} {% elif request.user.is_customer %}
@ -157,7 +161,11 @@
<img src="{{ im.url }}" alt="profile-image"> <img src="{{ im.url }}" alt="profile-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="profile-image"> {% if request.user.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="profile-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="profile-image">
{% endif %}
{% endif %} {% endif %}
</a> </a>
{% endif %} {% endif %}

@ -195,7 +195,11 @@
<img src="{{ avatar.url }}" alt="profile-image"> <img src="{{ avatar.url }}" alt="profile-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="profile-image"> {% if team.owner.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="profile-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="profile-image">
{% endif %}
{% endif %} {% endif %}
</div> </div>
</a> </a>
@ -316,7 +320,11 @@
<img src="{{ avatar.url }}" alt="profile-image"> <img src="{{ avatar.url }}" alt="profile-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="profile-image"> {% if contractor.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="profile-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="profile-image">
{% endif %}
{% endif %} {% endif %}
</div> </div>
</a> </a>

@ -82,8 +82,15 @@
src="{{ im.url }}" alt="profile-image"></a> src="{{ im.url }}" alt="profile-image"></a>
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<a href="{% url 'users:team-profile' pk=contractor.team.pk %}"><img <a href="{% url 'users:team-profile' pk=contractor.team.pk %}">
src="{% static 'img/profile.jpg' %}" alt="profile-image"></a> {% if contractor.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}"
alt="profile-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}"
alt="profile-image">
{% endif %}
</a>
{% endif %} {% endif %}
</div> </div>
</div> </div>
@ -105,7 +112,13 @@
<img src="{{ im.url }}" alt="mess-image"> <img src="{{ im.url }}" alt="mess-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="mess-image"> {% if c.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}"
alt="profile-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}"
alt="profile-image">
{% endif %}
{% endif %} {% endif %}
</div> </div>
@ -300,8 +313,10 @@
var $moreWorkSellsfBtn = $('.-more-work-sells-btn').first() var $moreWorkSellsfBtn = $('.-more-work-sells-btn').first()
var workSellAbsUrl = '/work_sell/' var workSellAbsUrl = '/work_sell/'
var contractorId ={{ contractor.pk }} var contractorId =
var teamId ={{ contractor.team.pk }} {{ contractor.pk }}
var teamId =
{{ contractor.team.pk }}
var contractorIds = [contractorId] var contractorIds = [contractorId]
var portfUrl = new URI('/api/portfolios/') var portfUrl = new URI('/api/portfolios/')
@ -309,10 +324,10 @@
var pageSize = {% if TESTING %}99999{% else %}9{% endif %} var pageSize = {% if TESTING %}99999{% else %}9{% endif %}
$.get('/api/teams/' + teamId + '/').then(function (res) { $.get('/api/teams/' + teamId + '/').then(function (res) {
Array.prototype.push.apply(contractorIds, _.map(function (contractor) { Array.prototype.push.apply(contractorIds, _.map(function (contractor) {
return contractor.id return contractor.id
}, res.contractors)) }, res.contractors))
}) })
.then(loadMorePortfolios) .then(loadMorePortfolios)
.then(loadMoreWorkSells) .then(loadMoreWorkSells)

File diff suppressed because it is too large Load Diff

@ -10,7 +10,11 @@
<img src="{{ im.url }}" alt="profile-image"> <img src="{{ im.url }}" alt="profile-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" width="220" height="220" alt="profile-image"> {% if customer.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="profile-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="profile-image">
{% endif %}
{% endif %} {% endif %}
</div> </div>
</div> </div>

@ -17,11 +17,17 @@
<img src="{{ im.url }}" alt="profile-image"> <img src="{{ im.url }}" alt="profile-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="profile-image"> {% if team.owner.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}"
alt="profile-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}"
alt="profile-image">
{% endif %}
{% endif %} {% endif %}
</div> </div>
</div> </div>
<div class="menuUser disTab"> <div class="menuUser disTab">
{% if request.user == team.owner %} {% if request.user == team.owner %}
<a href="{% url 'users:contractor-filter' %}" class="add-man"> <a href="{% url 'users:contractor-filter' %}" class="add-man">
@ -40,7 +46,13 @@
<img src="{{ im.url }}" alt="mess-image"> <img src="{{ im.url }}" alt="mess-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="mess-image"> {% if c.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}"
alt="profile-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}"
alt="profile-image">
{% endif %}
{% endif %} {% endif %}
</div> </div>
@ -56,28 +68,29 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-lg-9 divCol9"> <div class="col-lg-9 divCol9">
<div class="col-lg-4"> <div class="col-lg-4">
<p class="nameUser">{{ team.name }}</p> <p class="nameUser">{{ team.name }}</p>
<p class="cityUser">{{ team.owner.get_location }}</p> <p class="cityUser">{{ team.owner.get_location }}</p>
<p class="navv">На сайте {{ team.created }}</p> <p class="navv">На сайте {{ team.created }}</p>
<p class="navv"> <p class="navv">
Кол-во человек: <span>{{ team.contractors.count }}</span> Кол-во человек: <span>{{ team.contractors.count }}</span>
</p> </p>
<p class="navv"> <p class="navv">
Выполненных проектов: <span>{{ completed_project_count }}</span> Выполненных проектов: <span>{{ completed_project_count }}</span>
</p> </p>
{% if team.owner.contractor_status == 'free' %} {% if team.owner.contractor_status == 'free' %}
<div class="statusUser">Свободен</div> <div class="statusUser">Свободен</div>
{% else %} {% else %}
<div class="statusUser busy">Занят</div> <div class="statusUser busy">Занят</div>
{% endif %} {% endif %}
<a href="{% url 'chat:chat-user' %}?user_id={{ team.owner.pk }}#user{{ team.owner.pk }}" class="new-prop new-prop2 new-prop3">написать сообщение</a> <a href="{% url 'chat:chat-user' %}?user_id={{ team.owner.pk }}#user{{ team.owner.pk }}"
class="new-prop new-prop2 new-prop3">написать сообщение</a>
</div> </div>
<div class="col-lg-4"> <div class="col-lg-4">
@ -118,21 +131,25 @@
<script type="text/x-template" class="-portfolio-item-templ"> <script type="text/x-template" class="-portfolio-item-templ">
<div class="col-lg-4"> <div class="col-lg-4">
<div class="insetCol box-sizing disTab"> <div class="insetCol box-sizing disTab">
<div class="imgGal" style="background:rgba(0, 0, 0, 0) url('<%- portfolio.photos[0].img %>') no-repeat scroll center center / cover"> <div class="imgGal"
<a class="open-modal-image" href="<%- portfolio.photos[0].img %>"><div class="imgFigure"></div></a> style="background:rgba(0, 0, 0, 0) url('<%- portfolio.photos[0].img %>') no-repeat scroll center center / cover">
<a class="open-modal-image" href="<%- portfolio.photos[0].img %>">
<div class="imgFigure"></div>
</a>
</div> </div>
</div> </div>
<div class="insetCol2 box-sizing disTab text-center"> <div class="insetCol2 box-sizing disTab text-center">
<a href="<%- portfAbsUrl %>"><%- trunc({length: 50}, portfolio.name) %></a> <a href="<%- portfAbsUrl %>"><%- trunc({length: 50}, portfolio.name) %></a>
</div> </div>
</div> </div>
</script> </script>
</div> </div>
<div class="col-lg-9 col-lg-offset-3 -more-portfolios-btn"> <div class="col-lg-9 col-lg-offset-3 -more-portfolios-btn">
<div class="linkElse"> <div class="linkElse">
<a href="#" onclick="loadMorePortfolios(); return false" class="showElse">показать еще</a> <a href="#" onclick="loadMorePortfolios(); return false" class="showElse">показать
еще</a>
</div> </div>
</div> </div>
</div> </div>
@ -142,10 +159,13 @@
<script type="text/x-template" class="-work-sell-item-templ"> <script type="text/x-template" class="-work-sell-item-templ">
<div class="col-lg-4"> <div class="col-lg-4">
<div class="insetCol box-sizing disTab"> <div class="insetCol box-sizing disTab">
<div class="imgGal" style="background:rgba(0, 0, 0, 0) url('<%- workSell.photos[0].img %>') no-repeat scroll center center / cover ;"> <div class="imgGal"
<a class="open-modal-image" href="<%- workSell.photos[0].img %>"><div class="imgFigure"></div></a> style="background:rgba(0, 0, 0, 0) url('<%- workSell.photos[0].img %>') no-repeat scroll center center / cover ;">
<a class="open-modal-image" href="<%- workSell.photos[0].img %>">
<div class="imgFigure"></div>
</a>
</div> </div>
<div class="cenaImg box-sizing"> <div class="cenaImg box-sizing">
<div class="cenaImgInset"> <div class="cenaImgInset">
<%- workSell.budget %> <i class="fa fa-rub"></i> <%- workSell.budget %> <i class="fa fa-rub"></i>
@ -158,14 +178,15 @@
</div> </div>
</script> </script>
</div> </div>
<div class="col-lg-9 col-lg-offset-3 -more-work-sells-btn"> <div class="col-lg-9 col-lg-offset-3 -more-work-sells-btn">
<div class="linkElse"> <div class="linkElse">
<a href="#" onclick="loadMoreWorkSells(); return false" class="showElse">показать еще</a> <a href="#" onclick="loadMoreWorkSells(); return false" class="showElse">показать
еще</a>
</div> </div>
</div> </div>
</div> </div>
<div id="tab13" class="tab-pane fade"> <div id="tab13" class="tab-pane fade">
{% for review in reviews %} {% for review in reviews %}
<div class="new-comm-44"> <div class="new-comm-44">
@ -173,15 +194,15 @@
<p class="nameComm"> <p class="nameComm">
<a href="#">{{ review.get_sender }}</a> <a href="#">{{ review.get_sender }}</a>
</p> </p>
{% if review.project.deal_type == 'secure_deal' %} {% if review.project.deal_type == 'secure_deal' %}
<span class="dateComm44">Безопасная сделка</span> <span class="dateComm44">Безопасная сделка</span>
{% endif %} {% endif %}
<div class="stars box-sizing"> <div class="stars box-sizing">
<a href="#">положительный отзыв</a> <a href="#">положительный отзыв</a>
</div> </div>
<p class="textComm44"> <p class="textComm44">
{{ review.text|safe }} {{ review.text|safe }}
</p> </p>
@ -194,9 +215,8 @@
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
<div> <div>
{% include 'partials/footer.html' %} {% include 'partials/footer.html' %}
</div> </div>
@ -208,93 +228,93 @@
{% block js_block %} {% block js_block %}
<script type="text/javascript"> <script type="text/javascript">
(function() { (function () {
// Pagination --------------------------------------------------- // Pagination ---------------------------------------------------
var $portfoliosContainer = $('.-portfolios-container').first() var $portfoliosContainer = $('.-portfolios-container').first()
var portfolioItemTempl = _.template($portfoliosContainer.find('.-portfolio-item-templ').first().html()) var portfolioItemTempl = _.template($portfoliosContainer.find('.-portfolio-item-templ').first().html())
var $morePortfBtn = $('.-more-portfolios-btn').first() var $morePortfBtn = $('.-more-portfolios-btn').first()
var portfAbsUrl = '/projects/portfolio/' var portfAbsUrl = '/projects/portfolio/'
var $workSellsContainer = $('.-work-sells-container').first() var $workSellsContainer = $('.-work-sells-container').first()
var workSellItemTempl = _.template($workSellsContainer.find('.-work-sell-item-templ').first().html()) var workSellItemTempl = _.template($workSellsContainer.find('.-work-sell-item-templ').first().html())
var $moreWorkSellsfBtn = $('.-more-work-sells-btn').first() var $moreWorkSellsfBtn = $('.-more-work-sells-btn').first()
var workSellAbsUrl = '/work_sell/' var workSellAbsUrl = '/work_sell/'
var teamId = {{ team.pk }} var teamId =
{{ team.pk }}
var contractorIds = [{{ team.owner.pk }}] var contractorIds = [{{ team.owner.pk }}]
var portfUrl = new URI('/api/portfolios/') var portfUrl = new URI('/api/portfolios/')
var workSellUrl = new URI('/api/work-sells/') var workSellUrl = new URI('/api/work-sells/')
var pageSize = {% if TESTING %}99999{% else %}9{% endif %} var pageSize = {% if TESTING %}99999{% else %}9{% endif %}
$.get('/api/teams/' + teamId + '/').then(function(res) { $.get('/api/teams/' + teamId + '/').then(function (res) {
Array.prototype.push.apply(contractorIds, _.map(function(contractor) { Array.prototype.push.apply(contractorIds, _.map(function (contractor) {
return contractor.id return contractor.id
}, res.contractors)) }, res.contractors))
}) })
.then(loadMorePortfolios) .then(loadMorePortfolios)
.then(loadMoreWorkSells) .then(loadMoreWorkSells)
function loadMorePortfolios() { function loadMorePortfolios() {
var query = portfUrl.query(true) var query = portfUrl.query(true)
portfUrl.setQuery('user__id__in', _.join(',', contractorIds)) portfUrl.setQuery('user__id__in', _.join(',', contractorIds))
portfUrl.setQuery('page_size', pageSize) portfUrl.setQuery('page_size', pageSize)
portfUrl.setQuery('page', query.page ? Number(query.page) + 1 : 1) portfUrl.setQuery('page', query.page ? Number(query.page) + 1 : 1)
$.get(portfUrl.href()) $.get(portfUrl.href())
.then(function(res) { .then(function (res) {
_.each(function(portfolio) { _.each(function (portfolio) {
$portfoliosContainer.append(portfolioItemTempl({ $portfoliosContainer.append(portfolioItemTempl({
portfolio: portfolio, portfolio: portfolio,
portfAbsUrl: portfAbsUrl + portfolio.id + '/', portfAbsUrl: portfAbsUrl + portfolio.id + '/',
trunc: _.truncate, trunc: _.truncate,
})) }))
}, res.results) }, res.results)
if (!res.next) if (!res.next)
$morePortfBtn.css('display', 'none') $morePortfBtn.css('display', 'none')
}) })
.then(function() { .then(function () {
$('.open-modal-image').magnificPopup({type: 'image'}) $('.open-modal-image').magnificPopup({type: 'image'})
}) })
} }
function loadMoreWorkSells() { function loadMoreWorkSells() {
var query = workSellUrl.query(true) var query = workSellUrl.query(true)
workSellUrl.setQuery('team', teamId) workSellUrl.setQuery('team', teamId)
workSellUrl.setQuery('page_size', pageSize) workSellUrl.setQuery('page_size', pageSize)
workSellUrl.setQuery('page', query.page ? Number(query.page) + 1 : 1) workSellUrl.setQuery('page', query.page ? Number(query.page) + 1 : 1)
$.get(workSellUrl.href()).then(function(res) { $.get(workSellUrl.href()).then(function (res) {
_.each(function(ws) { _.each(function (ws) {
$workSellsContainer.append(workSellItemTempl({ $workSellsContainer.append(workSellItemTempl({
workSell: ws, workSell: ws,
workSellAbsUrl: workSellAbsUrl + ws.id + '/', workSellAbsUrl: workSellAbsUrl + ws.id + '/',
trunc: _.truncate, trunc: _.truncate,
})) }))
}, res.results) }, res.results)
if (!res.next) if (!res.next)
$moreWorkSellsfBtn.css('display', 'none') $moreWorkSellsfBtn.css('display', 'none')
}) })
} }
window.loadMorePortfolios = loadMorePortfolios window.loadMorePortfolios = loadMorePortfolios
window.loadMoreWorkSells = loadMoreWorkSells window.loadMoreWorkSells = loadMoreWorkSells
// Persistent Bootstrap tabs -------------------------------------- // Persistent Bootstrap tabs --------------------------------------
$('a[data-toggle="tab"][href="' + window.location.hash + '"]').tab('show') $('a[data-toggle="tab"][href="' + window.location.hash + '"]').tab('show')
$('a[data-toggle="tab"]').on('click', function($evt) { // Better handle "shown.bs.tab" event? $('a[data-toggle="tab"]').on('click', function ($evt) { // Better handle "shown.bs.tab" event?
window.location.hash = $(this).attr('href') window.location.hash = $(this).attr('href')
}) })
}()) }())

@ -13,7 +13,11 @@
<img src="{{ im.url }}" alt="profile-image"> <img src="{{ im.url }}" alt="profile-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="profile-image"> {% if customer.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="profile-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="profile-image">
{% endif %}
{% endif %} {% endif %}
</div> </div>
</div> </div>

@ -6,7 +6,7 @@
{% block head_css %} {% block head_css %}
<style> <style>
.-live-image-avatar-upload-container .-position-relative-parent {position: relative} .-live-image-avatar-upload-container .-position-relative-parent {position: relative}
.-live-image-avatar-upload-container .-live-image-delete { .-live-image-avatar-upload-container .-live-image-delete {
position: absolute; position: absolute;
top: 0; top: 0;
@ -18,67 +18,71 @@
{% block content %} {% block content %}
{% include 'partials/header.html' %} {% include 'partials/header.html' %}
<div class="container mainScore"> <div class="container mainScore">
<div class="row"> <div class="row">
<form action="{% url 'users:user-financial-info-edit' pk=pk %}" method="POST" enctype="multipart/form-data" novalidate> <form action="{% url 'users:user-financial-info-edit' pk=pk %}" method="POST" enctype="multipart/form-data" novalidate>
{% csrf_token %} {% csrf_token %}
{% if request.user.is_customer %} {% if request.user.is_customer %}
<input type="hidden" name="next" value="{% url 'users:customer-profile' pk=pk %}"> <input type="hidden" name="next" value="{% url 'users:customer-profile' pk=pk %}">
{% elif request.user.is_contractor %} {% elif request.user.is_contractor %}
<input type="hidden" name="next" value="{% url 'users:contractor-profile' pk=pk %}"> <input type="hidden" name="next" value="{% url 'users:contractor-profile' pk=pk %}">
{% endif %} {% endif %}
<div class="projectsBlock disTab"> <div class="projectsBlock disTab">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="col-lg-3 divCol3 -live-image-avatar-upload-container"> <div class="col-lg-3 divCol3 -live-image-avatar-upload-container">
<div class="avatar"> <div class="avatar">
<div class="avatarInset -position-relative-parent"> <div class="avatarInset -position-relative-parent">
<a href="#" onclick="return false" class="btn close -live-image-delete" style="display: none">&times;</a> <a href="#" onclick="return false" class="btn close -live-image-delete" style="display: none">&times;</a>
{% if request.user.avatar %} {% if request.user.avatar %}
{% thumbnail request.user.avatar "235x224" crop="center" as avatar %} {% thumbnail request.user.avatar "235x224" crop="center" as avatar %}
<img src="{{ avatar.url }}" alt="profile-image" class="-avatar-image"> <img src="{{ avatar.url }}" alt="profile-image" class="-avatar-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="profile-image" class="-avatar-image"> {% if request.user.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="profile-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="profile-image">
{% endif %}
{% endif %} {% endif %}
</div> </div>
</div> </div>
<div class="menuUser upload-img disTab"> <div class="menuUser upload-img disTab">
<div class="upload2 up-l1"> <div class="upload2 up-l1">
<input type="file" name="image" class="-live-image-upload"> <input type="file" name="image" class="-live-image-upload">
<p>Загрузить фотографию</p> <p>Загрузить фотографию</p>
</div> </div>
</div> </div>
<div {% if not TESTING %}style="display: none"{% endif %}> <div {% if not TESTING %}style="display: none"{% endif %}>
<input type="text" name="live_image" class="-live-image-id"> <input type="text" name="live_image" class="-live-image-id">
</div> </div>
</div> </div>
<div class="col-lg-9 divCol9"> <div class="col-lg-9 divCol9">
<div class="col-lg-4"> <div class="col-lg-4">
<p class="name-edit-p">ФИО</p> <p class="name-edit-p">ФИО</p>
<input type="text" value="{{ form.last_name.value }}" name="{{ form.last_name.html_name }}" class="box-sizing inp-edit"> <input type="text" value="{{ form.last_name.value }}" name="{{ form.last_name.html_name }}" class="box-sizing inp-edit">
<input type="text" value="{{ form.first_name.value }}" name="{{ form.first_name.html_name }}" class="box-sizing inp-edit"> <input type="text" value="{{ form.first_name.value }}" name="{{ form.first_name.html_name }}" class="box-sizing inp-edit">
<input type="text" value="{{ form.patronym.value }}" name="{{ form.patronym.html_name }}" class="box-sizing inp-edit"> <input type="text" value="{{ form.patronym.value }}" name="{{ form.patronym.html_name }}" class="box-sizing inp-edit">
</div> </div>
{% if request.user.is_contractor %} {% if request.user.is_contractor %}
<div class="col-lg-4"> <div class="col-lg-4">
<p class="name-edit-p">Специализации</p> <p class="name-edit-p">Специализации</p>
<div id="simpleSpecContainer"> <div id="simpleSpecContainer">
<div class="polsF1 pols-edit disTab -simple-spec-widget" style="display: none"> <div class="polsF1 pols-edit disTab -simple-spec-widget" style="display: none">
<input type="hidden" class="-simple-spec-select" style="width: 100%"> <input type="hidden" class="-simple-spec-select" style="width: 100%">
<input type="hidden" class="-chosen-simple-spec-id" name="{{ form.contractor_specializations.html_name }}"> <input type="hidden" class="-chosen-simple-spec-id" name="{{ form.contractor_specializations.html_name }}">
</div> </div>
{% for spec_id in form.contractor_specializations.value %} {% for spec_id in form.contractor_specializations.value %}
<div class="polsF1 pols-edit disTab -simple-spec-widget"> <div class="polsF1 pols-edit disTab -simple-spec-widget">
<input type="hidden" class="-simple-spec-select" style="width: 100%"> <input type="hidden" class="-simple-spec-select" style="width: 100%">
@ -86,28 +90,28 @@
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
<a href="#" onclick="return false" class="add-edit" id="addSpec"> <a href="#" onclick="return false" class="add-edit" id="addSpec">
Добавить еще Добавить еще
</a> </a>
</div> </div>
{% endif %} {% endif %}
<div class="col-lg-4"> <div class="col-lg-4">
<p class="name-edit-p">Местоположение</p> <p class="name-edit-p">Местоположение</p>
<div class="polsF1 pols-edit disTab"> <div class="polsF1 pols-edit disTab">
<div><input type="hidden" class="-location-select -location-select-country" style="width: 100%"></div> <div><input type="hidden" class="-location-select -location-select-country" style="width: 100%"></div>
<div><input type="hidden" class="-location-select -location-select-region" style="width: 100%"></div> <div><input type="hidden" class="-location-select -location-select-region" style="width: 100%"></div>
<div><input type="hidden" class="-location-select -location-select-city" style="width: 100%"></div> <div><input type="hidden" class="-location-select -location-select-city" style="width: 100%"></div>
<input type="hidden" id="chosenLocationId" name="{{ form.location.html_name }}" value="{{ form.location.value }}"> <input type="hidden" id="chosenLocationId" name="{{ form.location.html_name }}" value="{{ form.location.value }}">
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="buttonGP btn-edit disTab"> <div class="buttonGP btn-edit disTab">
<div class="btn-group valProject valProject2" role="group"> <div class="btn-group valProject valProject2" role="group">
<a href="{% url 'users:user-profile-edit' pk=pk %}" class="btn btn-default">Общая информация</a> <a href="{% url 'users:user-profile-edit' pk=pk %}" class="btn btn-default">Общая информация</a>
@ -117,7 +121,7 @@
{% endif %} {% endif %}
</div> </div>
</div> </div>
<div class="col-lg-12 col12 new-filter"> <div class="col-lg-12 col12 new-filter">
<div class="filter clearfix"> <div class="filter clearfix">
<div class="titleF1 disTab"> <div class="titleF1 disTab">
@ -125,7 +129,7 @@
<div class="col-lg-3">Дата рождения <span style="color: red">{{ fin_info_form.date_of_birth.errors.as_text }}</span></div> <div class="col-lg-3">Дата рождения <span style="color: red">{{ fin_info_form.date_of_birth.errors.as_text }}</span></div>
<div class="col-lg-3">Телефон <span style="color: red">{{ fin_info_form.phone.errors.as_text }}</span></div> <div class="col-lg-3">Телефон <span style="color: red">{{ fin_info_form.phone.errors.as_text }}</span></div>
</div> </div>
<div class="polsF1 disTab"> <div class="polsF1 disTab">
<div class="col-lg-6"> <div class="col-lg-6">
<input type="text" class="searchInp box-sizing" value="{{ fin_info_form.fio.value }}" name="{{ fin_info_form.fio.html_name }}"> <input type="text" class="searchInp box-sizing" value="{{ fin_info_form.fio.value }}" name="{{ fin_info_form.fio.html_name }}">
@ -137,11 +141,11 @@
<input type="text" class="box-sizing surr surr2" value="{{ fin_info_form.phone.value }}" name="{{ fin_info_form.phone.html_name }}"> <input type="text" class="box-sizing surr surr2" value="{{ fin_info_form.phone.value }}" name="{{ fin_info_form.phone.html_name }}">
</div> </div>
</div> </div>
<div class="titleF1 titleFFE disTab"> <div class="titleF1 titleFFE disTab">
<div class="col-lg-12">Резиденство <span style="color: red">{{ fin_info_form.residency.errors.as_text }}</span></div> <div class="col-lg-12">Резиденство <span style="color: red">{{ fin_info_form.residency.errors.as_text }}</span></div>
</div> </div>
<div class="searchF1 polsF1 polsFF radio-afer"> <div class="searchF1 polsF1 polsFF radio-afer">
{% for residency in fin_info_form.residency %} {% for residency in fin_info_form.residency %}
<div class="col-lg-3"> <div class="col-lg-3">
@ -152,11 +156,11 @@
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
<div class="titleF1 titleFFE disTab"> <div class="titleF1 titleFFE disTab">
<div class="col-lg-12">Юридический статус <span style="color: red">{{ fin_info_form.legal_status.errors.as_text }}</span></div> <div class="col-lg-12">Юридический статус <span style="color: red">{{ fin_info_form.legal_status.errors.as_text }}</span></div>
</div> </div>
<div class="searchF1 polsF1 polsFF radio-afer new-doubt"> <div class="searchF1 polsF1 polsFF radio-afer new-doubt">
{% for lstatus in fin_info_form.legal_status %} {% for lstatus in fin_info_form.legal_status %}
<div class="col-lg-3"> <div class="col-lg-3">
@ -167,18 +171,18 @@
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
<div class="titleF1 disTab"> <div class="titleF1 disTab">
<div class="col-lg-6"> <div class="col-lg-6">
Серия и номер паспорта Серия и номер паспорта
<span style="color: red">{{ fin_info_form.passport_series.errors.as_text }}</span> <span style="color: red">{{ fin_info_form.passport_series.errors.as_text }}</span>
<span style="color: red">{{ fin_info_form.passport_number.errors.as_text }}</span> <span style="color: red">{{ fin_info_form.passport_number.errors.as_text }}</span>
</div> </div>
<div class="col-lg-3">Код подразделения <span style="color: red">{{ fin_info_form.subdivision_code.errors.as_text }}</span></div> <div class="col-lg-3">Код подразделения <span style="color: red">{{ fin_info_form.subdivision_code.errors.as_text }}</span></div>
<div class="col-lg-3">Дата выдачи <span style="color: red">{{ fin_info_form.passport_issue_date.errors.as_text }}</span></div> <div class="col-lg-3">Дата выдачи <span style="color: red">{{ fin_info_form.passport_issue_date.errors.as_text }}</span></div>
</div> </div>
<div class="polsF1 disTab new-doubt"> <div class="polsF1 disTab new-doubt">
<div class="col-lg-3"> <div class="col-lg-3">
<input type="text" value="{{ fin_info_form.passport_series.value }}" class="box-sizing surr surr2" name="{{ fin_info_form.passport_series.html_name }}" placeholder="КН"> <input type="text" value="{{ fin_info_form.passport_series.value }}" class="box-sizing surr surr2" name="{{ fin_info_form.passport_series.html_name }}" placeholder="КН">
@ -193,34 +197,34 @@
<input type="text" value="{{ fin_info_form.passport_issue_date.value|date:"d.m.Y" }}" name="{{ fin_info_form.passport_issue_date.html_name }}" class="box-sizing surr surr2 datepicker" placeholder="11.12.1994"> <input type="text" value="{{ fin_info_form.passport_issue_date.value|date:"d.m.Y" }}" name="{{ fin_info_form.passport_issue_date.html_name }}" class="box-sizing surr surr2 datepicker" placeholder="11.12.1994">
</div> </div>
</div> </div>
<div class="titleF1 disTab"> <div class="titleF1 disTab">
<div class="col-lg-12">Кем выдан <span style="color: red">{{ fin_info_form.passport_issued_by.errors.as_text }}</span></div> <div class="col-lg-12">Кем выдан <span style="color: red">{{ fin_info_form.passport_issued_by.errors.as_text }}</span></div>
</div> </div>
<div class="polsF1 disTab new-doubt"> <div class="polsF1 disTab new-doubt">
<div class="col-lg-12"> <div class="col-lg-12">
<input type="text" value="{{ fin_info_form.passport_issued_by.value }}" class="searchInp box-sizing" name="{{ fin_info_form.passport_issued_by.html_name }}"> <input type="text" value="{{ fin_info_form.passport_issued_by.value }}" class="searchInp box-sizing" name="{{ fin_info_form.passport_issued_by.html_name }}">
</div> </div>
</div> </div>
<div class="titleF1 disTab"> <div class="titleF1 disTab">
<div class="col-lg-12">Почтовый адрес <span style="color: red">{{ fin_info_form.address.errors.as_text }}</span></div> <div class="col-lg-12">Почтовый адрес <span style="color: red">{{ fin_info_form.address.errors.as_text }}</span></div>
</div> </div>
<div class="polsF1 disTab new-doubt"> <div class="polsF1 disTab new-doubt">
<div class="col-lg-12"> <div class="col-lg-12">
<input type="text" value="{{ fin_info_form.address.value }}" class="searchInp box-sizing" name="{{ fin_info_form.address.html_name }}"> <input type="text" value="{{ fin_info_form.address.value }}" class="searchInp box-sizing" name="{{ fin_info_form.address.html_name }}">
</div> </div>
</div> </div>
<div class="titleF1 disTab"> <div class="titleF1 disTab">
<div class="col-lg-3">ИНН <span style="color: red">{{ fin_info_form.inn.errors.as_text }}</span></div> <div class="col-lg-3">ИНН <span style="color: red">{{ fin_info_form.inn.errors.as_text }}</span></div>
<div class="col-lg-3">Яндекс.Деньги <span style="color: red">{{ fin_info_form.yandex_money.errors.as_text }}</span></div> <div class="col-lg-3">Яндекс.Деньги <span style="color: red">{{ fin_info_form.yandex_money.errors.as_text }}</span></div>
<div class="col-lg-3">Номер карты <span style="color: red">{{ fin_info_form.credit_card_number.errors.as_text }}</span></div> <div class="col-lg-3">Номер карты <span style="color: red">{{ fin_info_form.credit_card_number.errors.as_text }}</span></div>
<div class="col-lg-3">Скан-копии страниц паспорта <span style="color: red">{{ fin_info_form.passport_scan.errors.as_text }}</span></div> <div class="col-lg-3">Скан-копии страниц паспорта <span style="color: red">{{ fin_info_form.passport_scan.errors.as_text }}</span></div>
</div> </div>
<div class="polsF1 disTab new-doubt"> <div class="polsF1 disTab new-doubt">
<div class="col-lg-3"> <div class="col-lg-3">
<input type="text" value="{{ fin_info_form.inn.value }}" class="box-sizing surr surr2" name="{{ fin_info_form.inn.html_name }}"> <input type="text" value="{{ fin_info_form.inn.value }}" class="box-sizing surr surr2" name="{{ fin_info_form.inn.html_name }}">
@ -243,14 +247,14 @@
</div> </div>
</div> </div>
</div> </div>
<div class="searchF1 polsF1 polsFF links-filter"> <div class="searchF1 polsF1 polsFF links-filter">
<input class="btn-submit-link" type="submit" value="Сохранить"> <input class="btn-submit-link" type="submit" value="Сохранить">
</div> </div>
</div> </div>
</div> </div>
</form> </form>
{% include 'partials/footer.html' %} {% include 'partials/footer.html' %}
</div> </div>
</div> </div>

@ -37,7 +37,11 @@
<img src="{{ avatar.url }}" alt="profile-image" class="-avatar-image"> <img src="{{ avatar.url }}" alt="profile-image" class="-avatar-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" width="208" height="208" alt="profile-image" class="-avatar-image"> {% if request.user.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="profile-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="profile-image">
{% endif %}
{# {% with "/static/img/profile.jpg" as path %}#} {# {% with "/static/img/profile.jpg" as path %}#}
{# {% thumbnail path "100x100" crop="center" as im %}#} {# {% thumbnail path "100x100" crop="center" as im %}#}
{# <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt="profile-image" class="-avatar-image">#} {# <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt="profile-image" class="-avatar-image">#}

@ -42,7 +42,11 @@
<img src="{{ avatar.url }}" alt="profile-image" class="-avatar-image"> <img src="{{ avatar.url }}" alt="profile-image" class="-avatar-image">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}
<img src="{% static 'img/profile.jpg' %}" alt="profile-image" class="-avatar-image"> {% if request.user.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="profile-image">
{% else %}
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="profile-image">
{% endif %}
{% endif %} {% endif %}
</div> </div>
</div> </div>

Loading…
Cancel
Save