forked from ontoportal/ontoportal_web_ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
re-organize the submission form key properties
Added hasCreator, to add hasCreator, description, alternative, publication, released, hasFormalityLevel
- Loading branch information
1 parent
f7b9da9
commit 6a48422
Showing
2 changed files
with
26 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,27 +33,36 @@ | |
= metadata_section('key-properties', 'Key properties', collapsed: false) do | ||
= form_group_attribute("URI", required: true) | ||
= render partial: 'submissions/submission_identifier_form' | ||
%div.agents-inputs | ||
= attribute_form_group_container("hasCreator", required: true) do | ||
= render NestedAgentSearchInputComponent.new(agents: @submission.hasCreator , agent_type: 'person', name_prefix: object_name+'[hasCreator]', | ||
parent_id: '') | ||
%div.agents-inputs | ||
= attribute_form_group_container("publisher", required: true) do | ||
= render NestedAgentSearchInputComponent.new(agents: @submission.publisher , agent_type: '', name_prefix: object_name+'[publisher]', | ||
parent_id: '') | ||
|
||
= form_group_attribute("deprecated") | ||
= form_group_attribute("hasOntologySyntax") do | ||
%p | ||
Properties taken from | ||
= link_to "W3C URIs for file format", "https://www.w3.org/ns/formats/", target: "_blank" | ||
= form_group_attribute('hasCreator', required: true) | ||
= form_group_attribute('publisher', required: true) | ||
|
||
= attribute_form_group_container('description', required: true) do |c| | ||
= text_area c.name, c.method_name, rows: 5, value: @submission.description, required: true, class: "form-control" | ||
|
||
= form_group_attribute('alternative', required: true) | ||
|
||
= form_group_attribute("hasFormalityLevel") do | ||
-# Publications page | ||
= attribute_text_field_container('publication', required: true) do |c| | ||
- c.help do | ||
Enter a URL for a page that lists publications about your ontology. | ||
|
||
= form_group_attribute("released", default: Date.today, required: true) | ||
|
||
= form_group_attribute("hasFormalityLevel", required: true) do | ||
%p | ||
Properties taken from | ||
= link_to "DCMI KOS type vocabularies", "http://wiki.dublincore.org/index.php/NKOS_Vocabularies#KOS_Types_Vocabulary", target: "_blank" | ||
|
||
%div#description-card.mt-4 | ||
= metadata_section('more-description-details', 'More description details', parent_id: "description-card") do | ||
= form_group_attribute("deprecated") | ||
= form_group_attribute("isOfType") | ||
= form_group_attribute("hasOntologySyntax") do | ||
%p | ||
Properties taken from | ||
= link_to "W3C URIs for file format", "https://www.w3.org/ns/formats/", target: "_blank" | ||
|
||
= form_group_attribute("naturalLanguage") do | ||
%p | ||
Consider using a | ||
|
@@ -62,12 +71,6 @@ | |
%br | ||
e.g.: http://lexvo.org/id/iso639-3/eng | ||
|
||
%div#description-card.mt-4 | ||
= metadata_section('description', 'Description', collapsed: !@required_only || [email protected]?) do | ||
-# Description | ||
= attribute_form_group_container('description', required: true) do |c| | ||
= text_area c.name, c.method_name, rows: 5, value: @submission.description, required: true, class: "form-control" | ||
|
||
-# Home page | ||
= attribute_text_field_container('homepage') do |c| | ||
- c.help do | ||
|
@@ -78,18 +81,11 @@ | |
- c.help do | ||
Enter a URL for a page that provides ontology documentation. | ||
|
||
= form_group_attribute('alternative', required: true) | ||
|
||
-# Publications page | ||
= attribute_text_field_container('publication', required: true) do |c| | ||
- c.help do | ||
Enter a URL for a page that lists publications about your ontology. | ||
|
||
-# Used ontology engineering tool | ||
= form_group_attribute("usedOntologyEngineeringTool") | ||
|
||
= metadata_section('more-description-details', 'More description details', parent_id: "description-card") do | ||
- for attr_name in %w[abstract notes keywords alternative] | ||
- for attr_name in %w[abstract notes keywords] | ||
= form_group_attribute(attr_name) | ||
|
||
- data = sections | ||
|
@@ -100,10 +96,8 @@ | |
= form_group_attribute(attr["attribute"]) | ||
|
||
%div#ontology-dates-card.mt-4 | ||
= metadata_section('ontology-dates', 'Dates', collapsed: !@required_only || [email protected]?) do | ||
= form_group_attribute("released", default: Date.today, required: true) | ||
= form_group_attribute("modificationDate") | ||
= metadata_section('more-dates', 'More dates', parent_id: "ontology-dates-card") do | ||
= form_group_attribute("modificationDate") | ||
- for attr in @metadata.select { |m| m['category'] == 'dates' } | ||
= form_group_attribute(attr["attribute"]) | ||
|
||
|