89 lines
2.7 KiB
HTML
89 lines
2.7 KiB
HTML
{% extends "base.dj.html" %}{% load humanize %}
|
||
{%block content %}
|
||
<h3><a href="{% url "league:league" league.slug %}" class="text-reset text-decoration-none">{{season.league.name}}</a> - {{season.label}} {{season.year}}</h3>
|
||
<div>
|
||
<ul class="nav nav-underline">
|
||
<li class="nav-item">
|
||
<button class="nav-link active" data-bs-toggle="tab" data-bs-target="#scoreboard-tab-pane" type="button">Scoreboard</button>
|
||
</li>
|
||
<li class="nav-item">
|
||
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#teams-tab-pane" type="button">Teams</button>
|
||
</li>
|
||
<li class="nav-item ">
|
||
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#movies-tab-pane" type="button">Movies</button>
|
||
</li>
|
||
<li class="nav-item">
|
||
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#draft-tab-pane" type="button">Draft</button>
|
||
</li>
|
||
</ul>
|
||
|
||
<div class="tab-content">
|
||
<div class="tab-pane fade show active" id="scoreboard-tab-pane">
|
||
<table class="table dataTable">
|
||
<thead>
|
||
<th>Team</th>
|
||
<th>Owner</th>
|
||
<th>Total</th>
|
||
<tbody>
|
||
{% for entry in scoreboard%}
|
||
<tr>
|
||
<td>{{entry.team}}</td>
|
||
<td>{{entry.user}}</td>
|
||
<td>${{entry.total|floatformat:0|intcomma }}</td>
|
||
</tr>
|
||
{%endfor%}
|
||
</table>
|
||
</div>
|
||
<div class="tab-pane fade" id="teams-tab-pane">
|
||
{% for entry in scoreboard %}
|
||
<h3>{{ entry.team }} ({{ entry.user }})</h3>
|
||
<ul>
|
||
{% for pick in entry.picks %}
|
||
<li>
|
||
<a href="{% url 'season:movie' league.slug season.slug pick.imdb_id %}">{{ pick.movie.title }}</a> – ${{ pick.score|floatformat:0|intcomma }} (Bid:
|
||
${{pick.bid | floatformat:0}}M)
|
||
|
||
</li>
|
||
{% endfor %}
|
||
</ul>
|
||
{% endfor %}
|
||
</div>
|
||
<div class="tab-pane fade" id="movies-tab-pane">
|
||
<table class="dataTable">
|
||
<thead>
|
||
<th>Title</th>
|
||
<th>Team</th>
|
||
<th>User</th>
|
||
<th>Gross</th>
|
||
<th>Bid</th>
|
||
</thead>
|
||
<tbody>
|
||
{% for pick in picks %}
|
||
<tr>
|
||
<td>{{pick.movie.title}}</td>
|
||
<td>{{pick.season_entry.team_name}}</td>
|
||
<td>{{pick.season_entry.user.username}}</td>
|
||
<td>${{pick.domestic_gross | floatformat:0 |intcomma}}</td>
|
||
<td>${{pick.bid_amount | floatformat:0}}M</td>
|
||
</tr>
|
||
{%endfor%}
|
||
</tbody>
|
||
</ul>
|
||
</table>
|
||
</div>
|
||
<div class="tab-pane fade" id="draft-tab-pane">
|
||
Draft
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script>
|
||
window.addEventListener("load", () => {
|
||
document.querySelectorAll(".dataTable").forEach((table) => {
|
||
new DataTable(table, {
|
||
pageLength: 10,
|
||
});
|
||
});
|
||
});
|
||
</script>
|
||
{%endblock%} |