1
0
Fork 0
forked from OpenNeo/impress

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:
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
margin-top: 1em
margin-bottom: 1.5em
padding-bottom: 24px
padding-bottom: 32px
padding-left: 24px
padding-top: 24px
padding-top: 32px
header, div
+inline-block

View file

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

View file

@ -1,9 +1,9 @@
- title "Support Dress to Impress"
= campaign_progress(@campaign) do
We've received #{number_to_currency(@campaign.progress / 100.0)}
toward our hosting costs this year.
- if @campaign.progress > 0
- if @campaign.progress > 0
= campaign_progress(@campaign) do
We've received #{number_to_currency(@campaign.progress / 100.0)}
toward our hosting costs this year.
Thanks so much!
= form_tag donations_path, method: 'POST', id: 'donation-form',
@ -61,18 +61,18 @@
[aws]: http://aws.amazon.com/
[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
- @donations.each do |donation|
- donation.features.each do |feature|
%li
- if feature.outfit_id? && feature.outfit.image?
= link_to image_tag(feature.outfit.image.small.url), feature.outfit
- else
= image_tag 'default_preview.png'
%ul#outfits
- @donations.each do |donation|
- donation.features.each do |feature|
%li
- if feature.outfit_id? && feature.outfit.image?
= link_to image_tag(feature.outfit.image.small.url), feature.outfit
- else
= image_tag 'default_preview.png'
%header Thanks, #{donation.donor_name.presence || 'Anonymous'}!
%header Thanks, #{donation.donor_name.presence || 'Anonymous'}!
#fine-print
%h2 Some notes on featured outfits