Skip to content

Commit

Permalink
#269 increase max number of listing species
Browse files Browse the repository at this point in the history
  • Loading branch information
qifeng-bai committed Sep 19, 2023
1 parent 191b205 commit 3840a14
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class SpeciesListItemController {
} else {
if (requestParams.message)
flash.message = requestParams.message
requestParams.max = Math.min(requestParams.max ? requestParams.int('max') : 10, 100)
requestParams.max = Math.min(requestParams.max ? requestParams.int('max') : 10, 500)
requestParams.sort = requestParams.sort ?: "itemOrder"
requestParams.offset = requestParams.int('offset') ?: 0
requestParams.fetch = [kvpValues: 'select']
Expand Down
4 changes: 2 additions & 2 deletions grails-app/views/_speciesList.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<div class="form-group pull-right">
<label class="control-label">${message(code:'public.lists.search.options',default:'Items per page')}:</label>
<select id="maxItems" class="form-control" onchange="reloadWithMax(this)">
<g:each in="${[10,25,50,100,1000]}" var="max">
<g:each in="${[10,25,50,100]}" var="max">
<option ${(params.max == max)?'selected="selected"':''}>${max}</option>
</g:each>
</select>
Expand Down Expand Up @@ -202,7 +202,7 @@
<g:each in="${lists}" var="list" status="i">
<tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
<td>
<a href="${request.contextPath}/speciesListItem/list/${list.dataResourceUid}">${fieldValue(bean: list, field: "listName")}
<a href="${request.contextPath}/speciesListItem/list/${list.dataResourceUid}?max=500">${fieldValue(bean: list, field: "listName")}
</a>
</td>
<td>${list.listType?.getDisplayValue()}</td>
Expand Down
4 changes: 2 additions & 2 deletions grails-app/views/speciesListItem/list.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@
<g:if test="${result.imageUrl}">
<a href="${bieUrl}/species/${result.guid}" title="click to view species page"><img
src="${result.imageUrl}"
class="smallSpeciesImage"/></a>
class="smallSpeciesImage" loading="lazy"/></a>
</g:if>
</td>
<td class="author">${result.author}</td>
Expand All @@ -1058,7 +1058,7 @@
<div class="searchWidgets">
${message(code:'generic.lists.ItemsPerPage', default:'Items per page:')}
<select id="maxItems" onchange="reloadWithMax(this)">
<g:each in="${[10, 25, 50, 100]}" var="max">
<g:each in="${[10, 25, 50, 100, 500,1000]}" var="max">
<option ${(params.max == max) ? 'selected="selected"' : ''}>${max}</option>
</g:each>
</select>
Expand Down

0 comments on commit 3840a14

Please sign in to comment.