Remove speaker pictures from schedule.

This commit is contained in:
Víðir Valberg Guðmundsson 2018-05-06 22:09:19 +02:00
parent 4ad568bb97
commit 91519e8b43
4 changed files with 5 additions and 28 deletions

View File

@ -46,8 +46,6 @@ speakerDecoder =
|> required "name" string
|> required "slug" string
|> required "biography" string
|> optional "large_picture_url" (nullable string) Nothing
|> optional "small_picture_url" (nullable string) Nothing
eventDecoder : Decoder Event

View File

@ -69,8 +69,6 @@ type alias Speaker =
{ name : String
, slug : SpeakerSlug
, biography : String
, largePictureUrl : Maybe String
, smallPictureUrl : Maybe String
}

View File

@ -22,33 +22,18 @@ speakerDetailView speakerSlug model =
model.speakers
|> List.filter (\speaker -> speaker.slug == speakerSlug)
|> List.head
image =
case speaker of
Just speaker ->
case speaker.smallPictureUrl of
Just smallPictureUrl ->
[ img [ src smallPictureUrl ] [] ]
Nothing ->
[]
Nothing ->
[]
in
case speaker of
Just speaker ->
div []
([ a [ onClick BackInHistory, classList [ ( "btn", True ), ( "btn-default", True ) ] ]
[ a [ onClick BackInHistory, classList [ ( "btn", True ), ( "btn-default", True ) ] ]
[ i [ classList [ ( "fa", True ), ( "fa-chevron-left", True ) ] ] []
, text " Back"
]
, h3 [] [ text speaker.name ]
, div [] [ Markdown.toHtml [] speaker.biography ]
, speakerEvents speaker model
]
++ image
)
, h3 [] [ text speaker.name ]
, div [] [ Markdown.toHtml [] speaker.biography ]
, speakerEvents speaker model
]
Nothing ->
div [] [ text "Unknown speaker..." ]

View File

@ -659,10 +659,6 @@ class Speaker(CampRelatedModel):
'biography': self.biography,
}
if self.picture_small and self.picture_large:
data['large_picture_url'] = self.get_large_picture_url()
data['small_picture_url'] = self.get_small_picture_url()
return data