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