Anfänglicher Commit: Producion Version Stand: Oktober 2014
This commit is contained in:
83
templates/mahjong_ranking/eventranking_list.html
Normal file
83
templates/mahjong_ranking/eventranking_list.html
Normal file
@@ -0,0 +1,83 @@
|
||||
{% extends "events/event_site.html" %}
|
||||
|
||||
{% load i18n comments%}
|
||||
|
||||
{% block title %}{% trans "Tournament Ranking" %}: {{ event.name }}{% endblock %}
|
||||
|
||||
{% block event_content %}
|
||||
|
||||
{% if event.is_tournament %}
|
||||
<ul class="tabs grid_12">
|
||||
<li><a href="{% url 'event-hanchan-list' event.id %}">{% trans "Tournament Hanchans" %}</a></li>
|
||||
<li class="active"><a href="{% url 'event-ranking' event.id %}">{% trans "Tournament Ranking" %}</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
<div class="grid_12">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">{% trans "Rank" %}</th>
|
||||
<th rowspan="2">{% trans "Avatar" %}</th>
|
||||
<th rowspan="2">{% trans "Nickname" %}</th>
|
||||
<th rowspan="2">{% trans "Name" %}</th>
|
||||
<th colspan="2">{% trans 'Average' %}</th>
|
||||
<th colspan="2">Hanchans</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans 'Placement' %}</th>
|
||||
<th>{% trans "Score" %}</th>
|
||||
<th>{% trans "won" %}</th>
|
||||
<th>{% trans "good" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for player in eventranking_list %}
|
||||
{% with player.user.get_profile as profile %}
|
||||
<tr>
|
||||
<td class="center">{{player.placement}}.</td>
|
||||
<td class="avatar"><a href="{{ player.user.get_absolute_url }}">
|
||||
{% if profile.thumbnail %}
|
||||
<img src="{{profile.thumbnail.url}}" alt="" />
|
||||
{% else %}
|
||||
<img src="{{STATIC_URL}}img/unknown_thumbnail.png" alt=""/>
|
||||
{% endif %}
|
||||
</a></td>
|
||||
<td><a href="{{ player.user.get_absolute_url }}">{{player.user}}</a></td>
|
||||
<td>{{profile.last_name}} {{profile.first_name}}</td>
|
||||
<td class="center">{{player.avg_placement|floatformat:2 }}</td>
|
||||
<td class="right">{{player.avg_score|floatformat:0 }}</td>
|
||||
<td class="center">{{player.won_hanchans}}</td>
|
||||
<td class="center">{{player.good_hanchans}}</td>
|
||||
</tr>
|
||||
{% endwith %}
|
||||
{% empty %}
|
||||
<tr><td colspan="8">Leider hat es noch niemand in das Ranking geschafft.
|
||||
Ein Spieler wird erst ins Ranking genommen wenn er 5 Hanchans absolviert hat.</td></tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% if is_archive %}
|
||||
<h2>{% trans 'Ladder Archive' %}</h2>
|
||||
<ul class="list">
|
||||
{% for season in season_archive %}
|
||||
<li class="season"><a href="{% url 'mahjong-ladder-archive' season.id %}">{{season.name}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<h2>{% trans 'Latest Events' %}</h2>
|
||||
<ul class="list">
|
||||
{% for event in latest_event_list %}
|
||||
<li class="event"><a href="{% url 'event-hanchan-list' event.pk %}">{{event.name}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h2>{% trans 'Latest Hanchans' %}</h2>
|
||||
<ul class="comment_list">
|
||||
{% for hanchan in latest_hanchan_list %}
|
||||
<li class="hanchan"><a href="{% url 'event-hanchan-list' hanchan.event.pk %}">{{hanchan.event.name}}</a> {{hanchan.start|time:'H:i'}}: {{hanchan.player_names}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
26
templates/mahjong_ranking/hanchan_confirm_delete.html
Normal file
26
templates/mahjong_ranking/hanchan_confirm_delete.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n comments %}
|
||||
|
||||
{% block meta_title %}{% trans 'Delete Hanchan' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<fieldset>
|
||||
<legend>{% trans "Delete Hanchan" %}</legend>
|
||||
{% include 'form.html' %}
|
||||
<p class="buttonbar">
|
||||
<button type="button" onclick="window.history.back()">
|
||||
<img src="{{STATIC_URL}}icons/cancel.png" alt="{% trans 'Cancel' %}"/>
|
||||
{% trans 'Cancel' %}
|
||||
</button>
|
||||
<button type="submit">
|
||||
<img src="{{STATIC_URL}}icons/table_delete.png" alt="{% trans 'Delete' %}"/>
|
||||
{% trans 'Delete' %}
|
||||
</button>
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block buttonbar %}{% endblock %}
|
||||
59
templates/mahjong_ranking/hanchan_form.html
Normal file
59
templates/mahjong_ranking/hanchan_form.html
Normal file
@@ -0,0 +1,59 @@
|
||||
{% extends "events/event_site.html" %}
|
||||
{% load i18n comments fieldset_extras %}
|
||||
|
||||
{% block title %}
|
||||
{% if hanchan.id %}{% trans "Edit Hanchan" %}{% else %}{% trans "Add Hanchan" %}{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block event_content %}
|
||||
{% get_fieldset "event, start" from form as event_formset %}
|
||||
{% if perms.mahjong_ranking.delete_hanchan %}
|
||||
{% get_fieldset "comment, confirmed" from form as hanchan_formset %}
|
||||
{% else %}
|
||||
{% get_fieldset "comment" from form as hanchan_formset %}
|
||||
{% endif %}
|
||||
{% for hidden in form.hidden_fields %}{% if hidden.errors %}{{ hidden.errors }}{% endif %}{% endfor %}
|
||||
|
||||
<form class="grid_12" method="post">
|
||||
{% csrf_token %}
|
||||
<fieldset>
|
||||
<legend>{% if hanchan.id %}{% trans "Edit Hanchan" %}{% else %} {% trans "Add Hanchan" %}{% endif %}</legend>
|
||||
{% with event_formset as form %}{% include "form.html" %}{% endwith %}
|
||||
<div>
|
||||
<label class="field_name required">{% trans 'Players' %}</label>
|
||||
{{ formset.management_form }}
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% trans 'User' %}</th>
|
||||
<th>{% trans 'Score' %}</th>
|
||||
<th>{% trans 'Bonus' %}</th>
|
||||
<th width="75%">{% trans 'Comment' %}</th>
|
||||
</tr>
|
||||
{% for form in formset %}
|
||||
<tr>
|
||||
<td class="{{form.user.css_classes}}">{{form.id}} {{form.user}} {% for error in form.user.errors %}<br />{{error}}{% endfor %}</td>
|
||||
<td class="{{form.score.css_classes}}">{{form.score}} {% for error in form.score.errors %}<br />{{error}}{% endfor %}</td>
|
||||
<td class="{{form.bonus_points.css_classes}}">{{form.bonus_points}} {% for error in form.bonus_points.errors %}<br />{{error}}{% endfor %}</td>
|
||||
<td class="{{form.comment.css_classes}}" width="*">{{form.comment}} {% for error in form.comment.errors %}<br />{{error}}{% endfor %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% for error in formset.errors %}<p class="error">{{error}}</p>{% endfor %}
|
||||
|
||||
{% if hanchan.pk and not hanchan.valid %}<p class="error">{{hanchan.check_validity}}</p>{% endif %}
|
||||
|
||||
{% with hanchan_formset as form %}{% include "form.html" %}{% endwith %}
|
||||
{% for error in form.non_field_errors %}<p class="error">{{error}}</p>{% endfor %}
|
||||
|
||||
|
||||
<p class="buttonbar">
|
||||
<a href="{{hanchan.get_absolute_url}}" class="button"><img src="{{STATIC_URL}}icons/arrow_undo.png" alt="{% trans 'back' %}" /> {% trans 'back' %}</a>
|
||||
<button type="submit"><img src="{{STATIC_URL}}icons/table_save.png" alt="{% trans 'save' %}" /> {% trans 'save' %}</button>
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block buttonbar %}{% endblock %}
|
||||
53
templates/mahjong_ranking/hanchan_list.html
Normal file
53
templates/mahjong_ranking/hanchan_list.html
Normal file
@@ -0,0 +1,53 @@
|
||||
{% extends "events/event_site.html" %}
|
||||
|
||||
{% load i18n comments %}
|
||||
|
||||
{% block title %}Hanchans: {{ event.name }}{% endblock %}
|
||||
|
||||
{% block event_content %}
|
||||
|
||||
{% if event.is_tournament %}
|
||||
<ul class="tabs grid_12">
|
||||
<li class="active"><a href="{% url 'event-hanchan-list' event.id %}">{% trans "Tournament Hanchans" %}</a></li>
|
||||
<li><a href="{% url 'event-ranking' event.id %}">{% trans "Tournament Ranking" %}</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% for hanchan in hanchan_list %}
|
||||
<h3 class="grid_12 clearfix" id="{{ hanchan.pk }}">{{hanchan.start|time:'H:i'}}: {{ hanchan.player_names }}</h3>
|
||||
{% for player in hanchan.player_set.all %}
|
||||
<div class="player" >
|
||||
<a href="{% url 'player-ladder-score' player.user %}"><img
|
||||
{% if player.user.get_profile.thumbnail %}src="{{player.user.get_profile.thumbnail.url}}"{% else %}src="{{STATIC_URL}}img/unknown_thumbnail.png"{% endif %}
|
||||
class="avatar" alt=""
|
||||
title="{% if player.dan_points != None %}Dan P.: {{player.dan_points}}{% else %}Kyu P.: {{player.kyu_points}}{% endif %} - {{player.comment}}"/></a>
|
||||
<h4>{{player.placement}}. - <a href="{% url 'player-ladder-score' player.user %}">{{ player.user }}</a></h4>
|
||||
<strong>{% trans 'Score' %}:</strong> {{player.score}}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if not hanchan.valid %}
|
||||
<p class="grid_12 error"><strong>Ungültig:</strong> {{hanchan.check_validity}}</p>
|
||||
{% elif 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 %}
|
||||
<p class="grid_12 more_link">
|
||||
{% if perms.mahjong_ranking.delete_hanchan %}
|
||||
<a href="{% url 'delete-hanchan' hanchan.pk %}" class="button"><img src="{{STATIC_URL}}icons/table_delete.png" alt="{% trans 'Delete' %}"/> {% trans 'Delete Hanchan' %}</a>
|
||||
{% endif %}
|
||||
{% if perms.mahjong_ranking.change_hanchan %}
|
||||
<a href="{% url 'edit-hanchan' hanchan.pk %}" class="button"><img src="{{STATIC_URL}}icons/table_edit.png" alt="{% trans 'Edit' %}"/> {% trans 'Edit Hanchan' %}</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% empty %}
|
||||
<h3 class="grid_12">{% trans 'No Hanchan has been added to this event yet.'%}</h3>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block buttonbar %}
|
||||
{% if perms.mahjong_ranking.add_hanchan %}
|
||||
<a class="button" href="{{event.get_edit_url}}"><img src="{{STATIC_URL}}icons/calendar_edit.png" alt="{% trans 'Add' %}"/> {% trans 'Edit Event' %}</a>
|
||||
<a class="button" href="{% url 'add-hanchan-form' event.id %}"><img src="{{STATIC_URL}}icons/table_add.png" alt="{% trans 'Add' %}"/> {% trans 'Add Hanchan' %}</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
58
templates/mahjong_ranking/kyudanranking_list.html
Normal file
58
templates/mahjong_ranking/kyudanranking_list.html
Normal file
@@ -0,0 +1,58 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans 'Player List' %}{% endblock %}
|
||||
|
||||
{% block maincontent %}
|
||||
<h2 class="grid_12">{% trans 'Player List' %}</h2>
|
||||
<table class="grid_12">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans 'Avatar' %}</th>
|
||||
<th>
|
||||
<a href="{% url 'kyudanranking-list' order_by='+username' %}?page={{page_obj.number}}"><img src="{{STATIC_URL}}icons/bullet_arrow_up.png" alt="▴"/></a>
|
||||
{% trans 'Nickname' %}
|
||||
<a href="{% url 'kyudanranking-list' order_by='-username' %}?page={{page_obj.number}}"><img src="{{STATIC_URL}}icons/bullet_arrow_down.png" alt="▾"/></a>
|
||||
</th>
|
||||
<th>
|
||||
<a href="{% url 'kyudanranking-list' order_by='+full_name'%}?page={{page_obj.number}}"><img src="{{STATIC_URL}}icons/bullet_arrow_up.png" alt="▴"/></a>
|
||||
{% trans 'Full Name' %}
|
||||
<a href="{% url 'kyudanranking-list' order_by='-full_name' %}?page={{page_obj.number}}"><img src="{{STATIC_URL}}icons/bullet_arrow_down.png" alt="▾"/></a>
|
||||
</th>
|
||||
<th>
|
||||
<a href="{% url 'kyudanranking-list' order_by='+rank' %}?page={{page_obj.number}}"><img src="{{STATIC_URL}}icons/bullet_arrow_up.png" alt="▴"/></a>
|
||||
{% trans 'Rank' %}
|
||||
<a href="{% url 'kyudanranking-list' order_by='-rank' %}?page={{page_obj.number}}"><img src="{{STATIC_URL}}icons/bullet_arrow_down.png" alt="▾"/></a>
|
||||
</th>
|
||||
<th>
|
||||
<a href="{% url 'kyudanranking-list' order_by='+score' %}?page={{page_obj.number}}"><img src="{{STATIC_URL}}icons/bullet_arrow_up.png" alt="▴"/></a>
|
||||
{% trans 'Score' %}
|
||||
<a href="{% url 'kyudanranking-list' order_by='-score' %}?page={{page_obj.number}}"><img src="{{STATIC_URL}}icons/bullet_arrow_down.png" alt="▾"/></a>
|
||||
</th>
|
||||
<th>
|
||||
<a href="{% url 'kyudanranking-list' order_by='+hanchan_count'%}?page={{page_obj.number}}"><img src="{{STATIC_URL}}icons/bullet_arrow_up.png" alt="▴"/></a>
|
||||
{% trans 'Games Total' %}
|
||||
<a href="{% url 'kyudanranking-list' order_by='-hanchan_count'%}?page={{page_obj.number}}"><img src="{{STATIC_URL}}icons/bullet_arrow_down.png" alt="▾"/></a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for ranking in kyudanranking_list %}{% with ranking.user.get_profile as profile %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if profile.thumbnail %}
|
||||
<a href="{{ ranking.get_absolute_url }}"><img src="{{profile.thumbnail.url}}" alt="" /></a>
|
||||
{% else %}
|
||||
<a href="{{ ranking.get_absolute_url }}"><img src="{{STATIC_URL}}img/unknown_thumbnail.png" alt=""/></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td><a href="{{ ranking.get_absolute_url }}">{{ ranking.user }}</a></td>
|
||||
<td>{{profile.last_name}} {{profile.first_name}}</td>
|
||||
<td>{% if ranking.dan %} {{ranking.dan}}. Dan {% else %} {{ranking.kyu}} Kyu {% endif %}</td>
|
||||
<td class="right">{% if ranking.dan %} {{ranking.dan_points}} {% else %} {{ranking.kyu_points}} {% endif %}</td>
|
||||
<td class="right">{{ranking.hanchan_count}}</td>
|
||||
</tr>
|
||||
{% endwith %}{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
72
templates/mahjong_ranking/ladderranking_list.html
Normal file
72
templates/mahjong_ranking/ladderranking_list.html
Normal file
@@ -0,0 +1,72 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n comments%}
|
||||
|
||||
{% block content %}
|
||||
<h2>Ladder - {{season.name}}</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">{% trans "Rank" %}</th>
|
||||
<th rowspan="2">{% trans "Avatar" %}</th>
|
||||
<th rowspan="2">{% trans "Nickname" %}</th>
|
||||
<th rowspan="2">{% trans "Name" %}</th>
|
||||
<th colspan="2">{% trans 'Average' %}</th>
|
||||
<th colspan="2">Hanchans</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans 'Placement' %}</th>
|
||||
<th>{% trans "Score" %}</th>
|
||||
<th>{% trans "won" %}</th>
|
||||
<th>{% trans "good" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for player in ladderranking_list %}
|
||||
{% with player.user.get_profile as profile %}
|
||||
<tr>
|
||||
<td class="center">{{player.placement}}.</td>
|
||||
<td class="avatar"><a href="{{ player.get_absolute_url }}?season={{season.id}}">
|
||||
{% if profile.thumbnail %}
|
||||
<img src="{{profile.thumbnail.url}}" alt="" />
|
||||
{% else %}
|
||||
<img src="{{STATIC_URL}}img/unknown_thumbnail.png" alt=""/>
|
||||
{% endif %}
|
||||
</a></td>
|
||||
<td><a href="{{ player.get_absolute_url }}?season={{season.id}}">{{player.user}}</a></td>
|
||||
<td>{{profile.last_name}} {{profile.first_name}}</td>
|
||||
<td class="center">{{player.avg_placement|floatformat:2 }}</td>
|
||||
<td class="right">{{player.avg_score|floatformat:0 }}</td>
|
||||
<td class="center">{{player.won_hanchans}}</td>
|
||||
<td class="center">{{player.good_hanchans}}</td>
|
||||
</tr>
|
||||
{% endwith %}
|
||||
{% empty %}
|
||||
<tr><td colspan="8">Leider hat es noch niemand in das Ranking geschafft.
|
||||
Ein Spieler wird erst ins Ranking genommen wenn er 5 Hanchans absolviert hat.</td></tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% if is_archive %}
|
||||
<h2>{% trans 'Ladder Archive' %}</h2>
|
||||
<ul class="list">
|
||||
{% for season in season_archive %}
|
||||
<li class="season"><a href="{% url 'mahjong-ladder-archive' season.id %}">{{season.name}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<h2>{% trans 'Latest Events' %}</h2>
|
||||
<ul class="list">
|
||||
{% for event in latest_event_list %}
|
||||
<li class="event"><a href="{% url 'event-hanchan-list' event.pk %}">{{event.name}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h2>{% trans 'Latest Hanchans' %}</h2>
|
||||
<ul class="comment_list">
|
||||
{% for hanchan in latest_hanchan_list %}
|
||||
<li class="hanchan"><a href="{% url 'event-hanchan-list' hanchan.event.pk %}">{{hanchan.event.name}}</a> {{hanchan.start|time:'H:i'}}: {{hanchan.player_names}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
10
templates/mahjong_ranking/page.html
Normal file
10
templates/mahjong_ranking/page.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block additional_nav_elements %}
|
||||
<a href="{% url 'season_ranking-archive' %}" {% if is_archive %}class="active"{% endif %}>{% trans 'Archive' %}</a>
|
||||
{% if perms.events.add_event %}
|
||||
<a href="{% url 'event-form' %}" {% ifequal request.path '/events/add/' %}class="active"{% endifequal %}>{% trans 'Add Event' %}</a>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
59
templates/mahjong_ranking/player_dan_score.html
Normal file
59
templates/mahjong_ranking/player_dan_score.html
Normal file
@@ -0,0 +1,59 @@
|
||||
{% extends "membership/membership_detail.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %} {% trans 'Dan Score for' %} {{membership.user.username}} {% endblock %}
|
||||
|
||||
{% block score_list %}
|
||||
<ul class="tabs grid_12">
|
||||
<li><a href="{% url 'player-ladder-score' membership.user.username %}">{% trans "Ladder Hanchans" %}</a></li>
|
||||
<li><a href="{% url 'player-kyu-score' membership.user.username %}">{% trans "Kyu Hanchans" %}</a></li>
|
||||
<li class="active"><a href="{% url 'player-dan-score' membership.user.username %}">{% trans "Dan Hanchans" %}</a></li>
|
||||
<li><a href="{% url 'player-invalid-score' membership.user.username %}">{% trans "Invalid Hanchans" %}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="grid_12">
|
||||
<h2>{% trans 'Hanchans that apply to the Dan Score' %}</h2>
|
||||
<table>
|
||||
<thead><tr>
|
||||
<tr>
|
||||
<th rowspan="2">{% trans 'Date' %}</th>
|
||||
<th rowspan="2">{% trans 'Event' %}</th>
|
||||
<th rowspan="2">{% trans 'Start' %}<//th>
|
||||
<th rowspan="2">{% trans 'Placement' %}</th>
|
||||
<th colspan="4">{% trans 'Players' %}</th>
|
||||
<th rowspan="2">{% trans 'Dan Points' %}</th>
|
||||
<th rowspan="2">{% trans 'Comment' %}</th>
|
||||
<th rowspan="2"></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1.</th>
|
||||
<th>2.</th>
|
||||
<th>3.<//th>
|
||||
<th>4.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
{% for result in player_list %}
|
||||
<tr>
|
||||
<td>{{ result.hanchan.start|date:'SHORT_DATE_FORMAT' }}</td>
|
||||
<td><a href="{{ result.hanchan.get_absolute_url }}">{{ result.hanchan.event.name }}</a></td>
|
||||
<td>{{ result.hanchan.start|time:'H:i' }}</td>
|
||||
<td class="center">{{result.placement}}.</td>
|
||||
{% for player in result.hanchan.player_set.all %}
|
||||
<td class="center"><a href="{% url 'player-dan-score' player.user.username %}">{{player.user}}</a><br/> {{player.score }}</td>
|
||||
{% endfor %}
|
||||
<td class="center">{{result.dan_points}}</td>
|
||||
<td>{{ result.comment }}</td>
|
||||
<td>
|
||||
{% if perms.mahjong_ranking.delete_hanchan %}
|
||||
<a href="{% url 'delete-hanchan' result.hanchan.pk %}"><img src="{{STATIC_URL}}icons/table_delete.png" alt="{% trans 'Delete' %}" title="{% trans 'Delete Hanchan' %}"/>
|
||||
{% endif %}
|
||||
{% if perms.mahjong_ranking.change_hanchan %}
|
||||
<a href="{% url 'edit-hanchan' result.hanchan.pk %}"><img src="{{STATIC_URL}}icons/table_edit.png" alt="{% trans 'Edit' %}" title="{% trans 'Edit Hanchan' %}"/>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
49
templates/mahjong_ranking/player_invalid_score.html
Normal file
49
templates/mahjong_ranking/player_invalid_score.html
Normal file
@@ -0,0 +1,49 @@
|
||||
{% extends "membership/membership_detail.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %} {% trans 'Kyu Score for' %} {{player.username}} {% endblock %}
|
||||
|
||||
{% block score_list %}
|
||||
|
||||
<ul class="tabs grid_12">
|
||||
<li><a href="{% url 'player-ladder-score' membership.user.username %}">{% trans "Ladder Hanchans" %}</a></li>
|
||||
<li><a href="{% url 'player-kyu-score' membership.user.username %}">{% trans "Kyu Hanchans" %}</a></li>
|
||||
<li><a href="{% url 'player-dan-score' membership.user.username %}">{% trans "Dan Hanchans" %}</a></li>
|
||||
<li class="active"><a href="{% url 'player-invalid-score' membership.user.username %}">{% trans "Invalid Hanchans" %}</a></li>
|
||||
</ul>
|
||||
<div class="grid_12">
|
||||
<h2>{% trans 'Invalid hanchans with' %} {{membership.user.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 result in player_list %}
|
||||
<tr>
|
||||
<td><a href="{{ result.hanchan.get_absolute_url }}">{{ result.hanchan.event.name }}</a></td>
|
||||
<td>{{ result.hanchan.start|time:'H:i' }}</td>
|
||||
{% for player in result.hanchan.player_set.all %}
|
||||
<td class="center"><a href="{% url 'player-invalid-score' player.user.username %}">{{player.user}}</a><br/> {{player.score }}</td>
|
||||
{% endfor %}
|
||||
<td class="center">{{result.placement}}</td>
|
||||
<td class="center">{{result.kyu_points}}</td>
|
||||
<td>{{ result.comment }}</td>
|
||||
<td>
|
||||
{% if perms.mahjong_ranking.delete_hanchan %}
|
||||
<a href="{% url 'delete-hanchan' result.hanchan.pk %}"><img src="{{STATIC_URL}}icons/table_delete.png" alt="{% trans 'Delete' %}" title="{% trans 'Delete Hanchan' %}"/>
|
||||
{% endif %}
|
||||
{% if perms.mahjong_ranking.change_hanchan %}
|
||||
<a href="{% url 'edit-hanchan' result.hanchan.pk %}"><img src="{{STATIC_URL}}icons/table_edit.png" alt="{% trans 'Edit' %}" title="{% trans 'Edit Hanchan' %}"/>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
56
templates/mahjong_ranking/player_kyu_score.html
Normal file
56
templates/mahjong_ranking/player_kyu_score.html
Normal file
@@ -0,0 +1,56 @@
|
||||
{% extends "membership/membership_detail.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %} {% trans 'Kyu Score for' %} {{membership.user.username}} {% endblock %}
|
||||
|
||||
{% block score_list %}
|
||||
<ul class="tabs grid_12">
|
||||
<li><a href="{% url 'player-ladder-score' membership.user.username %}">{% trans "Ladder Hanchans" %}</a></li>
|
||||
<li class="active"><a href="{% url 'player-kyu-score' membership.user.username %}">{% trans "Kyu Hanchans" %}</a></li>
|
||||
<li><a href="{% url 'player-dan-score' membership.user.username %}">{% trans "Dan Hanchans" %}</a></li>
|
||||
<li><a href="{% url 'player-invalid-score' membership.user.username %}">{% trans "Invalid Hanchans" %}</a></li>
|
||||
</ul>
|
||||
<div class="grid_12">
|
||||
<h2>{% trans 'Hanchans that apply to the Kyu Score' %}</h2>
|
||||
<table>
|
||||
<thead><tr>
|
||||
<tr>
|
||||
<th rowspan="2">{% trans 'Date' %}</th>
|
||||
<th rowspan="2">{% trans 'Event' %}</th>
|
||||
<th rowspan="2">{% trans 'Start' %}<//th>
|
||||
<th rowspan="2">{% trans 'Placement' %}</th>
|
||||
<th colspan="4">{% trans 'Players' %}</th>
|
||||
<th rowspan="2">{% trans 'Kyu Points' %}</th>
|
||||
<th rowspan="2"></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1.</th>
|
||||
<th>2.</th>
|
||||
<th>3.<//th>
|
||||
<th>4.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
{% for result in player_list %}
|
||||
<tr>
|
||||
<td>{{ result.hanchan.start|date:'SHORT_DATE_FORMAT' }}</td>
|
||||
<td><a href="{{ result.hanchan.get_absolute_url }}">{{ result.hanchan.event.name }}</a></td>
|
||||
<td>{{ result.hanchan.start|time:'H:i' }}</td>
|
||||
<td class="center">{{result.placement}}.</td>
|
||||
{% for player in result.hanchan.player_set.select_related %}
|
||||
<td class="center"><a href="{% url 'player-kyu-score' player.user.username %}">{{player.user}}</a><br/> {{player.score }}</td>
|
||||
{% endfor %}
|
||||
<td class="center">{{result.kyu_points}}</td>
|
||||
<td>
|
||||
{% if perms.mahjong_ranking.delete_hanchan %}
|
||||
<a href="{% url 'delete-hanchan' result.hanchan.pk %}"><img src="{{STATIC_URL}}icons/table_delete.png" alt="{% trans 'Delete' %}" title="{% trans 'Delete Hanchan' %}"/>
|
||||
{% endif %}
|
||||
{% if perms.mahjong_ranking.change_hanchan %}
|
||||
<a href="{% url 'edit-hanchan' result.hanchan.pk %}"><img src="{{STATIC_URL}}icons/table_edit.png" alt="{% trans 'Edit' %}" title="{% trans 'Edit Hanchan' %}"/>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
63
templates/mahjong_ranking/player_ladder_score.html
Normal file
63
templates/mahjong_ranking/player_ladder_score.html
Normal file
@@ -0,0 +1,63 @@
|
||||
{% extends "membership/membership_detail.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %} {% trans 'Ladder Score for' %} {{membership.user.username}} {% endblock %}
|
||||
|
||||
{% block score_list %}
|
||||
<ul class="tabs grid_12">
|
||||
<li class="active"><a href="{% url 'player-ladder-score' membership.user.username %}">{% trans "Ladder Hanchans" %}</a></li>
|
||||
<li><a href="{% url 'player-kyu-score' membership.user.username %}">{% trans "Kyu Hanchans" %}</a></li>
|
||||
<li><a href="{% url 'player-dan-score' membership.user.username %}">{% trans "Dan Hanchans" %}</a></li>
|
||||
<li><a href="{% url 'player-invalid-score' membership.user.username %}">{% trans "Invalid Hanchans" %}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="grid_12">
|
||||
<h2>{% trans 'Hanchans that apply to the Ladder Score' %} - {{season.name}}</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">{% trans 'Date' %}</th>
|
||||
<th rowspan="2">{% trans 'Event' %}</th>
|
||||
<th rowspan="2">{% trans 'Start' %}<//th>
|
||||
<th rowspan="2">{% trans 'Placement' %}</th>
|
||||
<th colspan="4">{% trans 'Players' %}</th>
|
||||
<th rowspan="2"></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1.</th>
|
||||
<th>2.</th>
|
||||
<th>3.<//th>
|
||||
<th>4.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for result in player_list %}
|
||||
<tr>
|
||||
<td>{{ result.hanchan.start|date:'SHORT_DATE_FORMAT' }}</td>
|
||||
<td><a href="{{ result.hanchan.get_absolute_url }}">{{ result.hanchan.event.name }}</a></td>
|
||||
<td>{{ result.hanchan.start|time:'H:i' }}</td>
|
||||
<td class="center">{{result.placement}}.</td>
|
||||
{% for player in result.hanchan.player_set.select_related %}
|
||||
<td class="center"><a href="{% url 'player-ladder-score' player.user.username %}?season={{season.id}}">{{player.user}}</a><br/> {{player.score}}</td>
|
||||
{% endfor %}
|
||||
<td>
|
||||
{% if perms.mahjong_ranking.delete_hanchan %}
|
||||
<a href="{% url 'delete-hanchan' result.hanchan.pk %}"><img src="{{STATIC_URL}}icons/table_delete.png" alt="{% trans 'Delete' %}" title="{% trans 'Delete Hanchan' %}"/>
|
||||
{% endif %}
|
||||
{% if perms.mahjong_ranking.change_hanchan %}
|
||||
<a href="{% url 'edit-hanchan' result.hanchan.pk %}"><img src="{{STATIC_URL}}icons/table_edit.png" alt="{% trans 'Edit' %}" title="{% trans 'Edit Hanchan' %}"/>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfooter>
|
||||
<tr><td colspan="9" class="right">
|
||||
<form action="{% url 'player-ladder-score' membership.user.username %}">
|
||||
<label for="id_season">{% trans 'Season' %}:</label> {{seasons_select_form.season}} <button type="submit">{% trans 'Go' %}</button>
|
||||
</form>
|
||||
</td></tr>
|
||||
</tfooter>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user