app/controllers/collections_controller.rb
# When you're going to show a bunch of collection items and provide sorting and filtering capabilities:
When you're going to show a bunch of collection items and provide sorting and filtering capabilities.
When you ' re going to show a bunch of collection items and provide sorting and filtering capabilities .
def configure_sorting_and_filtering_and_facet_counts
    set_view_as_options
    @view_as = params[:view_as].blank? ? @collection.view_style_or_default : ViewStyle.find(params[:view_as])
    set_sort_options
    @sort_by = params[:sort_by].blank? ? @collection.sort_style_or_default : SortStyle.find(params[:sort_by])
    @filter = params[:filter]
    @page = params[:page]
    @selected_collection_items = params[:collection_items] || []
    @facet_counts = EOL::Solr::CollectionItems.get_facet_counts(@collection.id)
  end
def configure_sorting_and_filtering_and_facet_counts set_view_as_options @view_as = params [ :view_as ] . blank? ? @collection . view_style_or_default : ViewStyle . find ( params [ :view_as ] ) set_sort_options @sort_by = params [ :sort_by ] . blank? ? @collection . sort_style_or_default : SortStyle . find ( params [ :sort_by ] ) @filter = params [ :filter ] @page = params [ :page ] @selected_collection_items = params [ :collection_items ] || [ ] @facet_counts = EOL :: Solr :: CollectionItems . get_facet_counts ( @collection . id ) end
When you're going to show a bunch of collection items and provide sorting and filtering capabilities:
When you ' re going to show a bunch of collection items and provide sorting and filtering capabilities :
# NOTE - you still need these counts on the Update page: