From afa9e8f50e82194170cf7d34ec8f69a27a56b36c Mon Sep 17 00:00:00 2001 From: Josef Citrine Date: Tue, 16 May 2017 21:08:46 +0100 Subject: [PATCH] Added archive filter to tracks page --- app/Http/Controllers/Api/Web/TracksController.php | 5 +++++ public/templates/tracks/index.html | 11 +++++++++++ resources/assets/scripts/app/services/tracks.coffee | 9 +++++++++ 3 files changed, 25 insertions(+) diff --git a/app/Http/Controllers/Api/Web/TracksController.php b/app/Http/Controllers/Api/Web/TracksController.php index ba6d36df..391b7bfe 100644 --- a/app/Http/Controllers/Api/Web/TracksController.php +++ b/app/Http/Controllers/Api/Web/TracksController.php @@ -357,6 +357,11 @@ class TracksController extends ApiControllerBase $query->whereIn('show_song_track.show_song_id', Request::get('songs')); } + if (Request::has('archive')) { + // Select which archive to view + $query->where('source', Request::get('archive')); + } + return $query; } } diff --git a/public/templates/tracks/index.html b/public/templates/tracks/index.html index f14e53ec..6a66f955 100644 --- a/public/templates/tracks/index.html +++ b/public/templates/tracks/index.html @@ -63,6 +63,17 @@ +