remodulation du projet et des classes

This commit is contained in:
cedrick2711
2026-07-28 23:33:31 -04:00
parent 90ac3eb804
commit 3feae80767
94 changed files with 2644 additions and 4366 deletions
+104
View File
@@ -0,0 +1,104 @@
{% extends "layouts/base.html" %}
{% block title %}{% if tryout %}Edit Tryout{% else %}Create Tryout{% endif %} - TryoutPro{% endblock %}
{% block page_title %}{% if tryout %}Edit Tryout{% else %}Create Tryout{% endif %}{% endblock %}
{% block breadcrumb %}
<span class="breadcrumb">
Home / <a href="{{ url_for('tryouts.list_tryouts') }}">Tryouts</a>
{% if tryout %}
/ <a href="{{ url_for('tryouts.view_tryout', tryout_id=tryout.id) }}">{{ tryout.title }}</a>
/ Edit
{% else %}
/ Create
{% endif %}
</span>
{% endblock %}
{% block content %}
<div class="card">
<div class="card-body">
<form method="POST" action="{% if tryout %}{{ url_for('tryouts.edit_tryout', tryout_id=tryout.id) }}{% else %}{{ url_for('tryouts.create_tryout') }}{% endif %}" class="form">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
<div class="form-row">
<div class="form-group col-12">
<label for="title">Tryout Title</label>
<input type="text" id="title" name="title" value="{{ tryout.title if tryout else '' }}" placeholder="e.g., Spring Season Tryouts" required>
</div>
</div>
<div class="form-row">
<div class="form-group col-6">
<label for="game">Game</label>
<select id="game" name="game" class="form-select" required>
<option value="">-- Select a game --</option>
{% for game in esport_games %}
<option value="{{ game }}" {% if tryout and tryout.game == game %}selected{% endif %}>{{ game }}</option>
{% endfor %}
</select>
</div>
<div class="form-group col-6">
<label for="date">Date</label>
<input type="date" id="date" name="date" value="{{ tryout.date.strftime('%Y-%m-%d') if tryout else '' }}" required>
</div>
</div>
<div class="form-row">
<div class="form-group col-6">
<label for="location">Location</label>
<input type="text" id="location" name="location" value="{{ tryout.location or '' if tryout else '' }}" placeholder="e.g., Online">
</div>
<div class="form-group col-6">
<label for="max_players">Max Players</label>
<input type="number" id="max_players" name="max_players" value="{{ tryout.max_players or '' if tryout else '' }}" placeholder="Leave blank for unlimited" min="1">
</div>
</div>
<div class="form-row">
<div class="form-group col-6">
<label for="target_org_team_id">Target Team</label>
<select id="target_org_team_id" name="target_org_team_id" class="form-select">
<option value="">-- No target team --</option>
{% for team in org_teams %}
<option value="{{ team.id }}" {% if tryout and tryout.target_org_team_id == team.id %}selected{% endif %}>
{{ team.name }}{% if team.coach %} (Coach: {{ team.coach.username }}){% endif %}
</option>
{% endfor %}
</select>
</div>
<div class="form-group col-6">
<label for="manager_id">Assigned Manager</label>
<select id="manager_id" name="manager_id" class="form-select">
<option value="">-- No manager assigned --</option>
{% for manager in managers %}
<option value="{{ manager.id }}" {% if tryout and tryout.manager_id == manager.id %}selected{% endif %}>
{{ manager.username }}
</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-row">
<div class="form-group col-12">
<label for="coach_id">Assigned Coach</label>
<select id="coach_id" name="coach_id" class="form-select">
<option value="">-- No coach assigned --</option>
{% for coach in coaches %}
<option value="{{ coach.id }}" {% if tryout and tryout.coach_id == coach.id %}selected{% endif %}>
{{ coach.username }}
</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-group">
<label for="description">Description</label>
<textarea id="description" name="description" rows="4" placeholder="Enter any details about the tryout...">{% if tryout %}{{ tryout.description or '' }}{% endif %}</textarea>
</div>
<div class="form-actions">
<a href="{% if tryout %}{{ url_for('tryouts.view_tryout', tryout_id=tryout.id) }}{% else %}{{ url_for('tryouts.list_tryouts') }}{% endif %}" class="btn btn-secondary">
Cancel
</a>
<button type="submit" class="btn btn-primary">
{% if tryout %}Save Changes{% else %}Create Tryout{% endif %}
</button>
</div>
</form>
</div>
</div>
{% endblock %}