/
activities.html
77 lines (74 loc) · 3.06 KB
/
activities.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{% extends 'base.html' %}
{% load static %}
{% block title %}Активности{% endblock %}
{% block content %}
<div class="row">
<div class="col">
<div class="pull-left">
<h2>Активности</h2>
</div>
</div>
{% comment %}
<div class="col">
<div class="pull-right">
<label>Только мои активности <input type="checkbox" id="my-activities" {% if only_my %}checked{% endif %}></label>
</div>
</div>
{% endcomment %}
</div>
{% if is_assistant %}
<a class="pull-right export_event_csv" href="{% url 'get_activities_csv' %}">
<span class="glyphicon glyphicon-download-alt"></span> Экспортировать все
</a>
<div class="clearfix"></div>
{% endif %}
{% url 'index' as reset_filter_url %}
{% include 'includes/events_filter.html' %}
<div class="row">
<div class="col">
<div class="overflow-scroll">
<table id="main-events-table" class="table table-striped table-bordered table-hover">
<thead class="thead-light">
<tr>
<th>Название активности</th>
<th>Главный лектор</th>
<th>Тип активности</th>
<th>Количество мероприятий</th>
<th>Количество участников/чекинов</th>
<th>Загружено элементов</th>
</tr>
</thead>
{% for activity in objects %}
<tr>
<td><a href="{% url 'events' %}?activity={{ activity.id }}">{{ activity.title }}</a></td>
<td>{{ activity.main_author }}</td>
<td>{{ activity.activity_type }}</td>
<td>{{ activity.event_count }}</td>
<td>{{ activity.participants_num }} / {{ activity.check_ins_num }}</td>
<td>{{ activity.materials_num }}</td>
</tr>
{% empty %}
<tr>
<td colspan="6" class="text-center">У вас нет активностей</td>
</tr>
{% endfor %}
</table>
</div>
{% include 'includes/paginator.html' %}
</div>
</div>
{% endblock %}
{% block js %}
{{ block.super }}
<script type="text/javascript">
const date_min = "{{ date_min|default:'' }}";
const date_max = "{{ date_max|default:'' }}";
const sortAsc = eval("{% if sort_asc %}true{% else %}false{% endif %}");
</script>
<!-- event handlers of buttons are binded in js file below -->
<script type="text/javascript" src="{% static 'js/pages/activities.js' %}"></script>
<script type="text/javascript" src="{% static 'js/pages/index.js' %}"></script>
{% if is_assistant %}
<script type="text/javascript" src="{% static 'js/pages/index_assistant.js' %}"></script>
{% endif %}
{% endblock %}