145 lines
6.8 KiB
HTML
145 lines
6.8 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}HoopScout | {{ player.full_name }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<section class="panel">
|
|
<div class="flex flex-wrap items-start justify-between gap-3">
|
|
<div>
|
|
<h1>{{ player.full_name }}</h1>
|
|
<p class="mt-1 text-sm text-slate-600">{{ player.nominal_position.name|default:"No nominal position" }} · {{ player.inferred_role.name|default:"No inferred role" }}</p>
|
|
</div>
|
|
<div class="flex flex-wrap items-center gap-2">
|
|
{% if request.user.is_authenticated %}
|
|
{% include "scouting/partials/favorite_button.html" with player=player is_favorite=is_favorite next_url=request.get_full_path %}
|
|
{% endif %}
|
|
<a class="btn-secondary" href="{% url 'players:index' %}">Back to search</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-4 grid gap-3 md:grid-cols-3">
|
|
<div class="rounded-lg border border-slate-200 p-4">
|
|
<h2 class="text-base">Summary</h2>
|
|
<dl class="mt-2 space-y-1 text-sm">
|
|
<div><dt class="inline font-semibold">Nationality:</dt> <dd class="inline">{{ player.nationality.name|default:"-" }}</dd></div>
|
|
<div><dt class="inline font-semibold">Origin competition:</dt> <dd class="inline">{{ player.origin_competition.name|default:"-" }}</dd></div>
|
|
<div><dt class="inline font-semibold">Origin team:</dt> <dd class="inline">{{ player.origin_team.name|default:"-" }}</dd></div>
|
|
<div><dt class="inline font-semibold">Birth date:</dt> <dd class="inline">{{ player.birth_date|date:"Y-m-d"|default:"-" }}</dd></div>
|
|
<div><dt class="inline font-semibold">Age:</dt> <dd class="inline">{{ age|default:"-" }}</dd></div>
|
|
<div><dt class="inline font-semibold">Height:</dt> <dd class="inline">{{ player.height_cm|default:"-" }} cm</dd></div>
|
|
<div><dt class="inline font-semibold">Weight:</dt> <dd class="inline">{{ player.weight_kg|default:"-" }} kg</dd></div>
|
|
<div><dt class="inline font-semibold">Dominant hand:</dt> <dd class="inline">{{ player.get_dominant_hand_display|default:"-" }}</dd></div>
|
|
</dl>
|
|
</div>
|
|
|
|
<div class="rounded-lg border border-slate-200 p-4">
|
|
<h2 class="text-base">Current Assignment</h2>
|
|
{% if current_assignment %}
|
|
<dl class="mt-2 space-y-1 text-sm">
|
|
<div><dt class="inline font-semibold">Team:</dt> <dd class="inline">{{ current_assignment.team.name|default:"-" }}</dd></div>
|
|
<div><dt class="inline font-semibold">Competition:</dt> <dd class="inline">{{ current_assignment.competition.name|default:"-" }}</dd></div>
|
|
<div><dt class="inline font-semibold">Season:</dt> <dd class="inline">{{ current_assignment.season.label|default:"-" }}</dd></div>
|
|
<div><dt class="inline font-semibold">Games:</dt> <dd class="inline">{{ current_assignment.games_played }}</dd></div>
|
|
</dl>
|
|
{% else %}
|
|
<div class="empty-state mt-2">No active assignment available.</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="rounded-lg border border-slate-200 p-4">
|
|
<h2 class="text-base">Aliases</h2>
|
|
<ul class="mt-2 list-inside list-disc text-sm text-slate-700">
|
|
{% for alias in player.aliases.all %}
|
|
<li>{{ alias.alias }}{% if alias.source %} ({{ alias.source }}){% endif %}</li>
|
|
{% empty %}
|
|
<li>No aliases recorded.</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="panel mt-4">
|
|
<h2>Team History</h2>
|
|
{% if season_rows %}
|
|
<div class="table-wrap mt-3">
|
|
<table class="data-table">
|
|
<thead><tr><th>Season</th><th>Team</th><th>Competition</th></tr></thead>
|
|
<tbody class="divide-y divide-slate-100 bg-white">
|
|
{% for row in season_rows %}
|
|
<tr><td>{{ row.season.label|default:"-" }}</td><td>{{ row.team.name|default:"-" }}</td><td>{{ row.competition.name|default:"-" }}</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% else %}
|
|
<div class="empty-state mt-3">No team history available.</div>
|
|
{% endif %}
|
|
</section>
|
|
|
|
<section class="panel mt-4">
|
|
<h2>Career History</h2>
|
|
{% if career_entries %}
|
|
<div class="table-wrap mt-3">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr><th>Season</th><th>Team</th><th>Competition</th><th>Role</th><th>From</th><th>To</th></tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-slate-100 bg-white">
|
|
{% for entry in career_entries %}
|
|
<tr>
|
|
<td>{{ entry.season.label|default:"-" }}</td>
|
|
<td>{{ entry.team.name|default:"-" }}</td>
|
|
<td>{{ entry.competition.name|default:"-" }}</td>
|
|
<td>{{ entry.role_snapshot.name|default:"-" }}</td>
|
|
<td>{{ entry.start_date|date:"Y-m-d"|default:"-" }}</td>
|
|
<td>{{ entry.end_date|date:"Y-m-d"|default:"-" }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% else %}
|
|
<div class="empty-state mt-3">No career entries available.</div>
|
|
{% endif %}
|
|
</section>
|
|
|
|
<section class="panel mt-4">
|
|
<h2>Season-by-Season Stats</h2>
|
|
{% if season_rows %}
|
|
<div class="table-wrap mt-3">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Season</th><th>Team</th><th>Competition</th><th>Games</th><th>MPG</th><th>PPG</th><th>RPG</th><th>APG</th><th>SPG</th><th>BPG</th><th>TOPG</th><th>FG%</th><th>3P%</th><th>FT%</th><th>Impact</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-slate-100 bg-white">
|
|
{% for row in season_rows %}
|
|
<tr>
|
|
<td>{{ row.season.label|default:"-" }}</td>
|
|
<td>{{ row.team.name|default:"-" }}</td>
|
|
<td>{{ row.competition.name|default:"-" }}</td>
|
|
<td>{{ row.games_played }}</td>
|
|
<td>{% if row.mpg is not None %}{{ row.mpg|floatformat:1 }}{% else %}-{% endif %}</td>
|
|
<td>{% if row.stats %}{{ row.stats.points }}{% else %}-{% endif %}</td>
|
|
<td>{% if row.stats %}{{ row.stats.rebounds }}{% else %}-{% endif %}</td>
|
|
<td>{% if row.stats %}{{ row.stats.assists }}{% else %}-{% endif %}</td>
|
|
<td>{% if row.stats %}{{ row.stats.steals }}{% else %}-{% endif %}</td>
|
|
<td>{% if row.stats %}{{ row.stats.blocks }}{% else %}-{% endif %}</td>
|
|
<td>{% if row.stats %}{{ row.stats.turnovers }}{% else %}-{% endif %}</td>
|
|
<td>{% if row.stats %}{{ row.stats.fg_pct }}{% else %}-{% endif %}</td>
|
|
<td>{% if row.stats %}{{ row.stats.three_pct }}{% else %}-{% endif %}</td>
|
|
<td>{% if row.stats %}{{ row.stats.ft_pct }}{% else %}-{% endif %}</td>
|
|
<td>{% if row.stats %}{{ row.stats.player_efficiency_rating }}{% else %}-{% endif %}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% else %}
|
|
<div class="empty-state mt-3">No season stats available.</div>
|
|
{% endif %}
|
|
</section>
|
|
{% endblock %}
|