Sha256: 09eda87daa38b1cd183b2665322e62bc98c5d8b862c55ec96f593711df85063d

Contents?: true

Size: 580 Bytes

Versions: 2

Compression:

Stored size: 580 Bytes

Contents

module My
  class SharesController < MyController

    self.solr_search_params_logic += [
      :show_only_shared_files,
      :show_only_generic_files
    ]

    def show_only_shared_files(solr_parameters, user_parameters)
      solr_parameters[:fq] ||= []
      solr_parameters[:fq] += [
        "-" + ActiveFedora::SolrQueryBuilder.construct_query_for_rel(depositor: current_user.user_key)
      ]
    end

    def index
      super
      @selected_tab = :shared
    end

    protected

    def search_action_url *args
      sufia.dashboard_shares_url *args
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sufia-6.0.0.rc4 app/controllers/my/shares_controller.rb
sufia-6.0.0.rc3 app/controllers/my/shares_controller.rb