Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Backend
Commits
a79de6bc
Commit
a79de6bc
authored
Sep 17, 2013
by
Matija Obreza
Browse files
Limit institute stats to 30 entries
parent
8635e088
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/crophub/rest/servlet/controller/WiewsController.java
View file @
a79de6bc
...
...
@@ -76,8 +76,11 @@ public class WiewsController extends BaseController {
model
.
addAttribute
(
"faoInstitute"
,
faoInstitute
);
model
.
addAttribute
(
"countByInstitute"
,
genesysService
.
countByInstitute
(
faoInstitute
));
model
.
addAttribute
(
"statisticsGenus"
,
genesysService
.
statisticsGenusByInstitute
(
faoInstitute
));
model
.
addAttribute
(
"statisticsTaxonomy"
,
genesysService
.
statisticsTaxonomyByInstitute
(
faoInstitute
));
// FIXME some institutes have *a lot* of different taxa
// TODO needs pagination
model
.
addAttribute
(
"statisticsGenus"
,
genesysService
.
statisticsGenusByInstitute
(
faoInstitute
).
subList
(
0
,
30
));
model
.
addAttribute
(
"statisticsTaxonomy"
,
genesysService
.
statisticsTaxonomyByInstitute
(
faoInstitute
).
subList
(
0
,
30
));
return
"/wiews/details"
;
}
...
...
src/main/webapp/WEB-INF/jsp/wiews/details.jsp
View file @
a79de6bc
...
...
@@ -57,7 +57,7 @@
<div
class=
"clearfix"
style=
"margin-top: 2em;"
>
<div
class=
"pull-left"
style=
"margin-right: 3em;"
>
<h4>
B
y Genus
</h4>
<h4>
Top 30 b
y Genus
</h4>
<ul
class=
"funny-list statistics"
>
<c:forEach
items=
"
${
statisticsGenus
}
"
var=
"stat"
varStatus=
"status"
>
<li><span
class=
"stats-number"
><fmt:formatNumber
value=
"
${
stat
[
1
]
}
"
/></span>
<c:out
value=
"
${
stat
[
0
]
}
"
/></li>
...
...
@@ -66,7 +66,7 @@
</div>
<div
class=
"pull-left"
style=
"margin-right: 3em;"
>
<h4>
B
y Species
</h4>
<h4>
Top 30 b
y Species
</h4>
<ul
class=
"funny-list statistics"
>
<c:forEach
items=
"
${
statisticsTaxonomy
}
"
var=
"stat"
varStatus=
"status"
>
<li><span
class=
"stats-number"
><fmt:formatNumber
value=
"
${
stat
[
1
]
}
"
/></span>
<a
href=
"
<c:url
value=
"/wiews/${faoInstitute.code.toLowerCase()}/t/${stat[0].genus}/${stat[0].species}"
/>
"
><c:out
value=
"
${
stat
[
0
].
taxonName
}
"
/></a></li>
...
...
src/main/webapp/WEB-INF/web.xml
View file @
a79de6bc
...
...
@@ -79,7 +79,7 @@
</error-page>
<error-page>
<error-code>
500
</error-code>
<location>
/WEB-INF/jsp
s
/500.jsp
</location>
<location>
/WEB-INF/jsp/500.jsp
</location>
</error-page>
<session-config>
<session-timeout>
30
</session-timeout>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment