Sha256: aa58b3dda5e3b69f2e15d5bf0a1a39420b1ad19caac42f21b581b345a484898f
Contents?: true
Size: 825 Bytes
Versions: 5
Compression:
Stored size: 825 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(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(params.merge(circulation_status: circulation_status.name, page: nil, view: nil, only_path: true))) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems