Skip to content

Commit

Permalink
Created button groups for Publish and Edit buttons on both Dataverse …
Browse files Browse the repository at this point in the history
…and Dataset (still in progress) pages. Moved View Published/Unpublished buttons to the left of the page. [ref #1325]
  • Loading branch information
mheppler committed Feb 25, 2015
1 parent ea0ef50 commit ff0e632
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 102 deletions.
14 changes: 7 additions & 7 deletions src/main/java/Bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,15 @@ dataverse.facetPickList.tip=Pick the metadata fields to use as facets for browsi
dataverse.facetPickList.facetsFromHost.text=Uncheck to not use the facets from {0}
dataverse.facetPickList.metadataBlockList.all=All Metadata Fields

dataverse.edit=Edit Dataverse
dataverse.edit=Edit
dataverse.option.generalInfo=General Information
dataverse.option.themeAndWidgets=Theme + Widgets
dataverse.option.featuredDataverse=Featured Dataverses
dataverse.option.permissions=Permissions
dataverse.option.datasetTemplates=Dataset Templates
dataverse.option.datasetGuestbooks=Dataset Guestbooks
dataverse.option.deleteDataverse=Delete Dataverse
dataverse.publish=Publish Dataverse
dataverse.publish=Publish
dataverse.contact=Email Dataverse Contact
dataset.link=Link Dataset
dataverse.link=Link Dataverse
Expand Down Expand Up @@ -527,7 +527,7 @@ dataset.manageGuestboobs.guestbook.customQuestions.responseOptions=Response Opti
# dataset.xhtml

dataset.pageTitle=Add New Dataset
dataset.editBtn=Edit Dataset
dataset.editBtn=Edit
dataset.editBtn.itemLabel.upload=Files (Upload + Edit)
dataset.editBtn.itemLabel.metadata=Metadata
dataset.editBtn.itemLabel.terms=License + Terms
Expand All @@ -536,10 +536,10 @@ dataset.editBtn.itemLabel.deleteDataset=Delete Dataset
dataset.editBtn.itemLabel.deleteDraft=Delete Draft Version
dataset.editBtn.itemLabel.deaccession=Deaccession Dataset
dataset.registerBtn=Register Dataset
dataset.publishBtn=Publish Dataset
dataset.rejectBtn=Return Dataset to Author
dataset.submitBtn=Submit Dataset for Review
dataset.disabledubmittedBtn=Dataset Submitted for Review
dataset.publishBtn=Publish
dataset.rejectBtn=Return to Author
dataset.submitBtn=Submit for Review
dataset.disabledubmittedBtn=Submitted for Review
dataset.submitMessage=Submit this dataset for review by the curator of this dataverse for possible publishing.
dataset.rejectMessage=Return this dataset to contributor for modification.
dataset.publish.tip=Are you sure you want to publish your dataset? Once you do so it must remain published.
Expand Down
31 changes: 15 additions & 16 deletions src/main/webapp/dataset.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,20 @@
<ui:fragment rendered="#{empty DatasetPage.editMode}">
<div id="topDatasetBlock">
<div id="actionButtonBlock" class="clearfix" style="margin-bottom:.55em;">
<!-- View Published/Unpublished Button -->
<ui:fragment rendered="#{DatasetPage.dataset.latestVersion.draft and DatasetPage.workingVersion != DatasetPage.dataset.latestVersion
and permissionServiceBean.on(DatasetPage.dataset).has('ViewUnpublishedDataset')}">
<a class="btn btn-warning" href="/dataset.xhtml?globalId=#{DatasetPage.dataset.globalId}&#38;versionId=#{DatasetPage.dataset.latestVersion.id}">
<h:outputText value="#{bundle['dataset.viewVersion.unpublished']}"/>
</a>
</ui:fragment>
<ui:fragment rendered="#{DatasetPage.dataset.released and DatasetPage.workingVersion != DatasetPage.dataset.releasedVersion
and !empty(DatasetPage.releasedVersionTabList)}">
<a class="btn btn-primary" href="/dataset.xhtml?globalId=#{DatasetPage.dataset.globalId}&#38;versionId=#{DatasetPage.dataset.releasedVersion.id}">
<h:outputText value="#{bundle['dataset.viewVersion.published']}"/>
</a>
</ui:fragment>
<!-- END: View Published/Unpublished Button -->
<ui:fragment rendered="#{dataverseSession.user.authenticated and empty DatasetPage.editMode
and ((DatasetPage.workingVersion == DatasetPage.dataset.latestVersion and (DatasetPage.workingVersion.draft or DatasetPage.workingVersion.released))
or (DatasetPage.workingVersion != DatasetPage.dataset.latestVersion and DatasetPage.dataset.latestVersion.deaccessioned and DatasetPage.workingVersion == DatasetPage.dataset.releasedVersion))
Expand Down Expand Up @@ -372,22 +386,7 @@
<p:commandButton value="#{bundle.cancel}" onclick="sendBackToContributor.hide()" type="button" />
</p:confirmDialog>
</ui:fragment>
<ui:fragment rendered="#{DatasetPage.dataset.latestVersion.draft and DatasetPage.workingVersion != DatasetPage.dataset.latestVersion
and permissionServiceBean.on(DatasetPage.dataset).has('ViewUnpublishedDataset')}">

<a class="btn btn-warning pull-right" href="/dataset.xhtml?globalId=#{DatasetPage.dataset.globalId}&#38;versionId=#{DatasetPage.dataset.latestVersion.id}">
<h:outputText value="#{bundle['dataset.viewVersion.unpublished']}"/>
</a>

</ui:fragment>
<ui:fragment rendered="#{DatasetPage.dataset.released and DatasetPage.workingVersion != DatasetPage.dataset.releasedVersion
and !empty(DatasetPage.releasedVersionTabList)}">

<a class="btn btn-primary pull-right" href="/dataset.xhtml?globalId=#{DatasetPage.dataset.globalId}&#38;versionId=#{DatasetPage.dataset.releasedVersion.id}">
<h:outputText value="#{bundle['dataset.viewVersion.published']}"/>
</a>

</ui:fragment>

<div class="btn-group pull-right" jsf:id="datasetButtonBar" jsf:rendered="#{empty DatasetPage.editMode}" role="group" style="margin-right:.3em;">
<button type="button" class="btn btn-default bootstrap-button-tooltip" onclick="contact_confirmation.show()" data-toggle="tooltip" data-trigger="hover" data-placement="top" data-original-title="Email Dataset Contact">
<span class="glyphicon glyphicon-envelope no-text"/>
Expand Down
Loading

0 comments on commit ff0e632

Please sign in to comment.