Sha256: a292428fd2e9fa2d508543444e7e9ce30b0bba5b01185e422d966942c28c5287
Contents?: true
Size: 824 Bytes
Versions: 13
Compression:
Stored size: 824 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
13 entries across 13 versions & 1 rubygems