summaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
authorDeveloper2026-06-27 04:05:43 +0200
committerDeveloper2026-06-27 04:05:43 +0200
commit33b69f87babac5116db923b906512411488eb28a (patch)
treea810eac806de16a68e7e6ec81fa13d3d755fb7de /resources
parentaa9efa6cb7d60a6e501088fae3aecb08aee3246e (diff)
downloadcurious-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')
-rw-r--r--resources/views/cinema.blade.php8
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 }}&amp;direction=asc">{{ $label }} &#x25B2;</a>
+ @else
+ <a class="btn btn-sm btn-primary my-1" href="{{ url()->current() }}?order={{ $key }}&amp;direction=desc">{{ $label }} &#x25BC;</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 }}&amp;direction=desc">{{ $label }}</a>
@endif
@endforeach
</div>