124 lines
5.5 KiB
PHP
Executable File
124 lines
5.5 KiB
PHP
Executable File
@extends('layouts.app')
|
|
|
|
@section('title', 'Meine Sammlung - NeoNail DB')
|
|
|
|
@section('content')
|
|
<div class="container">
|
|
<div class="row mb-4">
|
|
<div class="col-md-8">
|
|
<h2>
|
|
<i class="fas fa-palette me-2"></i>Meine NeoNail-Sammlung
|
|
</h2>
|
|
<p class="text-muted">Verwalten Sie Ihre persönliche Nagellack-Sammlung</p>
|
|
</div>
|
|
<div class="col-md-4 text-end">
|
|
<div class="d-flex gap-2 justify-content-end">
|
|
<a href="{{ route('user-nail-polishes.create') }}" class="btn btn-success">
|
|
<i class="fas fa-plus me-2"></i>Neuen Lack hinzufügen
|
|
</a>
|
|
<a href="{{ route('user-nail-polishes.available') }}" class="btn btn-primary">
|
|
<i class="fas fa-search me-2"></i>Verfügbare Lacke
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Suchleiste -->
|
|
<div class="row mb-4">
|
|
<div class="col-md-6">
|
|
<form method="GET" action="{{ route('user-nail-polishes.index') }}" class="d-flex">
|
|
<input type="text" name="search" class="form-control me-2"
|
|
placeholder="Nach Name oder Nummer suchen..."
|
|
value="{{ $search }}">
|
|
<button type="submit" class="btn btn-outline-primary">
|
|
<i class="fas fa-search"></i>
|
|
</button>
|
|
@if($search)
|
|
<a href="{{ route('user-nail-polishes.index') }}" class="btn btn-outline-secondary ms-2">
|
|
<i class="fas fa-times"></i>
|
|
</a>
|
|
@endif
|
|
</form>
|
|
</div>
|
|
<div class="col-md-6 text-end">
|
|
<span class="text-muted">
|
|
{{ $nailPolishes->total() }} Lack{{ $nailPolishes->total() != 1 ? 'e' : '' }} in Ihrer Sammlung
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
@if($nailPolishes->count() > 0)
|
|
<div class="row">
|
|
@foreach($nailPolishes as $nailPolish)
|
|
<div class="col-md-3 col-sm-6 mb-4">
|
|
<div class="card h-100 nail-polish-card">
|
|
@if($nailPolish->image_path)
|
|
<img src="{{ Storage::url($nailPolish->image_path) }}"
|
|
class="card-img-top nail-polish-image"
|
|
alt="{{ $nailPolish->name }}"
|
|
loading="lazy">
|
|
@else
|
|
<div class="card-img-top nail-polish-placeholder d-flex align-items-center justify-content-center">
|
|
<i class="fas fa-palette fa-3x text-muted"></i>
|
|
</div>
|
|
@endif
|
|
|
|
<div class="card-body d-flex flex-column">
|
|
<h6 class="card-title mb-1">{{ $nailPolish->name }}</h6>
|
|
<p class="card-text text-muted mb-2">Nr. {{ $nailPolish->number }}</p>
|
|
@if($nailPolish->manufacturer)
|
|
<p class="card-text text-muted mb-2">
|
|
<small><i class="fas fa-industry"></i> {{ $nailPolish->manufacturer->name }}</small>
|
|
</p>
|
|
@endif
|
|
|
|
<div class="mt-auto">
|
|
<form method="POST" action="https://neonail.vogt.de.com/remove-from-collection/{{ $nailPolish->id }}"
|
|
class="d-inline"
|
|
onsubmit="return confirm('Möchten Sie diesen Lack wirklich aus Ihrer Sammlung entfernen?')">
|
|
@csrf
|
|
<button type="submit" class="btn btn-outline-danger btn-sm w-100">
|
|
<i class="fas fa-trash me-2"></i>Entfernen
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
|
|
<!-- Pagination -->
|
|
@if($nailPolishes->hasPages())
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<nav aria-label="Seitennavigation">
|
|
{{ $nailPolishes->appends(['search' => $search])->links() }}
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
@else
|
|
<div class="text-center py-5">
|
|
<i class="fas fa-palette fa-4x text-muted mb-3"></i>
|
|
<h4 class="text-muted">Ihre Sammlung ist noch leer</h4>
|
|
<p class="text-muted mb-4">
|
|
@if($search)
|
|
Keine Lacke gefunden, die "{{ $search }}" entsprechen.
|
|
@else
|
|
Fügen Sie Ihren ersten NeoNail-Lack hinzu!
|
|
@endif
|
|
</p>
|
|
<div class="d-flex gap-2 justify-content-center">
|
|
<a href="{{ route('user-nail-polishes.create') }}" class="btn btn-success">
|
|
<i class="fas fa-plus me-2"></i>Ersten Lack hinzufügen
|
|
</a>
|
|
<a href="{{ route('user-nail-polishes.available') }}" class="btn btn-primary">
|
|
<i class="fas fa-search me-2"></i>Verfügbare Lacke durchsuchen
|
|
</a>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
@endsection
|