Skip to content
Snippets Groups Projects

Display buttons to easily access groups

Merged Anusha Ranganathan requested to merge feature/472_crc_1280_button into develop
Files
3
@@ -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