diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b6c9cd38..d6bb8c3c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -14,19 +14,22 @@ module ApplicationHelper end end - def campaign_progress(&block) - include_campaign_progress_requirements + CAMPAIGN_ACTIVE = false + def campaign_progress(options={}, &block) + if CAMPAIGN_ACTIVE || options[:always] + include_campaign_progress_requirements - if block_given? - content = capture(&block) - else - content = link_to('We made it! Image Mode has been released.', donate_path) + - link_to('Read more', donate_path, :class => 'button') + if block_given? + content = capture(&block) + else + content = link_to('We made it! Image Mode has been released.', donate_path) + + link_to('Read more', donate_path, :class => 'button') + end + + html = content_tag(:div, nil, :class => 'campaign-progress') + + content_tag(:div, content, :class => 'campaign-progress-label') + content_tag(:div, html, :class => 'campaign-progress-wrapper') end - - html = content_tag(:div, nil, :class => 'campaign-progress') + - content_tag(:div, content, :class => 'campaign-progress-label') - content_tag(:div, html, :class => 'campaign-progress-wrapper') end def canonical_path(resource) diff --git a/app/views/static/donate.html.haml b/app/views/static/donate.html.haml index cf7062c2..ef6df1dc 100644 --- a/app/views/static/donate.html.haml +++ b/app/views/static/donate.html.haml @@ -1,7 +1,7 @@ - title "Support Dress to Impress" %h2 Thank you so much for all your help. We made it! -= campaign_progress do += campaign_progress(:always => true) do We've received = surround '$', ',' do %span.campaign-raised