| 
									
										
										
										
											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
										 |  |  | <table class='table--striped u-marginBottom--0'> | 
					
						
							| 
									
										
										
										
											2018-11-19 16:15:56 -06:00
										 |  |  |    <% campaigns.each do |campaign|%> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <% metric = QueryCampaignMetrics.on_donations(campaign.id) %> | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:42 -04:00
										 |  |  |     <tr> | 
					
						
							|  |  |  |       <td class='u-padding--0 u-width--200 u-hideIf--400'> | 
					
						
							| 
									
										
										
										
											2020-05-15 14:01:59 -05:00
										 |  |  |       <% if campaign.main_image.attached?%> | 
					
						
							|  |  |  |         <%= image_tag campaign.main_image_by_size(:normal) %> | 
					
						
							|  |  |  |       <% end %> | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:42 -04:00
										 |  |  |       </td> | 
					
						
							|  |  |  |       <td class='u-padding--10'> | 
					
						
							|  |  |  |         <% if campaign.end_datetime %> | 
					
						
							|  |  |  |           <p class='u-marginBottom--0'> | 
					
						
							|  |  |  |             <small><strong>Until: <%= Format::Date.full(campaign.end_datetime, campaign.nonprofit.timezone) %> </strong></small> | 
					
						
							|  |  |  |           </p> | 
					
						
							|  |  |  |         <% end %> | 
					
						
							|  |  |  |         <h6 class='u-marginTop--0 u-marginBottom--5'> | 
					
						
							|  |  |  |           <a if-branded='color, darker' href='<%= campaign.url %>'><%= campaign.name %></a> | 
					
						
							|  |  |  |         </h6> | 
					
						
							|  |  |  |         <p class='u-marginBottom--15'> | 
					
						
							|  |  |  |           <small><%= campaign.summary ? strip_tags(campaign.summary) : strip_tags(campaign.tagline) %></small> | 
					
						
							|  |  |  |         </p> | 
					
						
							|  |  |  |         <% if campaign.show_total_count %> | 
					
						
							| 
									
										
										
										
											2018-11-19 16:15:56 -06:00
										 |  |  |           <span class='pastelBox--white u-padding--3'><%= metric['supporters_count'] %> <small>supporters</small></span> | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:42 -04:00
										 |  |  |         <% end %> | 
					
						
							|  |  |  |         <% if campaign.show_total_raised %> | 
					
						
							|  |  |  |           <span class='pastelBox--white u-padding--3'> | 
					
						
							| 
									
										
										
										
											2018-11-19 16:15:56 -06:00
										 |  |  |             <%= print_currency metric['total_raised'], campaign.nonprofit.currency_symbol %> <small>raised</small> | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:42 -04:00
										 |  |  |           </span> | 
					
						
							|  |  |  |         <% end %> | 
					
						
							|  |  |  |       </td> | 
					
						
							|  |  |  |     </tr> | 
					
						
							|  |  |  |   <% end %> | 
					
						
							|  |  |  | </table> |