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 =
[ 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
)
]
]

View File

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