Commit da391204 authored by Lukas Burgey's avatar Lukas Burgey

Remove many newlines from template

parent ca350610
...@@ -22,9 +22,7 @@ ...@@ -22,9 +22,7 @@
<h5>{{ stat_descriptions|ldescr:'glicko2_history' }}</h5> <h5>{{ stat_descriptions|ldescr:'glicko2_history' }}</h5>
<div id="chart_glicko2_history"></div> <div id="chart_glicko2_history"></div>
<div> <div>
{% for player in player_list|dictsort:"stats.points" %} {% for player in player_list|dictsort:"stats.points" %}<label><input type="checkbox" name="{{ forloop.counter0 }}" onchange="toggleGlicko2ConfidenceIntervalCheckbox(this)"> {{ player.name }}</label>{% endfor %}
<label><input type="checkbox" name="{{ forloop.counter0 }}" onchange="toggleGlicko2ConfidenceIntervalCheckbox(this)"> {{ player.name }}</label>
{% endfor %}
</div> </div>
</div> </div>
</div> </div>
...@@ -36,16 +34,11 @@ ...@@ -36,16 +34,11 @@
<thead> <thead>
<tr> <tr>
<td>Player</td> <td>Player</td>
{% for stat in stats %}<td data-toggle="tooltip" title="{{ stat_descriptions|ldescr:stat }}">{{ stat_descriptions|sdescr:stat }}</td> {% for stat in stats %}<td title="{{ stat_descriptions|ldescr:stat }}">{{ stat_descriptions|sdescr:stat }}</td>{% endfor %}
{% endfor %}
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for player in player_list reversed %}<tr> {% 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 %}
<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> </tbody>
</table> </table>
</div> </div>
...@@ -56,26 +49,12 @@ ...@@ -56,26 +49,12 @@
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
{% for row in best_player_per_type %} {% for row in best_player_per_type %}<td>{{ row.type }}</td>{% endfor %}
<td>{{ row.type }}</td>
{% endfor %}
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
{% for row in best_player_per_type %} {% 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 %}
<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> </tr>
</tbody> </tbody>
</table> </table>
...@@ -125,10 +104,7 @@ label["False"] = "Defeat"; ...@@ -125,10 +104,7 @@ label["False"] = "Defeat";
// prepare datasets // prepare datasets
var dataSetsPointHistory = [ var dataSetsPointHistory = [
{% for player in player_list|dictsort:"stats.points" %}{ {% for player in player_list|dictsort:"stats.points" %}{
line: { line: { color: "{{ player.color }}", width: 1 },
color: "{{ player.color }}",
width: 1
},
name: "{{ player.name }}", name: "{{ player.name }}",
type: "scatter", type: "scatter",
x: [{% for point in player.stats.point_history %}{{ forloop.counter0 }},{% endfor %}], x: [{% for point in player.stats.point_history %}{{ forloop.counter0 }},{% endfor %}],
...@@ -137,10 +113,7 @@ var dataSetsPointHistory = [ ...@@ -137,10 +113,7 @@ var dataSetsPointHistory = [
], ],
dataSetsEloHistory = [ dataSetsEloHistory = [
{% for player in player_list|dictsort:"stats.points" %}{ {% for player in player_list|dictsort:"stats.points" %}{
line: { line: { color: "{{ player.color }}", width: 1 },
color: "{{ player.color }}",
width: 1
},
name: "{{ player.name }}", name: "{{ player.name }}",
type: "scatter", type: "scatter",
x: [{% for point in player.stats.elo_history %}{{ forloop.counter0 }},{% endfor %}], x: [{% for point in player.stats.elo_history %}{{ forloop.counter0 }},{% endfor %}],
...@@ -151,9 +124,7 @@ dataSetsGlicko2History = [ ...@@ -151,9 +124,7 @@ dataSetsGlicko2History = [
{% for player in player_list|dictsort:"stats.points" %}{ {% for player in player_list|dictsort:"stats.points" %}{
fill: "tozerox", fill: "tozerox",
fillcolor: "{{ player.color }}33", fillcolor: "{{ player.color }}33",
line: { line: { color: "transparent" },
color: "transparent"
},
name: "{{ player.name }}", name: "{{ player.name }}",
type: "scatter", type: "scatter",
showlegend: false, showlegend: false,
...@@ -169,10 +140,7 @@ dataSetsGlicko2History = [ ...@@ -169,10 +140,7 @@ dataSetsGlicko2History = [
], ],
},{% endfor %} },{% endfor %}
{% for player in player_list|dictsort:"stats.points" %}{ {% for player in player_list|dictsort:"stats.points" %}{
line: { line: { color: "{{ player.color }}", width: 1 },
color: "{{ player.color }}",
width: 1
},
name: "{{ player.name }}", name: "{{ player.name }}",
type: "scatter", type: "scatter",
x: [{% for point in player.stats.glicko2_history %}{{ forloop.counter0 }},{% endfor %}], x: [{% for point in player.stats.glicko2_history %}{{ forloop.counter0 }},{% endfor %}],
...@@ -207,9 +175,7 @@ $(window).on("load", function () { ...@@ -207,9 +175,7 @@ $(window).on("load", function () {
backgroundColor: [ backgroundColor: [
{% for row in game_count_per_type %}pattern['{{ row.game_type }}'], {% for row in game_count_per_type %}pattern['{{ row.game_type }}'],
{% endfor %}], {% endfor %}],
data: [ data: [{% for row in game_count_per_type %}"{{ row.count }}",{% endfor %}]
{% for row in game_count_per_type %}"{{ row.count }}",
{% endfor %}]
} }
]; ];
var dataSetsWinRatio = [ 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