Add icons for video filters.

This commit is contained in:
Vidir Valberg Gudmundsson 2017-08-16 19:39:30 +02:00
parent 9659871a3f
commit f5b5db70ae
2 changed files with 39 additions and 1 deletions

View file

@ -92,7 +92,7 @@ filterSidebar model =
videoRecordingFilters : List FilterType videoRecordingFilters : List FilterType
videoRecordingFilters = videoRecordingFilters =
[ VideoFilter "Will not be recorded" "not-to-be-recorded" [ 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" , 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 in
li li
[] []
@ -205,6 +236,7 @@ filterChoiceView filter currentFilters eventInstances slugLike =
] ]
] ]
++ locationIcon ++ locationIcon
++ videoIcon
) )
] ]
] ]

View file

@ -90,6 +90,12 @@ dayEventInstanceIcons eventInstance =
[] []
] ]
"not-to-be-recorded" ->
[ i
[ classList [ ( "fa", True ), ( "fa-ban", True ), ( "pull-right", True ) ] ]
[]
]
_ -> _ ->
[] []
in in