diff --git a/productMods/templates/freemarker/visualization/publication/personPublicationSparklineContent.ftl b/productMods/templates/freemarker/visualization/publication/personPublicationSparklineContent.ftl
index bd9ce115..266ee714 100644
--- a/productMods/templates/freemarker/visualization/publication/personPublicationSparklineContent.ftl
+++ b/productMods/templates/freemarker/visualization/publication/personPublicationSparklineContent.ftl
@@ -68,8 +68,16 @@
$.each(shortSparkRows, function(index, value) {
renderedShortSparks += data.getValue(value, 1);
});
-
- $('#${sparklineContainerID} td.sparkline_number').text(parseInt(renderedShortSparks) + parseInt(${sparklineVO.unknownYearPublications})).css("font-weight", "bold").attr("class", "grey").append(" publication(s)
");
+
+ var totalPubs = parseInt(renderedShortSparks) + parseInt(${sparklineVO.unknownYearPublications});
+
+ if ( totalPubs > 1 ) {
+ var pubDisplay = "publications";
+ } else {
+ var pubDisplay = "publication";
+ }
+
+ $('#${sparklineContainerID} td.sparkline_number').text(totalPubs).css("font-weight", "bold").attr("class", "grey").append(" "+ pubDisplay +"
");
var sparksText = ' within the last 10 years';
@@ -79,8 +87,16 @@
* Sparks that will be rendered will always be the one's which has
* any year associated with it. Hence.
* */
- var renderedSparks = ${sparklineVO.renderedSparks};
- $('#${sparklineContainerID} td.sparkline_number').text(parseInt(renderedSparks) + parseInt(${sparklineVO.unknownYearPublications})).css("font-weight", "bold").attr("class", "grey").append(" publication(s)
");
+ var renderedSparks = ${sparklineVO.renderedSparks};
+ var totalPubs = parseInt(renderedSparks) + parseInt(${sparklineVO.unkownYearPublications});
+
+ if ( totalPubs > 1 ) {
+ var pubDisplay = "publications";
+ } else {
+ var pubDisplay = "publication";
+ }
+
+ $('#${sparklineContainerID} td.sparkline_number').text(totalPubs).css("font-weight", "bold").attr("class", "grey").append(" "+ pubDisplay +"
");
var sparksText = ' from ${sparklineVO.earliestYearConsidered?c}'
+ ' to ${sparklineVO.latestRenderedPublicationYear?c} '