NIVIVO - 1732 For temporal graph vis if an organization does not have any publications then there is no option to switch to "by Grants" mode
This commit is contained in:
parent
5c43a368a5
commit
239b6d40d7
3 changed files with 38 additions and 2 deletions
|
@ -1,15 +1,47 @@
|
|||
<#-- $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>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -164,13 +164,15 @@ public class EntityPublicationCountRequestHandler implements
|
|||
VitroRequest vitroRequest, String entityURI) {
|
||||
|
||||
Portal portal = vitroRequest.getPortal();
|
||||
String visualization = "ENTITY_PUB_COUNT";
|
||||
String standaloneTemplate = "entityComparisonErrorActivator.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);
|
||||
|
||||
}
|
||||
|
|
|
@ -163,12 +163,14 @@ public class EntityGrantCountRequestHandler implements
|
|||
VitroRequest vitroRequest, String entityURI) {
|
||||
|
||||
Portal portal = vitroRequest.getPortal();
|
||||
String visualization = "ENTITY_GRANT_COUNT";
|
||||
String standaloneTemplate = "entityComparisonErrorActivator.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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue