Skip to content
Snippets Groups Projects
Commit 127910a9 authored by Anusha Ranganathan's avatar Anusha Ranganathan
Browse files

Merge branch 'feature/redirect_to_crc_1280_collection' into 'develop'

Redirect_to  CRC 1280 collection page when a user clicks on add new CRC Dataset

See merge request FDM/rdm-system/rdms!204
parents cdfdc314 1e257870
Branches
Tags
1 merge request!204Redirect_to CRC 1280 collection page when a user clicks on add new CRC Dataset
Checking pipeline status
......@@ -15,6 +15,7 @@ module Hyrax
before_action :authorize_collection_access, only: :new
before_action :check_tombstone, only: [:show, :edit]
before_action :redirect_to_default_collection, only:[:new]
def authorize_collection_access
group_id = params[:add_works_to_collection]
......@@ -94,5 +95,13 @@ module Hyrax
curation_concern.complex_subject << new_complex_subject_record
end
end
def redirect_to_default_collection
return if params.has_key?(:add_works_to_collection)
collection = Collection.where(title: ENV.fetch('CRC_1280_COLLECTION', "CRC 1280")).first
flash[:notice] = "You need to navigate to your group to create an experiment."
redirect_to dashboard_collection_path(collection.id)
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment