Sha256: 1acf029f1908317dccccb0563c189a058f942e0b5452c22c9f7cbe2c6404f990
Contents?: true
Size: 669 Bytes
Versions: 1
Compression:
Stored size: 669 Bytes
Contents
module Worthwhile::CollectionsHelper def has_collection_search_parameters? params[:cq].present? end def collection_modal_id(collectible) "#{collectible.to_param.gsub(/:/, '-')}-modal" end def link_to_select_collection(collectible, opts={}) html_class = opts[:class] link_to add_member_form_collections_path(collectible_id: collectible.id), data: { toggle: "modal", target: '#' + collection_modal_id(collectible) }, class: "add-to-collection #{html_class}", title: "Add #{collectible.human_readable_type} to Collection" do raw('<span class="glyphicon glyphicon-folder-open"></span> Add to a Collection') end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
worthwhile-0.0.1 | app/helpers/worthwhile/collections_helper.rb |