houdini/app/views/profiles/_supported_nonprofits.html.erb

33 lines
1.3 KiB
Text
Raw Normal View History

<%- # License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later -%>
<!-- partial start: profile/supported_nonprofits -->
<section class='u-padding--15'>
<h5 class='u-centered'>Supported Nonprofits</h5>
<% if @profile.supporters.empty? %>
<p class='noResults'>None yet</p>
<% else %>
<table class='table--striped u-marginTop--20'>
<% @profile_nonprofits.each do |npo| %>
<tr>
<%# let's make an image server already %>
<td class='u-padding--0 hideWhenMobile u-width--200 u-centered'>
<% if npo['logo'] %>
<img src="https://dmnsmycmdpaix.cloudfront.net/uploads/npo/logo/<%= npo['id'].to_s + '/normal_' + npo['logo'] %>">
<% end %>
</td>
<td class='u-padding--15'>
<h5 class='u-margin--0'>
<a href='<%= npo['url'] %>'><%= npo['name'] %></a>
</h5>
<p class='u-marginBottom--5'><small><strong><%= npo['city'] %>, <%= npo['state_code'] %></strong></small></p>
<p><small><%= npo['summary'] && npo['summary'] != "" ? npo['summary'] : npo['tagline'] %></small></p>
<% npo['categories'] && YAML.load(npo['categories']).each do |category | %>
<span class='tag u-marginBottom--5'><%= category %></span>
<% end %>
</td>
</tr>
<% end %>
</table>
<% end %>
</section>
<!-- partial end: profile/supported_nonprofits -->