changement de l'affichage des tryouts et des matchs
This commit is contained in:
@@ -12,64 +12,87 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="table-container">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Target Team</th>
|
||||
<th>Date</th>
|
||||
<th>Location</th>
|
||||
<th>Status</th>
|
||||
<th>Players</th>
|
||||
<th>Evaluations</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for tryout in tryouts %}
|
||||
<tr>
|
||||
<td class="cell-title">{{ tryout.title }}</td>
|
||||
<td>{{ tryout.target_org_team.name if tryout.target_org_team else '-' }}</td>
|
||||
<td>{{ tryout.date.strftime('%b %d, %Y') }}</td>
|
||||
<td>{{ tryout.location or 'TBD' }}</td>
|
||||
<td>
|
||||
<span class="badge badge-{{ tryout.status }}">
|
||||
{{ tryout.status | replace('_', ' ') | title }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ tryout.registrations.count() }}</td>
|
||||
<td>{{ tryout.evaluations.count() }}</td>
|
||||
<td>
|
||||
<a href="{{ url_for('tryouts.view_tryout', tryout_id=tryout.id) }}" class="btn btn-sm btn-outline">
|
||||
<i class="fas fa-eye"></i> View
|
||||
</a>
|
||||
{% if current_user.can_evaluate() %}
|
||||
<a href="{{ url_for('evaluations.players_to_evaluate', tryout_id=tryout.id) }}" class="btn btn-sm btn-primary">
|
||||
<i class="fas fa-clipboard-check"></i> Evaluate
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="8" class="text-center">
|
||||
<div class="empty-state">
|
||||
<i class="fas fa-calendar-times"></i>
|
||||
<h3>No tryouts found</h3>
|
||||
{% if current_user.can_manage_tryouts() %}
|
||||
<p>Get started by creating a new tryout.</p>
|
||||
<a href="{{ url_for('tryouts.create_tryout') }}" class="btn btn-primary">Create Tryout</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="tryouts-grid">
|
||||
{% for tryout in tryouts %}
|
||||
<div class="card tryout-card">
|
||||
<div class="card-header">
|
||||
<h3 class="tryout-title">{{ tryout.title }}</h3>
|
||||
<span class="badge badge-{{ tryout.status }}">{{ tryout.status | replace('_', ' ') | title }}</span>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="tryout-info-grid">
|
||||
<div class="info-item">
|
||||
<i class="fas fa-gamepad info-icon"></i>
|
||||
<span class="info-label">Game</span>
|
||||
<span class="info-value">{{ tryout.game }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<i class="fas fa-calendar info-icon"></i>
|
||||
<span class="info-label">Date</span>
|
||||
<span class="info-value">{{ tryout.date.strftime('%b %d, %Y') }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<i class="fas fa-map-marker-alt info-icon"></i>
|
||||
<span class="info-label">Location</span>
|
||||
<span class="info-value">{{ tryout.location or 'TBD' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<i class="fas fa-users info-icon"></i>
|
||||
<span class="info-label">Players</span>
|
||||
<span class="info-value">{{ tryout.registrations.count() }}</span>
|
||||
</div>
|
||||
{% if current_user.can_evaluate() %}
|
||||
<div class="info-item">
|
||||
<i class="fas fa-clipboard-check info-icon"></i>
|
||||
<span class="info-label">Evaluations</span>
|
||||
<span class="info-value">{{ tryout.evaluations.count() }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if tryout.target_org_team %}
|
||||
<div class="info-item">
|
||||
<i class="fas fa-flag info-icon"></i>
|
||||
<span class="info-label">Target Team</span>
|
||||
<span class="info-value">{{ tryout.target_org_team.name }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if tryout.max_players %}
|
||||
<div class="info-item">
|
||||
<i class="fas fa-user-friends info-icon"></i>
|
||||
<span class="info-label">Max Players</span>
|
||||
<span class="info-value">{{ tryout.max_players }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if tryout.description %}
|
||||
<div class="tryout-description mt-3">
|
||||
<p>{{ tryout.description | truncate(120) }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<a href="{{ url_for('tryouts.view_tryout', tryout_id=tryout.id) }}" class="btn btn-sm btn-outline">
|
||||
<i class="fas fa-eye"></i> View Details
|
||||
</a>
|
||||
{% if current_user.can_evaluate() %}
|
||||
<a href="{{ url_for('evaluations.players_to_evaluate', tryout_id=tryout.id) }}" class="btn btn-sm btn-primary">
|
||||
<i class="fas fa-clipboard-check"></i> Evaluate
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="card" style="grid-column: 1 / -1;">
|
||||
<div class="card-body text-center">
|
||||
<div class="empty-state">
|
||||
<i class="fas fa-calendar-times"></i>
|
||||
<h3>No tryouts found</h3>
|
||||
{% if current_user.can_manage_tryouts() %}
|
||||
<p>Get started by creating a new tryout.</p>
|
||||
<a href="{{ url_for('tryouts.create_tryout') }}" class="btn btn-primary">Create Tryout</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user