2020-06-12 20:03:43 +00: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 17:30:42 +00:00
<% content_for :head do %>
<meta name="viewport" content="width=device-width, user-scalable=no">
<% end %>
<% content_for :stylesheets do %>
<%= stylesheet_link_tag 'campaigns/peer_to_peer/page' %>
<% end %>
<% content_for :javascripts do %>
<script>
2018-05-30 19:58:41 +00:00
<% if @nonprofit %>
2018-05-16 19:25:16 +00:00
appl.def('selected_result', {
2018-05-30 19:58:41 +00:00
name: '<%= @nonprofit.name.html_safe %>',
id: <%= @nonprofit.id %>,
2018-05-16 19:25:16 +00:00
modal_id: 'newCampaign'
})
2018-05-30 19:58:41 +00:00
app.nonprofit_id = <%= @nonprofit.id %>
<% elsif @parent_campaign %>
2018-05-16 19:25:16 +00:00
appl.def('selected_result', {
2018-05-30 19:58:41 +00:00
name: '<%= @parent_campaign.nonprofit.name.html_safe %>',
parent_campaign_id: <%= @parent_campaign.id %>,
campaign_name: '<%= @parent_campaign.name %>',
2018-05-16 19:25:16 +00:00
modal_id: 'newPeerToPeerCampaign'
})
2018-05-30 19:58:41 +00:00
app.nonprofit_id = <%= @parent_campaign.nonprofit.id %>
2018-03-25 17:30:42 +00:00
<% end %>
<% if current_user %>
appl.def('is_logged_in', true)
appl.def('is_confirmed', <%= !current_user.confirmed_at.nil? %>)
appl.def('user', {
2018-05-30 19:58:41 +00:00
name: '<%= current_user.profile.name || current_user.email %>',
2018-03-25 17:30:42 +00:00
id: <%= current_user.id %>
})
<% end %>
</script>
2021-01-05 22:45:35 +00:00
<%= javascript_pack_tag 'i18n', 'page__campaigns__peer_to_peer' %>
2018-03-25 17:30:42 +00:00
<% end %>
2018-07-05 14:11:08 +00:00
<% if @parent_campaign && @parent_campaign.banner_image_url %>
2018-05-30 19:58:41 +00:00
<div class='campaign-banner u-margin'>
<img src='<%= @parent_campaign.banner_image_url %>'>
</div>
<% end %>
2018-03-25 17:30:42 +00:00
<main>
<header class='u-paddingX--15 container'>
2018-05-16 19:25:16 +00:00
<h1>Start my campaign</h1>
2018-03-25 17:30:42 +00:00
</header>
<hr>
<div class='container u-paddingRight--10'>
<table><tr>
<td class='u-padding--15'>
<i class='icon icon-bicycle u-fontSize--50'></i>
</td>
<td>
2018-05-16 19:25:16 +00:00
<h5 class='u-paddingLeft--20'>Below is a roadmap to get you started with your campaign</h5>
2018-03-25 17:30:42 +00:00
</td>
</tr></table>
<ul class='u-paddingLeft--10 timeline--checklist'>
2018-05-30 19:58:41 +00:00
<% if @parent_campaign.present? %>
2018-05-16 19:25:16 +00:00
<li>
<!--= set_attr_if selected_result 'class' 'is-complete' -->
<span class='annot'>10 seconds</span>
<p class='strong u-marginBottom--15'>My campaign</p>
<div class='u-paddingLeft--20 u-maxWidth--500'>
2018-05-30 19:58:41 +00:00
<h4><%= @parent_campaign.name %></h4>
2018-05-16 19:25:16 +00:00
</div>
</li>
2018-11-21 18:49:24 +00:00
<% elsif @nonprofit.present?%>
<li>
<!--= set_attr_if selected_result 'class' 'is-complete' -->
<span class='annot'>10 seconds</span>
<p class='strong u-marginBottom--15'>My nonprofit</p>
<div class='u-paddingLeft--20 u-maxWidth--500'>
<h4><%= @nonprofit.name %></h4>
</div>
</li>
2018-05-16 19:25:16 +00:00
<% else %>
<li>
<!--= set_attr_if selected_result 'class' 'is-complete' -->
<span class='annot'>10 seconds</span>
<p class='strong u-marginBottom--15'>Search for a nonprofit that you want to fundraise for</p>
<div class='u-paddingLeft--20 u-maxWidth--500'>
<%= render 'search_for_npo' %>
</div>
</li>
<% end %>
2018-03-25 17:30:42 +00:00
<li>
<!--= set_attr_if is_logged_in 'class' 'is-complete' -->
<span class='annot'>1 minute</span>
<p class='strong u-marginBottom--15'>Sign Up or Login</p>
<div class='u-paddingLeft--20 u-maxWidth--500'>
<div>
<!--= hide_if is_logged_in -->
<%= render 'components/forms/sign_up_or_login_tabs' %>
</div>
<p class='pastelBox--green u-padding--5'>
<!--= show_if is_logged_in -->
<strong><!--= put user.name --></strong>, you're logged in.
</p>
</div>
</li>
<li>
<!--= set_attr_if is_confirmed 'class' 'is-complete' -->
<span class='annot'>1 minute</span>
<p class='strong u-marginBottom--15'>Confirm your account</p>
<div class='u-paddingLeft--20 u-maxWidth--500'>
<p>
<!--= hide_if is_confirmed -->
2020-06-10 22:31:47 +00:00
Simply click the confirmation link in the email we sent you when you created your <%= Houdini.general.name %> account.
2018-11-21 19:00:40 +00:00
<br/><br/>
Once you've clicked the confirmation link, come back here and <a href="javascript:window.location.reload(true)">reload this page</a>.
2018-03-25 17:30:42 +00:00
</p>
<p class='pastelBox--green u-padding--5'>
<!--= show_if is_confirmed -->
<strong><!--= put user.name --></strong>, you're confirmed.
</p>
</div>
</li>
<li>
2018-05-30 20:25:16 +00:00
<% if !@child_campaign %>
<p class='strong u-marginBottom--15'>Start your campaign</p>
<span class='annot'>5 minutes</span>
<div class='u-paddingLeft--20 u-maxWidth--500'>
<p>Use our simple wizard to create your campaign for
<strong>
<!--= show_if selected_result -->
<!--= put selected_result.name -->.
</strong>
<strong>
<!--= hide_if selected_result -->
your favorite nonprofit.
</strong>
</p>
<p><small>If you need any further help setting up your campaign, check out <a target='_blank' href='/help/peer-to-peer-campaigns-essentials-package-feature'>this handy article</a>.</small></p>
<div class='u-centered u-padding--15'>
<button class='button orange'>
<!--= show_if (all is_logged_in is_confirmed selected_result) -->
<!--= on 'click' (open_modal selected_result.modal_id) -->
Start Campaign
</button>
</div>
2018-03-25 17:30:42 +00:00
</div>
2018-05-30 20:25:16 +00:00
<% else %>
2019-02-05 22:58:01 +00:00
<% if @child_campaign.deleted %>
<p>
Seems like you already have a campaign for that cause! <%= link_to "Click here to reactivate your campaign", "javascript:appl.undelete_p2p(\"/nonprofits/#{@child_campaign.nonprofit_id}/campaigns/#{@child_campaign.id}\")" %>
</p>
<% else %>
<p>
Seems like you already have a campaign for that cause! <%= link_to "Click here to see it", @child_campaign.url %>.
</p>
<% end %>
2018-05-30 20:25:16 +00:00
<% end %>
2018-03-25 17:30:42 +00:00
</li>
2018-05-30 20:25:16 +00:00
2018-03-25 17:30:42 +00:00
</ul>
</div>
</main>
<% if current_user %>
2018-05-30 19:58:41 +00:00
<% if @nonprofit.present? %>
2018-05-16 19:25:16 +00:00
<%= render 'campaigns/new_modal' %>
2018-05-30 19:58:41 +00:00
<% elsif @parent_campaign.present? %>
2018-05-16 19:25:16 +00:00
<%= render 'campaigns/new_peer_to_peer_modal' %>
<% end %>
2018-03-25 17:30:42 +00:00
<% end %>