@extends('layouts.app') @section('title', '議題清單') @push('head') @endpush @section('content') @php $isMyIssuesTab = request()->filled('assignee') && (string)request('assignee') === (string)auth()->id(); $activeTab = $isMyIssuesTab ? 'myissues' : 'issues'; $curSort = request('sort'); $curDir = request('dir', 'desc'); $sortUrl = function(string $col) use ($curSort, $curDir): string { $dir = ($curSort === $col && $curDir === 'desc') ? 'asc' : 'desc'; return route('projects.globalIssues') . '?' . http_build_query(array_merge(request()->except(['sort','dir','page']), ['sort' => $col, 'dir' => $dir])); }; $sortIcon = function(string $col) use ($curSort, $curDir): string { if ($curSort !== $col) return ''; return $curDir === 'asc' ? '' : ''; }; @endphp @include('projects._list_tabs', ['activeTab' => $activeTab])
{{-- 標題列 --}}
@if($isMyIssuesTab) 我的議題 @elseif($showArchived) 封存議題 @else 議題清單 @endif
{{-- 篩選列 --}}
@if($showArchived)@endif
@if(request()->hasAny(['tracker','status','priority','assignee','creator','q'])) 清除 @endif
共 {{ $issues->total() }} 筆
{{-- 批次操作列 --}}
{{-- 批次 Form (hidden) --}}
@csrf
{{-- 表格 --}}
@forelse($issues as $issue) @php $tLabel = $allTrackers[$issue->tracker]['label'] ?? $issue->tracker; $tColor = $allTrackers[$issue->tracker]['color'] ?? 'secondary'; $sData = $allStatuses[$issue->status] ?? null; $sLabel = $sData['label'] ?? $issue->status; $sBs = $sData['color'] ?? 'secondary'; $pLabel = $allPriorities[$issue->priority]['label'] ?? $issue->priority; $pColor = $allPriorities[$issue->priority]['color'] ?? null; $projName = $issue->project->name ?? '—'; @endphp @empty @endforelse
# 專案 類型 狀態 優先權 主旨 被分配{!! $sortIcon('assignee') !!} 建立者 更新{!! $sortIcon('updated_at') !!} 建立{!! $sortIcon('created_at') !!}
#{{ $issue->redmine_id }} {{ $projName }} {{ $tLabel }} {{ $sLabel }} {{ $pLabel }} {{ $issue->title }} {{ $issue->assignee?->name ?? '—' }} {{ $issue->user?->name ?? '—' }} {{ $issue->updated_at?->format('Y-m-d') ?? '—' }} {{ $issue->created_at?->format('Y-m-d') ?? '—' }}
目前沒有符合條件的議題。
{{-- 分頁 --}} @if($issues->hasPages())
{{ $issues->withQueryString()->links() }}
@endif
{{-- 匯出 Modal --}} @push('scripts') @endpush @endsection