diff --git a/productMods/templates/freemarker/visualization/publication/personPublicationSparklineContent.ftl b/productMods/templates/freemarker/visualization/publication/personPublicationSparklineContent.ftl index 27d64f52..11ee9bbe 100644 --- a/productMods/templates/freemarker/visualization/publication/personPublicationSparklineContent.ftl +++ b/productMods/templates/freemarker/visualization/publication/personPublicationSparklineContent.ftl @@ -69,7 +69,15 @@ 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'; @@ -80,7 +88,15 @@ * 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 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} '