Commit da391204 authored by Lukas Burgey's avatar Lukas Burgey

Remove many newlines from template

parent ca350610
......@@ -22,9 +22,7 @@
<h5>{{ stat_descriptions|ldescr:'glicko2_history' }}</h5>
<div id="chart_glicko2_history"></div>
<div>
{% for player in player_list|dictsort:"stats.points" %}
<label><input type="checkbox" name="{{ forloop.counter0 }}" onchange="toggleGlicko2ConfidenceIntervalCheckbox(this)"> {{ player.name }}</label>
{% endfor %}
{% for player in player_list|dictsort:"stats.points" %}<label><input type="checkbox" name="{{ forloop.counter0 }}" onchange="toggleGlicko2ConfidenceIntervalCheckbox(this)"> {{ player.name }}</label>{% endfor %}
</div>
</div>
</div>
......@@ -36,16 +34,11 @@
<thead>
<tr>
<td>Player</td>
{% for stat in stats %}<td data-toggle="tooltip" title="{{ stat_descriptions|ldescr:stat }}">{{ stat_descriptions|sdescr:stat }}</td>
{% endfor %}
{% for stat in stats %}<td title="{{ stat_descriptions|ldescr:stat }}">{{ stat_descriptions|sdescr:stat }}</td>{% endfor %}
</tr>
</thead>
<tbody>
{% for player in player_list reversed %}<tr>
<td style="background: {{ player.color }};"><a href="/player/{{ player.name }}"><strong>{{ player.name }}</strong></a></td>
{% for stat in stats %}<td>{{ player.stats|keyvalue:stat|formatstat }}</td>{% endfor %}
</tr>
{% endfor %}
{% for player in player_list reversed %}<tr><td style="background: {{ player.color }};"><a href="/player/{{ player.name }}"><strong>{{ player.name }}</strong></a></td>{% for stat in stats %}<td>{{ player.stats|keyvalue:stat|formatstat }}</td>{% endfor %}</tr>{% endfor %}
</tbody>
</table>
</div>
......@@ -56,26 +49,12 @@
<table class="table">
<thead>
<tr>
{% for row in best_player_per_type %}
<td>{{ row.type }}</td>
{% endfor %}
{% for row in best_player_per_type %}<td>{{ row.type }}</td>{% endfor %}
</tr>
</thead>
<tbody>
<tr>
{% for row in best_player_per_type %}
<td class="nopad">
<table class="table table-striped">
{% for player in row.player_list %}
<tr>
<td>{{ player.win_ratio|floatformat:-2}}</td>
<td>{{ player.player }}</td>
<td>{{ player.game_count }}</td>
</tr>
{% endfor %}
</table>
</td>
{% endfor %}
{% for row in best_player_per_type %}<td class="nopad"><table class="table table-striped">{% for player in row.player_list %}<tr><td>{{ player.win_ratio|floatformat:-2}}</td><td>{{ player.player }}</td><td>{{ player.game_count }}</td></tr>{% endfor %}</table></td>{% endfor %}
</tr>
</tbody>
</table>
......@@ -125,10 +104,7 @@ label["False"] = "Defeat";
// prepare datasets
var dataSetsPointHistory = [
{% for player in player_list|dictsort:"stats.points" %}{
line: {
color: "{{ player.color }}",
width: 1
},
line: { color: "{{ player.color }}", width: 1 },
name: "{{ player.name }}",
type: "scatter",
x: [{% for point in player.stats.point_history %}{{ forloop.counter0 }},{% endfor %}],
......@@ -137,10 +113,7 @@ var dataSetsPointHistory = [
],
dataSetsEloHistory = [
{% for player in player_list|dictsort:"stats.points" %}{
line: {
color: "{{ player.color }}",
width: 1
},
line: { color: "{{ player.color }}", width: 1 },
name: "{{ player.name }}",
type: "scatter",
x: [{% for point in player.stats.elo_history %}{{ forloop.counter0 }},{% endfor %}],
......@@ -151,9 +124,7 @@ dataSetsGlicko2History = [
{% for player in player_list|dictsort:"stats.points" %}{
fill: "tozerox",
fillcolor: "{{ player.color }}33",
line: {
color: "transparent"
},
line: { color: "transparent" },
name: "{{ player.name }}",
type: "scatter",
showlegend: false,
......@@ -169,10 +140,7 @@ dataSetsGlicko2History = [
],
},{% endfor %}
{% for player in player_list|dictsort:"stats.points" %}{
line: {
color: "{{ player.color }}",
width: 1
},
line: { color: "{{ player.color }}", width: 1 },
name: "{{ player.name }}",
type: "scatter",
x: [{% for point in player.stats.glicko2_history %}{{ forloop.counter0 }},{% endfor %}],
......@@ -207,9 +175,7 @@ $(window).on("load", function () {
backgroundColor: [
{% for row in game_count_per_type %}pattern['{{ row.game_type }}'],
{% endfor %}],
data: [
{% for row in game_count_per_type %}"{{ row.count }}",
{% endfor %}]
data: [{% for row in game_count_per_type %}"{{ row.count }}",{% endfor %}]
}
];
var dataSetsWinRatio = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment