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
Merge requests
!361
Display buttons to easily access groups
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Display buttons to easily access groups
feature/472_crc_1280_button
into
develop
Overview
0
Commits
4
Pipelines
4
Changes
3
Merged
Anusha Ranganathan
requested to merge
feature/472_crc_1280_button
into
develop
2 months ago
Overview
0
Commits
4
Pipelines
4
Changes
3
Expand
fixes
https://gitlab.ruhr-uni-bochum.de/FDM/rdm-system/antleaf-projectmanagement/-/issues/472
0
0
Merge request reports
Viewing commit
05bdc14d
Prev
Next
Show latest version
3 files
+
8
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
05bdc14d
Need to parse yaml file as erb template
· 05bdc14d
Anusha Ranganathan
authored
2 months ago
hyrax/app/helpers/hyrax_helper.rb
+
6
−
2
Options
@@ -215,10 +215,14 @@ module HyraxHelper
def
list_collections_to_display
collections_to_display
=
[]
parsed_file
=
YAML
.
load_file
(
Rails
.
root
.
join
(
'config'
,
'collections_to_display.yml'
))
file_contents
=
File
.
new
(
Rails
.
root
.
join
(
'config'
,
'collections_to_display.yml'
)).
read
template
=
ERB
.
new
file_contents
parsed_file
=
YAML
.
load
(
template
.
result
(
binding
))
parsed_file
[
'collections_to_display'
].
each
do
|
collection_name
|
c
=
Collection
.
where
(
title:
collection_name
).
first
collections_to_display
.
append
({
id:
c
.
id
,
title:
c
.
title
,
url:
dashboard_collection_path
(
c
.
id
)})
collections_to_display
.
append
({
id:
c
.
id
,
title:
c
.
title
&
.
first
,
url:
"/dashboard/collections/
#{
c
.
id
}
"
})
# collections_to_display.append({id: c.id, title: c.title&.first, url: dashboard_collection_path(c.id)})
end
collections_to_display
end
end
Loading