-
Notifications
You must be signed in to change notification settings - Fork 33
/
results.html
113 lines (102 loc) · 3.11 KB
/
results.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
{% extends "league/base.html" %}
{% load tz static league_tags bootstrap3 i18n forum_markup_tags osr_tags %}
{% block title %}{{event}}- {% trans "results" %}{% endblock %}
{% block content %}
<ul class="nav nav-tabs">
<li ><a href="{% url 'league:archives' %}">{% trans "Archives" %}</a></li>
{%if event not in open_events%}
<li class="active">{{event |event_link}}</li>
{%endif%}
{% for ev in open_events %}
<li {%if ev == event %} class="active"{%endif %}>
<a href="{% url 'league:results' ev.pk %}">
{% if ev.community %}
({{ev.community.slug}})
{% endif %}
{% if ev.is_primary %}
<strong>
{% endif %}
{{ev.name}}
{% if ev.is_primary %}
</strong>
{% endif %}
</a>
</li>
{% endfor %}
<li class="pull-right"><a href="{% url 'league:scrap_list' %}">{% trans "Scrape list" %}</a></li>
</ul>
{% include 'league/includes/league_nav.html' with active='results' %}
{% if event.number_divisions > 1 %}
<ul class="nav nav-pills">
{% for div in event.get_divisions %}
<li {% if div == division %}class='active'{%endif%} > {{div|division_link}}</li>
{% endfor %}
</ul>
{% endif %}
{% if division %}
{% if number_players > 20 %}
{% include "league/includes/results_league.html" %}
{% else %} {%if number_players > 0 %}
{% include "league/includes/results_ladder.html" %}
{% else %}
<div class="well">
{% trans "This league is empty !" %}
</div>
{% endif %}
{% endif %}
{% else %}
<div class="well">
{% trans "This league is empty !" %}
</div>
{% endif %}
{% if division %}
<p>
{% if can_edit_division_infos or admin %}
<a href="{% url 'league:division_update_infos' division.pk %}">
<button class="btn btn-default">Edit informations</button>
</a>
{% endif %}
{% if admin %}
<a href="{% url 'league:division_update_wont_play' division.pk %}">
<button class="btn btn-default">Manage WontPlay results</button>
</a>
<a href="{% url 'league:division_create_forfeit' division.pk %}">
<button class="btn btn-default">Create forfait</button>
</a>
{% endif %}
</p>
{% endif %}
{% if division.informations %}
<div>{{division.informations|safe|rendered}}</div>
{% endif %}
{% if not event.community %}
<h3> OSR is made possible thanks to the support from friends and partners </h3>
{% sponsors %}
{% endif %}
{% endblock %}
{% timezone "UTC" %}
{% block extra_js %}
{% if number_players > 20 %}
<script type="text/javascript" src="https://cdn.datatables.net/v/bs/dt-1.10.13/fh-3.1.2/r-2.1.0/sc-1.4.2/datatables.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#league-table').DataTable({
"iDisplayLength": 50,
"columnDefs": [
{ "width": "60%", "targets": 6 }
]
});
} );
</script>
{%endif%}
{% if event.is_open %}
<script type="text/javascript" src="{% static 'jquery.countdown/jquery.countdown.min.js' %}"></script>
<script type="text/javascript">
var end = Date.now() + {{event.remaining_sec}};
$("#countdown").countdown(end,function(event) {
$(this).html(event.strftime('League ends in %D day%!D %H:%M:%S'));
});
</script>
{% endif %}
{% endblock %}
{% endtimezone %}