Переработана вся страница профиля заказчика Добавлена вкладка Объектыremotes/origin/PR-46
parent
8ec740939a
commit
680711ee0a
47 changed files with 7090 additions and 259 deletions
|
After Width: | Height: | Size: 71 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 19 KiB |
@ -0,0 +1,202 @@ |
|||||||
|
/******/ (function(modules) { // webpackBootstrap
|
||||||
|
/******/ // The module cache
|
||||||
|
/******/ var installedModules = {}; |
||||||
|
|
||||||
|
/******/ // The require function
|
||||||
|
/******/ function __webpack_require__(moduleId) { |
||||||
|
|
||||||
|
/******/ // Check if module is in cache
|
||||||
|
/******/ if(installedModules[moduleId]) |
||||||
|
/******/ return installedModules[moduleId].exports; |
||||||
|
|
||||||
|
/******/ // Create a new module (and put it into the cache)
|
||||||
|
/******/ var module = installedModules[moduleId] = { |
||||||
|
/******/ exports: {}, |
||||||
|
/******/ id: moduleId, |
||||||
|
/******/ loaded: false |
||||||
|
/******/ }; |
||||||
|
|
||||||
|
/******/ // Execute the module function
|
||||||
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); |
||||||
|
|
||||||
|
/******/ // Flag the module as loaded
|
||||||
|
/******/ module.loaded = true; |
||||||
|
|
||||||
|
/******/ // Return the exports of the module
|
||||||
|
/******/ return module.exports; |
||||||
|
/******/ } |
||||||
|
|
||||||
|
|
||||||
|
/******/ // expose the modules object (__webpack_modules__)
|
||||||
|
/******/ __webpack_require__.m = modules; |
||||||
|
|
||||||
|
/******/ // expose the module cache
|
||||||
|
/******/ __webpack_require__.c = installedModules; |
||||||
|
|
||||||
|
/******/ // __webpack_public_path__
|
||||||
|
/******/ __webpack_require__.p = ""; |
||||||
|
|
||||||
|
/******/ // Load entry module and return exports
|
||||||
|
/******/ return __webpack_require__(0); |
||||||
|
/******/ }) |
||||||
|
/************************************************************************/ |
||||||
|
/******/ ([ |
||||||
|
/* 0 */ |
||||||
|
/***/ function(module, exports, __webpack_require__) { |
||||||
|
|
||||||
|
'use strict'; |
||||||
|
|
||||||
|
var _show_hide = __webpack_require__(12); |
||||||
|
|
||||||
|
var _bootstrap_tabs = __webpack_require__(13); |
||||||
|
|
||||||
|
var _sort_by = __webpack_require__(14); |
||||||
|
|
||||||
|
$(function () { |
||||||
|
(0, _bootstrap_tabs.restoreTab)(); |
||||||
|
(0, _bootstrap_tabs.tabsHashInit)(); |
||||||
|
window.toggler = _show_hide.toggler; |
||||||
|
window.sortRealtyBy = _sort_by.sortRealtyBy; |
||||||
|
// on load of the page: switch to the currently selected tab
|
||||||
|
}); |
||||||
|
|
||||||
|
/***/ }, |
||||||
|
/* 1 */, |
||||||
|
/* 2 */ |
||||||
|
/***/ function(module, exports) { |
||||||
|
|
||||||
|
'use strict'; |
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", { |
||||||
|
value: true |
||||||
|
}); |
||||||
|
function getCookie(name) { |
||||||
|
var cookieValue = null; |
||||||
|
if (document.cookie && document.cookie != '') { |
||||||
|
var cookies = document.cookie.split(';'); |
||||||
|
for (var i = 0; i < cookies.length; i++) { |
||||||
|
var cookie = jQuery.trim(cookies[i]); |
||||||
|
if (cookie.substring(0, name.length + 1) == name + '=') { |
||||||
|
cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
return cookieValue; |
||||||
|
} |
||||||
|
|
||||||
|
function humanFileSize(bytes, si) { |
||||||
|
var thresh = si ? 1000 : 1024; |
||||||
|
|
||||||
|
if (Math.abs(bytes) < thresh) return bytes + ' B'; |
||||||
|
|
||||||
|
var units = si ? ['kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] : ['KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']; |
||||||
|
|
||||||
|
var u = -1; |
||||||
|
|
||||||
|
do { |
||||||
|
bytes /= thresh; |
||||||
|
++u; |
||||||
|
} while (Math.abs(bytes) >= thresh && u < units.length - 1); |
||||||
|
|
||||||
|
return bytes.toFixed(1) + ' ' + units[u]; |
||||||
|
} |
||||||
|
|
||||||
|
exports.humanFileSize = humanFileSize; |
||||||
|
exports.getCookie = getCookie; |
||||||
|
|
||||||
|
/***/ }, |
||||||
|
/* 3 */, |
||||||
|
/* 4 */, |
||||||
|
/* 5 */, |
||||||
|
/* 6 */, |
||||||
|
/* 7 */, |
||||||
|
/* 8 */, |
||||||
|
/* 9 */, |
||||||
|
/* 10 */, |
||||||
|
/* 11 */, |
||||||
|
/* 12 */ |
||||||
|
/***/ function(module, exports) { |
||||||
|
|
||||||
|
"use strict"; |
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", { |
||||||
|
value: true |
||||||
|
}); |
||||||
|
function toggler(from, divId) { |
||||||
|
$(from).toggleClass("clicked"); |
||||||
|
$("#" + divId).toggle(); |
||||||
|
} |
||||||
|
|
||||||
|
exports.toggler = toggler; |
||||||
|
|
||||||
|
/***/ }, |
||||||
|
/* 13 */ |
||||||
|
/***/ function(module, exports) { |
||||||
|
|
||||||
|
"use strict"; |
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", { |
||||||
|
value: true |
||||||
|
}); |
||||||
|
function tabsHashInit() { |
||||||
|
// store the currently selected tab in the hash value
|
||||||
|
$("a[data-toggle=tab]").on("shown.bs.tab", function (e) { |
||||||
|
var target = $(e.target); |
||||||
|
if (target.hasClass("tab-inserted")) { |
||||||
|
target.siblings(".active").removeClass("active"); |
||||||
|
target.addClass("active"); |
||||||
|
return; |
||||||
|
} |
||||||
|
var id = target.attr("href").substr(1); |
||||||
|
var scrollmem = $('body').scrollTop() || $('html').scrollTop(); |
||||||
|
window.location.hash = id; |
||||||
|
$('html,body').scrollTop(scrollmem); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
function restoreTab() { |
||||||
|
// on load of the page: switch to the currently selected tab
|
||||||
|
var hash = window.location.hash; |
||||||
|
var a = $("a[data-toggle=\"tab\"][href=\"" + hash + "\"]"); |
||||||
|
hash && a.tab('show'); |
||||||
|
} |
||||||
|
|
||||||
|
exports.tabsHashInit = tabsHashInit; |
||||||
|
exports.restoreTab = restoreTab; |
||||||
|
|
||||||
|
/***/ }, |
||||||
|
/* 14 */ |
||||||
|
/***/ function(module, exports, __webpack_require__) { |
||||||
|
|
||||||
|
"use strict"; |
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", { |
||||||
|
value: true |
||||||
|
}); |
||||||
|
exports.sortRealtyBy = undefined; |
||||||
|
|
||||||
|
var _utils = __webpack_require__(2); |
||||||
|
|
||||||
|
function sortRealtyBy(data, container_id) { |
||||||
|
console.log("sort_by = ", data); |
||||||
|
console.log("container_id = ", container_id); |
||||||
|
var url = '/objects/sort/'; |
||||||
|
$.ajax({ |
||||||
|
url: url, |
||||||
|
type: 'POST', |
||||||
|
data: data, |
||||||
|
beforeSend: function beforeSend(xhr) { |
||||||
|
xhr.setRequestHeader("X-CSRFToken", (0, _utils.getCookie)('csrftoken')); |
||||||
|
}, |
||||||
|
success: function success(data) { |
||||||
|
$(container_id).html(data); |
||||||
|
// console.log("data = ", data);
|
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
exports.sortRealtyBy = sortRealtyBy; |
||||||
|
|
||||||
|
/***/ } |
||||||
|
/******/ ]); |
||||||
@ -0,0 +1,12 @@ |
|||||||
|
import {toggler} from './seeds/show_hide' |
||||||
|
import {tabsHashInit, restoreTab} from './seeds/bootstrap_tabs' |
||||||
|
import {sortRealtyBy} from './seeds/sort_by' |
||||||
|
|
||||||
|
$(function () { |
||||||
|
restoreTab(); |
||||||
|
tabsHashInit(); |
||||||
|
window.toggler = toggler; |
||||||
|
window.sortRealtyBy = sortRealtyBy; |
||||||
|
// on load of the page: switch to the currently selected tab
|
||||||
|
|
||||||
|
}); |
||||||
@ -0,0 +1,24 @@ |
|||||||
|
function tabsHashInit() { |
||||||
|
// store the currently selected tab in the hash value
|
||||||
|
$("a[data-toggle=tab]").on("shown.bs.tab", function (e) { |
||||||
|
let target = $(e.target); |
||||||
|
if(target.hasClass("tab-inserted")){ |
||||||
|
target.siblings(".active").removeClass("active"); |
||||||
|
target.addClass("active"); |
||||||
|
return |
||||||
|
} |
||||||
|
let id = target.attr("href").substr(1); |
||||||
|
let scrollmem = $('body').scrollTop() || $('html').scrollTop(); |
||||||
|
window.location.hash = id; |
||||||
|
$('html,body').scrollTop(scrollmem); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
function restoreTab() { |
||||||
|
// on load of the page: switch to the currently selected tab
|
||||||
|
let hash = window.location.hash; |
||||||
|
let a = $(`a[data-toggle="tab"][href="${hash}"]`); |
||||||
|
hash && a.tab('show'); |
||||||
|
} |
||||||
|
|
||||||
|
export {tabsHashInit, restoreTab} |
||||||
@ -0,0 +1,6 @@ |
|||||||
|
function toggler(from, divId) { |
||||||
|
$(from).toggleClass("clicked"); |
||||||
|
$("#" + divId).toggle(); |
||||||
|
} |
||||||
|
|
||||||
|
export {toggler} |
||||||
@ -0,0 +1,21 @@ |
|||||||
|
import {getCookie} from '../utils' |
||||||
|
|
||||||
|
function sortRealtyBy(data, container_id) { |
||||||
|
console.log("sort_by = ", data); |
||||||
|
console.log("container_id = ", container_id); |
||||||
|
let url = '/objects/sort/'; |
||||||
|
$.ajax({ |
||||||
|
url: url, |
||||||
|
type: 'POST', |
||||||
|
data: data, |
||||||
|
beforeSend: function (xhr) { |
||||||
|
xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken')) |
||||||
|
}, |
||||||
|
success: function (data) { |
||||||
|
$(container_id).html(data); |
||||||
|
// console.log("data = ", data);
|
||||||
|
} |
||||||
|
}) |
||||||
|
} |
||||||
|
|
||||||
|
export {sortRealtyBy} |
||||||
@ -1,6 +1,6 @@ |
|||||||
$col_component_headers: #000 |
$col_component_headers: #000 |
||||||
//$colors: (c_red: #ff0000, c_green: #00FF00, c_blue: #0000FF) |
//$colors: (c_red: #ff0000, c_green: #00FF00, c_blue: #0000FF) |
||||||
|
|
||||||
$component_colors: (header: #000, header_favicon: #5e5e5e, border: #cccccc, select: #FF0029) |
$component_colors: (header: #000, header_favicon: #5e5e5e, border: #cccccc, select: #FF0029, footer_background: #F7F7F7) |
||||||
// #{map_get($component_colors, border)} |
// #{map_get($component_colors, border)} |
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,20 @@ |
|||||||
|
# -*- coding: utf-8 -*- |
||||||
|
# Generated by Django 1.9.7 on 2016-12-21 09:57 |
||||||
|
from __future__ import unicode_literals |
||||||
|
|
||||||
|
from django.db import migrations, models |
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration): |
||||||
|
|
||||||
|
dependencies = [ |
||||||
|
('projects', '0050_auto_20161207_1637'), |
||||||
|
] |
||||||
|
|
||||||
|
operations = [ |
||||||
|
migrations.AddField( |
||||||
|
model_name='realty', |
||||||
|
name='state', |
||||||
|
field=models.CharField(choices=[('active', 'Активный'), ('trashed', 'В корзине'), ('deleted', 'Удален')], default='active', max_length=20), |
||||||
|
), |
||||||
|
] |
||||||
@ -0,0 +1,21 @@ |
|||||||
|
# -*- coding: utf-8 -*- |
||||||
|
# Generated by Django 1.9.7 on 2016-12-22 07:25 |
||||||
|
from __future__ import unicode_literals |
||||||
|
|
||||||
|
from django.db import migrations, models |
||||||
|
import django.utils.timezone |
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration): |
||||||
|
|
||||||
|
dependencies = [ |
||||||
|
('projects', '0051_realty_state'), |
||||||
|
] |
||||||
|
|
||||||
|
operations = [ |
||||||
|
migrations.AddField( |
||||||
|
model_name='realty', |
||||||
|
name='created', |
||||||
|
field=models.DateTimeField(default=django.utils.timezone.now), |
||||||
|
), |
||||||
|
] |
||||||
@ -0,0 +1,162 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
{% load staticfiles %} |
||||||
|
{% load sass_tags %} |
||||||
|
{#{% load compress %}#} |
||||||
|
<html lang="ru"> |
||||||
|
<head> |
||||||
|
<meta charset="UTF-8"> |
||||||
|
<meta http-equiv='X-UA-Compatible' content='IE=edge, chrome=1'> |
||||||
|
<meta name='viewport' content='width=device-width, initial-scale=1'> |
||||||
|
<!--<meta name='viewport' content='initial-scale=1.0, user-scalable=no, maximum-scale=1'>--> |
||||||
|
|
||||||
|
{% block head %}{% endblock %} |
||||||
|
|
||||||
|
<title>PROEKTON</title> |
||||||
|
{% block common_css %} |
||||||
|
<link rel='stylesheet' href='{% static "css/bootstrap.css" %}'> |
||||||
|
<link rel='stylesheet' href='{% static "css/font-awesome.min.css" %}'> |
||||||
|
<link rel="stylesheet" href='{% static "lib/jquery-jgrowl/jquery.jgrowl.min.css" %}'> |
||||||
|
<link rel='stylesheet' href='{% static "lib/jquery-ui/jquery-ui.css" %}'> |
||||||
|
<link rel='stylesheet' href='{% sass_src "sass/main.sass" %}'> |
||||||
|
{% if TEMPLATE_DEBUG %} |
||||||
|
<link rel='stylesheet' href='{% static "css/dev-colors.css" %}'> <!-- Dev-time only, temporary!!! --> |
||||||
|
{% endif %} |
||||||
|
{% endblock %} |
||||||
|
{% block personal_css %} |
||||||
|
|
||||||
|
{% endblock %} |
||||||
|
|
||||||
|
<link rel="icon" href="{% static 'img/favicon.jpg' %}" type="image/x-icon"> |
||||||
|
<link rel="shortcut icon" href="{% static 'img/favicon50.jpg' %}" type="image/x-icon"> |
||||||
|
<link rel="apple-touch-icon" href="{% static 'img/favicon128.jpg' %}" sizes="128x128"> |
||||||
|
<link rel="icon" type="image/png" href="{% static 'img/favicon50.jpg' %}" sizes="32x32"> |
||||||
|
<link rel="icon" type="image/png" href="{% static 'img/favicon18.jpg' %}" sizes="16x16"> |
||||||
|
|
||||||
|
{# {% endcompress %}#} |
||||||
|
<meta name="keywords" content=""> |
||||||
|
<meta name="description" content="_TEXT_"> |
||||||
|
<meta name="yandex-verification" content="58d23691715ef942"> |
||||||
|
<link rel="canonical" href="_URL_"> |
||||||
|
</head> |
||||||
|
|
||||||
|
<body> |
||||||
|
{% if TEMPLATE_DEBUG %} |
||||||
|
{% if messages %} |
||||||
|
{% for message in messages %} |
||||||
|
<div class="c" |
||||||
|
style="position: relative; padding: 10px; margin-bottom: 6px; z-index: 100">{{ message|safe }}</div> |
||||||
|
{% endfor %} |
||||||
|
{% endif %} |
||||||
|
{% endif %} |
||||||
|
{% block header %} |
||||||
|
{% include 'partials/header.html' %} |
||||||
|
{% endblock %} |
||||||
|
|
||||||
|
{% block content %} |
||||||
|
<div style="min-height: 400px"> |
||||||
|
BASE TEMPLATE |
||||||
|
</div> |
||||||
|
{% endblock %} |
||||||
|
|
||||||
|
{% block footer %} |
||||||
|
<div class="container footer-border"> |
||||||
|
{% include 'partials/footer.html' %} |
||||||
|
</div> |
||||||
|
{% endblock %} |
||||||
|
{% block common_js %} |
||||||
|
<script src='{% static "js/jquery-2.2.3.min.js" %}'></script> |
||||||
|
<script src='{% static "lib/jquery.cookie/jquery.cookie.min.js" %}'></script> |
||||||
|
<script src='{% static "js/bootstrap.min.js" %}'></script> |
||||||
|
{% endblock %} |
||||||
|
{% block personal_js %} |
||||||
|
|
||||||
|
{% endblock %} |
||||||
|
{#{% compress js %}#} |
||||||
|
{# <script src='{% static "js/jquery-2.2.3.min.js" %}'></script>#} |
||||||
|
{# <script src='{% static "lib/jquery-ui/jquery-ui.js" %}'></script>#} |
||||||
|
{# <script src='{% static "lib/jquery-ui/i18n/datepicker-ru.js" %}'></script> <!-- jQueryUI Datepicker i18n -->#} |
||||||
|
{# <script src='{% static "js/bootstrap.min.js" %}'></script>#} |
||||||
|
{# <script src='{% static "lib/bootstrap-select/js/bootstrap-select.js" %}'></script>#} |
||||||
|
{# <script src='{% static "lib/select2/select2.js" %}'></script>#} |
||||||
|
{# <script src='{% static "lib/urijs/URI.min.js" %}'></script>#} |
||||||
|
{# <script src='{% static "js/jquery.magnific-popup.min.js" %}'></script>#} |
||||||
|
{# <script src='{% static "my-libs.js" %}'></script>#} |
||||||
|
|
||||||
|
{% block websocket_js %} |
||||||
|
<script src='{% static "lib/jquery-jgrowl/jquery.jgrowl.min.js" %}'></script> |
||||||
|
<script> |
||||||
|
function getOpenOrdersList() { |
||||||
|
$.ajax({ |
||||||
|
url: '/api/orders?status=created', |
||||||
|
type: 'get', |
||||||
|
success: function (data) { |
||||||
|
$.each(data.results, function (key, value) { |
||||||
|
open_order_list.push(parseInt(value.id)) |
||||||
|
}) |
||||||
|
} |
||||||
|
}) |
||||||
|
} |
||||||
|
|
||||||
|
function message_count_plus(selector) { |
||||||
|
var all_messages = $(selector); |
||||||
|
var count = parseInt(all_messages.html()) + 1; |
||||||
|
if (count > 99) count = '99+'; |
||||||
|
all_messages.html(count); |
||||||
|
|
||||||
|
} |
||||||
|
var SocketHandlerMain = function (userId) { |
||||||
|
var domain = '{{ request.META.HTTP_HOST }}'; |
||||||
|
var port = '{{ request.META.SERVER_PORT }}'; |
||||||
|
var queryString = '{{ request.get_full_path }}'; |
||||||
|
|
||||||
|
if ((queryString.indexOf('/chat') != 0) && (queryString.indexOf('/users/contractor-office/work-projects') != 0)) { |
||||||
|
domain = domain.replace(':' + port, ':8888'); |
||||||
|
if (window.location.protocol == 'https:') { |
||||||
|
var ws = "wss://"; |
||||||
|
} else { |
||||||
|
var ws = "ws://"; |
||||||
|
} |
||||||
|
|
||||||
|
var url = ws + domain + '/chat/' + userId + '/'; |
||||||
|
var sock = new WebSocket(url); |
||||||
|
var intervalId; |
||||||
|
sock.onopen = function () { |
||||||
|
intervalId = setInterval(function () { |
||||||
|
sock.send('{"dummy": 1}'); |
||||||
|
}, 15000); |
||||||
|
}; |
||||||
|
|
||||||
|
sock.onmessage = function (event) { |
||||||
|
var notificationData = JSON.parse(event.data); |
||||||
|
if (open_order_list.indexOf(parseInt(notificationData.order_id)) != -1) { |
||||||
|
{# console.log("in");#} |
||||||
|
message_count_plus('#my_office'); |
||||||
|
} |
||||||
|
message_count_plus('.js-all-messages'); |
||||||
|
var outMessage = ""; |
||||||
|
if (notificationData.answer_type == 'add_message_contact') { |
||||||
|
outMessage += "<a href='/chat/?user_id=" + notificationData.sender_id + "'>" + notificationData.msg + "<a>"; |
||||||
|
} else if ((notificationData.answer_type == 'approve_stages') || (notificationData.answer_type == 'add_message_order')) { |
||||||
|
outMessage += "<a href='/chat/#order" + notificationData.order_id + "'>" + notificationData.msg + "<a>"; |
||||||
|
} |
||||||
|
console.log("Вам пришло новое сообщение!<br />" + outMessage); |
||||||
|
$.jGrowl("Вам пришло новое сообщение!<br />" + outMessage, {life: 15000}); |
||||||
|
}; |
||||||
|
this.add_message = function (messageData) { |
||||||
|
sock.send(JSON.stringify(messageData)); |
||||||
|
}; |
||||||
|
} |
||||||
|
}; |
||||||
|
|
||||||
|
var userId = '{{ request.user.pk }}'; |
||||||
|
if (userId) { |
||||||
|
var socketMain = new SocketHandlerMain(userId); |
||||||
|
var open_order_list = []; |
||||||
|
getOpenOrdersList(); |
||||||
|
} |
||||||
|
</script> |
||||||
|
{% endblock %} |
||||||
|
|
||||||
|
{#{% endcompress %}#} |
||||||
|
</body> |
||||||
|
</html> |
||||||
@ -0,0 +1,178 @@ |
|||||||
|
@import "base/variavles" |
||||||
|
@import "modules/mods" |
||||||
|
|
||||||
|
//.avatarInset |
||||||
|
// //width: 100% |
||||||
|
// height: 224px |
||||||
|
// img |
||||||
|
// width: 100% |
||||||
|
// height: 100% |
||||||
|
// //padding: 10% |
||||||
|
// background-color: #e4e4e4 |
||||||
|
|
||||||
|
.count |
||||||
|
display: inline-block |
||||||
|
width: 32px |
||||||
|
height: 32px |
||||||
|
border-radius: 100% |
||||||
|
text-align: center |
||||||
|
line-height: 32px |
||||||
|
font-family: 'Arial-MT-Regular', sans-serif |
||||||
|
overflow: hidden |
||||||
|
color: black |
||||||
|
background-color: #ccc |
||||||
|
margin-left: 10px |
||||||
|
|
||||||
|
.projects_count |
||||||
|
display: inline-block |
||||||
|
color: red |
||||||
|
margin: 0 15px |
||||||
|
|
||||||
|
.object |
||||||
|
.object-header |
||||||
|
font-size: 24px |
||||||
|
color: #545151 |
||||||
|
font-weight: bold |
||||||
|
a |
||||||
|
color: #575454 |
||||||
|
a:hover |
||||||
|
text-decoration: none |
||||||
|
color: #000 |
||||||
|
|
||||||
|
.user_name |
||||||
|
color: #131212 |
||||||
|
font-size: 16pt |
||||||
|
line-height: 100% |
||||||
|
|
||||||
|
|
||||||
|
.border.add_line:before |
||||||
|
content: '' |
||||||
|
position: relative |
||||||
|
display: block |
||||||
|
width: 100px |
||||||
|
height: 3px |
||||||
|
background-color: black |
||||||
|
left: 62px |
||||||
|
top: 0 |
||||||
|
//z-index: 1 |
||||||
|
//-webkit-transition: all 0.3s ease-out |
||||||
|
//-moz-transition: all 0.3s ease-out |
||||||
|
//transition: all 0.3s ease-out |
||||||
|
|
||||||
|
.nav-tabs a |
||||||
|
color: #0b0b0b |
||||||
|
table.ratings |
||||||
|
font-size: 14pt |
||||||
|
td |
||||||
|
padding: 10px |
||||||
|
.positive |
||||||
|
color: #0b0b0b |
||||||
|
.neutral |
||||||
|
color: grey |
||||||
|
.negative |
||||||
|
color: red |
||||||
|
|
||||||
|
table.projects |
||||||
|
width: 100% |
||||||
|
td |
||||||
|
padding: 5px |
||||||
|
tr:nth-child(2n) |
||||||
|
background-color: #E8E8E8 |
||||||
|
|
||||||
|
.cut |
||||||
|
display: inline-block |
||||||
|
text-overflow: ellipsis |
||||||
|
max-width: 550px |
||||||
|
overflow: hidden |
||||||
|
word-wrap: break-word |
||||||
|
white-space: nowrap |
||||||
|
|
||||||
|
%icons |
||||||
|
margin-left: 24px |
||||||
|
display: flex |
||||||
|
align-items: center |
||||||
|
&:before |
||||||
|
content: '' |
||||||
|
display: inline-block |
||||||
|
width: 20px |
||||||
|
height: 20px |
||||||
|
background-size: cover |
||||||
|
position: relative |
||||||
|
left: -5px |
||||||
|
|
||||||
|
.icon-rating |
||||||
|
@extend %icons |
||||||
|
&:before |
||||||
|
background: url('#{$static}/img/rett.png') no-repeat 0 0 |
||||||
|
|
||||||
|
.icon-deals |
||||||
|
@extend %icons |
||||||
|
&:before |
||||||
|
width: 25px |
||||||
|
height: 25px |
||||||
|
background: url('#{$static}/img/rett.png') no-repeat 0 -19px |
||||||
|
|
||||||
|
.icon-reviews |
||||||
|
@extend %icons |
||||||
|
&:before |
||||||
|
width: 26px |
||||||
|
height: 26px |
||||||
|
background: url('#{$static}/img/rett.png') no-repeat 0 -44px |
||||||
|
|
||||||
|
.icon-protect |
||||||
|
@extend %icons |
||||||
|
&:before |
||||||
|
width: 26px |
||||||
|
height: 26px |
||||||
|
background: url('#{$static}/img/cenaList.png') no-repeat 0 0 |
||||||
|
|
||||||
|
.icon-trash-red |
||||||
|
@extend %icons |
||||||
|
&:before |
||||||
|
width: 21px |
||||||
|
height: 21px |
||||||
|
background: url('#{$static}/img/cenaList3.png') no-repeat 0 0 |
||||||
|
|
||||||
|
.icon-trash-gray |
||||||
|
@extend %icons |
||||||
|
&:before |
||||||
|
width: 21px |
||||||
|
height: 21px |
||||||
|
background: url('#{$static}/img/cenaList3.png') no-repeat 0 0 |
||||||
|
|
||||||
|
.icon-calendar |
||||||
|
@extend %icons |
||||||
|
&:before |
||||||
|
width: 19px |
||||||
|
height: 19px |
||||||
|
background: url('#{$static}/img/listPro.png') no-repeat 0 0 |
||||||
|
|
||||||
|
.icon-eye |
||||||
|
@extend %icons |
||||||
|
&:before |
||||||
|
width: 26px |
||||||
|
height: 18px |
||||||
|
background: |
||||||
|
image: url('#{$static}/img/icons/icon_eye.png') |
||||||
|
repeat: no-repeat |
||||||
|
size: 26px 18px |
||||||
|
|
||||||
|
.icon-speach-ball_gray |
||||||
|
@extend %icons |
||||||
|
&:before |
||||||
|
width: 18px |
||||||
|
height: 18px |
||||||
|
background: |
||||||
|
image: url('#{$static}/img/icons/icon_speach-ball_gray.png') |
||||||
|
repeat: no-repeat |
||||||
|
size: 18px 18px |
||||||
|
|
||||||
|
.icon-certificate |
||||||
|
@extend %icons |
||||||
|
&:before |
||||||
|
width: 18px |
||||||
|
height: 18px |
||||||
|
background: |
||||||
|
image: url('#{$static}/img/icons/icon_сertificate-512.png') |
||||||
|
repeat: no-repeat |
||||||
|
size: 18px 18px |
||||||
@ -0,0 +1,42 @@ |
|||||||
|
{% extends 'partials/_base.html' %} |
||||||
|
{% load staticfiles %} |
||||||
|
{% load sass_tags %} |
||||||
|
|
||||||
|
{% block personal_css %} |
||||||
|
<link rel='stylesheet' href='{% sass_src "sass/customer-profile.sass" %}'> |
||||||
|
<link rel='stylesheet' href='{% sass_src "sass/old_main.sass" %}'> |
||||||
|
<link rel='stylesheet' href='{% sass_src "sass/components/custom-components.sass" %}'> |
||||||
|
{# <link rel='stylesheet' href='{% static "css/main.css" %}'>#} |
||||||
|
{% endblock %} |
||||||
|
|
||||||
|
{% block content %} |
||||||
|
<div class="container main-scope"> |
||||||
|
<div class="row main-content"> |
||||||
|
<div class="col-lg-12"> |
||||||
|
{% include 'partials/inc-customer_profile-info.html' %} |
||||||
|
<div class="row"> |
||||||
|
<div class="col-lg-12"> |
||||||
|
<div class="tab-content"> |
||||||
|
<div id="objects" class="tab-pane fade in active"> |
||||||
|
{% include 'partials/tabs/tab-objects.html' %} |
||||||
|
</div> |
||||||
|
<div id="open_projects" class="tab-pane fade"> |
||||||
|
{% include 'partials/tabs/tab-open_projects.html' %} |
||||||
|
</div> |
||||||
|
<div id="in_work_projects" class="tab-pane fade"> |
||||||
|
{% include 'partials/tabs/tab-in_work_projects.html' %} |
||||||
|
</div> |
||||||
|
<div id="rewiews" class="tab-pane fade"> |
||||||
|
{% include 'partials/tabs/tab-rewiews.html' %} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{% endblock %} |
||||||
|
|
||||||
|
{% block personal_js %} |
||||||
|
<script src="{% static 'js/build/customer_profile.js' %}"></script> |
||||||
|
{% endblock %} |
||||||
@ -0,0 +1,105 @@ |
|||||||
|
{% load thumbnail %} |
||||||
|
{% load staticfiles %} |
||||||
|
{% load specializtions_tags %} |
||||||
|
{% load user_tags %} |
||||||
|
<div class="row"> |
||||||
|
<div class="col-lg-3"> |
||||||
|
<div class="avatar new-mar"> |
||||||
|
<div class="avatarInset"> |
||||||
|
{% if customer.avatar %} |
||||||
|
{% thumbnail customer.avatar "235x224" crop="center" as im %} |
||||||
|
<img src="{{ im.url }}" alt="profile-image"> |
||||||
|
{% endthumbnail %} |
||||||
|
{% else %} |
||||||
|
<img src="{% static 'img/profile.jpg' %}" alt="profile-image"> |
||||||
|
{% endif %} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="col-lg-9"> |
||||||
|
<div class="row mod-row-eq-height" style="padding-bottom: 40px"> |
||||||
|
<div class="col-lg-5"> |
||||||
|
<span class="user_name">{{ customer.get_full_name }} <br>[{{ customer.username }}]</span> |
||||||
|
<table style="margin-top: 10px; margin-bottom: 10px"> |
||||||
|
<tr> |
||||||
|
<td style="min-width: 100px">На сайте:</td> |
||||||
|
<td>{{ customer.created }}</td> |
||||||
|
</tr> |
||||||
|
<tr> |
||||||
|
<td>Страна:</td> |
||||||
|
<td>{{ customer.country }}</td> |
||||||
|
</tr> |
||||||
|
<tr> |
||||||
|
<td>Город:</td> |
||||||
|
<td>{{ customer.city }}</td> |
||||||
|
</tr> |
||||||
|
</table> |
||||||
|
{% if request.user == customer %} |
||||||
|
<a href="{% url 'users:user-profile-edit' pk=pk %}" class="btn btn-simple mod-align-center-inline" |
||||||
|
style="padding: px 20px; font-size: 12pt"> |
||||||
|
<span type="submit" class="icon-edit"> </span> редактировать профиль |
||||||
|
</a> |
||||||
|
{% endif %} |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-lg-7" style="border-bottom: 1px solid gainsboro; border-top: 1px solid gainsboro"> |
||||||
|
<table class="ratings" style="float: right"> |
||||||
|
<tr> |
||||||
|
<td> |
||||||
|
<div class="icon-rating">Рейтинг:</div> |
||||||
|
</td> |
||||||
|
<td> |
||||||
|
<span> {{ ratings }}</span> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
<tr> |
||||||
|
<td> |
||||||
|
<div class="icon-deals">Безопасные сделки:</div> |
||||||
|
</td> |
||||||
|
<td> |
||||||
|
<span> {{ deals }}</span> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
<tr> |
||||||
|
<td> |
||||||
|
<div class="icon-reviews">Отзывы:</div> |
||||||
|
</td> |
||||||
|
<td> |
||||||
|
<span class="positive"> {{ reviews_p }}</span> |
||||||
|
<span class="neutral"> {{ reviews_n }}</span> |
||||||
|
<span class="negative"> {{ reviews_m }}</span> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
</table> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="row"> |
||||||
|
<div class="col-lg-12"> |
||||||
|
<div class="profileTabs2 tabs-new"> |
||||||
|
<ul class="nav nav-tabs nav-justified"> |
||||||
|
<li class="active"> |
||||||
|
<a data-toggle="tab" href="#objects"> |
||||||
|
<div class="mod-align-center-inline"> Объекты <span class="count">{{ objects.count }}</span></div> |
||||||
|
</a> |
||||||
|
</li> |
||||||
|
<li> |
||||||
|
<a data-toggle="tab" href="#open_projects"> |
||||||
|
<div class="mod-align-center-inline"> Открытые заказы <span class="count">{{ open_projects.count }}</span></div> |
||||||
|
</a> |
||||||
|
</li> |
||||||
|
<li> |
||||||
|
<a data-toggle="tab" href="#in_work_projects"> |
||||||
|
<div class="mod-align-center-inline"> Заказы в работе <span class="count">{{ projects_in_work.count }}</span></div> |
||||||
|
</a> |
||||||
|
</li> |
||||||
|
<li> |
||||||
|
<a data-toggle="tab" href="#rewiews"> |
||||||
|
<div class="mod-align-center-inline"> Отзывы <span class="count">{{ reviews.count }}</span></div> |
||||||
|
</a> |
||||||
|
</li> |
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
@ -0,0 +1,114 @@ |
|||||||
|
{% for object in objects %} |
||||||
|
<div class="row object"> |
||||||
|
<div class="separator"> |
||||||
|
<div class="border add_line"></div> |
||||||
|
</div> |
||||||
|
<div style="margin-bottom: 15px" class="row"> |
||||||
|
<div class="col-lg-9"> |
||||||
|
<div class="object-header">{{ object.name }}</div> |
||||||
|
</div> |
||||||
|
{% if request.user == customer %} |
||||||
|
<div class="col-lg-3"> |
||||||
|
{% if trash %} |
||||||
|
<form action="{% url 'customer-object-restore' pk=object.pk %}" method="POST"> |
||||||
|
{% csrf_token %} |
||||||
|
<input type="hidden" name="next" value="{{ request.path }}"> |
||||||
|
|
||||||
|
<a href='#' onclick="$(this).closest('form').submit(); return false"> |
||||||
|
<span class="icon-protect">Восстановить</span> |
||||||
|
</a> |
||||||
|
</form> |
||||||
|
{% else %} |
||||||
|
<span class="icon-protect">Редактировать</span> |
||||||
|
{% endif %} |
||||||
|
|
||||||
|
</div> |
||||||
|
{% endif %} |
||||||
|
</div> |
||||||
|
<div class="row mod-align-center"> |
||||||
|
<div class="col-lg-9"> |
||||||
|
Заказы: <span class="projects_count"> {{ object.projects.count }}</span> |
||||||
|
<button class="bnt btn-default btn-up_down -small" type="submit" |
||||||
|
value="num_orders" |
||||||
|
onclick="toggler(this, 'obj-{{ object.id }}')"> |
||||||
|
<span class="text">Посмотреть</span> |
||||||
|
</button> |
||||||
|
{% if request.user == customer %} |
||||||
|
<a href="{% url 'projects:customer-project-create' %}" |
||||||
|
class="btn btn-simple -small"> |
||||||
|
Добавить заказ |
||||||
|
</a> |
||||||
|
{% endif %} |
||||||
|
</div> |
||||||
|
<div class="col-lg-3"> |
||||||
|
{% if request.user == customer %} |
||||||
|
{% if trash %} |
||||||
|
<form action="{% url 'customer-object-delete' pk=object.pk %}" method="POST"> |
||||||
|
{% csrf_token %} |
||||||
|
<input type="hidden" name="next" value="{{ request.path }}"> |
||||||
|
|
||||||
|
<a href='#' onclick="$(this).closest('form').submit(); return false"> |
||||||
|
<span class="icon-trash-red">Удалить навсегда</span> |
||||||
|
</a> |
||||||
|
</form> |
||||||
|
{% else %} |
||||||
|
<form action="{% url 'customer-object-trash' pk=object.pk %}" |
||||||
|
method="POST" novalidate> |
||||||
|
{% csrf_token %} |
||||||
|
<input type="hidden" name="next" |
||||||
|
value="{{ request.path }}"> |
||||||
|
<a href="#" |
||||||
|
onclick="$(this).closest('form').submit(); return false"> |
||||||
|
<span class="icon-trash-red">Переместить в корзину</span> |
||||||
|
</a> |
||||||
|
</form> |
||||||
|
{% endif %} |
||||||
|
{% endif %} |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="row" id="obj-{{ object.id }}" style="display: none"> |
||||||
|
<div class="col-lg-12"> |
||||||
|
<div class="separator"> |
||||||
|
<div class="border"></div> |
||||||
|
</div> |
||||||
|
<table class="projects"> |
||||||
|
{% for project in object.projects.all %} |
||||||
|
<tr> |
||||||
|
<td><strong>{{ forloop.counter }}</strong></td> |
||||||
|
<td>{{ project.name }}</td> |
||||||
|
<td> |
||||||
|
<span class="icon-calendar">{{ project.created }}</span> |
||||||
|
</td> |
||||||
|
<td> |
||||||
|
<span class="icon-eye">{{ project.hit_count.hits }}</span> |
||||||
|
</td> |
||||||
|
<td> |
||||||
|
<span class="icon-speach-ball_gray">{{ project.message_count }}</span> |
||||||
|
</td> |
||||||
|
{# <td>{{ project.answers.count }}</td>#} |
||||||
|
<td> |
||||||
|
<span class="icon-certificate"> |
||||||
|
<span class="cut">{{ project.specialization.full_path }}</span> |
||||||
|
</span> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
|
||||||
|
{% endfor %} |
||||||
|
</table> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<span style="margin: 10px 0" class="icon-calendar"> |
||||||
|
{{ object.created }} |
||||||
|
</span> |
||||||
|
{% endfor %} |
||||||
|
|
||||||
|
<div class="row"> |
||||||
|
<div class="separator"> |
||||||
|
<div class="border"></div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
@ -0,0 +1,99 @@ |
|||||||
|
{% load project_tags %} |
||||||
|
<div class="projectsBlock new-pro-block disTab"> |
||||||
|
{% for proj in open_projects %} |
||||||
|
<div class="projectPro clearfix"> |
||||||
|
<div class="col-lg-9 leftPro"> |
||||||
|
<p class="titlePro"> |
||||||
|
<a href="{% url 'projects:detail' proj.pk %}">{{ proj.name }}</a> |
||||||
|
</p> |
||||||
|
|
||||||
|
<ul class="desPro"> |
||||||
|
<li>Объект "{{ proj.realty.name }}"</li> |
||||||
|
<li><span>{{ proj.get_team_answers|length }}</span> ответ от имени |
||||||
|
группы |
||||||
|
</li> |
||||||
|
</ul> |
||||||
|
|
||||||
|
{% if request.user == customer %} |
||||||
|
<ul class="color-menu"> |
||||||
|
<li> |
||||||
|
<a href="{% url 'projects:detail' proj.pk %}#new-answers">Новые: {{ proj|get_new_answers|length }}</a> |
||||||
|
</li> |
||||||
|
<li> |
||||||
|
<a href="{% url 'projects:detail' proj.pk %}#candidate-answers">Кандидаты: {{ proj|get_candidate_answers|length }}</a> |
||||||
|
</li> |
||||||
|
<li> |
||||||
|
<a href="{% url 'projects:detail' proj.pk %}#rejected-answers">Отказал: {{ proj|get_rejected_answers|length }}</a> |
||||||
|
</li> |
||||||
|
</ul> |
||||||
|
{% endif %} |
||||||
|
|
||||||
|
<p class="textPro"> |
||||||
|
{{ proj.text }} |
||||||
|
</p> |
||||||
|
|
||||||
|
<ul class="listPro"> |
||||||
|
<li>{{ proj.created }}</li> |
||||||
|
<li>{{ proj.hit_count.hits }}</li> |
||||||
|
<li>{{ proj.answers.count }}</li> |
||||||
|
<li>{{ customer.get_full_name }}</li> |
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-lg-3 rightPro right-pro-red"> |
||||||
|
<p class="cenaPro"> |
||||||
|
{{ proj.budget }} <i |
||||||
|
class="{% fa_currency_classes proj.currency %}"></i> |
||||||
|
</p> |
||||||
|
|
||||||
|
{% if request.user == proj.customer %} |
||||||
|
{% if trash %} |
||||||
|
<ul> |
||||||
|
<li> |
||||||
|
<form action="{% url 'projects:customer-project-restore' pk=proj.pk %}" method="POST"> |
||||||
|
{% csrf_token %} |
||||||
|
<input type="hidden" name="next" value="{{ request.path }}"> |
||||||
|
|
||||||
|
<a href='#' onclick="$(this).closest('form').submit(); return false">Восстановить из |
||||||
|
корзины</a> |
||||||
|
</form> |
||||||
|
</li> |
||||||
|
|
||||||
|
<li> |
||||||
|
<form action="{% url 'projects:customer-project-delete' pk=proj.pk %}" method="POST"> |
||||||
|
{% csrf_token %} |
||||||
|
<input type="hidden" name="next" value="{{ request.path }}"> |
||||||
|
|
||||||
|
<a href='#' onclick="$(this).closest('form').submit(); return false">Удалить |
||||||
|
навсегда</a> |
||||||
|
</form> |
||||||
|
</li> |
||||||
|
</ul> |
||||||
|
{% else %} |
||||||
|
<ul> |
||||||
|
<li> |
||||||
|
<a href='{% url 'projects:customer-project-edit' pk=proj.pk %}?back={{ request.path }}'>Редактировать</a> |
||||||
|
</li> |
||||||
|
|
||||||
|
<li> |
||||||
|
<form action="{% url 'projects:customer-project-trash' pk=proj.pk %}" |
||||||
|
method="POST" novalidate> |
||||||
|
{% csrf_token %} |
||||||
|
<input type="hidden" name="next" |
||||||
|
value="{{ request.path }}"> |
||||||
|
<a href="#" |
||||||
|
onclick="$(this).closest('form').submit(); return false">Переместить |
||||||
|
в корзину</a> |
||||||
|
</form> |
||||||
|
</li> |
||||||
|
</ul> |
||||||
|
{% endif %} |
||||||
|
|
||||||
|
{% endif %} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{% endfor %} |
||||||
|
</div> |
||||||
|
<div class="col-lg-12 pagin"> |
||||||
|
{% include 'partials/pagination.html' %} |
||||||
|
</div> |
||||||
@ -0,0 +1,82 @@ |
|||||||
|
{% load project_tags %} |
||||||
|
<div class="old-main"> |
||||||
|
<div class="projectsBlock new-pro-block disTab"> |
||||||
|
{% for proj in projects_in_work %} |
||||||
|
<div class="projectPro clearfix"> |
||||||
|
<div class="col-lg-9 leftPro"> |
||||||
|
<p class="titlePro"> |
||||||
|
<a href="{% url 'projects:detail' proj.pk %}">{{ proj.name }}</a> |
||||||
|
</p> |
||||||
|
|
||||||
|
<ul class="desPro"> |
||||||
|
<li>Объект "{{ proj.realty.name }}"</li> |
||||||
|
<li><span>{{ proj.get_team_answers|length }}</span> ответ от имени |
||||||
|
группы |
||||||
|
</li> |
||||||
|
</ul> |
||||||
|
|
||||||
|
{% if request.user == customer %} |
||||||
|
<ul class="color-menu"> |
||||||
|
<li> |
||||||
|
<a href="{% url 'projects:detail' proj.pk %}#new-answers">Новые: {{ proj|get_new_answers|length }}</a> |
||||||
|
</li> |
||||||
|
<li> |
||||||
|
<a href="{% url 'projects:detail' proj.pk %}#candidate-answers">Кандидаты: {{ proj|get_candidate_answers|length }}</a> |
||||||
|
</li> |
||||||
|
<li> |
||||||
|
<a href="{% url 'projects:detail' proj.pk %}#rejected-answers">Отказал: {{ proj|get_rejected_answers|length }}</a> |
||||||
|
</li> |
||||||
|
</ul> |
||||||
|
{% endif %} |
||||||
|
|
||||||
|
<p class="textPro"> |
||||||
|
{{ proj.text }} |
||||||
|
</p> |
||||||
|
|
||||||
|
<ul class="listPro"> |
||||||
|
<li>{{ proj.created }}</li> |
||||||
|
<li>{{ proj.hit_count.hits }}</li> |
||||||
|
<li>{{ proj.answers.count }}</li> |
||||||
|
<li>{{ customer.get_full_name }}</li> |
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-lg-3 rightPro right-pro-red"> |
||||||
|
<p class="cenaPro"> |
||||||
|
{{ proj.budget }} <i |
||||||
|
class="{% fa_currency_classes proj.currency %}"></i> |
||||||
|
</p> |
||||||
|
|
||||||
|
{% if request.user == proj.customer %} |
||||||
|
<div class="open-projects-div1"> |
||||||
|
<ul> |
||||||
|
<li> |
||||||
|
<a href='{% url 'projects:customer-project-edit' pk=proj.pk %}?back={{ request.path }}'>Редактировать</a> |
||||||
|
</li> |
||||||
|
|
||||||
|
<li> |
||||||
|
<form action="{% url 'projects:customer-project-trash' pk=proj.pk %}" |
||||||
|
method="POST" novalidate> |
||||||
|
{% csrf_token %} |
||||||
|
<input type="hidden" name="next" |
||||||
|
value="{{ request.path }}"> |
||||||
|
<a href="#" |
||||||
|
onclick="$(this).closest('form').submit(); return false">Переместить |
||||||
|
в корзину</a> |
||||||
|
</form> |
||||||
|
</li> |
||||||
|
|
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
|
||||||
|
|
||||||
|
{% endif %} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{% endfor %} |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="col-lg-12 pagin"> |
||||||
|
{% include 'partials/pagination.html' %} |
||||||
|
</div> |
||||||
|
</div> |
||||||
@ -0,0 +1,48 @@ |
|||||||
|
<div class="row" style="margin: 35px 0"> |
||||||
|
{% if request.user == customer %} |
||||||
|
<div class="col-lg-12"> |
||||||
|
<div class="btn-group btn-round"> |
||||||
|
<a data-toggle="tab" href="#_objects" |
||||||
|
class="btn btn-default tab-inserted active"> |
||||||
|
Текущие объекты |
||||||
|
<span>{{ objects.count }}</span> |
||||||
|
</a> |
||||||
|
<a data-toggle="tab" href="#trashed_objects" |
||||||
|
class="btn btn-default tab-inserted"> |
||||||
|
Удаленные объекты |
||||||
|
<span>{{ trashed_objects.count }}</span> |
||||||
|
</a> |
||||||
|
</div> |
||||||
|
<a href="{% url 'projects:customer-project-create' %}" |
||||||
|
style="float: right; letter-spacing: 4px; padding-left: 35px; padding-right: 35px" |
||||||
|
class="btn btn-simple"> |
||||||
|
Добавить объект |
||||||
|
</a> |
||||||
|
</div> |
||||||
|
{% endif %} |
||||||
|
</div> |
||||||
|
<div class="row"> |
||||||
|
<div class="col-lg-12"> |
||||||
|
<div class="link-sort"> |
||||||
|
Сортировать по: |
||||||
|
{# name="name" #} |
||||||
|
<button class="bnt btn-default" type="submit" onclick="sortRealtyBy({sortBy: 'name', user_id: '{{ customer.id }}', state: 'active'}, '#_objects')"> |
||||||
|
названию |
||||||
|
</button> |
||||||
|
<button class="bnt btn-default" type="submit" onclick="sortRealtyBy({sortBy: 'created', user_id: '{{ customer.id }}', state: 'active'}, '#_objects')"> |
||||||
|
дате создания |
||||||
|
</button> |
||||||
|
<button class="bnt btn-default" type="submit" onclick="sortRealtyBy({sortBy: 'num_orders', user_id: '{{ customer.id }}', state: 'active'}, '#_objects')"> |
||||||
|
количеству заказов |
||||||
|
</button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="tab-content"> |
||||||
|
<div id="_objects" class="tab-pane fade in active"> |
||||||
|
{% include 'partials/inc-objects.html' with objects=objects %} |
||||||
|
</div> |
||||||
|
<div id="trashed_objects" class="tab-pane fade"> |
||||||
|
{% include 'partials/inc-objects.html' with objects=trashed_objects trash=1 %} |
||||||
|
</div> |
||||||
|
</div> |
||||||
@ -0,0 +1,39 @@ |
|||||||
|
<div class="old-main"> |
||||||
|
{% if request.user == customer %} |
||||||
|
<div class="row" style="margin: 35px 0;"> |
||||||
|
<div class="col-lg-12"> |
||||||
|
<div class="btn-group btn-round"> |
||||||
|
<a data-toggle="tab" href="#_projects" |
||||||
|
class="btn btn-default tab-inserted active"> |
||||||
|
Текущие объекты |
||||||
|
<span>{{ open_projects.count }}</span> |
||||||
|
</a> |
||||||
|
{% if request.user == customer %} |
||||||
|
<a data-toggle="tab" href="#trashed_projects" |
||||||
|
class="btn btn-default tab-inserted"> |
||||||
|
Удаленные объекты |
||||||
|
<span>{{ trashed_projects.count }}</span> |
||||||
|
</a> |
||||||
|
{% endif %} |
||||||
|
</div> |
||||||
|
|
||||||
|
{# <div style="display: inline-block;">#} |
||||||
|
{# Filter be here#} |
||||||
|
{# </div>#} |
||||||
|
<a href="{% url 'projects:customer-project-create' %}" |
||||||
|
style="float: right; letter-spacing: 4px; padding-left: 35px; padding-right: 35px" |
||||||
|
class="btn btn-simple"> |
||||||
|
Разместить заказ |
||||||
|
</a> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{% endif %} |
||||||
|
<div class="tab-content"> |
||||||
|
<div id="_projects" class="tab-pane fade in active"> |
||||||
|
{% include 'partials/inc-projects.html' with open_projects=open_projects %} |
||||||
|
</div> |
||||||
|
<div id="trashed_projects" class="tab-pane fade"> |
||||||
|
{% include 'partials/inc-projects.html' with open_projects=trashed_projects trash=1 %} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
@ -0,0 +1,29 @@ |
|||||||
|
<div class="old-main"> |
||||||
|
{% for review in reviews %} |
||||||
|
<div class="new-comm-44"> |
||||||
|
<div class="col-lg-12"> |
||||||
|
<p class="nameComm"> |
||||||
|
<a href="#">{{ review.from_contractor.get_full_name }}</a> |
||||||
|
</p> |
||||||
|
|
||||||
|
<span class="dateComm44"> |
||||||
|
{{ review.project.get_deal_type_display }} |
||||||
|
</span> |
||||||
|
|
||||||
|
<div class="stars box-sizing"> |
||||||
|
<a href="#"> |
||||||
|
{% if review.type == 'positive' %} |
||||||
|
Положительный отзыв |
||||||
|
{% elif review.type == 'negative' %} |
||||||
|
Отрицательный отзыв |
||||||
|
{% else %} |
||||||
|
Нейтральный отзыв |
||||||
|
{% endif %} |
||||||
|
</a> |
||||||
|
</div> |
||||||
|
|
||||||
|
<p class="textComm44">{{ review.text }}</p> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{% endfor %} |
||||||
|
</div> |
||||||
Loading…
Reference in new issue