something else

remotes/origin/PR-39
PekopT 9 years ago
parent 182fc9b779
commit da3793495d
  1. 29
      templates/partials/base.html
  2. 3
      users/models.py

@ -1,6 +1,6 @@
<!doctype html>{% load staticfiles %}
{#{% load compress %}#}
<html>
<html lang="ru">
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge, chrome=1'>
@ -11,7 +11,7 @@
<title>PROEKTON</title>
{# {% compress css %}#}
{# {% compress css %}#}
<link rel='stylesheet' href='{% static "lib/jquery-ui/jquery-ui.css" %}'>
<link rel='stylesheet' href='{% static "css/bootstrap.css" %}'>
<link rel='stylesheet' href='{% static "css/font-awesome.min.css" %}'>
@ -30,7 +30,17 @@
{% if TEMPLATE_DEBUG %}
<link rel='stylesheet' href='{% static "css/dev-colors.css" %}'> <!-- Dev-time only, temporary!!! -->
{% endif %}
{# {% endcompress %}#}
<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_">
<link rel="canonical" href="_URL_">
</head>
<body>
@ -42,7 +52,8 @@
{% endif %}
{% if TEMPLATE_DEBUG %}
<div ondblclick="$(this).css('display', 'none')" style="position: absolute; left: 0; bottom: 0; padding: 6px; color: black; background-color: {% if request.user.is_contractor %}#BADA55{% else %}#C0FFEE{% endif %}; z-index: 50">
<div ondblclick="$(this).css('display', 'none')"
style="position: absolute; left: 0; bottom: 0; padding: 6px; color: black; background-color: {% if request.user.is_contractor %}#BADA55{% else %}#C0FFEE{% endif %}; z-index: 50">
{{ request.user }}<br>
{% if request.user.is_authenticated %}
@ -101,12 +112,12 @@
sock.onmessage = function (event) {
var notificationData = JSON.parse(event.data);
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>";
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>";
}
$.jGrowl("Вам пришло новое сообщение!<br />" + outMessage, { life: 15000});
$.jGrowl("Вам пришло новое сообщение!<br />" + outMessage, {life: 15000});
};
this.add_message = function (messageData) {
sock.send(JSON.stringify(messageData));

@ -160,8 +160,7 @@ class User(AbstractBaseUser, PermissionsMixin):
@property
def is_staff(self):
# return self.is_superuser
return True
return self.is_superuser
def __str__(self):
return self.email

Loading…
Cancel
Save