Sha256: 666a8cb4ca6f042cd57e64172578edc9b32e5c55221085d9e2801a0d2d22719e

Contents?: true

Size: 1.05 KB

Versions: 9

Compression:

Stored size: 1.05 KB

Contents

<% p = params.dup %>
<h2><%= _t("Filter by tag") %></h2>
<%#= js_filter_field :onkeyup => "Alchemy.ListFilter('#tag_list li')", :id => 'tag_list_filter' %>
<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', :name => t.name, :class => p[:tagged_with].try(:split, ',').try(:include?, t.name) ? 'active' : nil do %>
      <%= link_to(
        "#{t.name} (#{t.count})",
        url_for(
          p.delete_if { |k, v| k == "page" }.merge(
            :action => :index,
            :tagged_with => picture_tags
          )
        ),
        :remote => request.xhr?,
        :class => 'please_wait'
      ) %>
    <% end %>
  <% end %>
</ul>
<% if p[:tagged_with].present? %>
  <%= link_to(
    render_icon('delete-small') + _t('Remove tag filter'),
    url_for(p.delete_if { |k, v| k == "tagged_with" }.merge(:action => :index)),
    :remote => request.xhr?,
    :class => 'button small with_icon please_wait'
  ) %>
<% end %>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
alchemy_cms-2.5.3.1 app/views/alchemy/admin/pictures/_tag_list.html.erb
alchemy_cms-2.5.3 app/views/alchemy/admin/pictures/_tag_list.html.erb
alchemy_cms-2.5.2.2 app/views/alchemy/admin/pictures/_tag_list.html.erb
alchemy_cms-2.5.2.1 app/views/alchemy/admin/pictures/_tag_list.html.erb
alchemy_cms-2.5.2 app/views/alchemy/admin/pictures/_tag_list.html.erb
alchemy_cms-2.5.1 app/views/alchemy/admin/pictures/_tag_list.html.erb
alchemy_cms-2.5.0 app/views/alchemy/admin/pictures/_tag_list.html.erb
alchemy_cms-2.5.0.rc3 app/views/alchemy/admin/pictures/_tag_list.html.erb
alchemy_cms-2.5.0.b9 app/views/alchemy/admin/pictures/_tag_list.html.erb