diff --git a/src/main/java/edu/harvard/iq/dataverse/FilePage.java b/src/main/java/edu/harvard/iq/dataverse/FilePage.java index b63e611d3ff..382a0c7322d 100644 --- a/src/main/java/edu/harvard/iq/dataverse/FilePage.java +++ b/src/main/java/edu/harvard/iq/dataverse/FilePage.java @@ -1372,15 +1372,19 @@ public boolean isCantRequestDueToEmbargo() { public String getEmbargoPhrase() { //Should only be getting called when there is an embargo + StringBuilder sb = new StringBuilder(); if(file.isReleased()) { if(FileUtil.isActivelyEmbargoed(file)) { - return BundleUtil.getStringFromBundle("embargoed.until"); + sb.append(BundleUtil.getStringFromBundle("embargoed.until")); } else { - return BundleUtil.getStringFromBundle("embargoed.wasthrough"); + sb.append(BundleUtil.getStringFromBundle("embargoed.wasthrough")); } } else { - return BundleUtil.getStringFromBundle("embargoed.willbeuntil"); + sb.append(BundleUtil.getStringFromBundle("embargoed.willbeuntil")); } + sb.append(" "); + sb.append(file.getEmbargo().getFormattedDateAvailable()); + return sb.toString(); } public boolean isValidRetentionSelection() { @@ -1494,15 +1498,21 @@ public boolean isCantRequestDueToRetention() { public String getRetentionPhrase() { //Should only be getting called when there is a retention + StringBuilder sb = new StringBuilder(); if(file.isReleased()) { if(FileUtil.isRetentionExpired(file)) { - return BundleUtil.getStringFromBundle("retention.after"); + sb.append(BundleUtil.getStringFromBundle("retention.after")); } else { - return BundleUtil.getStringFromBundle("retention.isfrom"); + sb.append(BundleUtil.getStringFromBundle("retention.isfrom")); } } else { - return BundleUtil.getStringFromBundle("retention.willbeafter"); + sb.append(BundleUtil.getStringFromBundle("retention.willbeafter")); } + sb.append(" "); + sb.append(file.getRetention().getFormattedDateUnavailable()); + sb.append(", "); + sb.append(BundleUtil.getStringFromBundle("retention.enddateinfo")); + return sb.toString(); } public String getToolTabTitle(){ diff --git a/src/main/webapp/file.xhtml b/src/main/webapp/file.xhtml index 07f70d68dfb..5d8694c2fde 100644 --- a/src/main/webapp/file.xhtml +++ b/src/main/webapp/file.xhtml @@ -557,11 +557,9 @@