Skip to content

Commit

Permalink
UI and accessibility clean up on dataverse, dataset and file pgs [ref #…
Browse files Browse the repository at this point in the history
  • Loading branch information
mheppler committed Jul 1, 2020
1 parent ce86fed commit 18d16f1
Show file tree
Hide file tree
Showing 16 changed files with 84 additions and 80 deletions.
2 changes: 1 addition & 1 deletion src/main/java/edu/harvard/iq/dataverse/DataCitation.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public String toString(boolean html) {
citationList.add(year);
if ((fileTitle != null) && isDirect()) {
citationList.add(formatString(fileTitle, html, "\""));
citationList.add(formatString(title, html, "<i>", "</i>"));
citationList.add(formatString(title, html, "<em>", "</em>"));
} else {
citationList.add(formatString(title, html, "\""));
}
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/propertyFiles/Bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1278,6 +1278,7 @@ dataset.submit.failure.null=Can't submit for review. Dataset is null.
dataset.submit.failure.isReleased=Latest version of dataset is already released. Only draft versions can be submitted for review.
dataset.submit.failure.inReview=You cannot submit this dataset for review because it is already in review.
dataset.rejectMessage=Return this dataset to contributor for modification.
dataset.rejectMessage.label=Return to Author Reason
dataset.rejectWatermark=Please enter a reason for returning this dataset to its author(s).
dataset.reject.enterReason.error=Reason for return to author is required.
dataset.reject.success=This dataset has been sent back to the contributor.
Expand Down Expand Up @@ -1458,11 +1459,13 @@ dataset.privateurl.noPermToCreate=To create a Private URL you must have the foll
file.display.label=Change View
file.display.table=Table
file.display.tree=Tree
file.count.label=File Count
file.count.one=1 File
file.count={0} to {1} of {2} {2, choice, 0#Files|1#File|2#Files}
file.count.shown={0} {0, choice, 0#Files Selected|1#File|2#Files}
file.clearSelection=Clear selection.
file.numFilesSelected={0} {0, choice, 0#files are|1#file is|2#files are} currently selected.
file.select.tooltip=Select Files
file.selectAllFiles=Select all {0} files in this dataset.
file.dynamicCounter.filesPerPage=Files Per Page
file.selectToAddBtn=Select Files to Add
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/contactFormFragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<div class="form-group">
<label jsf:for="userMessage" class="col-sm-3 control-label">#{bundle['contact.msg']} <span class="glyphicon glyphicon-asterisk text-danger" title="#{bundle.requiredField}"/></label>
<div class="col-sm-9">
<p:inputTextarea id="userMessage" styleClass="form-control" value="#{sendFeedbackDialog.userMessage}"
<p:inputTextarea id="userMessage" styleClass="form-control" value="#{sendFeedbackDialog.userMessage}" title="#{bundle['contact.msg']}"
required="#{param['DO_VALIDATION']}" requiredMessage="#{bundle['contact.msg.required']}" autoResize="false" rows="10"/>
<h:message for="userMessage" styleClass="bg-danger text-danger"/>
</div>
Expand Down
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 @@ -64,7 +64,7 @@
<h:outputText value="#{MarkupChecker:sanitizeBasicHTML(termsOfUseAndAccess.termsOfUse)}" escape="false" rendered="#{empty editMode}"/>
<ui:fragment rendered="#{!empty editMode}">
<p class="help-block"><h:outputText value="#{bundle['file.dataFilesTab.terms.list.termsOfUse.termsOfUse.description']}" escape="false"/></p>
<p:inputTextarea value="#{termsOfUseAndAccess.termsOfUse}" rows="5" cols="60" styleClass="form-control" />
<p:inputTextarea value="#{termsOfUseAndAccess.termsOfUse}" rows="5" cols="60" styleClass="form-control" title="#{bundle['file.dataFilesTab.terms.list.termsOfUse.termsOfUse']}"/>
</ui:fragment>
</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions src/main/webapp/dataset.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@
<label for="reasonForDeaccession">
#{bundle['file.deaccessionDialog.enterInfo']}
</label>
<p:inputTextarea id="reasonForDeaccession" styleClass="form-control" autoResize="false" rows="2" cols="40"
<p:inputTextarea id="reasonForDeaccession" styleClass="form-control" autoResize="false" rows="2" cols="40" title="#{bundle['file.deaccessionDialog.enterInfo']}"
value="#{DatasetPage.deaccessionReasonText}" widgetVar="reasonForDeaccession" validator="#{DatasetPage.validateDeaccessionReason}">
<f:attribute name="reasonRadio" value="#{reasonRadio}" />
</p:inputTextarea>
Expand Down Expand Up @@ -1491,17 +1491,17 @@
<p:focus for="termsAccessInput"/>
<div class="form-horizontal">
<div class="form-group">
<label for="metadata_TermsAccess" class="col-sm-3 control-label">
<label for="termsAccessInput" class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfAccess.termsOfsAccess']}
<span class="glyphicon glyphicon-question-sign tooltip-icon"
data-toggle="tooltip" data-placement="auto right" data-original-title="#{bundle['file.dataFilesTab.terms.list.termsOfAccess.termsOfsAccess.title']}"></span>
</label>
<div class="col-sm-9">
<p:inputTextarea id="termsAccessInput" value="#{DatasetPage.workingVersion.termsOfUseAndAccess.termsOfAccess}" autoResize="false" rows="5" styleClass="form-control" widgetVar="inputtoa"/>
<p:inputTextarea id="termsAccessInput" value="#{DatasetPage.workingVersion.termsOfUseAndAccess.termsOfAccess}" title="#{bundle['file.dataFilesTab.terms.list.termsOfAccess.termsOfsAccess']}" autoResize="false" rows="5" styleClass="form-control" widgetVar="inputtoa"/>
</div>
</div>
<div class="form-group">
<label for="metadata_RequestAccess" class="col-sm-3 control-label">
<label for="requestAccess" class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfAccess.requestAccess']}
<span class="glyphicon glyphicon-question-sign tooltip-icon"
data-toggle="tooltip" data-placement="auto right" data-original-title="#{bundle['file.dataFilesTab.terms.list.termsOfAccess.requestAccess.title']}"></span>
Expand Down Expand Up @@ -1565,7 +1565,7 @@
#{bundle['dataset.publishBoth.tip']}
</p>
</ui:fragment>
<div id="terms-agreement-block" class="well" jsf:rendered="#{DatasetPage.displayPublishPopupCustomText}">
<div class="well terms-agreement-block" jsf:rendered="#{DatasetPage.displayPublishPopupCustomText}">
<h:outputText value="#{DatasetPage.datasetPublishCustomText}" escape="false"/>
</div>
<ui:fragment rendered="#{releaseDraft}">
Expand Down Expand Up @@ -1640,7 +1640,7 @@
</p>
<ui:remove>
<!--FIXME update for new comments table -->
<p:inputTextarea id="returnReason" rows="3" value="#{DatasetPage.workingVersion.returnReason}" maxlength="200" widgetVar="returnReason"
<p:inputTextarea id="returnReason" rows="3" value="#{DatasetPage.workingVersion.returnReason}" title="#{bundle['dataset.rejectMessage.label']}" maxlength="200" widgetVar="returnReason"
cols="70" counter="display" counterTemplate="{0} characters remaining." autoResize="false"
requiredMessage="#{bundle['dataset.reject.enterReason.error']}"/>
<!--FIXME validation error msg for returnReason was in confirmDialog using testReturnReason() in commandButton below but all that was removed
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/dataverse.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@
<!-- END Edit Mode -->
<!-- View Mode / Description Panel -->
<ui:fragment rendered="#{empty DataversePage.editMode}">
<div id="actionButtonBlock" class="col-xs-12 button-block" jsf:rendered="#{!widgetWrapper.widgetView}">
<div id="actionButtonBlock" class="col-xs-12 button-block margin-bottom" jsf:rendered="#{!widgetWrapper.widgetView}">
<div class="row">
<!-- Metrics for Root Dataverse -->
<div id="metrics-block1" class="col-xs-4" jsf:rendered="#{DataversePage.isRootDataverse() and !settingsWrapper.rsyncOnly}">
Expand Down
7 changes: 3 additions & 4 deletions src/main/webapp/dataverse_header.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@
<a href="#" class="dropdown-toggle" data-toggle="dropdown">#{bundle.search} <b class="caret"></b></a>
<ul class="dropdown-menu navbar-search">
<form class="form-inline" role="search">
<label class="sr-only" for="navbarsearch">#{bundle.search}</label>
<label id="searchNavLabel" class="sr-only" for="navbarsearch">#{bundle.search}</label>
<div class="input-group">
<input id="navbarsearch" type="text" class="form-control" size="28" value="" placeholder="#{bundle['header.search.title']}"/>
<input id="navbarsearch" type="text" class="form-control" size="28" value="" placeholder="#{bundle['header.search.title']}" aria-labelledby="searchNavLabel"/>
<span class="input-group-btn">
<button type="submit" class="btn btn-default" onclick="window.location = '/dataverse/#{dataverseServiceBean.findRootDataverse().alias}&#63;q=' + document.getElementById('navbarsearch').value;
return false;">
<button type="submit" class="btn btn-default" onclick="window.location='/dataverse/#{dataverseServiceBean.findRootDataverse().alias}&#63;q=' + document.getElementById('navbarsearch').value;return false;">
<span class="glyphicon glyphicon-search"/> #{bundle.find}
</button>
</span>
Expand Down
26 changes: 11 additions & 15 deletions src/main/webapp/file-download-button-fragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,17 @@
<a tabindex="-1" href="javascript:void(0);">#{bundle['file.downloadBtn.format.citation']}</a>
<ul class="dropdown-menu">
<li>
<h:commandLink id="risLinkFilePgNew" styleClass="btn-download" actionListener="#{fileDownloadService.downloadDatafileCitationRIS(fileMetadata)}">
<h:commandLink styleClass="btn-download" actionListener="#{fileDownloadService.downloadDatafileCitationRIS(fileMetadata)}">
<h:outputText value="#{bundle['dataset.cite.downloadBtn.ris']}" />
</h:commandLink>
</li>
<li>
<h:commandLink id="endNoteLinkFilePgNew" styleClass="btn-download" action="#{fileDownloadService.downloadDatafileCitationXML(fileMetadata)}">
<h:commandLink styleClass="btn-download" action="#{fileDownloadService.downloadDatafileCitationXML(fileMetadata)}">
<h:outputText value="#{bundle['dataset.cite.downloadBtn.xml']}" />
</h:commandLink>
</li>
<li>
<h:commandLink id="bibLinkFilePgNew" styleClass="btn-download" action="#{fileDownloadService.downloadDatafileCitationBibtex(fileMetadata)}">
<h:commandLink styleClass="btn-download" action="#{fileDownloadService.downloadDatafileCitationBibtex(fileMetadata)}">
<h:outputText value="#{bundle['dataset.cite.downloadBtn.bib']}" />
</h:commandLink>
</li>
Expand Down Expand Up @@ -228,10 +228,10 @@
<div class="btn-group" jsf:rendered="#{fileMetadata.dataFile.tabularData}">
<!-- Download Dropdown -->
<a type="button" class="btn-download btn btn-link bootstrap-button-tooltip dropdown-toggle"
title="#{bundle.download}" id="downloadBtn" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
title="#{bundle.download}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-download-alt"/><span class="sr-only">#{bundle.download}</span><span class="caret"></span>
</a>
<ul class="dropdown-menu multi-level pull-right text-left" aria-labelledby="downloadBtn">
<ul class="dropdown-menu multi-level pull-right text-left">
<ui:remove>
<li>
<p:commandLink styleClass="highlightBold" rendered="#{!(downloadPopupRequired)}"
Expand Down Expand Up @@ -322,17 +322,17 @@
<a tabindex="-1" href="javascript:void(0);">#{bundle['file.downloadBtn.format.citation']}</a>
<ul class="dropdown-menu">
<li>
<h:commandLink id="risLinkFile" actionListener="#{fileDownloadService.downloadDatafileCitationRIS(fileMetadata)}">
<h:commandLink actionListener="#{fileDownloadService.downloadDatafileCitationRIS(fileMetadata)}">
<h:outputText value="#{bundle['dataset.cite.downloadBtn.ris']}" />
</h:commandLink>
</li>
<li>
<h:commandLink id="endNoteLinkFile" action="#{fileDownloadService.downloadDatafileCitationXML(fileMetadata)}">
<h:commandLink action="#{fileDownloadService.downloadDatafileCitationXML(fileMetadata)}">
<h:outputText value="#{bundle['dataset.cite.downloadBtn.xml']}" />
</h:commandLink>
</li>
<li>
<h:commandLink id="bibLinkFile" action="#{fileDownloadService.downloadDatafileCitationBibtex(fileMetadata)}">
<h:commandLink action="#{fileDownloadService.downloadDatafileCitationBibtex(fileMetadata)}">
<h:outputText value="#{bundle['dataset.cite.downloadBtn.bib']}" />
</h:commandLink>
</li>
Expand Down Expand Up @@ -375,9 +375,6 @@
<p:commandLink styleClass="btn-request" rendered="#{!fileDownloadHelper.session.user.authenticated }"
process="@this"
onclick="PF('accessSignUpLogIn_popup').show()">

<!-- 4.2.1 - TODO: retest this on a dataset with fileRequest enabled and with some files restricted to the user -->

#{bundle['file.requestAccess']}
</p:commandLink>
</li>
Expand Down Expand Up @@ -411,7 +408,6 @@
title="#{fileMetadata.dataFile.fileAccessRequesters.contains(dataverseSession.user) ? bundle['file.accessRequested'] : bundle['file.requestAccess']}"
process="@this"
onclick="PF('accessSignUpLogIn_popup').show()">
<!-- 4.2.1 - TODO: retest this on a dataset with fileRequest enabled and with some files restricted to the user -->
<span class="glyphicon glyphicon-bullhorn"/><span class="sr-only">#{fileMetadata.dataFile.fileAccessRequesters.contains(dataverseSession.user) ? bundle['file.accessRequested'] : bundle['file.requestAccess']}</span>
</p:commandLink>
<!-- END: DATASET PG -->
Expand Down Expand Up @@ -476,17 +472,17 @@
<div class="btn-group" jsf:rendered="#{!isFilePg}">
<ui:fragment rendered="#{(exploreTools.size()==1 and !worldMapPermissionHelper.canUserSeeExploreWorldMapButtonFromPage(fileMetadata)) or (exploreTools.size()==0 and worldMapPermissionHelper.canUserSeeExploreWorldMapButtonFromPage(fileMetadata))}">
<a class="btn-explore btn btn-link bootstrap-button-tooltip"
title="#{bundle.explore}" id="exploreBtn" onclick="$(this).parent().find( 'li > a' ).trigger( 'click' );">
title="#{bundle.explore}" onclick="$(this).parent().find( 'li > a' ).trigger( 'click' );">
<span class="glyphicon glyphicon-equalizer"/><span class="sr-only">#{bundle.explore}</span>
</a>
</ui:fragment>
<ui:fragment rendered="#{exploreTools.size()>1 or (exploreTools.size()>=1 and worldMapPermissionHelper.canUserSeeExploreWorldMapButtonFromPage(fileMetadata))}">
<a class="btn-explore btn btn-link bootstrap-button-tooltip dropdown-toggle"
title="#{bundle.explore}" id="exploreBtn" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
title="#{bundle.explore}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-equalizer"/><span class="sr-only">#{bundle.explore}</span><span class="caret"></span>
</a>
</ui:fragment>
<ul class="dropdown-menu multi-level pull-right text-left" aria-labelledby="exploreBtn">
<ul class="dropdown-menu multi-level pull-right text-left">
<!--external tools-->
<ui:repeat var="tool" value="#{exploreTools}">
<li>
Expand Down
9 changes: 4 additions & 5 deletions src/main/webapp/file-download-popup-fragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
xmlns:jsf="http://xmlns.jcp.org/jsf"
xmlns:iqbs="http://xmlns.jcp.org/jsf/composite/iqbs">


<o:importFunctions type="edu.harvard.iq.dataverse.util.MarkupChecker" />
<p:focus context="downloadPopup"/>
<p class="help-block">
Expand All @@ -22,7 +21,7 @@

<div class="form-horizontal">
<div class="form-group" jsf:rendered="#{workingVersion.termsOfUseAndAccess.license != 'CC0' and !empty workingVersion.termsOfUseAndAccess.termsOfUse}">
<label class="col-sm-3 control-label" for="guestbook_tou">
<label class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfUse.termsOfUse']}
</label>
<div class="col-sm-6">
Expand All @@ -34,9 +33,9 @@
</div>
</div>
<div class="form-group" jsf:rendered="#{!empty workingVersion.termsOfUseAndAccess.termsOfAccess}">
<label class="col-sm-3 control-label" for="guestbook_toa">
<div class="col-sm-3 control-label">
#{bundle['file.dataFilesTab.terms.list.termsOfAccess.termsOfsAccess']}
</label>
</div>
<div class="col-sm-6">
<div class="panel panel-default">
<div class="panel-body read-terms">
Expand Down Expand Up @@ -110,7 +109,7 @@
</div>
</div>
<div class="form-group" jsf:rendered="#{!empty workingVersion.dataset.guestbook.customQuestions}">
<label class="col-sm-3 control-label" for="guestbookuser_questions">
<label class="col-sm-3 control-label">
#{bundle['dataset.guestbookResponse.guestbook.additionalQuestions']}
</label>
<div class="col-sm-6">
Expand Down

0 comments on commit 18d16f1

Please sign in to comment.