AlchemyCMS/alchemy_cms

View on GitHub
app/views/alchemy/admin/attachments/_overlay_file_list.html.erb

Summary

Maintainability
Test Coverage
<% if @attachments.empty? %>
  <%= render_message do %>
    <% if search_filter_params[:q].present? %>
      <%= Alchemy.t(:no_search_results) %>
    <% else %>
      <%= Alchemy.t(:no_files_in_archive) %>
    <% end %>
  <% end %>
<% else %>
  <ul class="list">
    <li class="list-header">
      <span class="list-primary">
        <%= Alchemy::Attachment.human_attribute_name('name') %>
      </span>
      <span class="list-secondary">
        <%= Alchemy::Attachment.human_attribute_name('file_mime_type') %>
      </span>
    </li>
    <%= render partial: 'file_to_assign', collection: @attachments %>
  </ul>
  <%= paginate @attachments, theme: 'alchemy', remote: true %>
<% end %>