<% if preview %>
  <h1>PREVIEW ONLY</h1>
<% end %>

<p class="heading"><strong><u>Files</u></strong></p>
  <% unless release.description.blank? %>
    <p>
     Description: <%= release.description %> 
    </p>
  <% end %>

  <% photos = release.file_infos.photo %> 
  <% unless photos.empty? %>
    <h3>Photos</h3>
    <ul>
    <% photos.each do |file_info| %>
      <li>
        <%= file_info.filename %> 
      </li>
    <% end %>
    </ul>
  <% end %>

  <% videos = release.file_infos.video %>
  <% unless videos.empty? %>
    <h3>Videos</h3>
    <ul>
    <% videos.each do |file_info| %>
      <li>
          <%= file_info.filename %> 
      </li>
    <% end %>
    </ul>
  <% end %>

  <% other = release.file_infos.other %>
  <% unless other.empty? %>
    <h3>Other files</h3>
    <ul>
      <% other.each do |file_info| %>
        <li>
          <%= file_info.filename %> 
        </li>
      <% end %>
    </ul>
  <% end %>
