diff options
| author | Developer | 2026-06-27 04:05:43 +0200 |
|---|---|---|
| committer | Developer | 2026-06-27 04:05:43 +0200 |
| commit | 33b69f87babac5116db923b906512411488eb28a (patch) | |
| tree | a810eac806de16a68e7e6ec81fa13d3d755fb7de /resources/views/cinema.blade.php | |
| parent | aa9efa6cb7d60a6e501088fae3aecb08aee3246e (diff) | |
| download | curious-33b69f87babac5116db923b906512411488eb28a.tar.gz | |
feat: add ascending/descending sort direction toggle to cinema
Active sort button toggles direction on click, showing ▲ for asc and ▼ for desc.
Default direction is desc for all sort options.
Diffstat (limited to 'resources/views/cinema.blade.php')
| -rw-r--r-- | resources/views/cinema.blade.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/resources/views/cinema.blade.php b/resources/views/cinema.blade.php index ea2bdeb..eb6b085 100644 --- a/resources/views/cinema.blade.php +++ b/resources/views/cinema.blade.php @@ -124,9 +124,13 @@ html { ['start_year', 'Release Date'], ] as [$key, $label]) @if ( (isset($order) ? $order : 'ref_count') == $key ) - <a class="btn btn-sm btn-primary my-1" href="{{ url()->current() }}?order={{ $key }}">{{ $label }}</a> + @if ( (isset($direction) ? $direction : 'desc') == 'desc' ) + <a class="btn btn-sm btn-primary my-1" href="{{ url()->current() }}?order={{ $key }}&direction=asc">{{ $label }} ▲</a> + @else + <a class="btn btn-sm btn-primary my-1" href="{{ url()->current() }}?order={{ $key }}&direction=desc">{{ $label }} ▼</a> + @endif @else - <a class="btn btn-sm btn-outline-secondary my-1" href="{{ url()->current() }}?order={{ $key }}">{{ $label }}</a> + <a class="btn btn-sm btn-outline-secondary my-1" href="{{ url()->current() }}?order={{ $key }}&direction=desc">{{ $label }}</a> @endif @endforeach </div> |
