From f5b5db70aeda6e7cd80c92eb770723324542e242 Mon Sep 17 00:00:00 2001 From: Vidir Valberg Gudmundsson Date: Wed, 16 Aug 2017 19:39:30 +0200 Subject: [PATCH] Add icons for video filters. --- schedule/src/Views/FilterView.elm | 34 ++++++++++++++++++++++++- schedule/src/Views/ScheduleOverview.elm | 6 +++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/schedule/src/Views/FilterView.elm b/schedule/src/Views/FilterView.elm index cc5698ee..333b7621 100644 --- a/schedule/src/Views/FilterView.elm +++ b/schedule/src/Views/FilterView.elm @@ -92,7 +92,7 @@ filterSidebar model = videoRecordingFilters : List FilterType videoRecordingFilters = [ VideoFilter "Will not be recorded" "not-to-be-recorded" - , VideoFilter "Will recorded" "to-be-recorded" + , VideoFilter "Will be recorded" "to-be-recorded" , VideoFilter "Has recording" "has-recording" ] @@ -177,6 +177,37 @@ filterChoiceView filter currentFilters eventInstances slugLike = _ -> [] + + videoIcon = + case filter of + VideoFilter _ slug -> + let + icon = + case slug of + "has-recording" -> + "film" + + "to-be-recorded" -> + "video-camera" + + "not-to-be-recorded" -> + "ban" + + _ -> + "" + in + [ i + [ classList + [ ( "fa", True ) + , ( "fa-" ++ icon, True ) + , ( "pull-right", True ) + ] + ] + [] + ] + + _ -> + [] in li [] @@ -205,6 +236,7 @@ filterChoiceView filter currentFilters eventInstances slugLike = ] ] ++ locationIcon + ++ videoIcon ) ] ] diff --git a/schedule/src/Views/ScheduleOverview.elm b/schedule/src/Views/ScheduleOverview.elm index c1d7206b..8e1f7fe9 100644 --- a/schedule/src/Views/ScheduleOverview.elm +++ b/schedule/src/Views/ScheduleOverview.elm @@ -90,6 +90,12 @@ dayEventInstanceIcons eventInstance = [] ] + "not-to-be-recorded" -> + [ i + [ classList [ ( "fa", True ), ( "fa-ban", True ), ( "pull-right", True ) ] ] + [] + ] + _ -> [] in