Sha256: a9a286e137f513f788279803c91965c2297ea1fb3b163d6b5c93fa0d41a39602

Contents?: true

Size: 844 Bytes

Versions: 14

Compression:

Stored size: 844 Bytes

Contents

module ItemsHelper
  def circulation_status_facet(facet)
    string = ''
    circulation_status = CirculationStatus.where(name: facet.value).select([:name, :display_name]).first
    if circulation_status
      # string << form_icon(circulation_status)
      current = true if params[:circulation_status] == circulation_status.name
      if current
        content_tag :strong do
          link_to("#{circulation_status.display_name.localize} (" + facet.count.to_s + ")", url_for(filtered_params.merge(circulation_status: circulation_status.name, page: nil, view: nil, only_path: true)))
        end
      else
        link_to("#{circulation_status.display_name.localize} (" + facet.count.to_s + ")", url_for(filtered_params.merge(circulation_status: circulation_status.name, page: nil, view: nil, only_path: true)))
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
enju_circulation-0.3.11 app/helpers/items_helper.rb
enju_circulation-0.3.10 app/helpers/items_helper.rb
enju_circulation-0.3.9 app/helpers/items_helper.rb
enju_circulation-0.3.8 app/helpers/items_helper.rb
enju_circulation-0.3.7 app/helpers/items_helper.rb
enju_circulation-0.3.6 app/helpers/items_helper.rb
enju_circulation-0.3.5 app/helpers/items_helper.rb
enju_circulation-0.3.4 app/helpers/items_helper.rb
enju_circulation-0.3.3 app/helpers/items_helper.rb
enju_circulation-0.3.2 app/helpers/items_helper.rb
enju_circulation-0.3.1 app/helpers/items_helper.rb
enju_circulation-0.3.0 app/helpers/items_helper.rb
enju_circulation-0.3.0.rc.1 app/helpers/items_helper.rb
enju_circulation-0.3.0.beta.1 app/helpers/items_helper.rb