remotes/origin/1203
commit
b6de05dc0e
13 changed files with 235 additions and 39 deletions
|
After Width: | Height: | Size: 704 B |
@ -0,0 +1,58 @@ |
|||||||
|
{% extends 'admin/base.html' %} |
||||||
|
{% load staticfiles %} |
||||||
|
{% block body %} |
||||||
|
|
||||||
|
<div class="box span10"> |
||||||
|
<div class="box-header well"> |
||||||
|
<h2><i class="icon-arrow-down"></i>История для {{ newsletter.title }}</h2> |
||||||
|
</div> |
||||||
|
<div class="box-content"> |
||||||
|
<form id="id_form" class="form-inline"> |
||||||
|
<div class="form-group"> |
||||||
|
<select class="form-control" name="filter" id="filter"> |
||||||
|
<option>Фильтровать</option> |
||||||
|
<option value="">Все</option> |
||||||
|
{% for id, name in choices%} |
||||||
|
<option class="opt" value="{{ id }}">{{ name }}</option> |
||||||
|
{% endfor %} |
||||||
|
</select> |
||||||
|
</div> |
||||||
|
</form> |
||||||
|
<table class="table table-hover table table-bordered table-striped"> |
||||||
|
<colgroup> |
||||||
|
<col width="33%"> |
||||||
|
<col width="33%"> |
||||||
|
<col width="33%"> |
||||||
|
</colgroup> |
||||||
|
<thead> |
||||||
|
<tr> |
||||||
|
<th>Дата</th> |
||||||
|
<th>Контакт</th> |
||||||
|
<th>Статус</th> |
||||||
|
</tr> |
||||||
|
</thead> |
||||||
|
<tbody> |
||||||
|
{% for item in object_list %} |
||||||
|
<tr> |
||||||
|
<td>{{ item.creation_date|date:"Y-m-d H:i:s" }}</td> |
||||||
|
<td>{{ item.contact.email }}</td> |
||||||
|
<td>{{ item.get_verbose_status|safe }}</td> |
||||||
|
</tr> |
||||||
|
{% endfor %} |
||||||
|
</tbody> |
||||||
|
</table> |
||||||
|
|
||||||
|
</div> |
||||||
|
{# pagination #} |
||||||
|
{% include 'admin/includes/admin_pagination.html' with page_obj=object_list %} |
||||||
|
</div> |
||||||
|
<script> |
||||||
|
$(document).ready(function(){ |
||||||
|
$("#filter").on('change', function(event){ |
||||||
|
console.log("click"); |
||||||
|
$("#id_form").submit(); |
||||||
|
}) |
||||||
|
}) |
||||||
|
</script> |
||||||
|
{% endblock %} |
||||||
|
|
||||||
@ -0,0 +1,62 @@ |
|||||||
|
{% extends 'admin/base.html' %} |
||||||
|
{% load staticfiles %} |
||||||
|
{% block body %} |
||||||
|
|
||||||
|
<div class="box span10"> |
||||||
|
<div class="box-header well"> |
||||||
|
<h2><i class="icon-arrow-down"></i>Статистика для {{ newsletter.title }}</h2> |
||||||
|
</div> |
||||||
|
<div class="box-content"> |
||||||
|
<table class="table table-hover table table-bordered table-striped"> |
||||||
|
<colgroup> |
||||||
|
<col width="45%"> |
||||||
|
<col width="45%"> |
||||||
|
<col width="10%"> |
||||||
|
</colgroup> |
||||||
|
<thead> |
||||||
|
<tr> |
||||||
|
<th>Название</th> |
||||||
|
<th>Количество писем</th> |
||||||
|
<th> </th> |
||||||
|
</tr> |
||||||
|
</thead> |
||||||
|
<tbody> |
||||||
|
<tr> |
||||||
|
<td>Отправлено</td> |
||||||
|
<td>{{ stat.sent.data }}</td> |
||||||
|
<td><a href="{% url 'newsletters_newsletters_history' object.id %}?filter={{ stat.sent.filter }}">Подробно</a></td> |
||||||
|
</tr> |
||||||
|
<tr> |
||||||
|
<td>Ошибок</td> |
||||||
|
<td>{{ stat.errors.data }}</td> |
||||||
|
<td><a href="{% url 'newsletters_newsletters_history' object.id %}?filter={{ stat.errors.filter }}">Подробно</a></td> |
||||||
|
</tr> |
||||||
|
|
||||||
|
<tr> |
||||||
|
<td>Открыто</td> |
||||||
|
<td>{{ stat.opened.data }} {% if stat.opened.percent %} ({{ stat.opened.percent|floatformat:"0" }}%) {% endif %}</td> |
||||||
|
<td><a href="{% url 'newsletters_newsletters_history' object.id %}?filter={{ stat.opened.filter }}">Подробно</a></td> |
||||||
|
</tr> |
||||||
|
<tr> |
||||||
|
<td>Отписалось</td> |
||||||
|
<td>{{ stat.unsub.data }} {% if stat.unsub.percent %} ({{ stat.unsub.percent|floatformat:"0" }}%) {% endif %}</td> |
||||||
|
<td><a href="{% url 'newsletters_newsletters_history' object.id %}?filter={{ stat.unsub.filter }}">Подробно</a></td> |
||||||
|
</tr> |
||||||
|
|
||||||
|
<tr> |
||||||
|
<td>Нет данных</td> |
||||||
|
<td>{{ stat.no_data.data }}</td> |
||||||
|
<td><a href="{% url 'newsletters_newsletters_history' object.id %}?filter={{ stat.no_data.filter }}">Подробно</a></td> |
||||||
|
</tr> |
||||||
|
<tr> |
||||||
|
<td>Переходов по ссылкам</td> |
||||||
|
<td>{{ stat.links.data }}</td> |
||||||
|
<td><a href="{% url 'newsletters_newsletters_history' object.id %}?filter={{ stat.links.filter }}">Подробно</a></td> |
||||||
|
</tr> |
||||||
|
</tbody> |
||||||
|
</table> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{% endblock %} |
||||||
|
|
||||||
@ -1,12 +1,13 @@ |
|||||||
{% load i18n %} |
{% load i18n %} |
||||||
|
{% load staticfiles %} |
||||||
|
|
||||||
<div id="subscribe-sm" class="subscribe-sm"> |
<div id="subscribe-sm" class="subscribe-sm"> |
||||||
<header><a href="#" style="text-decoration: none">{% trans 'получать анонсЫ' %}</a></header> |
<header> |
||||||
{% comment %} |
<a href="#" style="text-decoration: none"> {% trans 'получать анонсЫ' %} |
||||||
<ul> |
<span> |
||||||
<li><a class="icon-big-email" href="#">{% trans 'по e-mail' %}</a></li> |
<img style="margin-right: -2px; margin-bottom: 4px; width: 12%;" src="{% static 'img/announce-letter.png' %}"> |
||||||
</ul> |
</span> |
||||||
{% endcomment %} |
</a> |
||||||
|
</header> |
||||||
</div> |
</div> |
||||||
<hr> |
<hr/> |
||||||
|
|
||||||
|
After Width: | Height: | Size: 704 B |
Loading…
Reference in new issue