Merge branch 'dev' of https://git.immortal.host/clubesportsudes/team-tryouts into audit/securite-maintenabilite-standards
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
{% extends "layouts/base.html" %}
|
||||
{% block title %}Evaluate Players - UdeS team manager{% endblock %}
|
||||
{% block page_title %}Evaluate Players{% endblock %}
|
||||
{% block breadcrumb %}<span class="breadcrumb">Home / <a href="{{ url_for('tryouts.view_tryout', tryout_id=tryout.id) }}">{{ tryout.title }}</a> / Evaluate</span>{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" action="{{ url_for('evaluations.batch_evaluate', tryout_id=tryout.id) }}" class="form batch-eval-form">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
||||
{% for entry in players %}
|
||||
<input type="hidden" name="player_ids" value="{{ entry.player.id }}"/>
|
||||
{% endfor %}
|
||||
|
||||
{% set positions = game_positions.get(tryout.game, []) %}
|
||||
|
||||
<div class="batch-eval-grid">
|
||||
{% for entry in players %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3>
|
||||
<i class="fas fa-user"></i> {{ entry.player.username }}
|
||||
{% if entry.existing %}
|
||||
<span class="badge badge-success">Already Evaluated</span>
|
||||
{% else %}
|
||||
<span class="badge badge-warning">Not Evaluated</span>
|
||||
{% endif %}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="eval-player-info mb-4">
|
||||
<div class="user-avatar avatar-lg">{{ entry.player.username[:2] | upper }}</div>
|
||||
<div>
|
||||
<h3>{{ entry.player.username }}</h3>
|
||||
<p class="text-muted">{{ entry.player.email }} | {{ entry.player.phone or 'No phone' }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% set pid = entry.player.id %}
|
||||
{% set existing = entry.existing %}
|
||||
{% set existing_scores = entry.existing_scores %}
|
||||
|
||||
<div class="form-row">
|
||||
{% for field_name, label in evaluation_criteria %}
|
||||
<div class="form-group col-4">
|
||||
<label for="{{ field_name }}_{{ pid }}">{{ label }} (1-10)</label>
|
||||
<div class="score-input">
|
||||
<input type="range" id="{{ field_name }}_{{ pid }}" name="{{ field_name }}_{{ pid }}" min="1" max="10" value="{{ existing_scores[field_name] or 5 }}" oninput="this.nextElementSibling.textContent = this.value">
|
||||
<span class="range-value">{{ existing_scores[field_name] or 5 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-12">
|
||||
<label for="position_recommendation_{{ pid }}">Recommended Position</label>
|
||||
{% if positions %}
|
||||
<select id="position_recommendation_{{ pid }}" name="position_recommendation_{{ pid }}" class="form-select">
|
||||
<option value="">-- Select Position --</option>
|
||||
{% for pos in positions %}
|
||||
<option value="{{ pos }}" {% if existing and existing.position_recommendation == pos %}selected{% endif %}>{{ pos }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% else %}
|
||||
<input type="text" id="position_recommendation_{{ pid }}" name="position_recommendation_{{ pid }}" value="{{ existing.position_recommendation if existing else '' }}" placeholder="Enter position (optional)">
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="comments_{{ pid }}">Comments</label>
|
||||
<textarea id="comments_{{ pid }}" name="comments_{{ pid }}" rows="3" placeholder="Enter your evaluation notes...">{{ existing.comments if existing else '' }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<a href="{{ url_for('evaluations.players_to_evaluate', tryout_id=tryout.id) }}" class="btn btn-secondary">Back</a>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="fas fa-save"></i> Save All Evaluations
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user