AlchemyCMS/alchemy_cms

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

Summary

Maintainability
Test Coverage
<% content_for(:toolbar) do %>
  <div class="toolbar_buttons">
    <% if can? :create, Alchemy::Attachment %>
      <div class="toolbar_button">
        <%= render 'alchemy/admin/uploader/button',
          redirect_url: alchemy.admin_attachments_path,
          object: Alchemy::Attachment.new,
          file_attribute: 'file' %>
      </div>
    <% end %>
  </div>
  <%= render 'alchemy/admin/partials/search_form' %>
<% end %>

<div id="archive_all" class="with_tag_filter resources-table-wrapper">
  <%= render 'alchemy/admin/resources/table_header' %>
  <%= render 'files_list' %>

  <div id="library_sidebar">
    <%= render 'filter_bar' if resource_has_filters %>

    <% if Alchemy::Attachment.tag_counts.any? %>
      <div class="tag-list with_filter_bar<%= ' filtered' if search_filter_params[:tagged_with].present? %>">
        <%= render 'tag_list' %>
      </div>
    <% end %>
  </div>
</div>