Skip to content

Commit

Permalink
fixed a small bug; changed the help message on the results page; bump…
Browse files Browse the repository at this point in the history
…ed up the display limit to 5K.

(#3609)
  • Loading branch information
landreev committed Aug 10, 2017
1 parent 38af5c9 commit 9b3fff0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
5 changes: 3 additions & 2 deletions src/main/java/Bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1084,8 +1084,9 @@ dataset.guestbooksResponses.type=Type
dataset.guestbooksResponses.file=File
dataset.guestbooksResponses.tip.title=Collected Guestbook Responses
dataset.guestbooksResponses.tip.downloadascsv=Click \"Donwload Responses\" to download all the collected responses for this guestbook, as a CSV file. If you are interested in selecting the responses for specific datasets, files, users etc., we recommend importing this CSV file into Excel, Google Sheets or similar software.
dataset.guestbooksResponses.tooManyResponses.header=Please note: only the top {0} responses are shown below.
dataset.guestbooksResponses.tooManyResponses.message=Click \"Download Responses\" to download all the collected responses ({0} total) as a CSV file.
dataset.guestbooksResponses.tooManyResponses.header=Please note: This guestbook has too many responses to display on the page.
dataset.guestbooksResponses.tooManyResponses.message.1=Only the last {0} responses are shown below.
dataset.guestbooksResponses.tooManyResponses.message.2=Click \"Download Responses\" to download all the collected responses ({0} total) as a CSV file.

# guestbook-responses.xhtml
dataset.guestbookResponses.pageTitle=View Guestbook Responses
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public void streamResponsesByDataverseIdAndGuestbookId(OutputStream out, Long da
sb.append(SEPARATOR);

// position:
sb.append(result[10] == null ? "" : ((String)result[7]).replace(',', ' '));
sb.append(result[10] == null ? "" : ((String)result[10]).replace(',', ' '));

// Finally, custom questions and answers, if present:

Expand Down Expand Up @@ -219,6 +219,7 @@ public void streamResponsesByDataverseIdAndGuestbookId(OutputStream out, Long da
// (i.e., we are writing one guestbook response at a time, thus allowing the
// whole thing to stream in real time -- L.A.)
out.write(sb.toString().getBytes());
out.flush();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public class SystemConfig {

private static final String JVM_TIMER_SERVER_OPTION = "dataverse.timerServer";

private static final long DEFAULT_GUESTBOOK_RESPONSES_DISPLAY_LIMIT = 1000L;
private static final long DEFAULT_GUESTBOOK_RESPONSES_DISPLAY_LIMIT = 5000L;

public String getVersion() {
return getVersion(false);
Expand Down
15 changes: 10 additions & 5 deletions src/main/webapp/guestbook-responses.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,19 @@
<div class="col-sm-12">
<div id="no-clients-message" class="panel panel-default">
<div class="panel-body">
<span class="help-block h3">
<h:outputFormat value="#{bundle['dataset.guestbooksResponses.tooManyResponses.header']}">
<f:param value="#{systemConfig.guestbookResponsesPageDisplayLimit}"/>
</h:outputFormat>
<span class="help-block h3">
<h:outputText value="#{bundle['dataset.guestbooksResponses.tooManyResponses.header']}"/>
</span>
<ul>
<li>
<h:outputFormat value="#{bundle['dataset.guestbooksResponses.tooManyResponses.message']}" escape="false">
<h:outputFormat value="#{bundle['dataset.guestbooksResponses.tooManyResponses.message.1']}" escape="false">
<f:param value="#{systemConfig.guestbookResponsesPageDisplayLimit}"/>
</h:outputFormat>
</li>
</ul>
<ul>
<li>
<h:outputFormat value="#{bundle['dataset.guestbooksResponses.tooManyResponses.message.2']}" escape="false">
<f:param value="#{guestbookResponsesPage.guestbook.responseCount}"/>
</h:outputFormat>
</li>
Expand Down

0 comments on commit 9b3fff0

Please sign in to comment.