From c59856b7159979d4ea8ab7c393e8c3440982125b Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Mon, 20 Apr 2020 18:39:49 +0200 Subject: [PATCH] add additional parameters to cursor-based pagination. #476 --- app/controllers/dois_controller.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/controllers/dois_controller.rb b/app/controllers/dois_controller.rb index 039a37a30..b92e6dece 100644 --- a/app/controllers/dois_controller.rb +++ b/app/controllers/dois_controller.rb @@ -216,7 +216,24 @@ def index "provider-id" => params[:provider_id], "consortium-id" => params[:consortium_id], "client-id" => params[:client_id], + "funder-id" => params[:funder_id], + "affiliation-id" => params[:affiliation_id], + "resource-type-id" => params[:resource_type_id], + prefix: params[:prefix], certificate: params[:certificate], + created: params[:created], + registered: params[:registered], + "has-citations" => params[:has_citations], + "has-references" => params[:has_references], + "has-parts" => params[:has_parts], + "has-part-of" => params[:has_part_of], + "has-versions" => params[:has_versions], + "has-version-of" => params[:has_version_of], + "has-views" => params[:has_views], + "has-downloads" => params[:has_downloads], + "has-person" => params[:has_person], + "has-affiliation" => params[:has_affiliation], + "has-funder" => params[:has_funder], # The cursor link should be an array of values, but we want to encode it into a single string for the URL "page[cursor]" => page[:cursor] ? make_cursor(results) : nil, "page[number]" => page[:cursor].nil? && page[:number].present? ? page[:number] + 1 : nil,