fix probleme avec dispos

This commit is contained in:
cedrick2711
2026-08-06 13:41:53 -04:00
parent d25b35c928
commit 68e3da6601
11 changed files with 582 additions and 246 deletions
+27 -9
View File
@@ -9,7 +9,7 @@
<div class="card-header">
<h3>Tryout Details</h3>
<div class="card-actions">
{% if can_edit %}
{% if can_edit and not tryout.is_ended %}
<a href="{{ url_for('matches.create_match', tryout_id=tryout.id) }}" class="btn btn-sm btn-success">
<i class="fas fa-futbol"></i> Schedule Match
</a>
@@ -24,11 +24,19 @@
</select>
</form>
{% endif %}
{% if can_edit %}
{% if can_edit and not tryout.is_ended %}
<a href="{{ url_for('tryouts.edit_tryout', tryout_id=tryout.id) }}" class="btn btn-sm btn-primary">
<i class="fas fa-edit"></i> Edit
</a>
{% endif %}
{% if can_edit %}
<form method="POST" action="{{ url_for('tryouts.delete_tryout', tryout_id=tryout.id) }}" class="inline-form" onsubmit="return confirm('Are you sure you want to delete this entire tryout? This will remove all matches, teams, registrations, and evaluations.');">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
<button type="submit" class="btn btn-sm btn-danger">
<i class="fas fa-trash"></i> Delete Tryout
</button>
</form>
{% endif %}
</div>
</div>
<div class="card-body">
@@ -39,7 +47,13 @@
</div>
<div class="detail-item">
<span class="detail-label">Date</span>
<span class="detail-value">{{ tryout.date.strftime('%A, %B %d, %Y') }}</span>
<span class="detail-value">
{% if tryout.end_date and tryout.end_date != tryout.date %}
{{ tryout.date.strftime('%B %d') }} - {{ tryout.end_date.strftime('%B %d, %Y') }}
{% else %}
{{ tryout.date.strftime('%A, %B %d, %Y') }}
{% endif %}
</span>
</div>
<div class="detail-item">
<span class="detail-label">Location</span>
@@ -90,7 +104,7 @@
</div>
{% endif %}
{% if can_edit %}
{% if can_edit and not tryout.is_ended %}
<div class="card mb-4">
<div class="card-header">
<h3><i class="fas fa-user-plus"></i> Add Player to Tryout</h3>
@@ -176,12 +190,14 @@
<i class="fas fa-sticky-note"></i>
</a>
{% endif %}
{% if not tryout.is_ended %}
<form method="POST" action="{{ url_for('tryouts.remove_player', tryout_id=tryout.id, player_id=p.id) }}" class="inline-form" onsubmit="return confirm('Remove {{ p.username }} from this tryout? This will also remove them from all teams and matches within this tryout.');">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
<button type="submit" class="btn btn-sm btn-danger" title="Remove player from tryout">
<i class="fas fa-user-minus"></i> Remove
</button>
</form>
{% endif %}
</td>
{% endif %}
</tr>
@@ -201,14 +217,14 @@
<div class="card">
<div class="card-header">
<h3><i class="fas fa-users-cog"></i> Teams</h3>
{% if can_edit %}
{% if can_edit and not tryout.is_ended %}
<button class="btn btn-sm btn-primary" onclick="showCreateTeam()">
<i class="fas fa-plus"></i> New Team
</button>
{% endif %}
</div>
<div class="card-body">
{% if can_edit %}
{% if can_edit and not tryout.is_ended %}
<div id="createTeamForm" class="hidden mb-3">
<form method="POST" action="{{ url_for('tryouts.create_team', tryout_id=tryout.id) }}" class="form-inline">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
@@ -235,7 +251,7 @@
<li class="text-muted">No players assigned yet.</li>
{% endfor %}
</ul>
{% if can_edit and registered_players %}
{% if can_edit and not tryout.is_ended and registered_players %}
{% set positions = game_positions.get(tryout.game, []) %}
<form method="POST" action="{{ url_for('tryouts.add_to_team', tryout_id=tryout.id, team_id=team.team.id) }}" class="form-inline mt-2">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
@@ -272,7 +288,7 @@
<div class="card tryout-schedule-card mb-4">
<div class="card-header">
<h3><i class="fas fa-futbol"></i> Schedule</h3>
{% if can_edit %}
{% if can_edit and not tryout.is_ended %}
<div class="card-actions">
<a href="{{ url_for('matches.create_match', tryout_id=tryout.id) }}" class="btn btn-sm btn-success">
<i class="fas fa-plus"></i> Schedule Match
@@ -412,9 +428,11 @@
</td>
{% if can_edit %}
<td>
{% if not tryout.is_ended %}
<a href="{{ url_for('matches.edit_match', match_id=m.id) }}" class="btn btn-sm btn-outline">
<i class="fas fa-edit"></i> Edit
</a>
{% endif %}
<a href="{{ url_for('users.add_note_from_match', match_id=m.id) }}" class="btn btn-sm btn-primary" title="Add Note for this Match">
<i class="fas fa-sticky-note"></i> Note
</a>
@@ -575,4 +593,4 @@ document.addEventListener('DOMContentLoaded', function() {
}
});
</script>
{% endblock %}
{% endblock %}