feat: add scouting search MVP list and player detail
This commit is contained in:
67
app/scouting/templates/scouting/player_detail.html
Normal file
67
app/scouting/templates/scouting/player_detail.html
Normal file
@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ player.full_name }}</title>
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="{% url 'scouting:player_list' %}">Back to search</a></p>
|
||||
<h1>{{ player.full_name }}</h1>
|
||||
|
||||
<p>Position: {{ player.position }}</p>
|
||||
<p>Nationality: {{ player.nationality|default:"-" }}</p>
|
||||
<p>Birth date: {{ player.birth_date|default:"-" }}</p>
|
||||
<p>Height (cm): {{ player.height_cm|default:"-" }}</p>
|
||||
<p>Weight (kg): {{ player.weight_kg|default:"-" }}</p>
|
||||
<p>Wingspan (cm): {{ player.wingspan_cm|default:"-" }}</p>
|
||||
|
||||
<p>
|
||||
Roles:
|
||||
{% for role in player.roles.all %}
|
||||
{{ role.name }}{% if not forloop.last %}, {% endif %}
|
||||
{% empty %}
|
||||
-
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Specialties:
|
||||
{% for specialty in player.specialties.all %}
|
||||
{{ specialty.name }}{% if not forloop.last %}, {% endif %}
|
||||
{% empty %}
|
||||
-
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
||||
<h2>Season Contexts</h2>
|
||||
<ul>
|
||||
{% for context in contexts %}
|
||||
<li>
|
||||
<strong>{{ context.season.name }}</strong>
|
||||
| Team: {{ context.team.name|default:"-" }}
|
||||
| Competition: {{ context.competition.name|default:"-" }}
|
||||
{% if context.stats %}
|
||||
<div>
|
||||
PTS {{ context.stats.points|default:"-" }} |
|
||||
AST {{ context.stats.assists|default:"-" }} |
|
||||
STL {{ context.stats.steals|default:"-" }} |
|
||||
TOV {{ context.stats.turnovers|default:"-" }} |
|
||||
BLK {{ context.stats.blocks|default:"-" }}
|
||||
</div>
|
||||
<div>
|
||||
eFG% {{ context.stats.efg_pct|default:"-" }} |
|
||||
TS% {{ context.stats.ts_pct|default:"-" }} |
|
||||
+/- {{ context.stats.plus_minus|default:"-" }} |
|
||||
ORtg {{ context.stats.offensive_rating|default:"-" }} |
|
||||
DRtg {{ context.stats.defensive_rating|default:"-" }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div>No stats available for this context.</div>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% empty %}
|
||||
<li>No season contexts found.</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
61
app/scouting/templates/scouting/player_list.html
Normal file
61
app/scouting/templates/scouting/player_list.html
Normal file
@ -0,0 +1,61 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Player Search</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Scout Search</h1>
|
||||
|
||||
<form method="get">
|
||||
<fieldset>
|
||||
<legend>Player Filters</legend>
|
||||
{{ form.name.label_tag }} {{ form.name }}
|
||||
{{ form.position.label_tag }} {{ form.position }}
|
||||
{{ form.role.label_tag }} {{ form.role }}
|
||||
{{ form.specialty.label_tag }} {{ form.specialty }}
|
||||
{{ form.min_age.label_tag }} {{ form.min_age }}
|
||||
{{ form.max_age.label_tag }} {{ form.max_age }}
|
||||
{{ form.min_height_cm.label_tag }} {{ form.min_height_cm }}
|
||||
{{ form.max_height_cm.label_tag }} {{ form.max_height_cm }}
|
||||
{{ form.min_weight_kg.label_tag }} {{ form.min_weight_kg }}
|
||||
{{ form.max_weight_kg.label_tag }} {{ form.max_weight_kg }}
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>Context Filters</legend>
|
||||
{{ form.competition.label_tag }} {{ form.competition }}
|
||||
{{ form.season.label_tag }} {{ form.season }}
|
||||
{{ form.team.label_tag }} {{ form.team }}
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>Stats Filters</legend>
|
||||
{{ form.min_points.label_tag }} {{ form.min_points }}
|
||||
{{ form.min_assists.label_tag }} {{ form.min_assists }}
|
||||
{{ form.min_steals.label_tag }} {{ form.min_steals }}
|
||||
{{ form.max_turnovers.label_tag }} {{ form.max_turnovers }}
|
||||
{{ form.min_blocks.label_tag }} {{ form.min_blocks }}
|
||||
{{ form.min_efg_pct.label_tag }} {{ form.min_efg_pct }}
|
||||
{{ form.min_ts_pct.label_tag }} {{ form.min_ts_pct }}
|
||||
{{ form.min_plus_minus.label_tag }} {{ form.min_plus_minus }}
|
||||
{{ form.min_offensive_rating.label_tag }} {{ form.min_offensive_rating }}
|
||||
{{ form.max_defensive_rating.label_tag }} {{ form.max_defensive_rating }}
|
||||
</fieldset>
|
||||
|
||||
<button type="submit">Search</button>
|
||||
</form>
|
||||
|
||||
<h2>Results ({{ players|length }})</h2>
|
||||
<ul>
|
||||
{% for player in players %}
|
||||
<li>
|
||||
<a href="{% url 'scouting:player_detail' player.id %}">{{ player.full_name }}</a>
|
||||
({{ player.position }})
|
||||
</li>
|
||||
{% empty %}
|
||||
<li>No players found.</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user