1. Changed language for when an organization does not have any data to be used for temporal graph vis. (see http://issues.library.cornell.edu/browse/NIHVIVO-2060)

This commit is contained in:
cdtank 2011-02-07 21:17:27 +00:00
parent a254173f9c
commit 43269929a6
6 changed files with 28 additions and 54 deletions

View file

@ -1,47 +0,0 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#assign standardVisualizationURLRoot ="/visualization">
<#assign ajaxVisualizationURLRoot ="/visualizationAjax">
<#assign dataVisualizationURLRoot ="/visualizationData">
<#assign organizationURI ="${organizationURI?url}">
<#assign organizationVivoProfileURL = "${urls.base}/individual?uri=${organizationURI}">
<#assign visualizationType = "${visualization}">
<#assign TemporalGraphGrantsURL = '${urls.base}${standardVisualizationURLRoot}?vis=entity_grant_count&uri=${organizationURI}&labelField=label'>
<#assign TemporalGraphPubsURL = '${urls.base}${standardVisualizationURLRoot}?vis=entity_comparison&uri=${organizationURI}&labelField=label'>
<#-- variables passed from server-side code -->
<script language="JavaScript" type="text/javascript">
var contextPath = "${urls.base}";
var visualization = "${visualizationType}";
var temporalGraphGrantsURL = "${TemporalGraphGrantsURL}";
var temporalGraphPubsURL = "${TemporalGraphPubsURL}";
var visualizationURL = "", visualizationString = "";
</script>
<script type="text/javascript">
$(document).ready(function() {
if(visualization == "ENTITY_PUB_COUNT"){
visualizationURL = temporalGraphGrantsURL;
visualizationString = "grants";
} else {
visualizationURL = temporalGraphPubsURL;
visualizationString = "publications";
}
$("a#visualizationID").text(visualizationString);
$("a#visualizationID").attr("href", visualizationURL);
});
</script>
<div id="body">
<p>Visit the Temporal Graph for <a id ="visualizationID" href="">grants</a> of the Organization</p>
<p>This Organization has neither Sub-Organizations nor People. Please visit the Organization's <a href="${organizationVivoProfileURL}">profile page.</a></p>
</div>

View file

@ -0,0 +1,12 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#assign standardVisualizationURLRoot ="/visualization">
<#assign organizationVivoProfileURL = "${urls.base}/individual?uri=${organizationURI?url}">
<#assign temporalGraphURL = '${urls.base}${standardVisualizationURLRoot}?vis=${otherVisType}&uri=${organizationURI}&labelField=label'>
<div id="error-body">
<p>Visit the Temporal Graph for <a href="${temporalGraphURL}">${textForOtherEntityComparisonType}</a> of the Organization.</p>
<p>This Organization has neither Sub-Organizations nor People with ${textForCurrentEntityComparisonType} in VIVO. Please visit the
Organization's <a href="${organizationVivoProfileURL}">profile page.</a></p>
</div>

View file

@ -0,0 +1,7 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#assign otherVisType = "entity_comparison">
<#assign textForOtherEntityComparisonType = "publications">
<#assign textForCurrentEntityComparisonType = "grants">
<#include "entityComparisonErrorCommonBody.ftl">

View file

@ -0,0 +1,7 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#assign otherVisType = "entity_grant_count">
<#assign textForOtherEntityComparisonType = "grants">
<#assign textForCurrentEntityComparisonType = "publications">
<#include "entityComparisonErrorCommonBody.ftl">

View file

@ -274,14 +274,12 @@ public class EntityPublicationCountRequestHandler implements
VitroRequest vitroRequest, String entityURI) {
Portal portal = vitroRequest.getPortal();
String visualization = "ENTITY_PUB_COUNT";
String standaloneTemplate = "entityComparisonErrorActivator.ftl";
String standaloneTemplate = "entityPublicationComparisonError.ftl";
Map<String, Object> body = new HashMap<String, Object>();
body.put("portalBean", portal);
body.put("title", "Temporal Graph Visualization");
body.put("organizationURI", entityURI);
body.put("visualization", visualization);
return new TemplateResponseValues(standaloneTemplate, body);

View file

@ -163,17 +163,14 @@ public class EntityGrantCountRequestHandler implements
VitroRequest vitroRequest, String entityURI) {
Portal portal = vitroRequest.getPortal();
String visualization = "ENTITY_GRANT_COUNT";
String standaloneTemplate = "entityComparisonErrorActivator.ftl";
String standaloneTemplate = "entityGrantComparisonError.ftl";
Map<String, Object> body = new HashMap<String, Object>();
body.put("portalBean", portal);
body.put("title", "Temporal Graph Visualization");
body.put("organizationURI", entityURI);
body.put("visualization", visualization);
return new TemplateResponseValues(standaloneTemplate, body);
}