Files
TipPy/templates/md.html

121 lines
5.8 KiB
HTML

{% extends "base.html" %}
{% load i18n static %}
{% load humanize %}
{% block head %}
<script type="text/javascript" src="{% static 'javascript/tippy.js' %}"></script>
{% endblock %}
{% block nav %}
{% include "nav.html" with ls=ls season=season %}
{% endblock %}
{% block body %}
<div id="content-main">
<div class="row">
<div class="col-md-7">
<h2>Deine Tipps</h2>
<nav>
<ul class="pager">
<li data-toggle="tooltip" title="{% trans 'previous' %}" class="previous"><a
href="/matchday/{{ ls }}/{{ season }}/{{ cur_md|add:"-1"|stringformat:"02i" }}"><span
aria-hidden="true">&larr;</span></a></li>
{{ md_name }}
<li data-toggle="tooltip" title="{% trans 'next' %}" class="next"><a
href="/matchday/{{ ls }}/{{ season }}/{{ cur_md|add:"1"|stringformat:"02i" }}"><span
aria-hidden="true">&rarr;</span></a></li>
</ul>
</nav>
<form role="form" action="" method="post">{% csrf_token %}
<div class="table-responsive">
<table class="table table-hover table-condensed">
<tr>
<th>Anstoß</th>
<th>Heim</th>
<th>Gast</th>
<th>Erg.</th>
<th colspan="2">Tipp</th>
</tr>
{% for match in matches %}
{% if match.started and not match.finished %}
<tr class="danger">{% else %}
<tr>{% endif %}
<td>{{ match.matchDateTime }}</td>
{% if match.iconURLTeam1 != "" %}
<td><img src="{{ match.iconURLTeam1 }}" width="20"/>
{% else %}
<td><img src="{{ STATIC_URL }}{{ match.iconTeam1 }}"/>
{% endif %}
<span class="hidden-xs"> {{ match.nameTeam1 }}</span>
<span class="visible-xs"> {{ match.abbrTeam1 }}</span>
</td>
{% if match.iconURLTeam1 != "" %}
<td><img src="{{ match.iconURLTeam2 }}" width="20"/>
{% else %}
<td><img src="{{ STATIC_URL }}{{ match.iconTeam2 }}"/>
{% endif %}
<span class="hidden-xs"> {{ match.nameTeam2 }}</span>
<span class="visible-xs"> {{ match.abbrTeam2 }}</span>
</td>
<td>{{ match.matchResult }}</td>
<td>{{ match.tippFormTeam1 }}</td>
<td>{{ match.tippFormTeam2 }}</td>
</tr>
{% endfor %}
</table>
</div>
<button type="submit" class="btn btn-default btn-lg btn-block">
<span class="glyphicon glyphicon-saved" aria-hidden="true"></span> Tipps abgeben
</button>
</form>
</div>
</div>
<div class="row">
{% for mandant, list in mandant_dict.items %}
<div class="col-md-7">
<h4>Mitspieler {{ mandant }}</h4>
<div class="table-responsive">
<table class="table table-hover table-condensed">
<tr>
<th>Tipper</th>
<th>Gesamt</th>
{% for match in matches %}
<th>
{% if match.iconURLTeam1 != "" %}
<img src="{{ match.iconURLTeam1 }}" width="20"/>
{% else %}
<img src="{{ STATIC_URL }}{{ match.iconTeam1 }}"/>
{% endif %}
<br/><br/>
{% if match.iconURLTeam2 != "" %}
<img src="{{ match.iconURLTeam2 }}" width="20"/>
{% else %}
<img src="{{ STATIC_URL }}{{ match.iconTeam2 }}"/>
{% endif %}
</th>
{% endfor %}
</tr>
{% for mate in list %}
<tr>
<td>{{ mate.mate.first_name }}</td>
<td>{{ mate.sum_score }}</td>
{% for tipp in mate.tipps %}
<td>{{ tipp }}</td>
{% endfor %}
{% endfor %}
</tr>
</table>
</div>
</div>
{% endfor %}
</div>
<div class="row">
<div class="col-md-7">
<h2>Chat</h2>
{% block chat %}
{% include "chat.xhtml" with posts=posts %}
{% endblock %}
</div>
</div>
</div>
{% endblock %}