{% extends "membership/membership_detail.html" %}
{% load i18n %}

{% block title %} {% trans 'Unconfirmed Hanchans from' %} {{player.username}} {% endblock %}

{% block teaser %}<h1>{% trans 'Unconfirmed Hanchans from' %} {{membership.username}}</h1>{% endblock %}

{% block score_list %}
<h2 class="grid_12">{% trans 'Invalid hanchans with' %} {{membership.username}}</h2>
<table>
 <thead><tr>
  <th>{% trans 'Event' %}</th>
  <th>{% trans 'Start' %}</th>
  <th colspan="4">{% trans 'Players' %}</th>
  <th>{% trans 'Placement' %}</th>
  <th>{% trans 'Kyu Points' %}</th>
  <th>{% trans 'Comment' %}</th>
  <th colspan="2"></th>
 </tr></thead>

{% for hanchan in hanchan_list%}
 <tr>
  <td><a href="{{ hanchan.get_absolute_url }}">{{ hanchan.event.name }}</a></td>
  <td>{{ hanchan.start|time:'TIME_FORMAT' }}</td>
  {% for player in hanchan.player_list %}
  <td class="center"><a href="{% url 'player-invalid-score' player.user.username %}">{{player.user}}</a><br/> {{player.input_score }}</td>
  {% endfor %}
  <td class="center">{{hanchan.placement}}</td>
  <td class="center">{{hanchan.kyu_points}}</td>
  <td>{{ hanchan.comment }}</td>
  <td>
  {% if perms.mahjong_ranking.delete_hanchan %}
   <a href="{% url 'delete-hanchan' hanchan.pk %}"><span class="fa fa-trash" title="{% trans 'Delete Hanchan' %}"></span></a>
  {% endif %}
  {% if perms.mahjong_ranking.change_hanchan %}
   <a href="{% url 'edit-hanchan' hanchan.pk %}"><span class="fa fa-pencil" title="{% trans 'Edit Hanchan' %}"></span></a>
  {% endif %}
  </td>
 </tr>
{% endfor %}
</table>
{% endblock %}

{% block buttonbar %}
<a href="?download=xlsx" class="button"><span class="fa fa-table"></span> Download</a>
{% endblock %}
