Files
hoopscout/templates/players/detail.html

170 lines
5.6 KiB
HTML

{% extends "base.html" %}
{% block title %}HoopScout | {{ player.full_name }}{% endblock %}
{% block content %}
<section class="panel">
<div class="row-between wrap-gap">
<div>
<h1>{{ player.full_name }}</h1>
<p class="muted-text">
{{ player.nominal_position.name|default:"No nominal position" }}
· {{ player.inferred_role.name|default:"No inferred role" }}
</p>
</div>
<a class="button ghost" href="{% url 'players:index' %}">Back to search</a>
</div>
<div class="detail-grid mt-16">
<div class="detail-card">
<h2>Summary</h2>
<p><strong>Nationality:</strong> {{ player.nationality.name|default:"-" }}</p>
<p><strong>Birth date:</strong> {{ player.birth_date|date:"Y-m-d"|default:"-" }}</p>
<p><strong>Age:</strong> {{ age|default:"-" }}</p>
<p><strong>Height:</strong> {{ player.height_cm|default:"-" }} cm</p>
<p><strong>Weight:</strong> {{ player.weight_kg|default:"-" }} kg</p>
<p><strong>Dominant hand:</strong> {{ player.get_dominant_hand_display|default:"-" }}</p>
</div>
<div class="detail-card">
<h2>Current Assignment</h2>
{% if current_assignment %}
<p><strong>Team:</strong> {{ current_assignment.team.name|default:"-" }}</p>
<p><strong>Competition:</strong> {{ current_assignment.competition.name|default:"-" }}</p>
<p><strong>Season:</strong> {{ current_assignment.season.label|default:"-" }}</p>
<p><strong>Games:</strong> {{ current_assignment.games_played }}</p>
{% else %}
<p>No active assignment available.</p>
{% endif %}
</div>
<div class="detail-card">
<h2>Aliases</h2>
<ul>
{% 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-16">
<h2>Team History</h2>
{% if season_rows %}
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Season</th>
<th>Team</th>
<th>Competition</th>
</tr>
</thead>
<tbody>
{% 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 %}
<p>No team history available.</p>
{% endif %}
</section>
<section class="panel mt-16">
<h2>Career History</h2>
{% if career_entries %}
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Season</th>
<th>Team</th>
<th>Competition</th>
<th>Role</th>
<th>From</th>
<th>To</th>
</tr>
</thead>
<tbody>
{% 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 %}
<p>No career entries available.</p>
{% endif %}
</section>
<section class="panel mt-16">
<h2>Season-by-Season Stats</h2>
{% if season_rows %}
<div class="table-wrap">
<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>
{% 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 %}
<p>No season stats available.</p>
{% endif %}
</section>
{% endblock %}