Skip to content

Commit

Permalink
make ingest link consistent and dynamic #8096
Browse files Browse the repository at this point in the history
We decided the "dataset management" page has more context.

Previously, the standard guides server base URL and "latest" was hard coded.
  • Loading branch information
pdurbin committed Dec 15, 2021
1 parent 65c9fcd commit 5326400
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/main/java/edu/harvard/iq/dataverse/DatasetPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -5805,4 +5805,9 @@ private boolean containsOnlyActivelyEmbargoedFiles(List<FileMetadata> selectedFi
}
return true;
}

public String getIngestMessage() {
return BundleUtil.getStringFromBundle("file.ingestFailed.message", Arrays.asList(settingsWrapper.getGuidesBaseUrl(), settingsWrapper.getGuidesVersion()));
}

}
5 changes: 5 additions & 0 deletions src/main/java/edu/harvard/iq/dataverse/FilePage.java
Original file line number Diff line number Diff line change
Expand Up @@ -1100,4 +1100,9 @@ public String getEmbargoPhrase() {
return BundleUtil.getStringFromBundle("embargoed.willbeuntil");
}
}

public String getIngestMessage() {
return BundleUtil.getStringFromBundle("file.ingestFailed.message", Arrays.asList(settingsWrapper.getGuidesBaseUrl(), settingsWrapper.getGuidesVersion()));
}

}
2 changes: 1 addition & 1 deletion src/main/java/propertyFiles/Bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,7 @@ file.spss-porExtraLabels=Variable Labels
file.spss-porExtraLabels.title=Upload an additional text file with extra variable labels.
file.spss-porExtraLabels.selectToAddBtn=Select File to Add
file.ingestFailed.header=File available in original format only
file.ingestFailed.message=<a href="https://guides.dataverse.org/en/latest/user/tabulardataingest/index.html" title="Tabular Data File Ingest - Dataverse User Guide" target="_blank">Tabular ingest</a> was unsuccessful.
file.ingestFailed.message=<a href="{0}/{1}/user/dataset-management.html#tabular-data-files" title="Tabular Data Files - Dataverse User Guide" target="_blank">Tabular ingest</a> was unsuccessful.
file.downloadBtn.format.all=All File Formats + Information
file.downloadBtn.format.tab=Tab-Delimited
file.downloadBtn.format.original={0} (Original File Format)
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/file.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<span>
<a tabindex="0" role="button" class="glyphicon glyphicon-question-sign tooltip-icon"
data-toggle="popover" data-placement="auto top" data-trigger="focus" data-html="true"
data-content="#{bundle['file.ingestFailed.message']} #{FilePage.fileMetadata.dataFile.ingestReportMessage}"/>
data-content="#{FilePage.ingestMessage} #{FilePage.fileMetadata.dataFile.ingestReportMessage}"/>
</span>
</div>
<!-- END: FILE LEVEL MSGs -->
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/filesFragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@
<span>
<a tabindex="0" role="button" class="glyphicon glyphicon-question-sign tooltip-icon"
data-toggle="popover" data-placement="auto top" data-trigger="focus" data-html="true"
data-content="#{bundle['file.ingestFailed.message']} #{fileMetadata.dataFile.ingestReportMessage}"/>
data-content="#{DatasetPage.ingestMessage} #{fileMetadata.dataFile.ingestReportMessage}"/>
</span>
</div>
<!-- END: FILE LEVEL MSGs -->
Expand Down

0 comments on commit 5326400

Please sign in to comment.