AlchemyCMS/alchemy_cms

View on GitHub
app/views/alchemy/admin/resources/_tag_list.html.erb

Summary

Maintainability
Test Coverage
<div class="tag-list<%= ' with_filter_bar' if resource_has_filters %><%= ' filtered' if search_filter_params[:tagged_with].present? %>">
  <h3><%= Alchemy.t("Filter by tag") %></h3>
  <%= render Alchemy::Admin::ListFilter.new(".tag-list li") %>
  <ul>
    <%= render_tag_list(resource_model.name) %>
  </ul>
  <% if search_filter_params[:tagged_with].present? %>
    <%= link_to(
      render_icon(:times, size: '1x') + Alchemy.t('Remove tag filter'),
      url_for(search_filter_params.except(:tagged_with)),
      remote: request.xhr?,
      class: 'secondary button small with_icon'
    ) %>
  <% end %>
</div>