{% extends "base.html" %} {% from "macros.html" import modal_editor, modal_editor_open %} {% block title %}PySkat - Players{% endblock %} {% block head %}{% endblock %} {% block content %}

Players

{{ modal_editor_open("add-player", "Add New Player", "success") }} {% call modal_editor("add-player", url_for("players.add"), "Add New Player", submit_label="Add", submit_color="success") %}
{% endcall %}
{% for p in players %} {% endfor %}
ID Name Is Active Remarks Actions
{{ p.id }} {{ p.name }} {% if p.active %}{% else %}{% endif %} {{ p.remarks }}
{{ modal_editor_open("edit-player-{}".format(p.id), "Edit", "warning") }} {{ modal_editor_open("remove-player-{}".format(p.id), "Remove", "danger") }}
{% call modal_editor("edit-player-{}".format(p.id), url_for("players.update", id=p.id), "Edit Player", "Edit", "warning") %}
{% endcall %} {% call modal_editor("remove-player-{}".format(p.id), url_for("players.remove", id=p.id), "Remove Player", "Remove", "danger") %} Really remove the player {{- p.name -}} with the ID {{- p.id -}}? {% endcall %}
{% endblock %}