{% extends "base.html" %} {% from "macros.html" import modal_editor, modal_editor_open, player_name_id %} {% block title %}PySkat - Tables{% endblock %} {% block head %}{% endblock %} {% macro player_display(id) %} {{ id }} {{ players[id].name }} {% endmacro %} {% block content %}

Tables

{{ modal_editor_open("add-table", "Add New Table", "success") }} {{ modal_editor_open("shuffle-tables", "Shuffle Players to Tables", "warning") }} Check Validity
{% call modal_editor("add-table", url_for("tables.add", series_id=series.id), "Add New Table", submit_label="Add", submit_color="success") %} {% macro player_select(player_id) %} {% set input_id = "player{}_id".format(player_id) %}
{% endmacro %} {{ player_select(1) }} {{ player_select(2) }} {{ player_select(3) }} {{ player_select(4) }}
{% endcall %} {% call modal_editor("shuffle-tables", url_for("tables.shuffle", series_id=series.id), "Shuffle Players to Tables", submit_label="Shuffle", submit_color="warning") %} {% macro player_select(name, label) %}
{% for p in players.values() %}
{% endfor %}
{% endmacro %}
{{ player_select("include", "Include Players Specifically") }} {{ player_select("exclude", "Exclude Players Specifically") }} {{ player_select("include_only", "Include Only These Players") }} {% endcall %}
{% for t in tables %} {% set player_count = t.player_ids|length %} {{ player_display(t.player1_id) }} {{ player_display(t.player2_id) }}{{ player_display(t.player3_id) }} {% if t.player4_id %} {{ player_display(t.player4_id) }} {% endif %} {% endfor %}
ID Player ID Player Name Remarks Actions
{{ t.table_id }}{{ t.remarks }}
{% for t in tables %} {% endfor %}
{% endblock %}