parent
958ba883c3
commit
799df0ea99
16 changed files with 995 additions and 0 deletions
@ -0,0 +1,374 @@ |
||||
# SOME DESCRIPTIVE TITLE. |
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
||||
# This file is distributed under the same license as the PACKAGE package. |
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
||||
# |
||||
#, fuzzy |
||||
msgid "" |
||||
msgstr "" |
||||
"Project-Id-Version: PACKAGE VERSION\n" |
||||
"Report-Msgid-Bugs-To: \n" |
||||
"POT-Creation-Date: 2015-09-08 13:44+0300\n" |
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
||||
"Language-Team: LANGUAGE <LL@li.org>\n" |
||||
"Language: \n" |
||||
"MIME-Version: 1.0\n" |
||||
"Content-Type: text/plain; charset=UTF-8\n" |
||||
"Content-Transfer-Encoding: 8bit\n" |
||||
|
||||
#: django_messages/admin.py:21 |
||||
msgid "group" |
||||
msgstr "" |
||||
|
||||
#: django_messages/admin.py:22 |
||||
msgid "Creates the message optionally for all users or a group of users." |
||||
msgstr "" |
||||
|
||||
#: django_messages/admin.py:30 |
||||
msgid "All users" |
||||
msgstr "" |
||||
|
||||
#: django_messages/admin.py:48 django_messages/models.py:94 |
||||
msgid "Message" |
||||
msgstr "" |
||||
|
||||
#: django_messages/admin.py:55 |
||||
msgid "Date/time" |
||||
msgstr "" |
||||
|
||||
#: django_messages/apps.py:6 django_messages/models.py:95 |
||||
msgid "Messages" |
||||
msgstr "" |
||||
|
||||
#: django_messages/fields.py:56 |
||||
#, python-format |
||||
msgid "The following usernames are incorrect: %(users)s" |
||||
msgstr "" |
||||
|
||||
#: django_messages/forms.py:17 django_messages/forms.py:66 |
||||
#: django_messages/models.py:55 |
||||
#: django_messages/templates/django_messages/inbox.html:10 |
||||
#: django_messages/templates/django_messages/outbox.html:10 |
||||
#: django_messages/templates/django_messages/trash.html:10 |
||||
#: django_messages/templates/django_messages/view.html:8 |
||||
msgid "Subject" |
||||
msgstr "" |
||||
|
||||
#: django_messages/forms.py:18 django_messages/forms.py:46 |
||||
#: django_messages/forms.py:67 django_messages/models.py:56 |
||||
msgid "Body" |
||||
msgstr "" |
||||
|
||||
#: django_messages/forms.py:65 django_messages/models.py:58 |
||||
#: django_messages/templates/django_messages/outbox.html:10 |
||||
#: django_messages/templates/django_messages/view.html:14 |
||||
msgid "Recipient" |
||||
msgstr "" |
||||
|
||||
#: django_messages/management.py:9 |
||||
msgid "Message Received" |
||||
msgstr "" |
||||
|
||||
#: django_messages/management.py:9 |
||||
msgid "you have received a message" |
||||
msgstr "" |
||||
|
||||
#: django_messages/management.py:10 |
||||
msgid "Message Sent" |
||||
msgstr "" |
||||
|
||||
#: django_messages/management.py:10 |
||||
msgid "you have sent a message" |
||||
msgstr "" |
||||
|
||||
#: django_messages/management.py:11 |
||||
msgid "Message Replied" |
||||
msgstr "" |
||||
|
||||
#: django_messages/management.py:11 |
||||
msgid "you have replied to a message" |
||||
msgstr "" |
||||
|
||||
#: django_messages/management.py:12 |
||||
msgid "Reply Received" |
||||
msgstr "" |
||||
|
||||
#: django_messages/management.py:12 |
||||
msgid "you have received a reply to a message" |
||||
msgstr "" |
||||
|
||||
#: django_messages/management.py:13 |
||||
msgid "Message Deleted" |
||||
msgstr "" |
||||
|
||||
#: django_messages/management.py:13 |
||||
msgid "you have deleted a message" |
||||
msgstr "" |
||||
|
||||
#: django_messages/management.py:14 |
||||
msgid "Message Recovered" |
||||
msgstr "" |
||||
|
||||
#: django_messages/management.py:14 |
||||
msgid "you have undeleted a message" |
||||
msgstr "" |
||||
|
||||
#: django_messages/models.py:57 |
||||
#: django_messages/templates/django_messages/inbox.html:10 |
||||
#: django_messages/templates/django_messages/trash.html:10 |
||||
#: django_messages/templates/django_messages/view.html:10 |
||||
msgid "Sender" |
||||
msgstr "" |
||||
|
||||
#: django_messages/models.py:59 |
||||
msgid "Parent message" |
||||
msgstr "" |
||||
|
||||
#: django_messages/models.py:60 |
||||
msgid "sent at" |
||||
msgstr "" |
||||
|
||||
#: django_messages/models.py:61 |
||||
msgid "read at" |
||||
msgstr "" |
||||
|
||||
#: django_messages/models.py:62 |
||||
msgid "replied at" |
||||
msgstr "" |
||||
|
||||
#: django_messages/models.py:63 |
||||
msgid "Sender deleted at" |
||||
msgstr "" |
||||
|
||||
#: django_messages/models.py:64 |
||||
msgid "Recipient deleted at" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/base.html:9 |
||||
#: django_messages/templates/django_messages/inbox.html:6 |
||||
#: django_messages/templates/django_messages/new_message.html:13 |
||||
msgid "Inbox" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/base.html:10 |
||||
#: django_messages/templates/django_messages/outbox.html:6 |
||||
msgid "Sent Messages" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/base.html:11 |
||||
msgid "New Message" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/base.html:12 |
||||
msgid "Trash" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/compose.html:4 |
||||
msgid "Compose Message" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/compose.html:10 |
||||
msgid "Send" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/inbox.html:10 |
||||
msgid "Received" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/inbox.html:10 |
||||
#: django_messages/templates/django_messages/outbox.html:10 |
||||
#: django_messages/templates/django_messages/trash.html:10 |
||||
msgid "Action" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/inbox.html:22 |
||||
#: django_messages/templates/django_messages/outbox.html:19 |
||||
#: django_messages/templates/django_messages/trash.html:19 |
||||
#: django_messages/templates/django_messages/view.html:13 |
||||
msgid "DATETIME_FORMAT" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/inbox.html:23 |
||||
#: django_messages/templates/django_messages/outbox.html:20 |
||||
msgid "delete" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/inbox.html:29 |
||||
#: django_messages/templates/django_messages/outbox.html:26 |
||||
#: django_messages/templates/django_messages/trash.html:26 |
||||
msgid "No messages." |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/new_message.html:4 |
||||
#, python-format |
||||
msgid "" |
||||
"Hello %(recipient)s,\n" |
||||
"\n" |
||||
"you received a private message from %(sender)s with\n" |
||||
"the following contents:" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/new_message.html:12 |
||||
#, python-format |
||||
msgid "Sent from %(site_url)s" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/new_message.html:14 |
||||
#: django_messages/templates/django_messages/view.html:20 |
||||
msgid "Reply" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/outbox.html:10 |
||||
msgid "Sent" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/trash.html:6 |
||||
msgid "Deleted Messages" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/trash.html:10 |
||||
#: django_messages/templates/django_messages/view.html:12 |
||||
msgid "Date" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/trash.html:20 |
||||
msgid "undelete" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/trash.html:29 |
||||
msgid "" |
||||
"Deleted Messages are removed from the trash at unregular intervals, don't " |
||||
"rely on this feature for long-time storage." |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/view.html:6 |
||||
msgid "View Message" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/django_messages/view.html:22 |
||||
msgid "Delete" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/notification/messages_deleted/full.txt:1 |
||||
#, python-format |
||||
msgid "You have deleted the message '%(message)s'." |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/notification/messages_deleted/notice.html:1 |
||||
#, python-format |
||||
msgid "" |
||||
"You have deleted the message <a href=\"%(message_url)s\">%(message)s</a>." |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/notification/messages_received/full.txt:1 |
||||
#, python-format |
||||
msgid "" |
||||
"%(message_sender)s has sent you a message:\n" |
||||
"\n" |
||||
"%(message)s\n" |
||||
"\n" |
||||
"%(message_body)s\n" |
||||
"\n" |
||||
"http://%(current_site)s%(message_url)s" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/notification/messages_received/notice.html:2 |
||||
#, python-format |
||||
msgid "" |
||||
"You have received the message <a href=\"%(message_url)s\">%(message)s</a> " |
||||
"from %(message_sender)s." |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/notification/messages_received/short.txt:1 |
||||
#: django_messages/templates/notification/messages_reply_received/short.txt:1 |
||||
#, python-format |
||||
msgid "%(notice)s by %(message_sender)s" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/notification/messages_recovered/full.txt:1 |
||||
#, python-format |
||||
msgid "You have recovered the message '%(message)s'." |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/notification/messages_recovered/notice.html:1 |
||||
#, python-format |
||||
msgid "" |
||||
"You have recovered the message <a href=\"%(message_url)s\">%(message)s</a>." |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/notification/messages_replied/full.txt:1 |
||||
#, python-format |
||||
msgid "" |
||||
"You have replied to '%(message_parent_msg)s' from %(message_recipient)s." |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/notification/messages_replied/notice.html:2 |
||||
#, python-format |
||||
msgid "" |
||||
"You have replied to <a href=\"%(message_url)s\">%(message_parent_msg)s</a> " |
||||
"from %(message_recipient)s." |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/notification/messages_reply_received/full.txt:1 |
||||
#, python-format |
||||
msgid "" |
||||
"%(message_sender)s replied to '%(message_parent_msg)s':\n" |
||||
"\n" |
||||
"%(message)s\n" |
||||
"\n" |
||||
"%(message_body)s\n" |
||||
"\n" |
||||
"http://%(current_site)s%(message_url)s" |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/notification/messages_reply_received/notice.html:2 |
||||
#, python-format |
||||
msgid "%(message_sender)s has sent you a reply to %(message_parent_msg)s." |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/notification/messages_sent/full.txt:1 |
||||
#, python-format |
||||
msgid "You have sent the message '%(message)s' to %(message_recipient)s." |
||||
msgstr "" |
||||
|
||||
#: django_messages/templates/notification/messages_sent/notice.html:2 |
||||
#, python-format |
||||
msgid "" |
||||
"You have sent the message <a href=\"%(message_url)s\">%(message)s</a> to " |
||||
"%(message_recipient)s." |
||||
msgstr "" |
||||
|
||||
#: django_messages/utils.py:26 |
||||
#, python-format |
||||
msgid "" |
||||
"%(sender)s wrote:\n" |
||||
"%(body)s" |
||||
msgstr "" |
||||
|
||||
#: django_messages/utils.py:54 |
||||
#, python-format |
||||
msgid "Re%(prefix)s: %(subject)s" |
||||
msgstr "" |
||||
|
||||
#: django_messages/utils.py:60 |
||||
#, python-format |
||||
msgid "New Message: %(subject)s" |
||||
msgstr "" |
||||
|
||||
#: django_messages/views.py:78 django_messages/views.py:114 |
||||
msgid "Message successfully sent." |
||||
msgstr "" |
||||
|
||||
#: django_messages/views.py:121 |
||||
#, python-format |
||||
msgid "Re: %(subject)s" |
||||
msgstr "" |
||||
|
||||
#: django_messages/views.py:157 |
||||
msgid "Message successfully deleted." |
||||
msgstr "" |
||||
|
||||
#: django_messages/views.py:184 |
||||
msgid "Message successfully recovered." |
||||
msgstr "" |
||||
@ -0,0 +1,19 @@ |
||||
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage |
||||
|
||||
class SeoPaginator(Paginator): |
||||
|
||||
def validate_number(self, number): |
||||
"Validates the given 1-based page number." |
||||
try: |
||||
number = int(number) |
||||
except (TypeError, ValueError): |
||||
raise PageNotAnInteger('That page number is not an integer') |
||||
if number < 1: |
||||
raise EmptyPage('That page number is less than 1') |
||||
if number > self.num_pages: |
||||
if number == 1 and self.allow_empty_first_page: |
||||
pass |
||||
else: |
||||
number = 1 |
||||
return number |
||||
|
||||
@ -0,0 +1,122 @@ |
||||
# SOME DESCRIPTIVE TITLE. |
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
||||
# This file is distributed under the same license as the PACKAGE package. |
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
||||
# |
||||
#, fuzzy |
||||
msgid "" |
||||
msgstr "" |
||||
"Project-Id-Version: PACKAGE VERSION\n" |
||||
"Report-Msgid-Bugs-To: \n" |
||||
"POT-Creation-Date: 2015-09-08 13:44+0300\n" |
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
||||
"Language-Team: LANGUAGE <LL@li.org>\n" |
||||
"Language: \n" |
||||
"MIME-Version: 1.0\n" |
||||
"Content-Type: text/plain; charset=UTF-8\n" |
||||
"Content-Transfer-Encoding: 8bit\n" |
||||
|
||||
#: password_reset/forms.py:14 |
||||
msgid "Sorry, this user doesn't exist." |
||||
msgstr "" |
||||
|
||||
#: password_reset/forms.py:31 |
||||
msgid "Username" |
||||
msgstr "" |
||||
|
||||
#: password_reset/forms.py:32 |
||||
msgid "Email" |
||||
msgstr "" |
||||
|
||||
#: password_reset/forms.py:33 |
||||
msgid "Для восстановления пароля укажите email, который Вы регистрировали" |
||||
msgstr "" |
||||
|
||||
#: password_reset/forms.py:83 |
||||
msgid "Unable to find user." |
||||
msgstr "" |
||||
|
||||
#: password_reset/forms.py:89 |
||||
msgid "New password" |
||||
msgstr "" |
||||
|
||||
#: password_reset/forms.py:93 |
||||
msgid "New password (confirm)" |
||||
msgstr "" |
||||
|
||||
#: password_reset/forms.py:98 |
||||
msgid "The two passwords didn't match." |
||||
msgstr "" |
||||
|
||||
#: password_reset/templates/password_reset/recovery_done.html:3 |
||||
msgid "New password set" |
||||
msgstr "" |
||||
|
||||
#: password_reset/templates/password_reset/recovery_done.html:6 |
||||
msgid "" |
||||
"Your password has successfully been reset. You can use it right now on the " |
||||
"login page." |
||||
msgstr "" |
||||
|
||||
#: password_reset/templates/password_reset/recovery_email.txt:1 |
||||
#, python-format |
||||
msgid "Dear %(username)s," |
||||
msgstr "" |
||||
|
||||
#: password_reset/templates/password_reset/recovery_email.txt:3 |
||||
#, python-format |
||||
msgid "" |
||||
"You -- or someone pretending to be you -- has requested a password reset on " |
||||
"%(domain)s." |
||||
msgstr "" |
||||
|
||||
#: password_reset/templates/password_reset/recovery_email.txt:5 |
||||
msgid "You can set your new password by following this link:" |
||||
msgstr "" |
||||
|
||||
#: password_reset/templates/password_reset/recovery_email.txt:9 |
||||
msgid "" |
||||
"If you don't want to reset your password, simply ignore this email and it " |
||||
"will stay unchanged." |
||||
msgstr "" |
||||
|
||||
#: password_reset/templates/password_reset/recovery_email_subject.txt:1 |
||||
#, python-format |
||||
msgid "Password recovery on %(domain)s" |
||||
msgstr "" |
||||
|
||||
#: password_reset/templates/password_reset/recovery_form.html:5 |
||||
msgid "Password recovery" |
||||
msgstr "" |
||||
|
||||
#: password_reset/templates/password_reset/recovery_form.html:10 |
||||
msgid "Recover my password" |
||||
msgstr "" |
||||
|
||||
#: password_reset/templates/password_reset/reset.html:5 |
||||
#, python-format |
||||
msgid "" |
||||
"Sorry, this password reset link is invalid. You can still <a href=" |
||||
"\"%(recovery_url)s\">request a new one</a>." |
||||
msgstr "" |
||||
|
||||
#: password_reset/templates/password_reset/reset.html:7 |
||||
#, python-format |
||||
msgid "Hi, <strong>%(username)s</strong>. Please choose your new password." |
||||
msgstr "" |
||||
|
||||
#: password_reset/templates/password_reset/reset.html:11 |
||||
msgid "Set new password" |
||||
msgstr "" |
||||
|
||||
#: password_reset/templates/password_reset/reset_sent.html:4 |
||||
msgid "Password recovery sent" |
||||
msgstr "" |
||||
|
||||
#: password_reset/templates/password_reset/reset_sent.html:7 |
||||
#, python-format |
||||
msgid "" |
||||
"An email was sent to <strong>%(email)s</strong> %(ago)s ago. Use the link in " |
||||
"it to set a new password." |
||||
msgstr "" |
||||
@ -0,0 +1,11 @@ |
||||
{% extends 'base.html' %} |
||||
{% block sidebar %}{% endblock %} |
||||
{% block body %} |
||||
<form action="" method="post">{% csrf_token %} |
||||
<div class="controls"> |
||||
<p>Вы точно хотите удалить "{{ object }}" ?</p> |
||||
<input class="btn btn-large btn-danger delete" type="submit" value="Да" /> |
||||
<a class="btn btn-large btn-primary" href = "/admin/article/blog/all">Нет</a> |
||||
</div> |
||||
</form> |
||||
{% endblock %} |
||||
@ -0,0 +1,38 @@ |
||||
{% extends 'base.html' %} |
||||
|
||||
{% block body %} |
||||
|
||||
<div class="box span8"> |
||||
<div class="box-header well"> |
||||
<h2><i class="icon-arrow-down"></i>{{ verbose }}</h2> |
||||
</div> |
||||
<div class="box-content"> |
||||
{% block list_table %} |
||||
<table class="table table-hover"> |
||||
|
||||
<thead> |
||||
<tr> |
||||
<th>Объект</th> |
||||
<th>ссылка для отслеживания</th> |
||||
<th> </th> |
||||
<th> </th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
{% for item in object_list %} |
||||
<tr> |
||||
<td>{{ item }}</td> |
||||
<td>{{request.get_host}}{{ item.get_click_link }}</td> |
||||
<td><a href="{% url 'expobanner-update_link' item.id %}">Изменить</a> </td> |
||||
<td><a href="{% url 'expobanner_stat_link' item.id %}">Статистика</a> </td> |
||||
</tr> |
||||
{% endfor %} |
||||
</tbody> |
||||
</table> |
||||
{% endblock %} |
||||
</div> |
||||
{# pagination #} |
||||
{% include 'admin/includes/admin_pagination.html' with page_obj=object_list %} |
||||
</div> |
||||
|
||||
{% endblock %} |
||||
@ -0,0 +1,55 @@ |
||||
{% extends 'admin/base.html' %} |
||||
|
||||
{% block body %} |
||||
|
||||
<div class="box span8"> |
||||
<div class="box-header well"> |
||||
<h2><i class="icon-arrow-down"></i>Список выставок на главной</h2> |
||||
</div> |
||||
<div class="box-content"> |
||||
{% block list_table %} |
||||
<div style="float:left;"> |
||||
<a class="btn btn-success" href="{% url 'expobanner-create_main' %}"><i class="icon-plus-sign icon-white"></i> Добавить выставку</a> |
||||
</div> |
||||
<div style="float:right;"> |
||||
<form method="get" id="form"> |
||||
Только опубликование<input id="public" type="checkbox" name="onlypublic" value="true"> |
||||
</form> |
||||
</div> |
||||
<table class="table table-hover"> |
||||
<thead> |
||||
<tr> |
||||
<th>Выставка</th> |
||||
<th>Позиция</th> |
||||
<th> </th> |
||||
<th> </th> |
||||
<th> </th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
{% for item in object_list %} |
||||
<tr> |
||||
<td>{{ item }}</td> |
||||
<td>{{ item.main.position }}</td> |
||||
<td><a href="{% url 'expobanner-update_main' item.main.id %}">Изменить</a> </td> |
||||
<td>{% if item.main.public %}<a href="{% url 'expobanner-main-turn' item.main.id 'off' %}">отключить</a>{% else %}<a href="{% url 'expobanner-main-turn' item.main.id 'on' %}">включить</a>{% endif %} </td> |
||||
<td><a href="{% url 'expobanner_stat_main' item.main.id %}">Статистика</a> </td> |
||||
</tr> |
||||
{% endfor %} |
||||
</tbody> |
||||
</table> |
||||
{% endblock %} |
||||
</div> |
||||
{# pagination #} |
||||
{% include 'admin/includes/admin_pagination.html' with page_obj=object_list %} |
||||
</div> |
||||
<script> |
||||
var cbox = $("#public"); |
||||
var form = $("#form"); |
||||
if(location.search != "") |
||||
cbox.attr('checked', true); |
||||
cbox.click(function(){ |
||||
form.submit() |
||||
}); |
||||
</script> |
||||
{% endblock %} |
||||
@ -0,0 +1,90 @@ |
||||
{% extends 'admin/base.html' %} |
||||
{% load static %} |
||||
{% load i18n %} |
||||
{% block scripts %} |
||||
{# datetimepicker #} |
||||
<script type="text/javascript"> |
||||
console.log("2"); |
||||
|
||||
</script> |
||||
<script src="{% static 'js/jquery.dataTables.min.js' %}"></script> |
||||
|
||||
{% endblock %} |
||||
|
||||
|
||||
{% block body %} |
||||
<div class="row-fluid sortable"> |
||||
<div class="box span12"> |
||||
<div class="box-header well" data-original-title> |
||||
<h2><i class="icon-align-justify"></i> {{ object.get_event }}</h2> |
||||
</div> |
||||
<div class="box-content"> |
||||
<div class="row-fluid"> |
||||
<div class="span8">Линк на статистику: <b>{{ request.get_host }}/expo-b/banner/{{ object.link.id }}/stat/</b></div> |
||||
<div class="span4">Пароль: <b>{{ object.link.stat_pswd }}</b></div> |
||||
</div> |
||||
<!-- date filter --> |
||||
<div class="row-fluid"> |
||||
<form class = "form-inline" method="get" > |
||||
<div class="form-group "> |
||||
<label class="control-label" for="id_date_from"> {% trans "с: " %}</label> |
||||
<input class="form-control" type="text" name="date_from" id="id_date_from"> |
||||
<label for="id_date_to" >{% trans "по: " %}</label> |
||||
<input class="form-control" type="text" name="date_to" id="id_date_to" > |
||||
<button class="btn btn-primary" type="submit" >{% trans "Фильтровать" %}</button> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
<!-- end date filter --> |
||||
<table class="table table-striped table-bordered bootstrap-datatable datatable"> |
||||
<thead> |
||||
<tr> |
||||
<th>Дата</th> |
||||
<th>Показы</th> |
||||
<th>Клики</th> |
||||
<th>Уникальные показы</th> |
||||
<th>Уникальные клики</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
<tr> |
||||
<td><b>Всего</b></td> |
||||
<td>{{ all.views }}</td> |
||||
<td>{{ all.clicks }}</td> |
||||
|
||||
<td>{{ all.unique_views}}</td> |
||||
<td>{{ all.unique_clicks }}</td> |
||||
</tr> |
||||
{% with stats=stats %} |
||||
{% for stat in stats %} |
||||
<tr> |
||||
<td>{{ stat.date|date:"Y-m-d" }}</td> |
||||
<td>{{ stat.view }}</td> |
||||
<td>{{ stat.click }}</td> |
||||
|
||||
<td>{{ stat.unique_view }}</td> |
||||
<td>{{ stat.unique_click }}</td> |
||||
</tr> |
||||
{% endfor %} |
||||
{% endwith %} |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<script> |
||||
console.log("down"); |
||||
$('#id_date_from').datetimepicker({ |
||||
todayHighlight: true, |
||||
format : 'dd.mm.yyyy', |
||||
minView:2 |
||||
}); |
||||
$('#id_date_to').datetimepicker({ |
||||
todayHighlight: true, |
||||
format : 'dd.mm.yyyy', |
||||
minView:2 |
||||
}); |
||||
console.log("1"); |
||||
|
||||
</script> |
||||
{% endblock %} |
||||
@ -0,0 +1,11 @@ |
||||
<div class="abn" id="expo_b_detail_inner_3"> |
||||
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> |
||||
<!-- Горизонтальный --> |
||||
<ins class="adsbygoogle" |
||||
style="display:inline-block;width:728px;height:90px" |
||||
data-ad-client="ca-pub-5242360491829403" |
||||
data-ad-slot="6420652378"></ins> |
||||
<script> |
||||
(adsbygoogle = window.adsbygoogle || []).push({}); |
||||
</script> |
||||
</div> |
||||
@ -0,0 +1,2 @@ |
||||
<div id="expo_b_popup" class="popup-window" style="width:900px;"> |
||||
</div> |
||||
@ -0,0 +1,2 @@ |
||||
<div id="expo_b_popup_2" class="popup-window" style="width:700px;"> |
||||
</div> |
||||
@ -0,0 +1,32 @@ |
||||
{% extends "client/base_catalog.html" %} |
||||
{% load static %} |
||||
{% load i18n %} |
||||
{% load template_filters %} |
||||
|
||||
{% block bread_scrumbs %} |
||||
<div class="bread-crumbs"> |
||||
<a href="/">{% trans 'Главная страница' %}</a> |
||||
<strong>{{ title }}</strong> |
||||
</div> |
||||
{% endblock %} |
||||
|
||||
|
||||
{% block content_list %} |
||||
{% with objects=object_list %} |
||||
{% for obj in objects %} |
||||
{% set cur_word = obj.place.name %} |
||||
{% if cur_word|slice:":1"|lower != prev_word|slice:":1"|lower and forloop.counter != 1 %} |
||||
</ul> |
||||
{% endif %} |
||||
{% if cur_word|slice:":1"|lower != prev_word|slice:":1"|lower %} |
||||
<ul class="leter-list"> |
||||
<div class="leter"><font size="5">{{ cur_word|slice:":1"|upper }}</font></div> |
||||
{% endif %} |
||||
<li> |
||||
<a href="{{ obj.get_absolute_url }}">{{ obj.place }}</a> |
||||
</li> |
||||
{% set prev_word = obj.place.name %} |
||||
{% endfor %} |
||||
{% endwith %} |
||||
|
||||
{% endblock %} |
||||
@ -0,0 +1,113 @@ |
||||
(function () { |
||||
"use strict"; |
||||
|
||||
var API_URL_ROOT = "/expo-b/get-banners/"; |
||||
|
||||
var getUrl = function () { |
||||
var search = []; |
||||
|
||||
var parts = /^\/([^\/]+)(?:\/|$)/i.exec(location.pathname); |
||||
if (parts) { |
||||
search.push("catalog=" + encodeURIComponent(parts[1])); |
||||
} else { |
||||
search.push("catalog="); |
||||
} |
||||
|
||||
var elements = $("[id^=\"expo_b_\"]"); |
||||
for (var j = 0; j < elements.length; j++) { |
||||
search.push("places=" + encodeURIComponent($(elements[j]).attr("id"))); |
||||
} |
||||
|
||||
var data = window.sendData; |
||||
if (data instanceof Object) { |
||||
for (var key in data) { |
||||
if (data.hasOwnProperty(key)) { |
||||
var value = data[key]; |
||||
|
||||
if (value instanceof Array) { |
||||
for (var i = 0, l = value.length; i < l; i++) { |
||||
search.push(encodeURIComponent(key) + "=" + encodeURIComponent(value[i])); |
||||
} |
||||
} else { |
||||
search.push(encodeURIComponent(key) + "=" + encodeURIComponent(value)); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
return API_URL_ROOT + "?" + search.join("&"); |
||||
}; |
||||
|
||||
var getBanners = function (url, callback) { |
||||
var xhr = new XMLHttpRequest(); |
||||
xhr.open("GET", url, true); |
||||
|
||||
xhr.onreadystatechange = function (event) { |
||||
if (event.target.readyState === 4) { |
||||
if (event.target.status === 200) { |
||||
try { |
||||
callback(JSON.parse(event.target.responseText)); |
||||
} catch (error) { |
||||
// do nothing
|
||||
} |
||||
} |
||||
} |
||||
}; |
||||
|
||||
xhr.send(); |
||||
}; |
||||
|
||||
var addBanner = function (banner) { |
||||
var parent = document.getElementById(banner.id); |
||||
|
||||
if (parent) { |
||||
if (banner.is_popup) { |
||||
if (banner.is_img) { |
||||
parent.innerHTML = |
||||
"<header class=\"clearfix\"><div class=\"pw-title\"></div></header><div class=\"pw-body clearfix\">" + |
||||
"<a href=\""+ banner.url + "\"><img src=\"" + banner.img + "\" alt=\"" + banner.alt + "\" /></a></div>"; |
||||
} else if (banner.is_html) { |
||||
parent.innerHTML = banner.text; |
||||
} |
||||
|
||||
$("#expo-form-popup").on("submit", function(e) { |
||||
e.preventDefault(); |
||||
window.location = $("#expo-form-popup").attr("action"); |
||||
}); |
||||
|
||||
setTimeout(function(){ |
||||
$.fancybox.open([{"href": "#" + banner.id}], {}); |
||||
}, 5000); |
||||
} else { |
||||
if (banner.is_img) { |
||||
var a = document.createElement("a"); |
||||
a.href = banner.url; |
||||
|
||||
var img = document.createElement("img"); |
||||
img.src = banner.img; |
||||
img.alt = banner.alt; |
||||
|
||||
a.appendChild(img); |
||||
parent.appendChild(a); |
||||
} else if (banner.is_html) { |
||||
parent.innerHTML = banner.text; |
||||
} |
||||
} |
||||
} |
||||
|
||||
}; |
||||
|
||||
var insertBanners = function (data) { |
||||
if (data instanceof Array) { |
||||
for (var i = 0, l = data.length; i < l; i++) { |
||||
addBanner(data[i]); |
||||
} |
||||
} |
||||
}; |
||||
|
||||
var main = function () { |
||||
getBanners(getUrl(), insertBanners); |
||||
}; |
||||
|
||||
window.addEventListener("load", main); |
||||
})(); |
||||
@ -0,0 +1,69 @@ |
||||
(function () { |
||||
"use strict"; |
||||
|
||||
var API_URL_ROOT = "/expo-b/get-tops/"; |
||||
var PARENT_ID = "expo_top_events"; |
||||
|
||||
var getUrl = function () { |
||||
var search = []; |
||||
|
||||
var parts = /^\/([^\/]+)(?:\/|$)/i.exec(location.pathname); |
||||
if (parts) { |
||||
search.push("catalog=" + encodeURIComponent(parts[1])); |
||||
} else { |
||||
search.push("catalog="); |
||||
} |
||||
|
||||
var data = window.sendData; |
||||
if (data instanceof Object) { |
||||
for (var key in data) { |
||||
if (data.hasOwnProperty(key)) { |
||||
var value = data[key]; |
||||
|
||||
if (value instanceof Array) { |
||||
for (var i = 0, l = value.length; i < l; i++) { |
||||
search.push(encodeURIComponent(key) + "=" + encodeURIComponent(value[i])); |
||||
} |
||||
} else { |
||||
search.push(encodeURIComponent(key) + "=" + encodeURIComponent(value)); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
return API_URL_ROOT + "?" + search.join("&"); |
||||
}; |
||||
|
||||
var getTops = function (url, callback) { |
||||
var xhr = new XMLHttpRequest(); |
||||
xhr.open("GET", url, true); |
||||
|
||||
xhr.onreadystatechange = function (event) { |
||||
if (event.target.readyState === 4) { |
||||
if (event.target.status === 200) { |
||||
try { |
||||
callback(event.target.responseText); |
||||
} catch (error) { |
||||
// do nothing
|
||||
} |
||||
} |
||||
} |
||||
}; |
||||
|
||||
xhr.send(); |
||||
}; |
||||
|
||||
var insertTops = function (text) { |
||||
var parent = document.getElementById(PARENT_ID); |
||||
|
||||
if (parent) { |
||||
parent.innerHTML = text; |
||||
} |
||||
}; |
||||
|
||||
var main = function () { |
||||
getTops(getUrl(), insertTops); |
||||
}; |
||||
|
||||
window.addEventListener("load", main); |
||||
})(); |
||||
@ -0,0 +1,2 @@ |
||||
Должен был быть модуль для добавления событий и других даных через кабинет пользователя. |
||||
Остановленна разработка по ненадобности, так как делается функционал добавление событий через црм |
||||
Loading…
Reference in new issue