| 
									
										
										
										
											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
										 |  |  | <div class='u-marginBottom--15 u-relative'> | 
					
						
							|  |  |  | 	<% has_video =  @campaign.vimeo_video_id || @campaign.youtube_video_id %> | 
					
						
							|  |  |  | 	<% text = has_video ? "Edit Video" : "Add Video" %> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	<% if @campaign.vimeo_video_id %> | 
					
						
							|  |  |  | 		<div class='campaignMedia-video' if-branded='background, lightest'> | 
					
						
							| 
									
										
										
										
											2019-05-06 11:22:08 -05:00
										 |  |  | 			<iframe src="https://player.vimeo.com/video/<%= @campaign.vimeo_video_id %>" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:42 -04:00
										 |  |  | 		</div> | 
					
						
							|  |  |  | 	<% elsif @campaign.youtube_video_id %> | 
					
						
							|  |  |  | 		<div class='campaignMedia-video' if-branded='background, lightest'> | 
					
						
							|  |  |  | 			<%= render 'components/media/youtube_iframe', id: @campaign.youtube_video_id %> | 
					
						
							|  |  |  | 		</div> | 
					
						
							| 
									
										
										
										
											2020-05-15 14:01:59 -05:00
										 |  |  | 	<% elsif @campaign.main_image.attached? %> | 
					
						
							|  |  |  | 		<%= image_tag @campaign.main_image_by_size(:normal), class: 'campaignMedia-image' %> | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:42 -04:00
										 |  |  | 	<% end %> | 
					
						
							|  |  |  | </div> |