when there are no donors yet, draw less attention to that fact :P

This commit is contained in:
Emi Matchu 2014-09-11 20:58:37 -05:00
parent be87039cba
commit 75e9fcbe5a
3 changed files with 19 additions and 19 deletions

View file

@ -20,12 +20,13 @@ body.static-donate
background: background:
image: url(http://images.neopets.com/new_shopkeepers/t_993.gif) image: url(http://images.neopets.com/new_shopkeepers/t_993.gif)
position: ($container-width - 150px - 8px) -8px position: ($container-width - 150px - 8px) -4px
repeat: no-repeat repeat: no-repeat
margin-top: 1em
margin-bottom: 1.5em margin-bottom: 1.5em
padding-bottom: 24px padding-bottom: 32px
padding-left: 24px padding-left: 24px
padding-top: 24px padding-top: 32px
header, div header, div
+inline-block +inline-block

View file

@ -1,6 +1,5 @@
class StaticController < ApplicationController class StaticController < ApplicationController
def donate def donate
# TODO: scope by campaign?
@campaign = Campaign.current @campaign = Campaign.current
@donations = @campaign.donations.includes(features: :outfit). @donations = @campaign.donations.includes(features: :outfit).
order('created_at DESC') order('created_at DESC')

View file

@ -1,9 +1,9 @@
- title "Support Dress to Impress" - title "Support Dress to Impress"
= campaign_progress(@campaign) do - if @campaign.progress > 0
= campaign_progress(@campaign) do
We've received #{number_to_currency(@campaign.progress / 100.0)} We've received #{number_to_currency(@campaign.progress / 100.0)}
toward our hosting costs this year. toward our hosting costs this year.
- if @campaign.progress > 0
Thanks so much! Thanks so much!
= form_tag donations_path, method: 'POST', id: 'donation-form', = form_tag donations_path, method: 'POST', id: 'donation-form',
@ -61,9 +61,9 @@
[aws]: http://aws.amazon.com/ [aws]: http://aws.amazon.com/
[matts_bat]: http://www.neopets.com/petlookup.phtml?pet=matts_bat [matts_bat]: http://www.neopets.com/petlookup.phtml?pet=matts_bat
%h2 Thanks to our lovely donors! - if @donations.present?
%h2 Thanks to our lovely donors!
%ul#outfits %ul#outfits
- @donations.each do |donation| - @donations.each do |donation|
- donation.features.each do |feature| - donation.features.each do |feature|
%li %li