@php use Leantime\Core\Controller\Frontcontroller; $currentRoute = Frontcontroller::getCurrentRoute(); $currentUrlPath = BASE_URL . '/' . str_replace('.', '/', $currentRoute); // Program boards render this partial under a /pgmPro/* route and can pass an explicit // self-redirect target. Default to the current route for normal per-project views. $searchFormUrl = $searchFormUrl ?? $currentUrlPath; $groupBy = $groupByOptions; $sortBy = $sortOptions; $statusLabels = $allTicketStates; $taskToggle = $enableTaskTypeToggle ?? false; // Multi-project (program) context: show the project filter + the "project" group-by. $showProjectFilter = isset($availableProjects); // Kanban shows status as columns, so the status group-by is suppressed. Program kanban // templates set $isKanbanView; per-project views derive it from the route. $isKanbanView = $isKanbanView ?? ($currentRoute === 'tickets.showKanban'); @endphp
@unless ($showProjectFilter) @endunless
{{-- Kept as a raw (not forms.button): this button is whitespace-sensitive — the @if adjacency below avoids an inline-block gap, and the component would reintroduce surrounding whitespace. Migrate once the component guarantees whitespace-tight output. --}} Filter{!! $numOfFilters > 0 ? " " . $numOfFilters . ' ' : '' !!} {{-- Please don't change the code formatting below, if not right next to each other it somehow adds a space between the two buttons and increases the distance --}} @if ($currentRoute !== 'tickets.roadmap' && $currentRoute != 'tickets.showProjectCalendar')
@endif
@dispatchEvent('filters.beforeFirstBarField') @if ($showProjectFilter)
@endif
@if (isset($taskToggle) && $taskToggle === true)
@endif
@dispatchEvent('filters.beforeBar') @dispatchEvent('filters.beforeFormClose')