{% extends "base.html" %} {% from "macros.html" import modal_editor, modal_editor_open, format_player, format_session %} {% block title %}PySkat - Results{% endblock %} {% block head %}{% endblock %} {% macro player_display(match, player) %} {{ player.id }} {{ player.name }} {% if (match.id, player.id) in results %} {% set r = results[match.id, player.id] %} {{ r.score }} {{ r.won }} {{ r.lost }} {{ r.remarks }}
{{ modal_editor_open("edit-result-{}-{}".format(match.id, player.id), "Edit", "warning") }} {{ modal_editor_open("delete-result-{}-{}".format(match.id, player.id), "Delete", "danger") }}
{% call modal_editor("edit-result-{}-{}".format(match.id, player.id), "Edit Result", submit_label="Edit", submit_color="warning") %}
{% endcall %} {% call modal_editor("delete-result-{}-{}".format(match.id, player.id), "Delete Result", submit_label="Delete", submit_color="danger") %} Really remove the result for player {{ format_player(player) }}? {% endcall %} {% else %} {{ modal_editor_open("add-result-{}-{}".format(match.id, player.id), "Add Result", "success") }} {% call modal_editor("add-result-{}-{}".format(match.id, player.id), "Add Result", submit_label="Add", submit_color="success") %}
{% endcall %} {% endif %} {% endmacro %} {% block content %}

Results {% if filtered_for_session %} for Session {{ format_session(session) }}{% endif %}

{% for m in matches %} {% if m.size > 0 %} {{ player_display(m, m.players[0]) }} {% endif %} {% for p in m.players[1:] %} {{ player_display(m, p) }} {% endfor %} {% endfor %}
Match ID Player ID Player Name Score Won Lost Remarks Actions
{{ m.id }}
{% endblock %}