@extends('layouts.app') @section('title', $project->name . ' - 議題') @section('content') @include('projects._nav')
{{-- 訊息 --}} @if(session('success'))
{{ session('success') }}
@endif {{-- 工具列 --}}
@can('view', $project) 新增議題 @endcan
{{-- 篩選列 --}}
@if($showClosed) @endif
@if($versions->isNotEmpty())
@endif
@if(request()->hasAny(['tracker','priority','status','assignee','version','q'])) 清除 @endif
{{-- 統計列 + 上方分頁 --}}
{{ $openCount }} 個進行中 {{ $closedCount }} 個已關閉 共 {{ $openCount + $closedCount }} 筆
@if($issues->hasPages())
{{ $issues->links('pagination::bootstrap-5') }}
@endif
{{-- 批次操作列 --}}
批次變更:
{{-- 批次 Form (hidden) --}} {{-- 議題表格 --}} @php $curSort = request('sort'); $curDir = request('dir', 'desc'); $sortUrl = function(string $col) use ($curSort, $curDir, $project): string { $dir = ($curSort === $col && $curDir === 'desc') ? 'asc' : 'desc'; return route('projects.issues.index', $project) . '?' . http_build_query(array_merge(request()->except(['sort','dir','page']), ['sort' => $col, 'dir' => $dir])); }; $thSort = function(string $label, string $col) use ($curSort, $curDir, $sortUrl): string { $icon = $curSort !== $col ? '' : ($curDir === 'asc' ? '' : ''); return '' . $label . $icon . ''; }; @endphp
@if($versions->isNotEmpty()) @endif @forelse($issues as $issue) @php $sData = $statuses[$issue->status] ?? null; $sLabel = $sData['label'] ?? $issue->status; $sColor = $sData['color'] ?? 'secondary'; $tLabel = $trackers[$issue->tracker]['label'] ?? $issue->tracker; $tColor = $trackers[$issue->tracker]['color'] ?? 'secondary'; $pLabel = $priorities[$issue->priority]['label'] ?? $issue->priority; $pColor = $priorities[$issue->priority]['color'] ?? 'secondary'; $closedSlugs = array_keys(array_filter($statuses, fn($s) => $s['is_closed'] ?? false)); $overdue = $issue->due_date && $issue->due_date->isPast() && !in_array($issue->status, $closedSlugs); @endphp @if($versions->isNotEmpty()) @endif @empty @endforelse
# 類型 狀態 標題 優先度 {!! $thSort('負責人', 'assignee') !!}版本{!! $thSort('截止日', 'due_date') !!} {!! $thSort('建立日', 'created_at') !!} 完成度
#{{ $issue->redmine_id }} {{ $tLabel }} {{ $sLabel }} {{ $issue->title }} @if($issue->comments_count ?? 0) {{ $issue->comments_count }} @endif {{ $pLabel }} {{ $issue->assignee?->name ?? '—' }} @if($issue->version) {{ $issue->version->name }} @else @endif {{ $issue->due_date?->format('Y-m-d') ?? '—' }} {{ $issue->created_at?->format('Y-m-d') ?? '—' }} @if($issue->done_ratio > 0)
{{ $issue->done_ratio }}% @else @endif
沒有符合條件的議題
{{-- 分頁 --}}
{{ $issues->links('pagination::bootstrap-5') }}
@push('styles') @endpush @push('scripts') @endpush {{-- 匯出 Modal --}} @endsection