Skip to content

Commit

Permalink
#4610 fix warning message; suppress download button when file exists
Browse files Browse the repository at this point in the history
  • Loading branch information
sekmiller committed Oct 1, 2018
1 parent 09fb45e commit f4c0f1f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions src/main/webapp/editFilesFragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,22 @@
<div class="panel-body" jsf:id="httpUploadDisabledDueToExistingRsyncPackage" jsf:rendered="#{EditDatafilesPage.workingVersion.hasPackageFile and !EditDatafilesPage.dataset.released}">
<p class="help-block">
<span class="glyphicon glyphicon-warning-sign text-warning"></span>
<h:outputFormat class="text-danger" value=" #{bundle['file.rsyncUpload.httpUploadDisabledDueToRsyncFileExisting']}">
<f:param value="#{settingsWrapper.supportTeamEmail}"/>
<h:outputFormat class="text-warning" value=" #{bundle['file.rsyncUpload.httpUploadDisabledDueToRsyncFileExisting']}" escape="false">
<o:param>
<p:commandLink value="#{settingsWrapper.supportTeamName}" oncomplete="PF('contactForm').show()" update=":contactDialog" actionListener="#{sendFeedbackDialog.initUserInput}">
<f:setPropertyActionListener target="#{sendFeedbackDialog.messageSubject}" value=""/>
<f:setPropertyActionListener target="#{sendFeedbackDialog.recipient}" value="#{null}"/>
<f:setPropertyActionListener target="#{sendFeedbackDialog.userMessage}" value=""/>
<f:setPropertyActionListener target="#{sendFeedbackDialog.userEmail}" value=""/>
</p:commandLink>
</o:param>
</h:outputFormat>
</p>
</div>
<div class="panel-body" jsf:id="httpUploadDisabledDueToExistingRsyncPackagePublished" jsf:rendered="#{EditDatafilesPage.workingVersion.hasPackageFile and EditDatafilesPage.dataset.released}">
<p class="help-block">
<span class="glyphicon glyphicon-warning-sign text-warning"></span>
<h:outputText class="text-danger" value=" #{bundle['file.rsyncUpload.httpUploadDisabledDueToRsyncFileExistingAndPublished']}"/>
<h:outputText class="text-warning" value=" #{bundle['file.rsyncUpload.httpUploadDisabledDueToRsyncFileExistingAndPublished']}"/>
</p>
</div>
<div class="panel-body" jsf:id="contentOfHttpPanel" jsf:rendered="#{!EditDatafilesPage.workingVersion.hasPackageFile}">
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 @@ -112,7 +112,7 @@
<!-- DOWNLOAD DCM SCRIPT BUTTON -->
<h:commandLink id="rsyncDL" actionListener="#{DatasetPage.downloadRsyncScript()}" styleClass="btn btn-default"
rendered="#{DatasetPage.sessionUserAuthenticated
and DatasetPage.canUpdateDataset()
and DatasetPage.canUpdateDataset() and empty DatasetPage.workingVersion.fileMetadatas
and !widgetWrapper.widgetView and DatasetPage.lockedDueToDcmUpload}">
<span class="glyphicon glyphicon-download-alt"/> <h:outputText value=" #{bundle['file.rsyncUpload.step2.downloadScriptButton']}"/>
</h:commandLink>
Expand Down

0 comments on commit f4c0f1f

Please sign in to comment.