46 lines
1.6 KiB
Plaintext
46 lines
1.6 KiB
Plaintext
<% if preview %>
|
|
<h1>PREVIEW ONLY</h1>
|
|
<% 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 %>
|
|
<p class="heading"><strong><u><%= t '.heading', count: @total_photos_count %></u></strong></p>
|
|
|
|
<ul>
|
|
<% if preview %>
|
|
<%= image_tag dummy_photo, size: "200x200" %>
|
|
Dummy photo
|
|
<% else %>
|
|
<% if release.minor? %>
|
|
<p class="heading"><strong><%= t '.minor_photos_heading', count: release.photos.size %></strong></p>
|
|
<% end %>
|
|
<% release.photos.each do |photo| %>
|
|
<li>
|
|
<%= image_tag photo.variant(auto_orient: true, resize: "200x200") %><br />
|
|
<%= photo.filename.to_s %>
|
|
</li>
|
|
<% end %>
|
|
<% if release.respond_to?(:guardian_photo) && release.guardian_photo.attached? %>
|
|
<br>
|
|
<p class="heading"><strong><%= t '.guardian_photo_heading' %></strong></p>
|
|
<li>
|
|
<%= image_tag release.guardian_photo.variant(auto_orient: true, resize: "200x200") %><br />
|
|
<%= release.guardian_photo.filename.to_s %>
|
|
</li>
|
|
<% end %>
|
|
<% if release.respond_to?(:guardian_2_photo) && release.guardian_2_photo.attached? %>
|
|
<br>
|
|
<p class="heading"><strong><%= t '.guardian_2_photo_heading' %></strong></p>
|
|
<li>
|
|
<%= image_tag release.guardian_2_photo.variant(auto_orient: true, resize: "200x200") %><br />
|
|
<%= release.guardian_2_photo.filename.to_s %>
|
|
</li>
|
|
<% end %>
|
|
<% end %>
|
|
</ul>
|
|
|