Sha256: b22678d3d44da5c17d56b092d56c0c245a4ebef6bcbd28ab018e906149ec6a9e

Contents?: true

Size: 1.09 KB

Versions: 37

Compression:

Stored size: 1.09 KB

Contents

# View Helpers for Hydra Batch Edit functionality
module BatchSelectHelper
  # determines if the given document id is in the batch
  # def item_in_batch?(doc_id)
  #   session[:batch_document_ids] && session[:batch_document_ids].include?(doc_id) ? true : false
  # end

  # Displays the batch edit tools.  Put this in your search result page template.  We recommend putting it in catalog/_sort_and_per_page.html.erb
  def batch_select_tools
    render partial: '/batch_select/tools'
  end

  # Displays the button to select/deselect items for your batch.  Call this in the index partial that's rendered for each search result.
  # @param [Hash] document the Hash (aka Solr hit) for one Solr document
  def button_for_add_to_batch(document)
    render partial: '/batch_select/add_button', locals: { document: document }
  end

  # Displays the check all button to select/deselect items for your batch.  Put this in your search result page template.  We put it in catalog/index.html
  def batch_check_all(label = 'Use all results')
    render partial: '/batch_select/check_all', locals: { label: label }
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
curation_concerns-1.5.0 app/helpers/batch_select_helper.rb
curation_concerns-1.4.0 app/helpers/batch_select_helper.rb
curation_concerns-1.3.3 app/helpers/batch_select_helper.rb
curation_concerns-1.3.2 app/helpers/batch_select_helper.rb
curation_concerns-1.3.1 app/helpers/batch_select_helper.rb
curation_concerns-1.3.0 app/helpers/batch_select_helper.rb
curation_concerns-1.2.0 app/helpers/batch_select_helper.rb
curation_concerns-1.1.2 app/helpers/batch_select_helper.rb
curation_concerns-1.1.1 app/helpers/batch_select_helper.rb
curation_concerns-1.1.0 app/helpers/batch_select_helper.rb
curation_concerns-1.0.0 app/helpers/batch_select_helper.rb
curation_concerns-1.0.0.beta10 app/helpers/batch_select_helper.rb
curation_concerns-1.0.0.beta9 app/helpers/batch_select_helper.rb
curation_concerns-1.0.0.beta8 app/helpers/batch_select_helper.rb
curation_concerns-1.0.0.beta7 app/helpers/batch_select_helper.rb
curation_concerns-1.0.0.beta6 app/helpers/batch_select_helper.rb
curation_concerns-1.0.0.beta5 app/helpers/batch_select_helper.rb
curation_concerns-1.0.0.beta4 app/helpers/batch_select_helper.rb
curation_concerns-1.0.0.beta3 app/helpers/batch_select_helper.rb
curation_concerns-1.0.0.beta2 app/helpers/batch_select_helper.rb