Commit c2490324 authored by Bruno Nocera Zanette's avatar Bruno Nocera Zanette

add Secondary arg's name for initialization vars

These secondary names facilitate the creation of form entries like:

<%= f.input :short_description, label: 'Short Description:' %>

The additional arg names are:

copyrightText -> copyright_text
introductoryText -> introductory_text
shortDescription -> short_description
sidebarText -> sidebar_text
bundleName -> bundle_name
parent f6dc2720
......@@ -14,7 +14,7 @@ module Dspace
@name = args['name']
@type = args['type']
@link = args['link']
@bundle_name = args['bundleName']
@bundle_name = args['bundleName'] || args['bundle_name']
@description = args['description']
@format = args['format']
@mime_type = args['mimeType']
......
......@@ -17,10 +17,10 @@ module Dspace
@link = args['link']
@logo = args['logo']
@license = args['license']
@copyright_text = args['copyrightText']
@introductory_text = args['introductoryText']
@short_description = args['shortDescription']
@sidebar_text = args['sidebarText']
@copyright_text = args['copyrightText'] || args['copyright_text']
@introductory_text = args['introductoryText'] || args['introductory_text']
@short_description = args['shortDescription'] || args['short_description']
@sidebar_text = args['sidebarText'] || args['sidebar_text']
@number_items = args['numberItems']
@expand = args['expand']
......
......@@ -15,10 +15,10 @@ module Dspace
@link = args['link']
@logo = args['logo']
@parent_community = Dspace::Community.new(args['parentCommunity']) unless args['parentCommunity'].nil?
@copyright_text = args['copyrightText']
@introductory_text = args['introductoryText']
@short_description = args['shortDescription']
@sidebar_text = args['sidebarText']
@copyright_text = args['copyrightText'] || args['copyright_text']
@introductory_text = args['introductoryText'] || args['introductory_text']
@short_description = args['shortDescription'] || args['short_description']
@sidebar_text = args['sidebarText'] || args['sidebar_text']
@count_items = args['countItems']
@sub_communities = Dspace::Builders::ModelBuilder.build_communities(args['subcommunities']) unless args['subcommunities'].nil?
@collections = Dspace::Builders::ModelBuilder.build_collections(args['collections']) unless args['collections'].nil?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment