Code bereinigt und Seitenstruktur verfeinert.
Das Layout der einzelnen Seiten ist jetzt einheitlich: - jumbotron - Naviation der Unterseiten (wenn Vorhanden) - Hauptinhalt - Pager (bei mehrseiteigen Ergebnissen) - Kommentare (wenn Kommentare möglich) - Buttonleiste zum bearbeiten (wen erlaubt) * Viele kleine HTML5 Fehler wurden bereinigt * CSS Dateien wurden angepasst * Nicht mehr benötigte Dateien in STATIC gelöscht * externe Pakete aus utlis/ entfernt, als Vobreitung für virtenv Nutzung.
This commit is contained in:
committed by
Christian Berg
parent
86a0db050d
commit
34f5bdca58
@@ -2,10 +2,11 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans 'Player List' %}{% endblock %}
|
||||
{% block teaser %}<h2>{% trans 'Player List' %}</h2>{% endblock %}
|
||||
|
||||
{% block maincontent %}
|
||||
<h2 class="grid_12">{% trans 'Player List' %}</h2>
|
||||
<table class="grid_12">
|
||||
<main class="grid_12">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans 'Avatar' %}</th>
|
||||
@@ -47,7 +48,7 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
<td><a href="{{ ranking.get_absolute_url }}">{{ ranking.user }}</a></td>
|
||||
<td>{{profile.last_name}} {{profile.first_name}}</td>
|
||||
<td>{% if user.is_authenticated %}{{profile.last_name}} {{profile.first_name}}{% else %} ---{% endif %}</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>
|
||||
@@ -55,4 +56,5 @@
|
||||
{% endwith %}{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</main>
|
||||
{% endblock %}
|
||||
@@ -1,72 +1,77 @@
|
||||
{% 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>
|
||||
{% block teaser %} <h2>Mahjong Ranking - {{season.name}}</h2> {% endblock %}
|
||||
|
||||
{% block maincontent %}
|
||||
<main 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="3">Hanchans</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans 'Placement' %}</th>
|
||||
<th>{% trans "Score" %}</th>
|
||||
<th>{% trans "count" %}</th>
|
||||
<th>{% trans "good" %}</th>
|
||||
<th>{% trans "won" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for player in ladderranking_list %}
|
||||
{% with player.user.get_profile as profile %}
|
||||
<tr>
|
||||
<td class="center">{{player.placement}}.</td>
|
||||
<td><a href="{{ player.get_absolute_url }}?season={{season.id}}"><img src="{% if profile.thumbnail %}{{profile.thumbnail.url}}{% else %}{{STATIC_URL}}img/unknown_thumbnail.png{% endif %}" class="avatar" alt=""/></a></td>
|
||||
<td><a href="{{ player.get_absolute_url }}?season={{season.id}}">{{player.user}}</a></td>
|
||||
<td>{% if user.is_authenticated %}{{profile.last_name}} {{profile.first_name}}{% else %} ---{% endif %}</td>
|
||||
<td class="center">{{player.avg_placement|floatformat:2 }}</td>
|
||||
<td class="right">{{player.avg_score|floatformat:0 }}</td>
|
||||
<td class="right">{{player.hanchan_count}}</td>
|
||||
<td class="right">{{player.good_hanchans}}</td>
|
||||
<td class="right">{{player.won_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>
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% if is_archive %}
|
||||
<h2>{% trans 'Ladder Archive' %}</h2>
|
||||
<ul class="list">
|
||||
{% for season in season_archive %}
|
||||
{% block redbox %}
|
||||
{% 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 %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<h2>{% trans 'Latest Hanchans' %}</h2>
|
||||
<ul class="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'}}:
|
||||
<small>{{hanchan.player_names}}</small>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<h3>{% trans 'Latest Events' %}</h3>
|
||||
<ul class="list">
|
||||
{% for event in latest_event_list|slice:":3" %}
|
||||
<li class="event"><a href="{% url 'event-hanchan-list' event.pk %}">{{event.name}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -2,58 +2,58 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %} {% trans 'Dan Score for' %} {{membership.user.username}} {% endblock %}
|
||||
{% block teaser %}<h2>{% trans 'Dan Score for' %} {{membership.user.username}}</h2>{% 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>
|
||||
<h2>{% trans 'Hanchans that apply to the Dan Score' %}</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">{% 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' %}"/></a>
|
||||
{% 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' %}"/></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% 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' %}"/></a>
|
||||
{% 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' %}"/></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -2,15 +2,8 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %} {% trans 'Kyu Score for' %} {{player.username}} {% endblock %}
|
||||
|
||||
{% block teaser %}<h2>{% trans 'Invalid hanchans with' %} {{membership.user.username}}</h2>{% 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>
|
||||
|
||||
@@ -3,13 +3,9 @@
|
||||
|
||||
{% block title %} {% trans 'Kyu Score for' %} {{membership.user.username}} {% endblock %}
|
||||
|
||||
{% block teaser %}<h2>{% trans 'Kyu Score for' %}{{membership.user.username}}</h2>{% 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>
|
||||
|
||||
@@ -2,15 +2,9 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %} {% trans 'Ladder Score for' %} {{membership.user.username}} {% endblock %}
|
||||
{% block teaser %}<h2>{% trans 'Ladder Score for' %} {{membership.user.username}}</h2>{% 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>
|
||||
|
||||
Reference in New Issue
Block a user