From aaddc721bf12a83186af56725b43f21437a1c1ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasia=20Jarmo=C5=82kowicz?= Date: Wed, 30 May 2018 21:58:41 +0200 Subject: [PATCH] Show banner on p2p create page, too --- .../campaigns/peer_to_peer/page.css.scss | 8 ++-- app/controllers/campaigns_controller.rb | 4 +- .../_new_peer_to_peer_modal.html.erb | 8 ++-- app/views/campaigns/peer_to_peer.html.erb | 37 ++++++++++--------- app/views/nonprofits/show.html.erb | 3 +- 5 files changed, 32 insertions(+), 28 deletions(-) diff --git a/app/assets/stylesheets/campaigns/peer_to_peer/page.css.scss b/app/assets/stylesheets/campaigns/peer_to_peer/page.css.scss index bab7abff..9c4a8ee2 100644 --- a/app/assets/stylesheets/campaigns/peer_to_peer/page.css.scss +++ b/app/assets/stylesheets/campaigns/peer_to_peer/page.css.scss @@ -12,11 +12,11 @@ body { background: $fog; } -body > .ymca-banner { +body > .campaign-banner { margin: auto; - width: 100vw; - height: 120px; - background-color: #01a490; + width: 980px; + max-height: 120px; + text-align: center; } main { diff --git a/app/controllers/campaigns_controller.rb b/app/controllers/campaigns_controller.rb index 4939fdfb..033af077 100644 --- a/app/controllers/campaigns_controller.rb +++ b/app/controllers/campaigns_controller.rb @@ -109,8 +109,8 @@ class CampaignsController < ApplicationController def peer_to_peer session[:donor_signup_url] = request.env["REQUEST_URI"] - @npo = Nonprofit.find_by_id(params[:npo_id]) - @campaign = Campaign.find_by_id(params[:campaign_id]) + @nonprofit = Nonprofit.find_by_id(params[:npo_id]) + @parent_campaign = Campaign.find_by_id(params[:campaign_id]) @profile = current_user.profile if current_user end diff --git a/app/views/campaigns/_new_peer_to_peer_modal.html.erb b/app/views/campaigns/_new_peer_to_peer_modal.html.erb index 2c472c0c..7b0a14cd 100644 --- a/app/views/campaigns/_new_peer_to_peer_modal.html.erb +++ b/app/views/campaigns/_new_peer_to_peer_modal.html.erb @@ -3,7 +3,7 @@