diff --git a/templates/home.html b/templates/home.html index 03d2bcc..85157c9 100644 --- a/templates/home.html +++ b/templates/home.html @@ -70,8 +70,6 @@ {% endblock %} {% block js_block %} - - + diff --git a/users/templates/contractor_office.html b/users/templates/contractor_office.html index 6e7b635..6e75308 100644 --- a/users/templates/contractor_office.html +++ b/users/templates/contractor_office.html @@ -164,7 +164,7 @@
-
+
@@ -188,7 +188,7 @@
-
+
@@ -283,18 +283,23 @@ portfUrl.setQuery('page_size', pageSize) portfUrl.setQuery('page', query.page ? Number(query.page) + 1 : 2) - $.get(portfUrl.href()).then(function(res) { - _.each(function(portfolio) { - $portfoliosContainer.append(portfolioItemTempl({ - portfolio: portfolio, - portfAbsUrl: portfAbsUrl + portfolio.id + '/', - trunc: _.truncate, - })) - }, res.results) + $.get(portfUrl.href()) + .then(function(res) { + _.each(function(portfolio) { + $portfoliosContainer.append(portfolioItemTempl({ + portfolio: portfolio, + portfAbsUrl: portfAbsUrl + portfolio.id + '/', + trunc: _.truncate, + })) + }, res.results) + + if (!res.next) + $morePortfBtn.css('display', 'none') + }) - if (!res.next) - $morePortfBtn.css('display', 'none') - }) + .then(function() { + $('.open-modal-image').magnificPopup({type: 'image'}) + }) } function loadMoreWorkSells() { diff --git a/users/templates/contractor_profile.html b/users/templates/contractor_profile.html index b77f795..0487231 100644 --- a/users/templates/contractor_profile.html +++ b/users/templates/contractor_profile.html @@ -164,14 +164,13 @@
{% endif %} -
+
{% if False %} {% for p in contractor.portfolios.all %}
{% thumbnail p.get_cover "224x224" crop="center" as im %} -
+
{% endthumbnail %} @@ -207,23 +206,42 @@
@@ -249,28 +267,71 @@
{% endif %} -
- {% for ws in contractor.work_sell.all %} +
+ {% if False %} + {% for ws in contractor.work_sell.all %} +
+
+ + {% thumbnail ws.get_cover "224x224" crop="center" as im %} +
+
+
+ {% endthumbnail %} + + +
+
+ {{ ws.budget }} +
+
+
+
+ {{ ws }} + {% if request.user.pk == contractor.pk %} +
+
+ + + +
+
+
+ {% csrf_token %} + + +
+
+
+ {% endif %} +
+
+ {% endfor %} + {% endif %} + + +
+
@@ -498,27 +560,102 @@ {% block js_block %} - - - - - - - {% endblock %}