Files
hoopscout-v2/app/scouting/templates/scouting/player_list.html

105 lines
3.9 KiB
HTML

<!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>Result Controls</legend>
{{ form.sort.label_tag }} {{ form.sort }}
<p>
Context stat sorts use the matching season context selected by the current
season/team/competition/stat filters.
</p>
{% if not context_sorting_enabled %}
<p>Context stat sorting becomes active once context or stat filters are applied.</p>
{% endif %}
</fieldset>
<fieldset>
<legend>Player Filters</legend>
{{ form.name.label_tag }} {{ form.name }}
{{ 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 }}
{{ form.position.label_tag }} {{ form.position }}
{{ form.role.label_tag }} {{ form.role }}
{{ form.specialty.label_tag }} {{ form.specialty }}
</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 ({{ total_results }})</h2>
<ul>
{% for player in players %}
<li>
<a href="{% url 'scouting:player_detail' player.id %}">{{ player.full_name }}</a>
({{ player.position }})
{% if player.matching_context %}
<div>
Match context:
{{ player.matching_context.season.name }}
| Team: {{ player.matching_context.team.name|default:"-" }}
| Competition: {{ player.matching_context.competition.name|default:"-" }}
</div>
{% if player.matching_context.stats %}
<div>
PTS {{ player.matching_context.stats.points|default:"-" }} |
AST {{ player.matching_context.stats.assists|default:"-" }} |
STL {{ player.matching_context.stats.steals|default:"-" }} |
TOV {{ player.matching_context.stats.turnovers|default:"-" }} |
BLK {{ player.matching_context.stats.blocks|default:"-" }}
</div>
{% endif %}
{% endif %}
</li>
{% empty %}
<li>No players found.</li>
{% endfor %}
</ul>
{% if page_obj.paginator.num_pages > 1 %}
<nav aria-label="Pagination">
{% if page_obj.has_previous %}
<a href="?{% if query_without_page %}{{ query_without_page }}&amp;{% endif %}page={{ page_obj.previous_page_number }}">Previous</a>
{% endif %}
<span>Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}</span>
{% if page_obj.has_next %}
<a href="?{% if query_without_page %}{{ query_without_page }}&amp;{% endif %}page={{ page_obj.next_page_number }}">Next</a>
{% endif %}
</nav>
{% endif %}
</body>
</html>