Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
RDMS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
researchdata
RDMS
Commits
1e257870
Commit
1e257870
authored
1 year ago
by
Kapil Patel
Committed by
Anusha Ranganathan
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Redirect_to CRC 1280 collection page when a user clicks on add new CRC Dataset
parent
cdfdc314
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!204
Redirect_to CRC 1280 collection page when a user clicks on add new CRC Dataset
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hyrax/app/controllers/hyrax/crc_datasets_controller.rb
+9
-0
9 additions, 0 deletions
hyrax/app/controllers/hyrax/crc_datasets_controller.rb
with
9 additions
and
0 deletions
hyrax/app/controllers/hyrax/crc_datasets_controller.rb
+
9
−
0
View file @
1e257870
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment