Merge branch 'PR-14-mod'

remotes/origin/PR-58
booblegum 9 years ago
commit fb0931cb22
  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. 18
      templates/partials/header.html
  8. 14
      templates/partials/trash/header.html
  9. 12
      users/templates/contractor_filter.html
  10. 25
      users/templates/contractor_office.html
  11. 234
      users/templates/contractor_profile.html
  12. 6
      users/templates/partials/inc-customer_profile-info.html
  13. 62
      users/templates/team_profile.html
  14. 6
      users/templates/trash/customer_profile_info_block.html
  15. 6
      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);
}
.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 {
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 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('show');
$("#btnYes").click(function (e) {
@ -138,6 +141,7 @@ function dialog (message, yesCallback, notCallback) {
var currentHash = URI(location.href).hash();
$('a[data-toggle="tab"]').on('show.bs.tab', function (e) {
console.log("TAB!");
var activeTab = $(this).attr('href').substring(1);
var liveHash = URI(location.href).hash();
@ -155,7 +159,6 @@ function dialog (message, yesCallback, notCallback) {
case 'tab2':
console.log("tab2");
// /api/message?recipent__id=5
updateCounts();
setTimeout(function () {
if (liveHash.indexOf("#order") == 0) {

@ -28,7 +28,11 @@
<img src="{{ im.url }}" alt="mess-image">
{% endthumbnail %}
{% 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 %}
</div>
<p class="nameMess">

@ -41,7 +41,11 @@
<img src="{{ im.url }}" alt="execitor-image">
{% endthumbnail %}
{% 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 %}
</div>
</a>
@ -235,7 +239,11 @@
<img src="{{ avatar.url }}" alt="execitor-image">
{% endthumbnail %}
{% 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 %}
</div>
</a>
@ -252,7 +260,11 @@
<img src="{{ avatar.url }}" alt="execitor-image">
{% endthumbnail %}
{% 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 %}
</div>
</a>
@ -613,7 +625,11 @@
<img src="{{ avatar.url }}" alt="execitor-image">
{% endthumbnail %}
{% 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 %}
</div>
</a>
@ -630,7 +646,11 @@
<img src="{{ avatar.url }}" alt="execitor-image">
{% endthumbnail %}
{% 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 %}
</div>
</a>
@ -827,7 +847,11 @@
<img src="{{ avatar.url }}" alt="execitor-image">
{% endthumbnail %}
{% 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 %}
</div>
</a>
@ -844,7 +868,11 @@
<img src="{{ avatar.url }}" alt="execitor-image">
{% endthumbnail %}
{% 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 %}
</div>
</a>
@ -1044,7 +1072,11 @@
<img src="{{ avatar.url }}" alt="execitor-image">
{% endthumbnail %}
{% 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 %}
</div>
</a>
@ -1061,7 +1093,11 @@
<img src="{{ avatar.url }}" alt="execitor-image">
{% endthumbnail %}
{% 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 %}
</div>
</a>

@ -27,7 +27,7 @@
<div class="user-info">
<a href="{% url 'wallets:score-detail' pk=request.user.pk %}"
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>
<a href="{% url 'chat:chat-user' %}" class="icon_chat js-all-messages">
{{ new_messages_count| max_count:99 }}
@ -37,27 +37,19 @@
{% endif %}
<li>
<div class="imgProfile">
{% if request.user.is_contractor %}
<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 %}
<img src="{% static 'img/profile.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 %}
{% if request.user.gender == "female" %}
<img src="{% static 'img/avatars/avatar-female.jpg' %}" alt="profile-image">
{% else %}
<img src="{% static 'img/profile.jpg' %}" alt="profile-image">
<img src="{% static 'img/avatars/avatar-male.jpg' %}" alt="profile-image">
{% endif %}
</a>
{% endif %}
</a>
</div> <!-- //imgProfile -->
</li>
{% if request.user.is_authenticated %}

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

@ -195,7 +195,11 @@
<img src="{{ avatar.url }}" alt="profile-image">
{% endthumbnail %}
{% 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 %}
</div>
</a>
@ -316,7 +320,11 @@
<img src="{{ avatar.url }}" alt="profile-image">
{% endthumbnail %}
{% 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 %}
</div>
</a>

@ -82,8 +82,15 @@
src="{{ im.url }}" alt="profile-image"></a>
{% endthumbnail %}
{% else %}
<a href="{% url 'users:team-profile' pk=contractor.team.pk %}"><img
src="{% static 'img/profile.jpg' %}" alt="profile-image"></a>
<a href="{% url 'users:team-profile' pk=contractor.team.pk %}">
{% 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 %}
</div>
</div>
@ -105,7 +112,13 @@
<img src="{{ im.url }}" alt="mess-image">
{% endthumbnail %}
{% 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 %}
</div>
@ -300,8 +313,10 @@
var $moreWorkSellsfBtn = $('.-more-work-sells-btn').first()
var workSellAbsUrl = '/work_sell/'
var contractorId ={{ contractor.pk }}
var teamId ={{ contractor.team.pk }}
var contractorId =
{{ contractor.pk }}
var teamId =
{{ contractor.team.pk }}
var contractorIds = [contractorId]
var portfUrl = new URI('/api/portfolios/')

@ -18,7 +18,13 @@
<img src="{{ im.url }}" alt="profile-image">
{% endthumbnail %}
{% 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 %}
</div>
</div>
@ -71,7 +77,9 @@
<ul>
{% for team in contractor.teams.all %}
<li><a href="{% url 'users:team-profile' pk=team.pk %}">{{ team.name }}</a><span></span></li>
<li>
<a href="{% url 'users:team-profile' pk=team.pk %}">{{ team.name }}</a><span></span>
</li>
{% endfor %}
</ul>
{% endif %}
@ -84,7 +92,7 @@
</p>
<p class="cityUser">{{ contractor.get_location }}</p>
<p class="navv">На сайте c {{ contractor.created|date:"d M Y"}}</p>
<p class="navv">На сайте c {{ contractor.created|date:"d M Y" }}</p>
{% if contractor.contractor_status == 'free' %}
<div class="statusUser">Свободен</div>
@ -93,7 +101,8 @@
{% endif %}
{% if request.user.is_authenticated %}
<a href="#" data-toggle="modal" data-target="#contact-contactor-modal" class="showCon">показать контакты</a>
<a href="#" data-toggle="modal" data-target="#contact-contactor-modal" class="showCon">показать
контакты</a>
{% endif %}
</div>
<div class="col-lg-4">
@ -115,7 +124,8 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">&times;</button>
<h4 class="modal-title">Контакты владельца </h4>
</div>
<div class="modal-body">
@ -167,23 +177,6 @@
</div>
<div class="tab-content">
<div id="tab11" class="tab-pane fade in active">
{% if contractor.pk == request.user.pk %}
@ -197,7 +190,8 @@
<div class="modal-dialog" style="width:900px;">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">&times;</button>
<h4 class="modal-title">Добавить портфолио</h4>
</div>
@ -211,8 +205,12 @@
<script type="text/x-template" class="-portfolio-item-templ">
<div class="col-lg-4">
<div class="insetCol box-sizing disTab">
<div class="imgGal" style="background:rgba(0, 0, 0, 0) url('<%- portfolio.photos[0] && portfolio.photos[0].img %>') no-repeat scroll center center / cover">
<a class="open-modal-image" href="<%- portfolio.photos[0] && portfolio.photos[0].img %>"><div class="imgFigure"></div></a>
<div class="imgGal"
style="background:rgba(0, 0, 0, 0) url('<%- portfolio.photos[0] && portfolio.photos[0].img %>') no-repeat scroll center center / cover">
<a class="open-modal-image"
href="<%- portfolio.photos[0] && portfolio.photos[0].img %>">
<div class="imgFigure"></div>
</a>
</div>
</div>
@ -230,7 +228,9 @@
<form action="<%- portfTrashUrl %>" method="POST" novalidate>
{% csrf_token %}
<input type="hidden" name="next" value="{{ request.path }}">
<a href="#" onclick="$(this).closest('form').submit(); return false"><i class="fa fa-times"></i></a>
<a href="#"
onclick="$(this).closest('form').submit(); return false"><i
class="fa fa-times"></i></a>
</form>
</div>
</div>
@ -242,7 +242,8 @@
<div class="col-lg-9 col-lg-offset-3 -more-portfolios-btn">
<div class="linkElse">
<a href="#" onclick="loadMorePortfolios(); return false" class="showElse">показать еще</a>
<a href="#" onclick="loadMorePortfolios(); return false" class="showElse">показать
еще</a>
</div>
</div>
</div>
@ -251,21 +252,21 @@
{% if contractor.pk == request.user.pk %}
<div class="col-lg-9">
<p class="addWork">
<a href="{% url 'work_sell:create'%}">Добавить проект</a>
<a href="{% url 'work_sell:create' %}">Добавить проект</a>
</p>
</div>
{# <div id="worksell-modal" class="modal fade">#}
{# <div class="modal-dialog" style="width: 900px;">#}
{# <div class="modal-content">#}
{# <div class="modal-header">#}
{# <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>#}
{# <h4 class="modal-title">Добавить готовую работу</h4>#}
{# </div>#}
{##}
{# {% include 'worksell_create_form.html' %}#}
{# </div>#}
{# </div>#}
{# </div>#}
{# <div id="worksell-modal" class="modal fade">#}
{# <div class="modal-dialog" style="width: 900px;">#}
{# <div class="modal-content">#}
{# <div class="modal-header">#}
{# <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>#}
{# <h4 class="modal-title">Добавить готовую работу</h4>#}
{# </div>#}
{##}
{# {% include 'worksell_create_form.html' %}#}
{# </div>#}
{# </div>#}
{# </div>#}
{% endif %}
<div class="galleryWork2 disTab -work-sells-container">
@ -273,8 +274,12 @@
<div class="col-lg-4">
<div class="insetCol box-sizing disTab">
<a href="#">
<div class="imgGal" style="background:rgba(0, 0, 0, 0) url('<%- workSell.photos[0] && workSell.photos[0].img %>') no-repeat scroll center center / cover">
<a class="open-modal-image" href="<%- workSell.photos[0] && workSell.photos[0].img %>"><div class="imgFigure"></div></a>
<div class="imgGal"
style="background:rgba(0, 0, 0, 0) url('<%- workSell.photos[0] && workSell.photos[0].img %>') no-repeat scroll center center / cover">
<a class="open-modal-image"
href="<%- workSell.photos[0] && workSell.photos[0].img %>">
<div class="imgFigure"></div>
</a>
</div>
</a>
@ -299,7 +304,9 @@
<form action="<%- workSellTrashUrl %>" method="POST" novalidate>
{% csrf_token %}
<input type="hidden" name="next" value="{{ request.path }}">
<a href="#" onclick="$(this).closest('form').submit(); return false"><i class="fa fa-times"></i></a>
<a href="#"
onclick="$(this).closest('form').submit(); return false"><i
class="fa fa-times"></i></a>
</form>
</div>
</div>
@ -311,27 +318,13 @@
<div class="col-lg-9 col-lg-offset-3 -more-work-sells-btn">
<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 id="tab13" class="tab-pane fade">
<div class="col-lg-9">
{% if contractor == request.user %}
@ -344,7 +337,8 @@
<p>Загрузить резюме</p>
</div>
<div class="upload2 up-l2" id="remove-resume-file" style="display:{% if contractor.contractor_resume.resume_file %}block;{% else %}none;{% endif %}">
<div class="upload2 up-l2" id="remove-resume-file"
style="display:{% if contractor.contractor_resume.resume_file %}block;{% else %}none;{% endif %}">
<p style="margin:0;">Удалить резюме</p>
</div>
</form>
@ -366,7 +360,8 @@
{% if contractor.contractor_resume.resume_file %}
<a style="display:block;"
href="{{ contractor.contractor_resume.resume_file.url }}" class="download-summ">
href="{{ contractor.contractor_resume.resume_file.url }}"
class="download-summ">
скачать резюме
</a>
{% endif %}
@ -403,7 +398,8 @@
</div>
<div class="col-lg-12 wr-inset-pluss">
{% if contractor.pk == request.user.pk %}
<a href="#" data-toggle="modal" data-target="#resume-text-edit" style="float: left; margin-right: 10px;">
<a href="#" data-toggle="modal" data-target="#resume-text-edit"
style="float: left; margin-right: 10px;">
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
</a>
{% endif %}
@ -418,18 +414,21 @@
<div class="modal-dialog" style="width:900px;">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">&times;</button>
<h4 class="modal-title">Редактировать текст резюме</h4>
</div>
<div class="modal-body">
<div style="height: 180px;">
<form id="resume-edit-form">
<div class="textAreaBlock2 text-nn box-sizing disTab">
<textarea name="text" id="text-new" class="-ckeditor">{{ contractor.contractor_resume.text }}</textarea>
<textarea name="text" id="text-new"
class="-ckeditor">{{ contractor.contractor_resume.text }}</textarea>
</div>
<div class="searchF1 polsF1 polsFF links-filter">
<input class="btn-submit-link" type="submit" value="Сохранить">
<input class="btn-submit-link" type="submit"
value="Сохранить">
</div>
</form>
</div>
@ -458,7 +457,8 @@
{% thumbnail diplom.img "210x334" crop="center" as im %}
<div class="imgGal"
style="background: url('{{ im.url }}') no-repeat center;">
<a href="{{ diplom.img.url }}" class='open-modal-image'>
<a href="{{ diplom.img.url }}"
class='open-modal-image'>
<div class="imgFigure"></div>
</a>
</div>
@ -471,7 +471,8 @@
{% if contractor.pk == request.user.pk %}
<div class="buttonsImg" distab="">
<div class="insetBI insetBI2 delete-resume-file" data-id="{{ diplom.pk }}">
<div class="insetBI insetBI2 delete-resume-file"
data-id="{{ diplom.pk }}">
<i class="fa fa-times"></i>
</div>
</div>
@ -498,7 +499,8 @@
{% thumbnail cro.img "210x334" crop="center" as im %}
<div class="imgGal"
style="background: url('{{ im.url }}') no-repeat center;">
<a href="{{ cro.img.url }}" class='open-modal-image'>
<a href="{{ cro.img.url }}"
class='open-modal-image'>
<div class="imgFigure"></div>
</a>
</div>
@ -511,7 +513,8 @@
{% if contractor.pk == request.user.pk %}
<div class="buttonsImg" distab="">
<div class="insetBI insetBI2 delete-resume-file" data-id="{{ cro.pk }}">
<div class="insetBI insetBI2 delete-resume-file"
data-id="{{ cro.pk }}">
<i class="fa fa-times"></i>
</div>
</div>
@ -569,7 +572,8 @@
<script src='{% static "lib/ckeditor/adapters/jquery.js" %}'></script>
<script>
;(function() {
;
(function () {
// Pagination ---------------------------------------------------
@ -587,8 +591,10 @@
var workSellEditUrl = '/work_sell/%id%/edit/'
var workSellTrashUrl = '/work_sell/%id%/trash/'
var contractorId = {{ contractor.pk }}
var authedContractorId{% if request.user.is_authenticated %} = {{ request.user.pk }}{% endif %}
var contractorId =
{{ contractor.pk }}
var authedContractorId{% if request.user.is_authenticated %} =
{{ request.user.pk }}{% endif %}
var portfUrl = new URI('/api/portfolios/')
var workSellUrl = new URI('/api/work-sells/')
@ -602,8 +608,8 @@
portfUrl.setQuery('page', query.page ? Number(query.page) + 1 : 1)
$.get(portfUrl.href())
.then(function(res) {
_.each(function(portfolio) {
.then(function (res) {
_.each(function (portfolio) {
$portfoliosContainer.append(portfolioItemTempl({
portfolio: portfolio,
portfAbsUrl: _.replace('%id%', portfolio.id, portfAbsUrl),
@ -619,7 +625,7 @@
$morePortfBtn.css('display', 'none')
})
.then(function() {
.then(function () {
$('.open-modal-image').magnificPopup({type: 'image'})
})
}
@ -632,8 +638,8 @@
workSellUrl.setQuery('page', query.page ? Number(query.page) + 1 : 1)
$.get(workSellUrl.href())
.then(function(res) {
_.each(function(ws) {
.then(function (res) {
_.each(function (ws) {
$workSellsContainer.append(workSellItemTempl({
workSell: ws,
workSellAbsUrl: _.replace('%id%', ws.id, workSellAbsUrl),
@ -649,7 +655,7 @@
$moreWorkSellsfBtn.css('display', 'none')
})
.then(function() {
.then(function () {
$('.open-modal-image').magnificPopup({type: 'image'})
})
}
@ -661,35 +667,32 @@
loadMoreWorkSells()
// Persistent Bootstrap tabs --------------------------------------
$('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')
})
// A wysiwyg editor ----------------------------------------------
$('textarea.-ckeditor').first().ckeditor()
// Team invitation -----------------------------------------------
{% if contractor.pk != request.user.pk and request.user.is_contractor and request.user.has_team %}
var createTeamInvitationUrl = format('/users/create-team-invitation/%s/', {{ contractor.pk }})
$('.-team-invitation').first().on('click', function($evt) {
$('.-team-invitation').first().on('click', function ($evt) {
var $inviteBtn = $(this)
$.post(createTeamInvitationUrl).then(function(res) {
$.post(createTeamInvitationUrl).then(function (res) {
if (res.status === 'success') {
socketMain.add_message({
format_type: 'add_message_contact',
@ -724,7 +727,7 @@
var projectOrderChatUrl_ = '/chat/#order%orderId%'
$projectSelectionModal.on('shown.bs.modal', function($evt) {
$projectSelectionModal.on('shown.bs.modal', function ($evt) {
var $that = $(this)
var $modalOpenButton = $($evt.relatedTarget)
@ -736,7 +739,7 @@
})
$projectSelectionModal.find('.-action-button').first().on('click', function($evt) {
$projectSelectionModal.find('.-action-button').first().on('click', function ($evt) {
var $projectSelect = $projectSelectionModal.find('.-project-select').first()
var $modalOpenButton = $projectSelectionModal.data('modalOpenButton')
var contractorId = $modalOpenButton.data('contractorId')
@ -749,7 +752,7 @@
if (project.order.contractor && project.order.contractor.id === contractorId) {
window.location.href = projectOrderChatUrl
} else {
var msg = 'Вам предлагается проект <a class="message_connect" href="http://{{ request.get_host }}' + projectUrl +'">Перейти к проекту</a>'
var msg = 'Вам предлагается проект <a class="message_connect" href="http://{{ request.get_host }}' + projectUrl + '">Перейти к проекту</a>'
socketMain.add_message({
format_type: 'add_message_contact',
@ -767,7 +770,7 @@
})
$projectSelectionModal.on('hidden.bs.modal', function($evt) {
$projectSelectionModal.on('hidden.bs.modal', function ($evt) {
$(this).find('.-project-select').first().select2('destroy')
})
{% endif %}
@ -816,22 +819,22 @@
});
$("#diplom-cro-gallery").on('click', '.delete-resume-file',function(e){
$("#diplom-cro-gallery").on('click', '.delete-resume-file', function (e) {
e.preventDefault();
var _this = $(this);
var deleteResumeUrl = '/api/contractorresumefiles/' + $(this).attr('data-id') + '/';
$.ajax({
url:deleteResumeUrl,
url: deleteResumeUrl,
type: 'DELETE',
beforeSend: function (xhr) {
xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'))
},
success: function(json){
success: function (json) {
_this.parent().parent().parent().remove();
console.log(json);
},
error: function(jqXHR, e){
error: function (jqXHR, e) {
console.log(jqXHR.statusCode);
}
});
@ -895,38 +898,38 @@
var url = '/work_sell/basic/';
var csrftoken = $.cookie('csrftoken');
$("body").on("click","#remove-resume-file", function(e) {
$("body").on("click", "#remove-resume-file", function (e) {
e.preventDefault();
var _this = $(this);
$.ajax({
url:'/api/contractorresume/{{ contractor.contractor_resume.pk }}/',
method:'PUT',
url: '/api/contractorresume/{{ contractor.contractor_resume.pk }}/',
method: 'PUT',
beforeSend: function (xhr) {
xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'));
},
data: {resume_file: null},
cache: false,
dataType: 'json',
success: function(data){
success: function (data) {
$("#resume-success").html("Файл для резюме удален!");
$(_this).css('display','none');
$('.download-summ').css('display','none');
$(_this).css('display', 'none');
$('.download-summ').css('display', 'none');
console.log(data);
},
error: function(jqXHR){
error: function (jqXHR) {
console.log(jqXHR);
}
});
});
$("#upload-resume").on('change',function(e){
$("#upload-resume").on('change', function (e) {
$("#resume-success").html("");
var formData = new FormData();
formData.append('resume_file', e.target.files[0]);
var file = e.target.files[0]
var allowedExts = ['.pdf','.doc','.docx','.xml','.odt','.uot','.dot','.rtf','.txt','.uop','.pptx','.odp','.html','.jpg','.jpeg','.tiff','.png']
var allowedExts = ['.pdf', '.doc', '.docx', '.xml', '.odt', '.uot', '.dot', '.rtf', '.txt', '.uop', '.pptx', '.odp', '.html', '.jpg', '.jpeg', '.tiff', '.png']
if (!_.includes(path.extname(file.name), allowedExts)) {
alert('Файл не подходит. Выберите документ')
@ -934,8 +937,8 @@
}
$.ajax({
url:'/api/contractorresume/{{ contractor.contractor_resume.pk }}/',
method:'PUT',
url: '/api/contractorresume/{{ contractor.contractor_resume.pk }}/',
method: 'PUT',
beforeSend: function (xhr) {
xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'));
},
@ -944,18 +947,18 @@
dataType: 'json',
processData: false,
contentType: false,
success: function(data){
success: function (data) {
$("#resume-success").html("Файл для резюме успешно загружен!");
var downloadSumm = $(".download-summ");
if(downloadSumm.length>0){
downloadSumm.css('display','block').attr('href',data.resume_file);
}else {
$('<a href="' + data.resume_file +'" class="download-summ">скачать резюме</a>').insertAfter('#resume-success');
if (downloadSumm.length > 0) {
downloadSumm.css('display', 'block').attr('href', data.resume_file);
} else {
$('<a href="' + data.resume_file + '" class="download-summ">скачать резюме</a>').insertAfter('#resume-success');
}
$("#remove-resume-file").show();
console.log(data);
},
error: function(jqXHR){
error: function (jqXHR) {
console.log(jqXHR);
}
});
@ -1032,20 +1035,20 @@
.parent().addClass($.support.fileInput ? undefined : 'disabled');
function add_resume_file(resumeType, imgUrl,imgPk, galleryId){
function add_resume_file(resumeType, imgUrl, imgPk, galleryId) {
$.ajax({
url: '/users/contractorsresumefiles/create/',
method: 'POST',
beforeSend: function (xhr) {
xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'))
},
data: 'type='+ resumeType+'&img_id=' + imgPk + '&resume={{ contractor.contractor_resume.pk }}',
data: 'type=' + resumeType + '&img_id=' + imgPk + '&resume={{ contractor.contractor_resume.pk }}',
dataType: 'json',
success: function (data) {
if (data.status == 'ok') {
var htmlImg = '<div class="col-lg-4"><div class="insetCol box-sizing disTab"><div class="imgGal" style="background: url(' + imgUrl +') no-repeat center;"><div class="imgFigure"></div></div></div> ' +
var htmlImg = '<div class="col-lg-4"><div class="insetCol box-sizing disTab"><div class="imgGal" style="background: url(' + imgUrl + ') no-repeat center;"><div class="imgFigure"></div></div></div> ' +
'<div class="insetCol2 box-sizing disTab"><div class="buttonsImg" distab="">' +
'<div class="insetBI insetBI2 delete-resume-file" data-id="' + data.pk +'"><i class="fa fa-times"></i></div></div></div></div>';
'<div class="insetBI insetBI2 delete-resume-file" data-id="' + data.pk + '"><i class="fa fa-times"></i></div></div></div></div>';
var img = $(htmlImg).appendTo(galleryId);
} else if (data.status == 'no') {
@ -1060,6 +1063,7 @@
}
});
}
$('#diplom-upload').fileupload({
url: url,
crossDomain: false,
@ -1075,7 +1079,7 @@
dataType: 'json',
done: function (e, data) {
$.each(data.result.files, function (index, file) {
add_resume_file('diplom', file.url,file.id, '#diplom-gallery');
add_resume_file('diplom', file.url, file.id, '#diplom-gallery');
});
},
progressall: function (e, data) {
@ -1103,7 +1107,7 @@
dataType: 'json',
done: function (e, data) {
$.each(data.result.files, function (index, file) {
add_resume_file('cro', file.url, file.id,'#cro-gallery');
add_resume_file('cro', file.url, file.id, '#cro-gallery');
});
},
progressall: function (e, data) {

@ -10,7 +10,11 @@
<img src="{{ im.url }}" alt="profile-image">
{% endthumbnail %}
{% 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 %}
</div>
</div>

@ -17,7 +17,13 @@
<img src="{{ im.url }}" alt="profile-image">
{% endthumbnail %}
{% 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 %}
</div>
</div>
@ -40,7 +46,13 @@
<img src="{{ im.url }}" alt="mess-image">
{% endthumbnail %}
{% 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 %}
</div>
@ -77,7 +89,8 @@
<div class="statusUser busy">Занят</div>
{% 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 class="col-lg-4">
@ -118,8 +131,11 @@
<script type="text/x-template" class="-portfolio-item-templ">
<div class="col-lg-4">
<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">
<a class="open-modal-image" href="<%- portfolio.photos[0].img %>"><div class="imgFigure"></div></a>
<div class="imgGal"
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>
@ -132,7 +148,8 @@
<div class="col-lg-9 col-lg-offset-3 -more-portfolios-btn">
<div class="linkElse">
<a href="#" onclick="loadMorePortfolios(); return false" class="showElse">показать еще</a>
<a href="#" onclick="loadMorePortfolios(); return false" class="showElse">показать
еще</a>
</div>
</div>
</div>
@ -142,8 +159,11 @@
<script type="text/x-template" class="-work-sell-item-templ">
<div class="col-lg-4">
<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 ;">
<a class="open-modal-image" href="<%- workSell.photos[0].img %>"><div class="imgFigure"></div></a>
<div class="imgGal"
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 class="cenaImg box-sizing">
@ -161,7 +181,8 @@
<div class="col-lg-9 col-lg-offset-3 -more-work-sells-btn">
<div class="linkElse">
<a href="#" onclick="loadMoreWorkSells(); return false" class="showElse">показать еще</a>
<a href="#" onclick="loadMoreWorkSells(); return false" class="showElse">показать
еще</a>
</div>
</div>
</div>
@ -196,7 +217,6 @@
</div>
<div>
{% include 'partials/footer.html' %}
</div>
@ -208,7 +228,7 @@
{% block js_block %}
<script type="text/javascript">
(function() {
(function () {
// Pagination ---------------------------------------------------
@ -222,15 +242,16 @@
var $moreWorkSellsfBtn = $('.-more-work-sells-btn').first()
var workSellAbsUrl = '/work_sell/'
var teamId = {{ team.pk }}
var teamId =
{{ team.pk }}
var contractorIds = [{{ team.owner.pk }}]
var portfUrl = new URI('/api/portfolios/')
var workSellUrl = new URI('/api/work-sells/')
var pageSize = {% if TESTING %}99999{% else %}9{% endif %}
$.get('/api/teams/' + teamId + '/').then(function(res) {
Array.prototype.push.apply(contractorIds, _.map(function(contractor) {
$.get('/api/teams/' + teamId + '/').then(function (res) {
Array.prototype.push.apply(contractorIds, _.map(function (contractor) {
return contractor.id
}, res.contractors))
})
@ -245,8 +266,8 @@
portfUrl.setQuery('page', query.page ? Number(query.page) + 1 : 1)
$.get(portfUrl.href())
.then(function(res) {
_.each(function(portfolio) {
.then(function (res) {
_.each(function (portfolio) {
$portfoliosContainer.append(portfolioItemTempl({
portfolio: portfolio,
portfAbsUrl: portfAbsUrl + portfolio.id + '/',
@ -258,7 +279,7 @@
$morePortfBtn.css('display', 'none')
})
.then(function() {
.then(function () {
$('.open-modal-image').magnificPopup({type: 'image'})
})
}
@ -270,8 +291,8 @@
workSellUrl.setQuery('page_size', pageSize)
workSellUrl.setQuery('page', query.page ? Number(query.page) + 1 : 1)
$.get(workSellUrl.href()).then(function(res) {
_.each(function(ws) {
$.get(workSellUrl.href()).then(function (res) {
_.each(function (ws) {
$workSellsContainer.append(workSellItemTempl({
workSell: ws,
workSellAbsUrl: workSellAbsUrl + ws.id + '/',
@ -288,13 +309,12 @@
window.loadMoreWorkSells = loadMoreWorkSells
// Persistent Bootstrap tabs --------------------------------------
$('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')
})
}())

@ -13,7 +13,11 @@
<img src="{{ im.url }}" alt="profile-image">
{% endthumbnail %}
{% 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 %}
</div>
</div>

@ -42,7 +42,11 @@
<img src="{{ avatar.url }}" alt="profile-image" class="-avatar-image">
{% endthumbnail %}
{% 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 %}
</div>
</div>

@ -37,7 +37,11 @@
<img src="{{ avatar.url }}" alt="profile-image" class="-avatar-image">
{% endthumbnail %}
{% 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 %}#}
{# {% thumbnail path "100x100" crop="center" as im %}#}
{# <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">
{% endthumbnail %}
{% 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 %}
</div>
</div>

Loading…
Cancel
Save