Fehlerbereinigung.
Mahjong Ranking berechnet nun die richtigen Ränge zu den legendären Kyu/Dan Punkten. Stablie Version bevor die Datenstruktur des Mahjongrankings vereinfacht wird.
This commit is contained in:
committed by
Christian Berg
parent
bafbf38612
commit
79eaeb34ad
@@ -1,59 +1,52 @@
|
||||
{% extends "events/event_detail.html" %}
|
||||
{% load i18n comments fieldset_extras %}
|
||||
|
||||
{% block title %}
|
||||
{% if hanchan.id %}{% trans "Edit Hanchan" %}{% else %}{% trans "Add Hanchan" %}{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}{% if hanchan.id %}{% trans "Edit Hanchan" %}{% else %}{% trans "Add Hanchan" %}{% endif %}{% endblock %}
|
||||
{% block maincontent %}
|
||||
{% 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 %}
|
||||
{% 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="{% url 'event-hanchan-list' event.pk %}" class="button"><span class="fa fa-undo"></span> {% trans 'back' %}</a>
|
||||
<button type="submit"><span class="fa fa-hdd-o"></span> {% trans 'save' %}</button>
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
<form class="grid_12" method="post"><fieldset>
|
||||
{% csrf_token %}
|
||||
<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.input_score.css_classes}}">{{form.input_score}} {% for error in form.input_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>
|
||||
{{ formset.non_form_errors }}
|
||||
{% if hanchan.pk and not hanchan.valid %}<p class="error">{{hanchan.check_validity}}</p>{% endif %}
|
||||
{% with hanchan_formset as form %}
|
||||
{% for error in form.non_field_errors %}<p class="error">{{error}}</p>{% endfor %}
|
||||
{% include "form.html" %}
|
||||
{% endwith %}
|
||||
|
||||
<p class="buttonbar">
|
||||
<a href="{% url 'event-hanchan-list' event.pk %}" class="button"><span class="fa fa-undo"></span> {% trans 'back' %}</a>
|
||||
<button type="submit"><span class="fa fa-hdd-o"></span> {% trans 'save' %}</button>
|
||||
</p>
|
||||
</fieldset></form>
|
||||
{% endblock %}
|
||||
|
||||
{% block buttonbar %}{% endblock %}
|
||||
Reference in New Issue
Block a user