remove campaign banner from most pages
This commit is contained in:
parent
df62e3540f
commit
70cf262387
2 changed files with 15 additions and 12 deletions
|
@ -14,19 +14,22 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def campaign_progress(&block)
|
CAMPAIGN_ACTIVE = false
|
||||||
include_campaign_progress_requirements
|
def campaign_progress(options={}, &block)
|
||||||
|
if CAMPAIGN_ACTIVE || options[:always]
|
||||||
|
include_campaign_progress_requirements
|
||||||
|
|
||||||
if block_given?
|
if block_given?
|
||||||
content = capture(&block)
|
content = capture(&block)
|
||||||
else
|
else
|
||||||
content = link_to('We made it! Image Mode has been released.', donate_path) +
|
content = link_to('We made it! Image Mode has been released.', donate_path) +
|
||||||
link_to('Read more', donate_path, :class => 'button')
|
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
|
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
|
end
|
||||||
|
|
||||||
def canonical_path(resource)
|
def canonical_path(resource)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
- title "Support Dress to Impress"
|
- title "Support Dress to Impress"
|
||||||
%h2 Thank you so much for all your help. We made it!
|
%h2 Thank you so much for all your help. We made it!
|
||||||
|
|
||||||
= campaign_progress do
|
= campaign_progress(:always => true) do
|
||||||
We've received
|
We've received
|
||||||
= surround '$', ',' do
|
= surround '$', ',' do
|
||||||
%span.campaign-raised
|
%span.campaign-raised
|
||||||
|
|
Loading…
Reference in a new issue