ajustements des calendriers, ajout de matchs jouer vs joueur
This commit is contained in:
@@ -231,10 +231,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if matches %}
|
||||
{% if can_view_calendar %}
|
||||
<div class="card mt-4">
|
||||
<div class="card-header">
|
||||
<h3><i class="fas fa-futbol"></i> Scheduled Matches</h3>
|
||||
<h3><i class="fas fa-futbol"></i> Schedule</h3>
|
||||
{% if can_edit %}
|
||||
<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
|
||||
@@ -242,9 +242,18 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if matches %}
|
||||
<!-- Mini Calendar -->
|
||||
<div id="mini-calendar" style="min-height: 300px;"></div>
|
||||
{% else %}
|
||||
<!-- No matches yet - show message -->
|
||||
<div class="text-center py-4">
|
||||
<i class="fas fa-calendar-alt fa-3x text-muted mb-3"></i>
|
||||
<p class="text-muted">No matches scheduled yet. Check back later!</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if matches %}
|
||||
<!-- Matches Table -->
|
||||
<div class="table-container mt-3">
|
||||
<table class="table">
|
||||
@@ -264,19 +273,42 @@
|
||||
<tbody>
|
||||
{% for item in match_data %}
|
||||
{% set m = item.match %}
|
||||
{% set participants = item.participants %}
|
||||
<tr>
|
||||
<td class="cell-title">{{ m.title }}</td>
|
||||
<td>
|
||||
<span class="badge badge-{{ 'success' if m.match_type == 'team_vs_team' else 'warning' }}">
|
||||
{{ 'Team vs Team' if m.match_type == 'team_vs_team' else 'Player Scrim' }}
|
||||
<span class="badge badge-{{ 'success' if m.match_type in ['team_vs_team', 'player_vs_player'] else 'warning' }}">
|
||||
{% if m.match_type == 'team_vs_team' %}
|
||||
Team vs Team
|
||||
{% elif m.match_type == 'player_vs_player' %}
|
||||
Player vs Player
|
||||
{% else %}
|
||||
Player Scrim
|
||||
{% endif %}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ m.date.strftime('%m/%d/%Y') }}</td>
|
||||
<td>
|
||||
{% if m.match_type == 'team_vs_team' %}
|
||||
{{ item.participants.team1 }} vs {{ item.participants.team2 }}
|
||||
{{ participants.team1 }} vs {{ participants.team2 }}
|
||||
{% if participants.team1_players or participants.team2_players %}
|
||||
<div class="team-roster-display mt-1">
|
||||
{% if participants.team1_players %}
|
||||
<small><strong>{{ m.team1.name if m.team1 else 'Team 1' }}:</strong>
|
||||
{% for pl in participants.team1_players %}{{ pl.name }}{% if not loop.last %}, {% endif %}{% endfor %}
|
||||
</small><br>
|
||||
{% endif %}
|
||||
{% if participants.team2_players %}
|
||||
<small><strong>{{ m.team2.name if m.team2 else 'Team 2' }}:</strong>
|
||||
{% for pl in participants.team2_players %}{{ pl.name }}{% if not loop.last %}, {% endif %}{% endfor %}
|
||||
</small>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% elif m.match_type == 'player_vs_player' %}
|
||||
{{ participants.team1 }} vs {{ participants.team2 }}
|
||||
{% else %}
|
||||
{{ item.participants | join(', ') }}
|
||||
{{ participants | join(', ') }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
@@ -301,6 +333,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user