{% extends "events/event_detail.html" %}
{% load i18n humanize thumbnail %}

{% block meta_title %}{% trans 'Delete Hanchan' %}{% endblock %}

{% block maincontent %}
<h3 class="grid_12" id="{{ hanchan.pk }}">{{hanchan.start|time:'H:i'}}: {{ hanchan.player_names }}</h3>
{% for player in hanchan.player_list %}
    <a class="grid_1" href="{% url 'player-ladder-score' player.user %}"><img
            src="{% thumbnail user.avatar|default:'unknown_profile.jpg' 'avatar' %}"
            width="70" height="70"
            class="avatar" alt="{{ player.user }}" title="{{ player.user }}"/></a>
    <div class="grid_2">
        <p><a class="player" href="{% url 'player-ladder-score' player.user %}" title="{{ player.comment }}">{{ player.user }}</a></p>
        <p><strong>{{ player.placement|ordinal }} {% trans 'Place' %}</strong><br />
            <strong>{% trans 'Score' %}:</strong> {{ player.game_score|intcomma }}<br />
            {% if player.dan_points != None %}
            <strong>{% trans 'Dan Points' %}:</strong> {{ player.dan_points }}
            {% else %}
            <strong>{% trans 'Kyu Points' %}:</strong> {{ player.kyu_points|default:0 }}
            {% endif %}
        </p>
    </div>
{% endfor %}
{% if not hanchan.confirmed %}
    <p class="grid_12 error">Diese Hanchan wurde nicht anerkannt und wird daher nicht gezählt.</p>
{% elif hanchan.comment %}
    <p class="grid_12">{{ hanchan.comment }}</p>
{% endif %}
<form method="post">
    {% csrf_token %}
    <fieldset class="grid_12">
        <legend>{% trans "Delete Hanchan" %}</legend>
        {% include 'form.html' %}
        <label class="field_name fa fa-exclamation-triangle fa-5x fa-pull-left" ></label>
        <p>Bist du sicher dass du diese Hanchan und alle Ergebnisse und Wertungen welche sich hierauf beziehen löschen möchtest?</p>
        <br class="clear">
        <p class="buttonbar">
            <button type="button" onclick="window.history.back()"><span class="fa fa-close"></span> {% trans 'Cancel' %}</button>
            <button type="submit"><span class="fa fa-trash"></span> {% trans 'Delete' %}</button>
        </p>
    </fieldset>
</form>
{% endblock %}


{% block buttonbar %}{% endblock %}
{% block comments %}{% endblock %}