{# Copyright 2017 Hermann Krumrey This file is part of bundesliga-tippspiel. bundesliga-tippspiel is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. bundesliga-tippspiel is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with bundesliga-tippspiel. If not, see . #} {% for entry in ranking_data %} {% if entry|length == 2 %} {% set tendency, tendency_class, season_wins, matchday_wins = [none, none, [], []] %} {% set position = loop.index %} {% set user, points = entry %} {% else %} {% set position, tendency, tendency_class, user, season_wins, matchday_wins, points = entry%} {% endif %} {% endfor %}
# Name {{ unit }}
{% if tendency is not none %} {% endif %} {{ position }} {{ user.username }} {% for season in season_wins %} {% endfor %} {% for matchday in matchday_wins %} {% endfor %} {% if points is integer %} {{ points }} {% else %} {{ points|round(2) }} {% endif %} {% if unit == "%" %}%{% endif %}