Skip to content

Commit

Permalink
Additional button style improvements to dataverse, dataset and file p…
Browse files Browse the repository at this point in the history
…gs. [ref #3747]
  • Loading branch information
mheppler committed Apr 18, 2017
1 parent bd73ce8 commit cc9d4eb
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 63 deletions.
2 changes: 1 addition & 1 deletion src/main/webapp/dataset-license-terms.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="text-right margin-bottom"
jsf:rendered="#{dataverseSession.user.authenticated and empty editMode and !widgetWrapper.widgetView
and permissionsWrapper.canIssueUpdateDatasetCommand(DatasetPage.dataset)}">
<p:commandLink type="button" styleClass="btn btn-default" actionListener="#{DatasetPage.edit('LICENSE')}"
<p:commandLink type="button" styleClass="btn btn-default btn-access" actionListener="#{DatasetPage.edit('LICENSE')}"
update="@form,:messagePanel" oncomplete="javascript:post_edit_terms()" disabled="#{DatasetPage.locked}">
<f:setPropertyActionListener target="#{DatasetPage.selectedTabIndex}" value="0" />
<span class="glyphicon glyphicon-briefcase"/> #{bundle['file.dataFilesTab.terms.editTermsBtn']}
Expand Down
34 changes: 17 additions & 17 deletions src/main/webapp/dataset.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<div class="btn-group pull-right" jsf:rendered="#{DatasetPage.sessionUserAuthenticated
and DatasetPage.canUpdateDataset()
and !DatasetPage.dataset.deaccessioned}">
<button type="button" id="editDataSet" class="btn btn-default dropdown-toggle #{DatasetPage.locked ? 'disabled' : ''}" data-toggle="dropdown">
<button type="button" id="editDataSet" class="btn btn-default btn-access dropdown-toggle #{DatasetPage.locked ? 'disabled' : ''}" data-toggle="dropdown">
<span class="glyphicon glyphicon-pencil"/> #{bundle['dataset.editBtn']} <span class="caret"></span>
</button>
<ul class="dropdown-menu pull-right text-left" role="menu">
Expand Down Expand Up @@ -132,36 +132,36 @@
and DatasetPage.canUpdateDataset()
and !permissionsWrapper.canIssuePublishDatasetCommand(DatasetPage.dataset))}">
<!-- Publish Buttons -->
<p:commandLink type="button" styleClass="btn btn-default #{DatasetPage.locked ? 'disabled' : ''}" onclick="PF('publishConfirm').show()"
<p:commandLink type="button" styleClass="btn btn-default btn-access #{DatasetPage.locked ? 'disabled' : ''}" onclick="PF('publishConfirm').show()"
rendered="#{!DatasetPage.dataset.released
and DatasetPage.dataset.latestVersion.versionState=='DRAFT' and DatasetPage.dataset.owner.released
and permissionsWrapper.canIssuePublishDatasetCommand(DatasetPage.dataset)}">
<span class="glyphicon glyphicon-globe"/> #{bundle['dataset.publish.btn']}
</p:commandLink>

<p:commandLink type="button" styleClass="btn btn-default #{DatasetPage.locked ? 'disabled' : ''}" onclick="PF('releaseDraft').show()"
<p:commandLink type="button" styleClass="btn btn-default btn-access #{DatasetPage.locked ? 'disabled' : ''}" onclick="PF('releaseDraft').show()"
rendered="#{DatasetPage.dataset.released and DatasetPage.dataset.latestVersion.versionState=='DRAFT' and DatasetPage.dataset.owner.released
and permissionsWrapper.canIssuePublishDatasetCommand(DatasetPage.dataset)}">
<span class="glyphicon glyphicon-globe"/> #{bundle['dataset.publish.btn']}
</p:commandLink>

<!-- 4.2.1: replaced permissionServiceBean.on(DatasetPage.dataset.owner).has('PublishDataverse') with DatasetPage.canPublishDataverse() -->
<p:commandLink type="button" styleClass="btn btn-default #{DatasetPage.locked ? 'disabled' : ''}" onclick="PF('mayNotRelease').show()"
<p:commandLink type="button" styleClass="btn btn-default btn-access #{DatasetPage.locked ? 'disabled' : ''}" onclick="PF('mayNotRelease').show()"
rendered="#{DatasetPage.dataset.latestVersion.versionState=='DRAFT' and !DatasetPage.dataset.owner.released
and permissionsWrapper.canIssuePublishDatasetCommand(DatasetPage.dataset)
and !DatasetPage.canPublishDataverse()}">
<span class="glyphicon glyphicon-globe"/> #{bundle['dataset.publish.btn']}
</p:commandLink>

<p:commandLink type="button" styleClass="btn btn-default #{DatasetPage.locked ? 'disabled' : ''}" onclick="PF('publishParent').show()"
<p:commandLink type="button" styleClass="btn btn-default btn-access #{DatasetPage.locked ? 'disabled' : ''}" onclick="PF('publishParent').show()"
rendered="#{DatasetPage.dataset.latestVersion.versionState=='DRAFT' and !DatasetPage.dataset.owner.released
and DatasetPage.canPublishDataverse()
and (DatasetPage.dataset.owner.owner == null or (DatasetPage.dataset.owner.owner != null and DatasetPage.dataset.owner.owner.released))
and permissionsWrapper.canIssuePublishDatasetCommand(DatasetPage.dataset)}">
<span class="glyphicon glyphicon-globe"/> #{bundle['dataset.publish.btn']}
</p:commandLink>

<p:commandLink type="button" styleClass="btn btn-default #{DatasetPage.locked ? 'disabled' : ''}"
<p:commandLink type="button" styleClass="btn btn-default btn-access #{DatasetPage.locked ? 'disabled' : ''}"
rendered="#{DatasetPage.dataset.latestVersion.versionState=='DRAFT' and !DatasetPage.dataset.owner.released
and DatasetPage.canPublishDataverse()
and (DatasetPage.dataset.owner.owner != null and !DatasetPage.dataset.owner.owner.released)
Expand All @@ -172,15 +172,15 @@
<!-- END: Publish Buttons -->

<!-- Return to Author Button -->
<p:commandLink type="button" styleClass="btn btn-default #{DatasetPage.locked ? 'disabled' : ''}" onclick="PF('sendBackToContributor').show()"
<p:commandLink type="button" styleClass="btn btn-default btn-access #{DatasetPage.locked ? 'disabled' : ''}" onclick="PF('sendBackToContributor').show()"
rendered="#{DatasetPage.dataset.latestVersion.versionState=='DRAFT' and DatasetPage.dataset.latestVersion.inReview
and permissionsWrapper.canIssuePublishDatasetCommand(DatasetPage.dataset)}">
#{bundle['dataset.rejectBtn']}
</p:commandLink>
<!-- END: Return to Author Button -->

<!-- Submit for Review Button -->
<button type="button" class="btn btn-default #{DatasetPage.dataset.latestVersion.inReview ? 'disabled' : ''}" onclick="PF('inreview').show()"
<button type="button" class="btn btn-default btn-access #{DatasetPage.dataset.latestVersion.inReview ? 'disabled' : ''}" onclick="PF('inreview').show()"
jsf:rendered="#{DatasetPage.workingVersion == DatasetPage.dataset.latestVersion
and DatasetPage.dataset.latestVersion.versionState=='DRAFT'
and DatasetPage.canUpdateDataset()
Expand All @@ -193,25 +193,25 @@
<!-- END: Edit/Publish Button Group -->
<!-- Email/Link/Share Button Group -->
<div class="btn-group pull-right" id="datasetButtonBar" role="group">
<p:commandLink class="btn btn-default bootstrap-button-tooltip" title="#{bundle['dataset.email.datasetContactBtn']}"
<p:commandLink class="text-button bootstrap-button-tooltip" title="#{bundle['dataset.email.datasetContactBtn']}"
update=":contactDialog" oncomplete="PF('contactForm').show()" actionListener="#{sendFeedbackDialog.initUserInput}">
<f:setPropertyActionListener target="#{sendFeedbackDialog.userMessage}" value=""/>
<f:setPropertyActionListener target="#{sendFeedbackDialog.userEmail}" value=""/>
<f:setPropertyActionListener target="#{sendFeedbackDialog.messageSubject}" value=""/>
<f:setPropertyActionListener target="#{sendFeedbackDialog.recipient}" value="#{DatasetPage.dataset}"/>
<span class="glyphicon glyphicon-envelope no-text"/>
<span class="glyphicon glyphicon-envelope"/> Contact
</p:commandLink>
<p:commandLink styleClass="btn btn-default bootstrap-button-tooltip" rendered="#{dataverseSession.user.superuser and !DatasetPage.workingVersion.deaccessioned}"
<p:commandLink styleClass="text-button bootstrap-button-tooltip" rendered="#{dataverseSession.user.superuser and !DatasetPage.workingVersion.deaccessioned}"
title="#{bundle['dataset.email.datasetLinkBtn.tip']}"
action="#{DatasetPage.updateLinkableDataverses()}"
oncomplete="PF('linkDatasetForm').show();bind_bsui_components();"
update="linkDatasetForm">
<span class="glyphicon glyphicon-link no-text"/>
<span class="glyphicon glyphicon-link"/> Link
</p:commandLink>
<p:commandLink styleClass="btn btn-default bootstrap-button-tooltip" rendered="#{!DatasetPage.workingVersion.deaccessioned}"
<p:commandLink styleClass="text-button bootstrap-button-tooltip" rendered="#{!DatasetPage.workingVersion.deaccessioned}"
title="#{bundle['dataset.share.datasetShare']}"
oncomplete="PF('shareDialog').show();sharrre();">
<span class="glyphicon glyphicon-share no-text"/>
<span class="glyphicon glyphicon-share"/> Share
</p:commandLink>
</div>
<p:dialog id="shareDialog" header="#{bundle['dataset.share.datasetShare']}" widgetVar="shareDialog" modal="true" rendered="#{!DatasetPage.workingVersion.deaccessioned}">
Expand Down Expand Up @@ -278,9 +278,9 @@
<h:outputText value="#{bundle['dataset.versionUI.unpublished']}" styleClass="label label-warning" rendered="#{!DatasetPage.dataset.released}"/>
<h:outputText value="#{bundle['dataset.versionUI.deaccessioned']}" styleClass="label label-danger" rendered="#{DatasetPage.workingVersion.deaccessioned}"/>
<!-- DATASET VERSION NUMBER -->
<h:outputText styleClass="label label-default" rendered="#{DatasetPage.workingVersion.released and !(DatasetPage.workingVersion.draft or DatasetPage.workingVersion.inReview)}"
<h:outputText styleClass="label label-default" rendered="#{DatasetPage.workingVersion.released and !(DatasetPage.workingVersion.draft or DatasetPage.workingVersion.inReview or DatasetPage.workingVersion.deaccessioned)}"
value="#{bundle['file.DatasetVersion']} #{DatasetPage.workingVersion.versionNumber}.#{DatasetPage.workingVersion.minorVersionNumber}" />
<h:outputText styleClass="label label-default" rendered="#{!DatasetPage.workingVersion.released and !(DatasetPage.workingVersion.draft or DatasetPage.workingVersion.inReview)}"
<h:outputText styleClass="label label-default" rendered="#{!DatasetPage.workingVersion.released and !(DatasetPage.workingVersion.draft or DatasetPage.workingVersion.inReview or DatasetPage.workingVersion.deaccessioned)}"
value="#{bundle['file.DatasetVersion']} #{DatasetPage.workingVersion.versionState}"/>
</div>
</div>
Expand Down Expand Up @@ -507,7 +507,7 @@
and (empty DatasetPage.editMode or DatasetPage.editMode == 'METADATA')}">

<div class="button-block tab-header margin-bottom text-right" jsf:rendered="#{empty DatasetPage.editMode and !widgetWrapper.widgetView}">
<p:commandLink type="button" styleClass="btn btn-default" actionListener="#{DatasetPage.edit('METADATA')}" update="@form,:messagePanel" oncomplete="javascript:post_edit_metadata()"
<p:commandLink type="button" styleClass="btn btn-default btn-access" actionListener="#{DatasetPage.edit('METADATA')}" update="@form,:messagePanel" oncomplete="javascript:post_edit_metadata()"
disabled="#{DatasetPage.locked}" rendered="#{DatasetPage.sessionUserAuthenticated and empty DatasetPage.editMode and !widgetWrapper.widgetView
and DatasetPage.canUpdateDataset() and !DatasetPage.dataset.deaccessioned }">
<f:setPropertyActionListener target="#{DatasetPage.selectedTabIndex}" value="0" />
Expand Down
Loading

0 comments on commit cc9d4eb

Please sign in to comment.