<%- # 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 -%>
<% content_for :title_suffix do %>
   - Donor Fundraisers (P2P)
<% end %>

<%= content_for :javascripts do %>
	<%= javascript_pack_tag 'i18n', 'page__profiles__fundraisers'%>
<% end %>

<% content_for(:footer_hidden) {'hidden'} %>

<% content_for :stylesheets do %>
	<%= stylesheet_link_tag 'profiles/show/page' %>
<% end %>

<header class='header stripe--orange'>
	<div class='container'>
		<% supporter = (@profile.supporters && @profile.supporters.length != 0) ? supporter : false %>
		<h4>Fundraisers
			<% if supporter %>
				<small>(<%= supporter.name ? supporter.name : supporter.email %>)</small>
			<% else %>
				<small>(<%= @profile.name ? @profile.name : @profile.email %>)</small>
			<% end %>
		</h4>
		<%= render 'profiles/profile_tabs', profile_id: @profile.id, active: :fundraisers %>
	</div>
</header>

<div class='container u-padding--15 u-marginBottom--50'>

  <h3 class='u-centered u-marginTop--30'>Managed Campaigns</h3>
  <% if @edited_campaigns.any? %>
    <%= render 'campaigns/campaigns_table',  campaigns: @edited_campaigns %>
  <% else %>
		<p class='noResults'>None currently</p>
  <% end %>
</div>