2025-04-12 17:18:33 +03:00
|
|
|
@extends('layouts.app')
|
|
|
|
|
|
|
|
|
|
@section('title', 'My Lists')
|
|
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
|
<div class="container py-4">
|
2025-06-13 23:06:13 +03:00
|
|
|
|
2025-04-12 17:18:33 +03:00
|
|
|
|
|
|
|
|
<div class="row g-4">
|
2025-06-13 23:06:13 +03:00
|
|
|
@if($lists->count())
|
|
|
|
|
<div class="card">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<h1 class="text-gradient d-block float-start">My Lists</h1>
|
|
|
|
|
<span class="float-end">
|
|
|
|
|
<a href="{{ route('lists.create') }}" class="btn btn-gradient">
|
|
|
|
|
<i class="fas fa-plus me-2"></i>Create New List
|
|
|
|
|
</a>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
<div class="row">
|
|
|
|
|
@foreach($lists as $list)
|
|
|
|
|
<div class="col-md-6 col-lg-4">
|
|
|
|
|
<div class="card bg-dark text-white h-100">
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
<div class="d-flex justify-content-between align-items-start mb-3">
|
|
|
|
|
<h5 class="card-title mb-0">{{ $list->name }}</h5>
|
|
|
|
|
<span class="badge bg-secondary">{{ $list->games_count }} games</span>
|
|
|
|
|
</div>
|
|
|
|
|
@if($list->description)
|
|
|
|
|
<p class="card-text text-muted">{{ $list->description }}</p>
|
|
|
|
|
@endif
|
2025-04-12 17:18:33 +03:00
|
|
|
</div>
|
2025-06-13 23:06:13 +03:00
|
|
|
<div class="card-footer bg-dark border-top border-secondary">
|
|
|
|
|
<div class="d-flex justify-content-between align-items-center">
|
|
|
|
|
<a href="{{ route('lists.show', $list) }}" class="btn btn-outline-primary btn-sm">
|
|
|
|
|
<i class="fas fa-eye me-1"></i> View
|
|
|
|
|
</a>
|
|
|
|
|
@if(!$list->is_default)
|
|
|
|
|
<div class="btn-group">
|
|
|
|
|
<a href="{{ route('lists.edit', $list) }}" class="btn btn-outline-secondary btn-sm">
|
|
|
|
|
<i class="fas fa-edit me-1"></i> Edit
|
|
|
|
|
</a>
|
|
|
|
|
<form action="{{ route('lists.destroy', $list) }}" method="POST" class="d-inline">
|
|
|
|
|
@csrf
|
|
|
|
|
@method('DELETE')
|
|
|
|
|
<button type="submit" class="btn btn-outline-danger btn-sm"
|
|
|
|
|
onclick="return confirm('Are you sure you want to delete this list?')">
|
|
|
|
|
<i class="fas fa-trash me-1"></i> Delete
|
|
|
|
|
</button>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
@endif
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-04-12 17:18:33 +03:00
|
|
|
</div>
|
2025-06-13 23:06:13 +03:00
|
|
|
@endforeach
|
2025-04-12 17:18:33 +03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-06-13 23:06:13 +03:00
|
|
|
|
|
|
|
|
@else
|
|
|
|
|
no lists exists
|
|
|
|
|
@endif
|
2025-04-12 17:18:33 +03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-06-13 23:06:13 +03:00
|
|
|
@endsection
|