NIHVIVO-2259: modified text on foaf person sparkline to clarify these are VIVO only pubs

This commit is contained in:
tworrall 2011-07-14 15:38:10 +00:00
parent 21991a545d
commit 1a3e72ad33
2 changed files with 31 additions and 34 deletions

View file

@ -22,9 +22,9 @@
<#assign coAuthorVisUrl = individual.coAuthorVisUrl>
<#assign mapOfScienceVisUrl = individual.mapOfScienceUrl>
<#assign googleJSAPI = "https://www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22visualization%22%2C%22version%22%3A%221%22%2C%22packages%22%3A%5B%22imagesparkline%22%5D%7D%5D%7D">
<#assign googleJSAPI = "https://www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22visualization%22%2C%22version%22%3A%221%22%2C%22packages%22%3A%5B%22imagesparkline%22%5D%7D%5D%7D">
<img class="infoIcon" src="${urls.images}/iconInfo.png" alt="information icon" title="The publication information may be incomplete" />
<span id="sparklineHeading">Publications in VIVO</span>
<div id="vis_container_coauthor">&nbsp;</div>
@ -52,6 +52,7 @@
<script type="text/javascript">
var visualizationUrl = '${urls.base}/visualizationAjax?uri=${individual.uri?url}';
var infoIconSrc = '${urls.images}/iconInfo.png';
</script>
<#if isInvestigator>

View file

@ -129,38 +129,34 @@
var totalPublicationCount = knownYearPublicationCounts + unknownYearPublicationCounts;
<#if sparklineVO.shortVisMode>
<#-- We want to display how many publication counts were considered, so this is used to calculate this. -->
var shortSparkRows = sparklineDataView.getViewRows();
var renderedShortSparks = 0;
$.each(shortSparkRows, function(index, value) {
renderedShortSparks += data.getValue(value, 1);
});
/*
In case that there are only unknown publications we want the text to mention these counts,
which would not be mentioned in the other case because the renderedShortSparks only hold counts
of publications which have any date associated with it.
*/
var totalPubs = onlyUnknownYearPublications ? unknownYearPublicationCounts : renderedShortSparks;
if (totalPubs === 1) {
var pubDisplay = "publication";
} else {
var pubDisplay = "publications";
}
$('#${sparklineContainerID} td.sparkline_number').text(totalPubs).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> "+ pubDisplay +"<br/></span>");
var sparksText = ' within the last 10 years';
if (totalPubs !== totalPublicationCount) {
sparksText += ' (' + totalPublicationCount + ' total)';
}
<#else>
<#if sparklineVO.shortVisMode>
<#-- We want to display how many publication counts were considered, so this is used to calculate this. -->
var shortSparkRows = sparklineDataView.getViewRows();
var renderedShortSparks = 0;
$.each(shortSparkRows, function(index, value) {
renderedShortSparks += data.getValue(value, 1);
});
/*
In case that there are only unknown publications we want the text to mention these counts,
which would not be mentioned in the other case because the renderedShortSparks only hold counts
of publications which have any date associated with it.
*/
var totalPubs = onlyUnknownYearPublications ? unknownYearPublicationCounts : renderedShortSparks;
$('#${sparklineContainerID} td.sparkline_number').text(totalPubs + " in the last 10 full").css("font-weight", "bold").css("font-size",".85em").attr("class", "grey");
var sparksText = "years";
if (totalPubs !== totalPublicationCount) {
sparksText += ' (' + totalPublicationCount + ' total)' ;
}
sparksText += "&nbsp;<img class='infoIcon' src='" + infoIconSrc + "' height='16px' width='16px' alt='information icon' title='These numbers are based solely on publications that have been loaded into this VIVO application.' />" ;
<#else>
/*
* Sparks that will be rendered will always be the one's which has