% if preview %>
PREVIEW ONLY
<% end %>
<% @total_photos_count = release.photos.size %>
<% if release.respond_to? :guardian_photo %>
<% @total_photos_count += release.guardian_photo.attached? ? 1 : 0 %>
<% end %>
<% if release.respond_to? :guardian_2_photo %>
<% @total_photos_count += release.guardian_2_photo.attached? ? 1 : 0 %>
<% end %>
<%= t '.heading', count: @total_photos_count %>
<% if preview %>
<%= image_tag dummy_photo, size: "200x200" %>
Dummy photo
<% else %>
<% if release.minor? %>
<%= t '.minor_photos_heading', count: release.photos.size %>
<% end %>
<% release.photos.each do |photo| %>
-
<%= image_tag photo.variant(auto_orient: true, resize: "200x200") %>
<%= photo.filename.to_s %>
<% end %>
<% if release.respond_to?(:guardian_photo) && release.guardian_photo.attached? %>
<%= t '.guardian_photo_heading' %>
-
<%= image_tag release.guardian_photo.variant(auto_orient: true, resize: "200x200") %>
<%= release.guardian_photo.filename.to_s %>
<% end %>
<% if release.respond_to?(:guardian_2_photo) && release.guardian_2_photo.attached? %>
<%= t '.guardian_2_photo_heading' %>
-
<%= image_tag release.guardian_2_photo.variant(auto_orient: true, resize: "200x200") %>
<%= release.guardian_2_photo.filename.to_s %>
<% end %>
<% end %>