From 43269929a6be068f207ec612d141adc5b8eb73c2 Mon Sep 17 00:00:00 2001 From: cdtank Date: Mon, 7 Feb 2011 21:17:27 +0000 Subject: [PATCH] 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) --- .../entityComparisonErrorActivator.ftl | 47 ------------------- .../entityComparisonErrorCommonBody.ftl | 12 +++++ .../entityGrantComparisonError.ftl | 7 +++ .../entityPublicationComparisonError.ftl | 7 +++ .../EntityPublicationCountRequestHandler.java | 4 +- .../EntityGrantCountRequestHandler.java | 5 +- 6 files changed, 28 insertions(+), 54 deletions(-) delete mode 100644 productMods/templates/freemarker/visualization/entitycomparison/entityComparisonErrorActivator.ftl create mode 100644 productMods/templates/freemarker/visualization/entitycomparison/entityComparisonErrorCommonBody.ftl create mode 100644 productMods/templates/freemarker/visualization/entitycomparison/entityGrantComparisonError.ftl create mode 100644 productMods/templates/freemarker/visualization/entitycomparison/entityPublicationComparisonError.ftl diff --git a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonErrorActivator.ftl b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonErrorActivator.ftl deleted file mode 100644 index 2c83b04f..00000000 --- a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonErrorActivator.ftl +++ /dev/null @@ -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 --> - - - - -
-

Visit the Temporal Graph for grants of the Organization

-

This Organization has neither Sub-Organizations nor People. Please visit the Organization's profile page.

-
- diff --git a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonErrorCommonBody.ftl b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonErrorCommonBody.ftl new file mode 100644 index 00000000..a0999e1b --- /dev/null +++ b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonErrorCommonBody.ftl @@ -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'> + +
+

Visit the Temporal Graph for ${textForOtherEntityComparisonType} of the Organization.

+

This Organization has neither Sub-Organizations nor People with ${textForCurrentEntityComparisonType} in VIVO. Please visit the + Organization's profile page.

+
\ No newline at end of file diff --git a/productMods/templates/freemarker/visualization/entitycomparison/entityGrantComparisonError.ftl b/productMods/templates/freemarker/visualization/entitycomparison/entityGrantComparisonError.ftl new file mode 100644 index 00000000..aad4f1c0 --- /dev/null +++ b/productMods/templates/freemarker/visualization/entitycomparison/entityGrantComparisonError.ftl @@ -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"> \ No newline at end of file diff --git a/productMods/templates/freemarker/visualization/entitycomparison/entityPublicationComparisonError.ftl b/productMods/templates/freemarker/visualization/entitycomparison/entityPublicationComparisonError.ftl new file mode 100644 index 00000000..7d736d38 --- /dev/null +++ b/productMods/templates/freemarker/visualization/entitycomparison/entityPublicationComparisonError.ftl @@ -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"> \ No newline at end of file diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntityPublicationCountRequestHandler.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntityPublicationCountRequestHandler.java index d6087749..d123b61d 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntityPublicationCountRequestHandler.java +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntityPublicationCountRequestHandler.java @@ -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 body = new HashMap(); body.put("portalBean", portal); body.put("title", "Temporal Graph Visualization"); body.put("organizationURI", entityURI); - body.put("visualization", visualization); return new TemplateResponseValues(standaloneTemplate, body); diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitygrantcount/EntityGrantCountRequestHandler.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitygrantcount/EntityGrantCountRequestHandler.java index c88fed43..21619dc1 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitygrantcount/EntityGrantCountRequestHandler.java +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitygrantcount/EntityGrantCountRequestHandler.java @@ -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 body = new HashMap(); body.put("portalBean", portal); body.put("title", "Temporal Graph Visualization"); body.put("organizationURI", entityURI); - body.put("visualization", visualization); return new TemplateResponseValues(standaloneTemplate, body); - }