diff --git a/productMods/js/visualization/entitycomparison/util.js b/productMods/js/visualization/entitycomparison/util.js index d40e94ca..e69d1c84 100644 --- a/productMods/js/visualization/entitycomparison/util.js +++ b/productMods/js/visualization/entitycomparison/util.js @@ -736,7 +736,11 @@ function prepareTableForDataTablePagination(jsonData){ entityLabelTH.html('Entity Label'); var publicationCountTH = $(''); - publicationCountTH.html('Publication Count'); + if($("select.comparisonValues option:selected").text() === "by Publications"){ + publicationCountTH.html('Publication Count'); + }else{ + publicationCountTH.html('Grant Count'); + } var entityTypeTH = $(''); entityTypeTH.html('Entity Type'); diff --git a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonErrorActivator.ftl b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonErrorActivator.ftl index 8ab1dbb3..36e91d0d 100644 --- a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonErrorActivator.ftl +++ b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonErrorActivator.ftl @@ -11,5 +11,5 @@ var contextPath = "${urls.base}";
-

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

+

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

\ No newline at end of file diff --git a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonGrantsStandaloneActivator.ftl b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonGrantsStandaloneActivator.ftl new file mode 100644 index 00000000..b966b06f --- /dev/null +++ b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonGrantsStandaloneActivator.ftl @@ -0,0 +1,369 @@ +<#-- $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 jsonContent ="${jsonContent}"> +<#assign organizationLabel = "${organizationLabel}"> +<#assign organizationVivoProfileURL = "${urls.base}/individual?uri=${organizationURI}"> +<#assign subOrganizationTemporalGraphURL = "${urls.base}${standardVisualizationURLRoot}?vis=entity_grant_count"> +<#assign subOrganizationTemporalGraphPubURL = "${urls.base}${standardVisualizationURLRoot}?vis=entity_comparison"> +<#assign subOrganizationVivoProfileURL = "${urls.base}/individual?"> + + + +<#assign temporalGraphSmallIcon = '${urls.images}/visualization/temporal_vis_small_icon.jpg'> + + +<#assign TemporalGraphDownloadFile = '${urls.base}${dataVisualizationURLRoot}?vis=entity_grant_count&uri=${organizationURI}&labelField=label'> + + +<#-- Javascript files --> + +<#assign flot = '${urls.base}/js/visualization/entitycomparison/jquery_plugins/flot/jquery.flot.js'> +<#assign excanvas = '${urls.base}/js/visualization/entitycomparison/jquery_plugins/flot/excanvas.js'> + + + + +<#assign fliptext = '${urls.base}/js/visualization/entitycomparison/jquery_plugins/fliptext/jquery.mb.flipText.js'> + +<#assign jqueryNotify = '${urls.base}/js/jquery_plugins/jquery.notify.min.js'> +<#assign jqueryUI = '${urls.base}/js/jquery-ui/js/jquery-ui-1.8.4.custom.min.js'> + +<#assign datatable = '${urls.base}/js/visualization/entitycomparison/jquery_plugins/datatable/jquery.dataTables.js'> +<#assign autoellipsis = '${urls.base}/js/visualization/entitycomparison/jquery_plugins/jquery.AutoEllipsis.js'> + +<#assign entityComparisonUtils = '${urls.base}/js/visualization/entitycomparison/util.js'> +<#assign entityComparisonConstants = '${urls.base}/js/visualization/entitycomparison/constants.js'> + + + + + + + + + + + + + + + + + +<#-- CSS files --> + + +<#assign demoTable = "${urls.base}/js/visualization/entitycomparison/jquery_plugins/datatable/demo_table.css" /> + +<#assign jqueryUIStyle = "${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.8.4.custom.css" /> +<#assign jqueryNotifyStyle = "${urls.base}/css/jquery_plugins/ui.notify.css" /> + +<#assign entityComparisonStyle = "${urls.base}/css/visualization/entitycomparison/layout.css" /> +<#assign entityComparisonStyleIEHack = "${urls.base}/css/visualization/entitycomparison/layout-ie.css" /> + +<#assign vizStyle = "${urls.base}/css/visualization/visualization.css" /> + + + + + + + + + + + +<#-- variables passed from server-side code --> + + + + +
+ +

+ +
+
+

How do you want to compare?

+ +
+ + + +
+
+ +
+ +

Who do you want to compare?

+
+
+ Save as CSV +
+<#-- +
+ * The entity types core:Person, foaf:Organization have been excluded as they are too general. +
+--> +
+ +
+ +

Comparing Grants of Institutions in

+ +
+
+
+
Year
+
+ +
+

+

You have selected 0 of a maximum + 10 schools to compare. + Clear

+ +
+
+
\ No newline at end of file diff --git a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonStandaloneActivator.ftl b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonStandaloneActivator.ftl index 9096ff60..0e1723b3 100644 --- a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonStandaloneActivator.ftl +++ b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonStandaloneActivator.ftl @@ -9,6 +9,7 @@ <#assign organizationLabel = "${organizationLabel}"> <#assign organizationVivoProfileURL = "${urls.base}/individual?uri=${organizationURI}"> <#assign subOrganizationTemporalGraphURL = "${urls.base}${standardVisualizationURLRoot}?vis=entity_comparison"> +<#assign subOrganizationTemporalGraphGrantURL = "${urls.base}${standardVisualizationURLRoot}?vis=entity_grant_count"> <#assign subOrganizationVivoProfileURL = "${urls.base}/individual?"> @@ -87,6 +88,7 @@ var temporalGraphDownloadFile = "${TemporalGraphDownloadFile}" var temporalGraphSmallIcon = "${temporalGraphSmallIcon}"; var subOrganizationVivoProfileURL = "${subOrganizationVivoProfileURL}"; var subOrganizationTemporalGraphURL = "${subOrganizationTemporalGraphURL}"; +var subOrganizationTemporalGraphGrantURL = "${subOrganizationTemporalGraphGrantURL}"; @@ -137,6 +139,13 @@ var subOrganizationTemporalGraphURL = "${subOrganizationTemporalGraphURL}"; clearRenderedObjects(); }); + $("select.comparisonValues").change(function(){ + console.log($("select.comparisonValues option:selected").text()); + if($("select.comparisonValues option:selected").text() === "by Grants"){ + window.location = subOrganizationTemporalGraphGrantURL + "&uri=" + "${organizationURI}"; + } + }); + $("input[type=checkbox].easyDeselectCheckbox").live('click', function(){ var checkbox = $(this); 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 1e58c20a..924d3e20 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 @@ -141,7 +141,7 @@ public class EntityGrantCountRequestHandler implements Entity entity, String entityURI, Map> subOrganizationTypesResult) { Portal portal = vreq.getPortal(); - String standaloneTemplate = "entityComparisonStandaloneActivator.ftl"; + String standaloneTemplate = "entityComparisonGrantsStandaloneActivator.ftl"; String jsonContent = ""; jsonContent = writeGrantsOverTimeJSON(vreq, entity.getSubEntities(), subOrganizationTypesResult);