58 lines
2.4 KiB
PHP
58 lines
2.4 KiB
PHP
@extends('admin.layout')
|
|
|
|
@section('title', 'Gestión de Torneos - Admin OnAPB')
|
|
|
|
@section('content')
|
|
<div class="page-header">
|
|
<h2><i class="bi bi-trophy-fill"></i> Torneos</h2>
|
|
<a href="{{ route('admin.torneos.create') }}" class="btn-admin-primary">
|
|
<i class="bi bi-plus-lg me-2"></i> NUEVO TORNEO
|
|
</a>
|
|
</div>
|
|
|
|
<div class="admin-card">
|
|
<div class="table-responsive">
|
|
<table class="admin-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Nombre</th>
|
|
<th>Inicio</th>
|
|
<th>Fin</th>
|
|
<th class="text-center">Equipos</th>
|
|
<th class="text-end">Acciones</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse($torneos as $torneo)
|
|
<tr>
|
|
<td class="fw-bold text-dark">{{ $torneo->nombre }}</td>
|
|
<td>{{ $torneo->fecha_inicio ? $torneo->fecha_inicio->format('d/m/Y') : '—' }}</td>
|
|
<td>{{ $torneo->fecha_fin ? $torneo->fecha_fin->format('d/m/Y') : '—' }}</td>
|
|
<td class="text-center">
|
|
<span class="badge bg-light text-dark border">{{ $torneo->equipos_count }}</span>
|
|
</td>
|
|
<td class="text-end">
|
|
<div class="d-flex justify-content-end gap-2">
|
|
<a href="{{ route('admin.torneos.edit', $torneo->id) }}" class="btn-admin-icon" title="Editar / Gestionar Equipos">
|
|
<i class="bi bi-pencil-square"></i>
|
|
</a>
|
|
<form action="{{ route('admin.torneos.destroy', $torneo->id) }}" method="POST" onsubmit="return confirm('¿Eliminar este torneo? Esto no borrará los equipos ni los eventos vinculados.')">
|
|
@csrf @method('DELETE')
|
|
<button type="submit" class="btn-admin-icon text-danger">
|
|
<i class="bi bi-trash"></i>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="5" class="text-center py-5 text-muted">No hay torneos creados.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
@endsection
|