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

34 lines
1.4 KiB
Text
Raw Normal View History

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 -%>
<!-- 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 -->