diff options
Diffstat (limited to 'resources')
| -rw-r--r-- | resources/views/cinema.blade.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/resources/views/cinema.blade.php b/resources/views/cinema.blade.php index af09b91..ea2bdeb 100644 --- a/resources/views/cinema.blade.php +++ b/resources/views/cinema.blade.php @@ -114,6 +114,22 @@ html { <input name="q" class="form-control mr-sm-2" type="text" placeholder="Search movies..." aria-label="Search" value="{{ isset($search_query) ? $search_query : '' }}"> <button class="btn btn-outline-primary my-2 my-sm-0" type="submit">Search</button> </form> + <div class="mt-2"> + <span class="text-muted">Sort by:</span> + @foreach ([ + ['ref_count', 'Hacker News Mentions'], + ['score', 'Rating'], + ['num_votes', 'Number of Votes'], + ['num_accolades', 'Accolades'], + ['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> + @else + <a class="btn btn-sm btn-outline-secondary my-1" href="{{ url()->current() }}?order={{ $key }}">{{ $label }}</a> + @endif + @endforeach + </div> </div> </div> |
