| 
									
										
										
										
											2020-06-12 15:03:43 -05:00
										 |  |  | <%- # License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later | 
					
						
							|  |  |  | # Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE -%> | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:42 -04:00
										 |  |  | <%= content_for(:title_prefix) { "#{@campaign.name} - #{@campaign.nonprofit.name} | ".html_safe } %> | 
					
						
							|  |  |  | <% content_for(:fixed_position_cta_hidden) {'hidden'} %> | 
					
						
							| 
									
										
										
										
											2019-08-19 12:55:38 -05:00
										 |  |  | <%= content_for(:meta_description) {@campaign.summary} %> | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:42 -04:00
										 |  |  | <% @brand_color = @nonprofit.brand_color ? @nonprofit.brand_color : nil %> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <%= content_for :javascripts do %> | 
					
						
							|  |  |  | 	<script> | 
					
						
							|  |  |  | 		app.campaign_id = <%= @campaign.id %> | 
					
						
							|  |  |  |     app.campaign = <%= raw(@campaign.to_json) %> | 
					
						
							|  |  |  | 		app.header_image_url = '<%= @campaign_background_image %>' | 
					
						
							|  |  |  |     app.campaign_end_datetime = '<%= @campaign.end_datetime %>' | 
					
						
							|  |  |  | 		app.timezone = '<%= @timezone %>' | 
					
						
							|  |  |  |     app.end_date_time = app.campaign_end_datetime | 
					
						
							|  |  |  |     app.hide_activities = <%= @campaign.hide_activity_feed %> | 
					
						
							|  |  |  | 		app.days_remaining = '<%= @campaign.days_left %>' | 
					
						
							|  |  |  | 		app.recurring_fund = <%= @campaign.recurring_fund? %> | 
					
						
							|  |  |  |     app.vimeo_id = "<%= @campaign.vimeo_video_id ? @campaign.vimeo_video_id : '' %>" | 
					
						
							| 
									
										
										
										
											2018-07-06 19:06:39 +02:00
										 |  |  |     app.current_campaign_editor = <%= current_campaign_editor? %> | 
					
						
							|  |  |  |     app.is_parent_campaign = <%= @campaign.parent_campaign? %> | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:42 -04:00
										 |  |  | 		appl.def('has_video', <%= @campaign.video_url.present? %>) | 
					
						
							|  |  |  |     appl.def('campaign_is_deleted', <%= @campaign.deleted || false %>) | 
					
						
							| 
									
										
										
										
											2020-05-15 14:01:59 -05:00
										 |  |  |     appl.def('has_main_image', <%= @campaign.main_image.attached? %>) | 
					
						
							| 
									
										
										
										
											2018-07-06 19:06:39 +02:00
										 |  |  |   </script> | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:42 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-06 19:06:39 +02:00
										 |  |  |   <%= render 'schema', campaign: @campaign, url: @url %> | 
					
						
							| 
									
										
										
										
											2018-11-23 15:38:40 -06:00
										 |  |  |   <%= render 'common/froala' if current_campaign_editor? %> | 
					
						
							| 
									
										
										
										
											2019-12-04 16:22:48 -06:00
										 |  |  | <%= javascript_pack_tag 'i18n', 'page__campaigns' %> | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:42 -04:00
										 |  |  | <% end %> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <%= content_for :stylesheets do %> | 
					
						
							|  |  |  | 	<%= stylesheet_link_tag 'campaigns/show/page' %> | 
					
						
							|  |  |  | 	<%= stylesheet_link_tag 'campaigns/edit/page' %> | 
					
						
							|  |  |  |   <style> | 
					
						
							|  |  |  |     .ios-force-absolute-positioning { | 
					
						
							|  |  |  |       position: absolute !important; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   </style> | 
					
						
							|  |  |  | <% end %> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <% content_for :head do %> | 
					
						
							|  |  |  | 	<link rel="canonical" href='<%= @url %>' /> | 
					
						
							|  |  |  | <% end %> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <%= content_for :facebook_tags do %> | 
					
						
							|  |  |  | 	<meta property="og:title" content="<%= raw @campaign.name %>"> | 
					
						
							|  |  |  | 	<meta property="og:description" content="<%= @campaign.summary.present? ? raw(@campaign.summary) : raw(@campaign.name) %>"> | 
					
						
							| 
									
										
										
										
											2020-05-15 14:01:59 -05:00
										 |  |  | 	<meta property="og:image" content="<%= @campaign.main_image.attached? ? @campaign.main_image_by_size(:normal) : "" %>"> | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:42 -04:00
										 |  |  | <% end %> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <%= content_for :twitter_tags do %> | 
					
						
							|  |  |  | 	<meta property="twitter:title" content="<%= raw @campaign.name %>"> | 
					
						
							|  |  |  | 	<meta property="twitter:description" content="<%= raw @campaign.summary %>"> | 
					
						
							| 
									
										
										
										
											2020-05-15 14:01:59 -05:00
										 |  |  | 	<meta property="twitter:image" content="<%= @campaign.main_image.attached? ? @campaign.main_image_by_size(:normal) : "" %>"> | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:42 -04:00
										 |  |  | <% end %> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <% if current_campaign_editor? %> | 
					
						
							|  |  |  |   <%= render 'admin_top_nav' %> | 
					
						
							|  |  |  | <% end %> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <%= render 'components/fundraising_pages/header', | 
					
						
							|  |  |  | 	image_url: @campaign_background_image, | 
					
						
							|  |  |  | 	is_editor: current_campaign_editor?, | 
					
						
							|  |  |  | 	hide_title:  @campaign.hide_title && @campaign_background_image, | 
					
						
							| 
									
										
										
										
											2018-05-30 19:16:24 +02:00
										 |  |  | 	header_content_partial: 'header_content', | 
					
						
							|  |  |  |   banner_image_url: @campaign.banner_image&.url %> | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:42 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | <%= render 'components/preview_mode_notification' %> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <div class="container u-marginTop--15 <%=  @brand_color ? 'is-branded' : '' %>" data-id='<%= @campaign.id %>'> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-30 19:16:24 +02:00
										 |  |  |   <section class='box'> | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:42 -04:00
										 |  |  | 		<%= render 'campaign_media' %> | 
					
						
							|  |  |  | 	</section> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	<section class='box-r'> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-30 19:45:51 +02:00
										 |  |  |     <% if current_campaign_editor? && !@campaign.child_campaign? %> | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:42 -04:00
										 |  |  |       <!-- Campaign editor gift option management modal --> | 
					
						
							|  |  |  |       <button class='button edit u-width--full u-marginBottom--15'> | 
					
						
							|  |  |  |         <!--= on 'click' (open_modal 'manageGiftOptionsModal') --> | 
					
						
							|  |  |  |         <i class='fa fa-gift'></i> Manage Gift Options | 
					
						
							|  |  |  |       </button> | 
					
						
							|  |  |  |     <% end %> | 
					
						
							| 
									
										
										
										
											2018-04-11 22:36:23 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-30 19:45:51 +02:00
										 |  |  |     <% if !@campaign.child_campaign? %> | 
					
						
							| 
									
										
										
										
											2018-05-30 19:16:24 +02:00
										 |  |  |       <aside class='u-marginBottom--15 pastelBox--grey'> | 
					
						
							| 
									
										
										
										
											2018-11-21 17:23:25 -06:00
										 |  |  |         <a class='button u-width--full' target='_blank' if-branded='background-color, dark' href='<%= @campaign.finished? ? "/peer-to-peer?npo_id=#{@nonprofit.id}" : "/peer-to-peer?campaign_id=#{ @peer_to_peer_campaign_param}" %>'> | 
					
						
							| 
									
										
										
										
											2018-05-30 19:16:24 +02:00
										 |  |  |           Start Your Own Campaign for <%= @nonprofit.name %> | 
					
						
							|  |  |  |         </a> | 
					
						
							|  |  |  |       </aside> | 
					
						
							|  |  |  |     <% end %> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:42 -04:00
										 |  |  |     <!-- flimflam gift options javascript gets rendered into this div: --> | 
					
						
							|  |  |  |     <div class='ff-sidebar'></div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		<aside class='u-marginTop--15 pastelBox--grey'> | 
					
						
							|  |  |  | 			<header>Promote This Campaign</header> | 
					
						
							|  |  |  | 			<div class='pastelBox-body'> | 
					
						
							|  |  |  | 				<%= render 'common/social_buttons' %> | 
					
						
							|  |  |  | 			</div> | 
					
						
							|  |  |  | 		</aside> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	</section> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-30 19:45:51 +02:00
										 |  |  |   <% if @campaign.child_campaign? %> | 
					
						
							| 
									
										
										
										
											2018-05-30 19:16:24 +02:00
										 |  |  |     <%= render 'components/fundraising_pages/campaigner_profile', | 
					
						
							|  |  |  |         profile: @campaign.profile, | 
					
						
							|  |  |  |         campaign_name: @campaign.name, | 
					
						
							|  |  |  |         reason_for_supporting: @campaign.reason_for_supporting | 
					
						
							|  |  |  |      %> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-19 13:53:15 -06:00
										 |  |  |     <section class='box u-centered' style="margin-top:20px; margin-bottom:20px;"> | 
					
						
							|  |  |  |       <a class='button--jumbo' target='_blank' if-branded='background-color, dark' href='/peer-to-peer?campaign_id=<%= @peer_to_peer_campaign_param %>'> | 
					
						
							| 
									
										
										
										
											2018-05-30 19:16:24 +02:00
										 |  |  |         Start Your Own Campaign for <%= @nonprofit.name %> | 
					
						
							|  |  |  |       </a> | 
					
						
							|  |  |  |     </section> | 
					
						
							|  |  |  |   <% end %> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:42 -04:00
										 |  |  | 	<section class='box'> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		<div id='js-campaignBody' class='editable' data-path='/nonprofits/<%= @nonprofit.id %>/campaigns/<%= @campaign.id %>.json' data-key='campaign[body]'> | 
					
						
							|  |  |  | 			<%= raw @campaign.body %> | 
					
						
							|  |  |  | 		</div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		<% unless @campaign.hide_activity_feed %> | 
					
						
							|  |  |  | 			<div class='u-marginTop--15 showWhenMobile'> | 
					
						
							|  |  |  | 				<%= render 'components/activity_feed' %> | 
					
						
							|  |  |  | 			</div> | 
					
						
							|  |  |  | 		<% end %> | 
					
						
							|  |  |  | 	</section> | 
					
						
							|  |  |  | </div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <% if current_campaign_editor? %> | 
					
						
							|  |  |  | 	<%= render 'settings_modal' %> | 
					
						
							|  |  |  | 	<%= render 'video_modal' %> | 
					
						
							|  |  |  | 	<%= render 'donations/campaign_new_offline_modal' %> | 
					
						
							|  |  |  | 	<%= render 'campaign_gift_options/manage_modal'%> | 
					
						
							|  |  |  | 	<%= render 'campaign_gift_options/form_modal'%> | 
					
						
							|  |  |  | 	<%= render 'components/upload_background_image', | 
					
						
							|  |  |  | 		end_point: "/nonprofits/#{@nonprofit.id}/campaigns/#{@campaign.id}", | 
					
						
							|  |  |  | 		image_url: @campaign_background_image, | 
					
						
							|  |  |  | 		input_name: 'campaign[background_image]' %> | 
					
						
							| 
									
										
										
										
											2018-07-05 17:50:56 +02:00
										 |  |  |   <%= render 'components/upload_banner_image', | 
					
						
							|  |  |  |     end_point: "/nonprofits/#{@nonprofit.id}/campaigns/#{@campaign.id}", | 
					
						
							|  |  |  | 		image_url: @campaign.banner_image_url, | 
					
						
							|  |  |  | 		input_name: 'campaign[banner_image]' %> | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:42 -04:00
										 |  |  |   <%= render 'components/custom_receipt_modal', | 
					
						
							|  |  |  |     title: 'Campaign Receipt Message', | 
					
						
							|  |  |  |     type: 'campaign', | 
					
						
							|  |  |  |     path: nonprofit_campaign_path(@nonprofit, @campaign), | 
					
						
							|  |  |  |     key: 'campaign[receipt_message]', | 
					
						
							|  |  |  |     text: @campaign.receipt_message %> | 
					
						
							|  |  |  |   <%= render 'components/duplicate_fundraiser_modal', type: 'campaign' %> | 
					
						
							|  |  |  | <% end %> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <%= render 'components/share_modal', name: @campaign.name, type: 'campaign' %> | 
					
						
							|  |  |  | <%= render 'common/email_share_modal', fundraiser: @campaign.name, fundraiser_url: @url  %> |