Sha256: 799f06287c65bd41c6080d56262adeaef00178c01d76d15eb7123b0c8de019d0

Contents?: true

Size: 954 Bytes

Versions: 10

Compression:

Stored size: 954 Bytes

Contents

<h2><%= t("Filter by tag") %></h2>
<ul>
  <% Alchemy::Picture.tag_counts.each do |t| %>
    <% picture_tags = pictures_filtered_by_tag?(t) ? picture_tag_filter(:remove => t) : picture_tag_filter(:add => t) %>
    <%= content_tag 'li', :class => params[:tagged_with].try(:split, ',').try(:include?, t.name) ? 'active' : nil do %>
      <%= link_to(
        "#{t.name} (#{t.count})",
        url_for(
          params.delete_if { |k, v| k == "page" }.merge(
            :action => :index,
            :tagged_with => picture_tags
          )
        ),
        :remote => request.xhr?,
        :class => 'please_wait'
      ) %>
    <% end %>
  <% end %>
</ul>
<% if params[:tagged_with].present? %>
  <%= link_to(
    render_icon('delete-small') + t('Remove tag filter'),
    url_for(params.delete_if { |k, v| k == "tagged_with" }.merge(:action => :index)),
    :remote => request.xhr?,
    :class => 'button small with_icon please_wait'
  ) %>
<% end %>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
alchemy_cms-2.3.2 app/views/alchemy/admin/pictures/_tag_list.html.erb
alchemy_cms-2.4.1 app/views/alchemy/admin/pictures/_tag_list.html.erb
alchemy_cms-2.4.0 app/views/alchemy/admin/pictures/_tag_list.html.erb
alchemy_cms-2.4.rc4 app/views/alchemy/admin/pictures/_tag_list.html.erb
alchemy_cms-2.4.rc2 app/views/alchemy/admin/pictures/_tag_list.html.erb
alchemy_cms-2.4.rc1 app/views/alchemy/admin/pictures/_tag_list.html.erb
alchemy_cms-2.3.1 app/views/alchemy/admin/pictures/_tag_list.html.erb
alchemy_cms-2.4.beta2 app/views/alchemy/admin/pictures/_tag_list.html.erb
alchemy_cms-2.3.0 app/views/alchemy/admin/pictures/_tag_list.html.erb
alchemy_cms-2.3.rc5 app/views/alchemy/admin/pictures/_tag_list.html.erb