Sha256: cc608b9988569a5c3bcfbb7fcb046c9aca83512f1f5b2468d37b1cc33f48cd94

Contents?: true

Size: 600 Bytes

Versions: 5

Compression:

Stored size: 600 Bytes

Contents

module My
  class HighlightsController < MyController

    self.solr_search_params_logic += [
      :show_only_highlighted_files
    ]

    def show_only_highlighted_files(solr_parameters, user_parameters)
      ids = current_user.trophies.pluck(:generic_file_id)
      solr_parameters[:fq] ||= []
      solr_parameters[:fq] += [
        ActiveFedora::SolrQueryBuilder.construct_query_for_ids(ids)
      ]
    end

    def index
      super
      @selected_tab = :highlighted
    end
  
    protected
    
    def search_action_url *args
      sufia.dashboard_highlights_url *args
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sufia-6.0.0.rc4 app/controllers/my/highlights_controller.rb
sufia-6.0.0.rc3 app/controllers/my/highlights_controller.rb
sufia-6.0.0.rc2 app/controllers/my/highlights_controller.rb
sufia-6.0.0.rc1 app/controllers/my/highlights_controller.rb
sufia-6.0.0.beta1 app/controllers/my/highlights_controller.rb