From 7f1162ea356e02d45b393fe615017a83462d877b Mon Sep 17 00:00:00 2001 From: Sasi Olin Date: Sat, 16 Apr 2022 15:04:27 +0200 Subject: [PATCH 1/3] Don't include speaker information if it's nil --- app/views/conferences/_highlights.haml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/views/conferences/_highlights.haml b/app/views/conferences/_highlights.haml index b44a24b1..f3281389 100644 --- a/app/views/conferences/_highlights.haml +++ b/app/views/conferences/_highlights.haml @@ -11,9 +11,11 @@ = link_to(conference_program_proposal_path(conference_id, event), class: 'thumbnail') do - = image_tag speaker.gravatar_url(size: 300), - class: ['img-responsive', 'img-circle'], - title: speaker.name + - unless speaker.nil? + = image_tag speaker.gravatar_url(size: 300), + class: ['img-responsive', 'img-circle'], + title: speaker.name .caption - %h3.text-center= speaker.name + - unless speaker.nil? + %h3.text-center= speaker.name %h4.text-center= event.title From 01bb991d463f612f8446afbb78acf15c2078a526 Mon Sep 17 00:00:00 2001 From: Sasi Olin Date: Tue, 19 Apr 2022 13:16:45 +0200 Subject: [PATCH 2/3] Update app/views/conferences/_highlights.haml Co-authored-by: Henne Vogelsang --- app/views/conferences/_highlights.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/conferences/_highlights.haml b/app/views/conferences/_highlights.haml index f3281389..0575362f 100644 --- a/app/views/conferences/_highlights.haml +++ b/app/views/conferences/_highlights.haml @@ -11,7 +11,7 @@ = link_to(conference_program_proposal_path(conference_id, event), class: 'thumbnail') do - - unless speaker.nil? + - if speaker = image_tag speaker.gravatar_url(size: 300), class: ['img-responsive', 'img-circle'], title: speaker.name From 7bbac4b59923902f0f5fa9fb4ee249fb2be325cf Mon Sep 17 00:00:00 2001 From: Sasi Olin Date: Tue, 19 Apr 2022 13:16:50 +0200 Subject: [PATCH 3/3] Update app/views/conferences/_highlights.haml Co-authored-by: Henne Vogelsang --- app/views/conferences/_highlights.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/conferences/_highlights.haml b/app/views/conferences/_highlights.haml index 0575362f..2bb5b383 100644 --- a/app/views/conferences/_highlights.haml +++ b/app/views/conferences/_highlights.haml @@ -16,6 +16,6 @@ class: ['img-responsive', 'img-circle'], title: speaker.name .caption - - unless speaker.nil? + - if speaker %h3.text-center= speaker.name %h4.text-center= event.title