From b4db97cbb75f02d2e859a0fc705786b53e15c214 Mon Sep 17 00:00:00 2001 From: Stella Rouzi Date: Thu, 12 Jun 2014 22:04:41 +0300 Subject: [PATCH 1/5] event[0].subtitle.blank? instead of .empty? because .blank? for nil is true but .empty? for nil is undefined method --- app/views/schedule/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/schedule/index.html.erb b/app/views/schedule/index.html.erb index 34d7274f..88f6cb55 100644 --- a/app/views/schedule/index.html.erb +++ b/app/views/schedule/index.html.erb @@ -56,7 +56,7 @@
<%= event[0].title %> - <% unless event[0].subtitle.empty? %> + <% unless event[0].subtitle.blank? %> <%= event[0].subtitle %> From 93d7cdf84044b166aadd26f8f345be5872905ad7 Mon Sep 17 00:00:00 2001 From: Stella Rouzi Date: Thu, 12 Jun 2014 22:05:47 +0300 Subject: [PATCH 2/5] Change wording and use unless instead of if --- app/views/conference/_program.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/conference/_program.html.haml b/app/views/conference/_program.html.haml index 81206952..38cb579e 100644 --- a/app/views/conference/_program.html.haml +++ b/app/views/conference/_program.html.haml @@ -6,13 +6,13 @@ %div.row %div.col-md-12 %h1 Program - - if !@conference.description.blank? + - unless @conference.description.blank? %p = @conference.description - if @conference.call_for_papers and @conference.call_for_papers.schedule_public - %span You can find the complete schedule in our + %span You can check out our %span - = link_to 'Master Schedule', conference_schedule_path(@conference.short_title), target: '_blank' - -if !@conference.tracks.blank? + = link_to 'Schedule', conference_schedule_path(@conference.short_title), target: '_blank' + -unless @conference.tracks.blank? = render 'tracks' From dab9e1da51d5acab3a0389110b702a113951b2a0 Mon Sep 17 00:00:00 2001 From: Stella Rouzi Date: Thu, 12 Jun 2014 22:07:30 +0300 Subject: [PATCH 3/5] show cfp partial only if @conference.call_for_papers is not nil --- app/views/conference/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/conference/show.html.haml b/app/views/conference/show.html.haml index 8a844c77..d1b30f98 100644 --- a/app/views/conference/show.html.haml +++ b/app/views/conference/show.html.haml @@ -10,4 +10,4 @@ %div#sponsors = render 'sponsor' %div#social-media - = render 'social_media' + = render 'social_media' \ No newline at end of file From 9c0af1faf094d071e12bd82881e694ef9c1f2904 Mon Sep 17 00:00:00 2001 From: Stella Rouzi Date: Thu, 12 Jun 2014 22:13:12 +0300 Subject: [PATCH 4/5] Move conference description in conference show, instead of program partial. --- app/views/conference/_program.html.haml | 3 --- app/views/conference/show.html.haml | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/conference/_program.html.haml b/app/views/conference/_program.html.haml index 38cb579e..124cd348 100644 --- a/app/views/conference/_program.html.haml +++ b/app/views/conference/_program.html.haml @@ -6,9 +6,6 @@ %div.row %div.col-md-12 %h1 Program - - unless @conference.description.blank? - %p - = @conference.description - if @conference.call_for_papers and @conference.call_for_papers.schedule_public %span You can check out our %span diff --git a/app/views/conference/show.html.haml b/app/views/conference/show.html.haml index d1b30f98..2ec6879c 100644 --- a/app/views/conference/show.html.haml +++ b/app/views/conference/show.html.haml @@ -1,5 +1,8 @@ = content_for :brand do = link_to @conference.title, conference_url(@conference.short_title), class: 'navbar-brand' + +- unless @conference.description.blank? + %p= @conference.description %div#program = render 'program' %div#registration From 668fe5f196de68d85b22983037d3c4bc4f6ed8cb Mon Sep 17 00:00:00 2001 From: Stella Rouzi Date: Thu, 12 Jun 2014 22:14:49 +0300 Subject: [PATCH 5/5] Add message when schedule is not ready --- app/views/conference/_program.html.haml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/conference/_program.html.haml b/app/views/conference/_program.html.haml index 124cd348..b998e3c9 100644 --- a/app/views/conference/_program.html.haml +++ b/app/views/conference/_program.html.haml @@ -10,6 +10,8 @@ %span You can check out our %span = link_to 'Schedule', conference_schedule_path(@conference.short_title), target: '_blank' + - else + %span The schedule is not ready yet. Stay tuned! -unless @conference.tracks.blank? = render 'tracks'