Sha256: dac63a8b0375e934559e02732c788b024b772ae1567eead2cea81abd323e9d3b
Contents?: true
Size: 723 Bytes
Versions: 37
Compression:
Stored size: 723 Bytes
Contents
module ShelvesHelper def library_shelf_facet(current_library, facet) library = Library.where(:name => facet.value).select([:name, :display_name]).first return nil unless library string = '' current = true if current_library.try(:name) == library.name content_tag :li do if current content_tag :strong do link_to("#{library.display_name.localize} (" + facet.count.to_s + ")", url_for(params.merge(:page => nil, :library_id => library.name, :only_path => true))) end else link_to("#{library.display_name.localize} (" + facet.count.to_s + ")", url_for(params.merge(:page => nil, :library_id => library.name, :only_path => true))) end end end end
Version data entries
37 entries across 37 versions & 1 rubygems