From 7fc79d265bf52088559f8c67e33f661d89ce127a Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Thu, 13 Jun 2019 06:27:22 +0200 Subject: [PATCH] don't show crossref dois in search. datacite/levriero#56 --- app/controllers/members_controller.rb | 10 +++++++++- app/controllers/providers_controller.rb | 10 +++++++++- app/controllers/works_controller.rb | 1 + 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb index b710b2270..07efa0c2c 100644 --- a/app/controllers/members_controller.rb +++ b/app/controllers/members_controller.rb @@ -18,7 +18,15 @@ def index elsif params[:ids].present? response = Provider.find_by_id(params[:ids], page: page, sort: sort) else - response = Provider.query(params[:query], exclude_registration_agencies: true, year: params[:year], region: params[:region], organization_type: params[:organization_type], focus_area: params[:focus_area], fields: params[:fields], page: page, sort: sort) + response = Provider.query(params[:query], + exclude_registration_agencies: true, + year: params[:year], + region: params[:region], + organization_type: params[:organization_type], + focus_area: params[:focus_area], + fields: params[:fields], + page: page, + sort: sort) end begin diff --git a/app/controllers/providers_controller.rb b/app/controllers/providers_controller.rb index d248ff428..2d6219fc1 100644 --- a/app/controllers/providers_controller.rb +++ b/app/controllers/providers_controller.rb @@ -25,7 +25,15 @@ def index elsif params[:ids].present? response = Provider.find_by_id(params[:ids], page: page, sort: sort) else - response = Provider.query(params[:query], year: params[:year], region: params[:region], member_type: params[:member_type], organization_type: params[:organization_type], focus_area: params[:focus_area], page: page, sort: sort) + response = Provider.query(params[:query], + exclude_registration_agencies: params[:exclude_registration_agencies], + year: params[:year], + region: params[:region], + member_type: params[:member_type], + organization_type: params[:organization_type], + focus_area: params[:focus_area], + page: page, + sort: sort) end begin diff --git a/app/controllers/works_controller.rb b/app/controllers/works_controller.rb index 6214b3a09..32a227517 100644 --- a/app/controllers/works_controller.rb +++ b/app/controllers/works_controller.rb @@ -33,6 +33,7 @@ def index response = Doi.find_by_id(params[:ids], page: page, sort: sort) else response = Doi.query(params[:query], + exclude_registration_agencies: true, state: "findable", created: params[:created], registered: params[:registered],