Skip to content

Commit

Permalink
#7406 add output panel
Browse files Browse the repository at this point in the history
  • Loading branch information
sekmiller committed Dec 4, 2020
1 parent e607cf7 commit 9a8e27a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/webapp/file-download-button-fragment.xhtml
Expand Up @@ -175,14 +175,16 @@
<!-- Download Options -->

<!-- Request Access Options -->
<!-- Output panel makes the "Request Access" button label pull left Access Requested looks OK -->
<p:outputPanel layout="#{fileMetadata.dataFile.fileAccessRequesters.contains(dataverseSession.user) ? 'block' : 'inline'}" id="requestPanel">
<ui:fragment rendered="#{!fileMetadata.datasetVersion.deaccessioned and !fileDownloadHelper.canDownloadFile(fileMetadata)
and fileMetadata.dataFile.owner.fileAccessRequest}">
and fileMetadata.dataFile.owner.fileAccessRequest}" >
<li class="dropdown-header">#{bundle['file.accessBtn.header.download']} <span class="glyphicon glyphicon-download-alt"/></li>
<li class="#{fileMetadata.dataFile.fileAccessRequesters.contains(dataverseSession.user) ? 'disabled' : ''}">

<p:commandLink styleClass="btn-request" rendered="#{fileDownloadHelper.session.user.authenticated}"
actionListener="#{fileDownloadHelper.handleCommandLinkClick(fileMetadata)}"
update="@([id$=requestAccessConsolidated])"
update="@([id$=requestAccessConsolidated]), @([id$=requestPanel])"
id="requestAccessConsolidated"
disabled="#{fileMetadata.dataFile.fileAccessRequesters.contains(dataverseSession.user)}">

Expand All @@ -197,6 +199,7 @@
</p:commandLink>
</li>
</ui:fragment>
</p:outputPanel>
<!-- END: Request Access Options -->

<!-- Explore Options -->
Expand Down

0 comments on commit 9a8e27a

Please sign in to comment.