Skip to content

Commit

Permalink
Merge pull request #567 from CDLUC3/remove-output-types
Browse files Browse the repository at this point in the history
Remove output types
  • Loading branch information
briri authored Apr 9, 2024
2 parents 5cd1c2a + 1db799a commit b01dc3c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/controllers/api/v3/options_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def contributor_roles

# GET /api/v3/output_types
def output_types
matches = ResearchOutput.output_types
matches = ResearchOutput.output_types.reject { |k, v| %w[event service text workflow].include?(k.downcase) }
matches = matches.map do |key, val|
{
label: key.capitalize.gsub('_', ' '),
Expand Down
6 changes: 6 additions & 0 deletions app/models/draft.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ def to_json_for_registration

distros = dataset['distribution'].is_a?(Hash) ? dataset['distribution'].values : dataset['distribution']
dataset['distribution'] = distros
dataset['distribution'].each do |distro|
next if distro['host'].nil? || !distro['host']['title'].nil?

repo = Repository.find_by(uri: distro['host']['url'])
distro['host']['title'] = repo.name
end
dataset
end

Expand Down
6 changes: 6 additions & 0 deletions react-client/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -494,3 +494,9 @@ dialog {
text-decoration-thickness: 2px;
text-decoration-skip-ink: auto;
}

#App p.dmpui-field-help {
font-size: 0.9rem;
color: #555;
margin-top: -10px;
}
11 changes: 6 additions & 5 deletions react-client/src/pages/plan/research-outputs/researchoutputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ function ResearchOutputs() {

<div className="dmpdui-list dmpdui-list-research ">
<div className="data-heading" data-colname="title">
Title
Proposed Output
</div>
<div className="data-heading" data-colname="personal">
Personal information?
Expand Down Expand Up @@ -282,7 +282,7 @@ function ResearchOutputs() {
<div className="dmpui-form-cols">
<div className="dmpui-form-col">
<TextInput
label="Title"
label="Proposed Output"
type="text"
required="required"
name="title"
Expand Down Expand Up @@ -312,7 +312,7 @@ function ResearchOutputs() {
<div className="dmpui-form-cols">
<div className="dmpui-form-col">
<SizeInput
label="Repository Size"
label="Estimated size of data"
name="size"
id="id_size"
unitOptions={sizeUnits}
Expand All @@ -338,7 +338,7 @@ function ResearchOutputs() {
/>

<TextArea
label="Description"
label="Repository description"
type="text"
inputValue={dataObj.repository.description}
onChange={handleChange}
Expand All @@ -349,7 +349,7 @@ function ResearchOutputs() {
/>

<TextInput
label="URL"
label="Repository URL"
type="text"
required="required"
name="repository_url"
Expand All @@ -360,6 +360,7 @@ function ResearchOutputs() {
disabled={dataObj.repository.isLocked}
hidden={dataObj.repository.isLocked}
/>
<p class="dmpui-field-help">(e.g., "https://dataverse.org/")</p>
</div>
</div>

Expand Down

0 comments on commit b01dc3c

Please sign in to comment.