/
show_stats.html
122 lines (98 loc) · 5.55 KB
/
show_stats.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{# show_stats.html #}
{% extends "base.html" %}
{% block head %}
<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}css/show_stats.css">
<title>veyepar - Show: {{client.name}} {{show.name}} </title>
{% endblock %}
{% block content %}
<a href="{% url "client" client.slug %}">{{ client.name }}</a>
<a href="{% url "episode_list" client.slug show.slug%}">{{ show.name }}</a>
</p>
{% for s in states %}
<span class="{% if s.1.0 == 1 or s.1.0 == 3 %}human{% else %}process{% endif %}">
{% if s.0 %}
<a href="{% url "episode_list" client_slug=client.slug show_slug=show.slug state=forloop.counter0 %}">{{s.1.1}}:{{s.0}}</a>
{% else %}{{s.1.1}}:o{% endif %}
</span>
{% endfor %}
<table class="grid">
<tr>
<th>
<span><b>TOTAL</b></span><br/>
<span> <a href="{% url "episode_list" client_slug=client.slug show_slug=show.slug %}"> {{show_stat.count}} </a> </span>
<span class="left">expected:</span><span class="right">{{show_stat.talk_gig}} g</span><br/>
{% if show_stat.files %}
<span class="left">files:{{show_stat.files}}</span><span class="right">{{show_stat.gig}} g</span><br/>
{% endif %}
</th>
{% for item in locations %}
<td>
{# Room header cells #}
<span><b>
<a href="{% url "admin:main_location_change" item.loc.id%}">{{ item.loc.name }}</a>
</b></span>
{{item.loc.slug}}
<span> <a href="{% url "episode_list" client_slug=client.slug show_slug=show.slug location_slug=item.loc.slug %}"> {{item.count}} </a> </span>
<span class="left">expected:</span><span class="right">{{item.talk_gig}} g</span><br/>
{% if item.files %}
<span class="left">files:{{item.files}}</span><span class="right">{{item.gig}} g</span><br/>
{% if item.alarm >= 0 %} <span class="left">{{item.alarm}}%</span><span class="right">{{item.variance}} g</span> {% endif %}
{% endif %}
</td>
{% endfor %}
</tr>
{% for item,row in rows %}
{# Day headers (first cell on left, summary of row #}
<tr><td><b>{{item.date|date:"D d"}}</b><br/>
<a href="{% url "episode_list" client_slug=client.slug show_slug=show.slug start_day=item.date|date:"d" %}"> {{item.count}} </a>
{% for s in item.states %}
<span class="{% if forloop.counter0 == 1 or forloop.counter0 == 3 %}human{% else %}process{% endif %}">
{% if s %}
<a href="{% url "episode_list" client_slug=client.slug show_slug=show.slug start_day=item.date|date:"d" state=forloop.counter0 %}" style="display: inline-block; padding-right: 1px; padding-left: 1px;">{{s}}</a>
{% else %}.{% endif %}</span>
{% endfor %}
<br/>
<span class="left">expected:</span><span class="right">{{item.talk_gig}} g</span><br/>
{% if item.files %}
<span class="left">files: {{item.files}}</span><span class="right">{{item.gig}} g</span><br/>
<span class="left">{{item.alarm}}%</span><span class="right">{{item.variance}} g</span>
{% endif %}
</td>
{# the room day cells - detail #}
{% for item,loc in row %}
<td style="background-color:#{{item.alarm_color}};">
{% if item.count %}
<a href="{% url "episode_list" client_slug=client.slug show_slug=show.slug location_slug=item.loc.slug start_day=item.date|date:"d" %}" style="display:inline-block">{{item.count}}</a>
{{item.start|date:"H:i"}} - {{item.end|date:"H:i"}} =
{{item.hours}} h
<br/>
{% for s in item.states %}
<span class="{% if forloop.counter0 == 1 or forloop.counter0 == 3 %}human{% else %}process{% endif %}">
{% if s %}
<a href="{% url "episode_list" client_slug=client.slug show_slug=show.slug location_slug=item.loc.slug start_day=item.date|date:"d" state=forloop.counter0 %}" style="display: inline-block; padding-right: 1px; padding-left: 1px;">{{s}}</a>
{% else %}.{% endif %}</span>
{% endfor %}
<br/>
<span class="left">expected raw:</span><span class="right">{{item.talk_gig}} g</span><br/>
{% if item.files %}
<span class="left">[ ]<a style="display: inline-block;" href="{% url "rf_set" loc.loc.slug %}?start_date={{item.date|date:"Y-m-d"}}">{{item.files}}</a>
{{item.raw.start|date:"H:i" }} -
{{item.raw.end|date:"H:i" }}
</span>
{# {{item.alarm}}%</span> #}
<span class="right">{{item.gig}} g</span><br>
<span class="right">{{item.variance}} g</span>
<span class="left">{{item.ep.times_display}}</span>
<span class="left">{{item.raw.times_display}}</span>
<span class="left">
<a style="display: inline-block;" href="{% url "raw_file_audio" %}?show_id={{show.id}}&location_slug={{loc.loc.slug}}&start_date={{item.date|date:"Y-m-d"}}">audio</a>
<a style="display: inline-block;" href="{% url "public_play_list" %}playlist.m3u?client={{client.slug}}&show={{show.slug}}&location_slug={{loc.loc.slug}}&date={{item.date|date:"Y-m-d"}}">encs</a>
</span>
{% endif %}
{% endif %}
</td>
{% endfor %}
</tr>
{% endfor %}
</table>
{% endblock %}