You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

96 lines
2.9 KiB

{% extends 'client/base_catalog.html' %}
{% load i18n %}
{% block styles %}
<style>
table {
width: 100%;
margin-bottom: 18px;
border: 1px solid #dddddd;
border-collapse: separate;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
border-spacing: 2px;
border-color: grey;
}
table th{
vertical-align: bottom;
font-weight: bold;
text-align: left;
}
table th. table td{
padding: 8px;
line-height: 18px;
text-align: left;
display: table-cell;
}
</style>
{% endblock %}
{% block page_title %}
<div class="page-title">
<h1>{{ object.get_event }}. {% trans 'Статистика' %}</h1>
</div>
{% endblock %}
{% block content_list %}
<div class="m-article recovery-page">
{% if form %}
<form class="pw-form" method="post">{% csrf_token %}
<div>
<div class="input">
<p class="label">{{ form.stat_pswd.label }}</p>
</div>
{% if form.errors %}
{# если есть ошибка #}
<div class="required err input">
{{ form.stat_pswd }}
</div>
<div class="error-text">
{{ form.errors.stat_pswd.0 }}{# текст ошибки #}
</div>
{% else %}
{# ошибки нет #}
<div class="input">
{{ form.stat_pswd }}
</div>
{% endif %}
<div class="input">
<button type="submit" class="icon-check submit">{% trans 'Подтвердить' %}</button>
</div>
</div>
</form>
{% else %}
<table width="100%">
<thead>
<tr>
<th>{% trans 'Дата' %}</th>
<th>{% trans 'Официальный сайт' %}</th>
<th>{% trans 'Билеты' %}</th>
<th>{% trans 'Участие' %}</th>
<th>{% trans 'Переходы с каталога' %}</th>
</tr>
</thead>
<tbody>
{% with stats=object.paidstat_set.all %}
{% for stat in stats %}
<tr>
<td>{{ stat.date|date:"Y-m-d" }}</td>
<td>{{ stat.official_clicks }}</td>
<td>{{ stat.tickets_clicks }}</td>
<td>{{ stat.participation_clicks }}</td>
<td>{{ stat.catalog_clicks }}</td>
</tr>
{% endfor %}
{% endwith %}
</tbody>
</table>
{% endif %}
</div>
{% endblock %}