184 lines
10 KiB
HTML
184 lines
10 KiB
HTML
{% extends "layouts/base.html" %}
|
|
{% block title %}Evaluate {{ player.username }} - UdeS team manager{% endblock %}
|
|
{% block page_title %}Evaluate {{ player.username }}{% 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 %}
|
|
<div class="dashboard-grid">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h3><i class="fas fa-clipboard-list"></i> {{ _('Player Evaluation') }}</h3>
|
|
<span class="badge badge-info">{{ tryout.title }} - {{ tryout.game }}</span>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="eval-player-info mb-4">
|
|
<div class="user-avatar avatar-lg">{{ player.username[:2] | upper }}</div>
|
|
<div>
|
|
<h3>{{ player.username }}</h3>
|
|
<p class="text-muted">{{ player.email }} | {{ player.phone or 'No phone' }}</p>
|
|
</div>
|
|
</div>
|
|
|
|
{% if existing_eval %}
|
|
<div class="alert alert-info">
|
|
<i class="fas fa-info-circle"></i> {{ _('You have already evaluated this player. Your previous scores are shown below.') }}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<form method="POST" action="{{ url_for('evaluations.evaluate_player', tryout_id=tryout.id, player_id=player.id) }}" class="form">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
|
|
|
<div class="form-row">
|
|
<div class="form-group col-4">
|
|
<label for="mecanics_score">{{ _('Mecanics (1-10)') }}</label>
|
|
<div class="score-input">
|
|
<input type="range" id="mecanics_score" name="mecanics_score" min="1" max="10" value="{{ existing_eval.mecanics_score or 5 }}" data-mirror>
|
|
<span class="range-value">{{ existing_eval.mecanics_score or 5 }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="form-group col-4">
|
|
<label for="cohesion_score">{{ _('Cohesion (1-10)') }}</label>
|
|
<div class="score-input">
|
|
<input type="range" id="cohesion_score" name="cohesion_score" min="1" max="10" value="{{ existing_eval.cohesion_score or 5 }}" data-mirror>
|
|
<span class="range-value">{{ existing_eval.cohesion_score or 5 }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="form-group col-4">
|
|
<label for="communication_score">{{ _('Communication (1-10)') }}</label>
|
|
<div class="score-input">
|
|
<input type="range" id="communication_score" name="communication_score" min="1" max="10" value="{{ existing_eval.communication_score or 5 }}" data-mirror>
|
|
<span class="range-value">{{ existing_eval.communication_score or 5 }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<div class="form-group col-4">
|
|
<label for="gamesense_score">{{ _('Gamesense (1-10)') }}</label>
|
|
<div class="score-input">
|
|
<input type="range" id="gamesense_score" name="gamesense_score" min="1" max="10" value="{{ existing_eval.gamesense_score or 5 }}" data-mirror>
|
|
<span class="range-value">{{ existing_eval.gamesense_score or 5 }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="form-group col-4">
|
|
<label for="versatility_score">{{ _('Versatility (1-10)') }}</label>
|
|
<div class="score-input">
|
|
<input type="range" id="versatility_score" name="versatility_score" min="1" max="10" value="{{ existing_eval.versatility_score or 5 }}" data-mirror>
|
|
<span class="range-value">{{ existing_eval.versatility_score or 5 }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="form-group col-4">
|
|
<label for="discipline_score">{{ _('Discipline (1-10)') }}</label>
|
|
<div class="score-input">
|
|
<input type="range" id="discipline_score" name="discipline_score" min="1" max="10" value="{{ existing_eval.discipline_score or 5 }}" data-mirror>
|
|
<span class="range-value">{{ existing_eval.discipline_score or 5 }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<div class="form-group col-4">
|
|
<label for="analysis_score">{{ _('Analysis (1-10)') }}</label>
|
|
<div class="score-input">
|
|
<input type="range" id="analysis_score" name="analysis_score" min="1" max="10" value="{{ existing_eval.analysis_score or 5 }}" data-mirror>
|
|
<span class="range-value">{{ existing_eval.analysis_score or 5 }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="form-group col-4">
|
|
<label for="sport_ethics_score">{{ _('Sport Ethics (1-10)') }}</label>
|
|
<div class="score-input">
|
|
<input type="range" id="sport_ethics_score" name="sport_ethics_score" min="1" max="10" value="{{ existing_eval.sport_ethics_score or 5 }}" data-mirror>
|
|
<span class="range-value">{{ existing_eval.sport_ethics_score or 5 }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="form-group col-4">
|
|
<label for="mental_score">{{ _('Mental (1-10)') }}</label>
|
|
<div class="score-input">
|
|
<input type="range" id="mental_score" name="mental_score" min="1" max="10" value="{{ existing_eval.mental_score or 5 }}" data-mirror>
|
|
<span class="range-value">{{ existing_eval.mental_score or 5 }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% set positions = game_positions.get(tryout.game, []) %}
|
|
<div class="form-row">
|
|
<div class="form-group col-12">
|
|
<label for="position_recommendation">{{ _('Recommended Position') }}</label>
|
|
{% if positions %}
|
|
<select id="position_recommendation" name="position_recommendation" class="form-select">
|
|
<option value="">{{ _('-- Select Position --') }}</option>
|
|
{% for pos in positions %}
|
|
<option value="{{ pos }}" {% if existing_eval.position_recommendation == pos %}selected{% endif %}>{{ pos }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
{% else %}
|
|
<input type="text" id="position_recommendation" name="position_recommendation" value="{{ existing_eval.position_recommendation or '' }}" placeholder="{{ _('Enter position (optional)') }}">
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="comments">{{ _('Comments') }}</label>
|
|
<textarea id="comments" name="comments" rows="4" placeholder="{{ _('Enter your evaluation notes...') }}">{{ existing_eval.comments or '' }}</textarea>
|
|
</div>
|
|
|
|
<div class="form-actions">
|
|
<a href="{{ url_for('tryouts.view_tryout', tryout_id=tryout.id) }}" class="btn btn-secondary">Cancel</a>
|
|
<button type="submit" class="btn btn-primary">
|
|
<i class="fas fa-save"></i> {% if existing_eval %}Update Evaluation{% else %}Submit Evaluation{% endif %}
|
|
</button>
|
|
<a href="{{ url_for('users.notes_dashboard') }}" class="btn btn-outline" title="{{ _('Add note for this player') }}">
|
|
<i class="fas fa-sticky-note"></i> {{ _('Add Note') }}
|
|
</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
{% if evaluators %}
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h3><i class="fas fa-users"></i> All Evaluations for {{ player.username }}</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ _('Evaluator') }}</th>
|
|
<th>{{ _('Mecanics') }}</th>
|
|
<th>{{ _('Cohesion') }}</th>
|
|
<th>{{ _('Communication') }}</th>
|
|
<th>{{ _('Gamesense') }}</th>
|
|
<th>{{ _('Versatility') }}</th>
|
|
<th>{{ _('Discipline') }}</th>
|
|
<th>{{ _('Analysis') }}</th>
|
|
<th>{{ _('Sport Ethics') }}</th>
|
|
<th>{{ _('Mental') }}</th>
|
|
<th>{{ _('Overall') }}</th>
|
|
<th>{{ _('Position') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for entry in evaluators %}
|
|
<tr>
|
|
<td>{{ entry.evaluator.username }}</td>
|
|
<td>{{ entry.eval.mecanics_score or '-' }}</td>
|
|
<td>{{ entry.eval.cohesion_score or '-' }}</td>
|
|
<td>{{ entry.eval.communication_score or '-' }}</td>
|
|
<td>{{ entry.eval.gamesense_score or '-' }}</td>
|
|
<td>{{ entry.eval.versatility_score or '-' }}</td>
|
|
<td>{{ entry.eval.discipline_score or '-' }}</td>
|
|
<td>{{ entry.eval.analysis_score or '-' }}</td>
|
|
<td>{{ entry.eval.sport_ethics_score or '-' }}</td>
|
|
<td>{{ entry.eval.mental_score or '-' }}</td>
|
|
<td><span class="score">{{ entry.eval.overall_score or '-' }}</span></td>
|
|
<td>{{ entry.eval.position_recommendation or '-' }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %} |