Merge pull request #225 from bornhack/remove_image_from_speaker_in_schedule
Remove image from speaker in schedule
This commit is contained in:
commit
4060c947de
|
@ -46,8 +46,6 @@ speakerDecoder =
|
||||||
|> required "name" string
|
|> required "name" string
|
||||||
|> required "slug" string
|
|> required "slug" string
|
||||||
|> required "biography" string
|
|> required "biography" string
|
||||||
|> optional "large_picture_url" (nullable string) Nothing
|
|
||||||
|> optional "small_picture_url" (nullable string) Nothing
|
|
||||||
|
|
||||||
|
|
||||||
eventDecoder : Decoder Event
|
eventDecoder : Decoder Event
|
||||||
|
|
|
@ -69,8 +69,6 @@ type alias Speaker =
|
||||||
{ name : String
|
{ name : String
|
||||||
, slug : SpeakerSlug
|
, slug : SpeakerSlug
|
||||||
, biography : String
|
, biography : String
|
||||||
, largePictureUrl : Maybe String
|
|
||||||
, smallPictureUrl : Maybe String
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,24 +22,11 @@ speakerDetailView speakerSlug model =
|
||||||
model.speakers
|
model.speakers
|
||||||
|> List.filter (\speaker -> speaker.slug == speakerSlug)
|
|> List.filter (\speaker -> speaker.slug == speakerSlug)
|
||||||
|> List.head
|
|> List.head
|
||||||
|
|
||||||
image =
|
|
||||||
case speaker of
|
|
||||||
Just speaker ->
|
|
||||||
case speaker.smallPictureUrl of
|
|
||||||
Just smallPictureUrl ->
|
|
||||||
[ img [ src smallPictureUrl ] [] ]
|
|
||||||
|
|
||||||
Nothing ->
|
|
||||||
[]
|
|
||||||
|
|
||||||
Nothing ->
|
|
||||||
[]
|
|
||||||
in
|
in
|
||||||
case speaker of
|
case speaker of
|
||||||
Just speaker ->
|
Just speaker ->
|
||||||
div []
|
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 ) ] ] []
|
[ i [ classList [ ( "fa", True ), ( "fa-chevron-left", True ) ] ] []
|
||||||
, text " Back"
|
, text " Back"
|
||||||
]
|
]
|
||||||
|
@ -47,8 +34,6 @@ speakerDetailView speakerSlug model =
|
||||||
, div [] [ Markdown.toHtml [] speaker.biography ]
|
, div [] [ Markdown.toHtml [] speaker.biography ]
|
||||||
, speakerEvents speaker model
|
, speakerEvents speaker model
|
||||||
]
|
]
|
||||||
++ image
|
|
||||||
)
|
|
||||||
|
|
||||||
Nothing ->
|
Nothing ->
|
||||||
div [] [ text "Unknown speaker..." ]
|
div [] [ text "Unknown speaker..." ]
|
||||||
|
|
|
@ -659,10 +659,6 @@ class Speaker(CampRelatedModel):
|
||||||
'biography': self.biography,
|
'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
|
return data
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13921,9 +13921,9 @@ var _user$project$Models$Day = F3(
|
||||||
function (a, b, c) {
|
function (a, b, c) {
|
||||||
return {day_name: a, date: b, repr: c};
|
return {day_name: a, date: b, repr: c};
|
||||||
});
|
});
|
||||||
var _user$project$Models$Speaker = F5(
|
var _user$project$Models$Speaker = F3(
|
||||||
function (a, b, c, d, e) {
|
function (a, b, c) {
|
||||||
return {name: a, slug: b, biography: c, largePictureUrl: d, smallPictureUrl: e};
|
return {name: a, slug: b, biography: c};
|
||||||
});
|
});
|
||||||
var _user$project$Models$EventInstance = function (a) {
|
var _user$project$Models$EventInstance = function (a) {
|
||||||
return function (b) {
|
return function (b) {
|
||||||
|
@ -14133,17 +14133,7 @@ var _user$project$Decoders$eventDecoder = A3(
|
||||||
'title',
|
'title',
|
||||||
_elm_lang$core$Json_Decode$string,
|
_elm_lang$core$Json_Decode$string,
|
||||||
_NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$decode(_user$project$Models$Event))))))));
|
_NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$decode(_user$project$Models$Event))))))));
|
||||||
var _user$project$Decoders$speakerDecoder = A4(
|
var _user$project$Decoders$speakerDecoder = A3(
|
||||||
_NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$optional,
|
|
||||||
'small_picture_url',
|
|
||||||
_elm_lang$core$Json_Decode$nullable(_elm_lang$core$Json_Decode$string),
|
|
||||||
_elm_lang$core$Maybe$Nothing,
|
|
||||||
A4(
|
|
||||||
_NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$optional,
|
|
||||||
'large_picture_url',
|
|
||||||
_elm_lang$core$Json_Decode$nullable(_elm_lang$core$Json_Decode$string),
|
|
||||||
_elm_lang$core$Maybe$Nothing,
|
|
||||||
A3(
|
|
||||||
_NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$required,
|
_NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$required,
|
||||||
'biography',
|
'biography',
|
||||||
_elm_lang$core$Json_Decode$string,
|
_elm_lang$core$Json_Decode$string,
|
||||||
|
@ -14155,7 +14145,7 @@ var _user$project$Decoders$speakerDecoder = A4(
|
||||||
_NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$required,
|
_NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$required,
|
||||||
'name',
|
'name',
|
||||||
_elm_lang$core$Json_Decode$string,
|
_elm_lang$core$Json_Decode$string,
|
||||||
_NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$decode(_user$project$Models$Speaker))))));
|
_NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$decode(_user$project$Models$Speaker))));
|
||||||
var _user$project$Decoders$dayDecoder = A3(
|
var _user$project$Decoders$dayDecoder = A3(
|
||||||
_NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$required,
|
_NoRedInk$elm_decode_pipeline$Json_Decode_Pipeline$required,
|
||||||
'repr',
|
'repr',
|
||||||
|
@ -16224,38 +16214,12 @@ var _user$project$Views_SpeakerDetail$speakerDetailView = F2(
|
||||||
return _elm_lang$core$Native_Utils.eq(speaker.slug, speakerSlug);
|
return _elm_lang$core$Native_Utils.eq(speaker.slug, speakerSlug);
|
||||||
},
|
},
|
||||||
model.speakers));
|
model.speakers));
|
||||||
var image = function () {
|
|
||||||
var _p1 = speaker;
|
var _p1 = speaker;
|
||||||
if (_p1.ctor === 'Just') {
|
if (_p1.ctor === 'Just') {
|
||||||
var _p2 = _p1._0.smallPictureUrl;
|
var _p2 = _p1._0;
|
||||||
if (_p2.ctor === 'Just') {
|
|
||||||
return {
|
|
||||||
ctor: '::',
|
|
||||||
_0: A2(
|
|
||||||
_elm_lang$html$Html$img,
|
|
||||||
{
|
|
||||||
ctor: '::',
|
|
||||||
_0: _elm_lang$html$Html_Attributes$src(_p2._0),
|
|
||||||
_1: {ctor: '[]'}
|
|
||||||
},
|
|
||||||
{ctor: '[]'}),
|
|
||||||
_1: {ctor: '[]'}
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
return {ctor: '[]'};
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return {ctor: '[]'};
|
|
||||||
}
|
|
||||||
}();
|
|
||||||
var _p3 = speaker;
|
|
||||||
if (_p3.ctor === 'Just') {
|
|
||||||
var _p4 = _p3._0;
|
|
||||||
return A2(
|
return A2(
|
||||||
_elm_lang$html$Html$div,
|
_elm_lang$html$Html$div,
|
||||||
{ctor: '[]'},
|
{ctor: '[]'},
|
||||||
A2(
|
|
||||||
_elm_lang$core$Basics_ops['++'],
|
|
||||||
{
|
{
|
||||||
ctor: '::',
|
ctor: '::',
|
||||||
_0: A2(
|
_0: A2(
|
||||||
|
@ -16310,7 +16274,7 @@ var _user$project$Views_SpeakerDetail$speakerDetailView = F2(
|
||||||
{ctor: '[]'},
|
{ctor: '[]'},
|
||||||
{
|
{
|
||||||
ctor: '::',
|
ctor: '::',
|
||||||
_0: _elm_lang$html$Html$text(_p4.name),
|
_0: _elm_lang$html$Html$text(_p2.name),
|
||||||
_1: {ctor: '[]'}
|
_1: {ctor: '[]'}
|
||||||
}),
|
}),
|
||||||
_1: {
|
_1: {
|
||||||
|
@ -16323,18 +16287,17 @@ var _user$project$Views_SpeakerDetail$speakerDetailView = F2(
|
||||||
_0: A2(
|
_0: A2(
|
||||||
_evancz$elm_markdown$Markdown$toHtml,
|
_evancz$elm_markdown$Markdown$toHtml,
|
||||||
{ctor: '[]'},
|
{ctor: '[]'},
|
||||||
_p4.biography),
|
_p2.biography),
|
||||||
_1: {ctor: '[]'}
|
_1: {ctor: '[]'}
|
||||||
}),
|
}),
|
||||||
_1: {
|
_1: {
|
||||||
ctor: '::',
|
ctor: '::',
|
||||||
_0: A2(_user$project$Views_SpeakerDetail$speakerEvents, _p4, model),
|
_0: A2(_user$project$Views_SpeakerDetail$speakerEvents, _p2, model),
|
||||||
_1: {ctor: '[]'}
|
_1: {ctor: '[]'}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
image));
|
|
||||||
} else {
|
} else {
|
||||||
return A2(
|
return A2(
|
||||||
_elm_lang$html$Html$div,
|
_elm_lang$html$Html$div,
|
||||||
|
|
Loading…
Reference in a new issue