Files
trackbugs/resources/views/projects/index.blade.php
T
2026-03-19 19:40:49 +02:00

49 lines
2.5 KiB
PHP

<x-app-layout>
<x-slot name="header">
<div class="flex items-center justify-between">
<h2 class="font-semibold text-xl text-gray-800 leading-tight">Projects</h2>
<a href="{{ route('projects.create') }}" class="inline-flex items-center px-4 py-2 bg-gray-800 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-gray-700 transition">
New Project
</a>
</div>
</x-slot>
<div class="py-8">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
@if(session('status'))
<div class="mb-4 bg-green-50 border border-green-200 text-green-700 px-4 py-3 rounded-md text-sm">
{{ session('status') }}
</div>
@endif
@if($projects->isEmpty())
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg p-12 text-center">
<p class="text-gray-500 mb-4">You don't have any projects yet.</p>
<a href="{{ route('projects.create') }}" class="text-indigo-600 hover:underline font-medium">Create your first project</a>
</div>
@else
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
@foreach($projects as $project)
<a href="{{ route('projects.issues.index', $project) }}" class="block bg-white overflow-hidden shadow-sm sm:rounded-lg hover:shadow-md transition">
<div class="p-6">
<div class="flex items-center justify-between mb-2">
<h3 class="text-lg font-semibold text-gray-900">{{ $project->name }}</h3>
@if($project->platform)
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-600">
{{ $project->platform }}
</span>
@endif
</div>
<div class="text-sm text-gray-500">
{{ $project->issues_count }} unresolved {{ Str::plural('issue', $project->issues_count) }}
</div>
</div>
</a>
@endforeach
</div>
@endif
</div>
</div>
</x-app-layout>