1. Added checking for 0 co-authorships. In that case dont make the flash vis call& other related ajax calls. Print an alternative message.
This commit is contained in:
parent
c30d99692a
commit
154c9e6dba
2 changed files with 57 additions and 6 deletions
|
@ -164,6 +164,7 @@ public class VisualizationRequestHandler {
|
||||||
prepareVisualizationQueryStandaloneResponse(egoURIParam,
|
prepareVisualizationQueryStandaloneResponse(egoURIParam,
|
||||||
publicationSparklineVO,
|
publicationSparklineVO,
|
||||||
uniqueCoauthorsSparklineVO,
|
uniqueCoauthorsSparklineVO,
|
||||||
|
coAuthorshipVO,
|
||||||
egoPubSparklineVisContainerID,
|
egoPubSparklineVisContainerID,
|
||||||
uniqueCoauthorsSparklineVisContainerID,
|
uniqueCoauthorsSparklineVisContainerID,
|
||||||
request,
|
request,
|
||||||
|
@ -364,7 +365,11 @@ public class VisualizationRequestHandler {
|
||||||
private void prepareVisualizationQueryStandaloneResponse(
|
private void prepareVisualizationQueryStandaloneResponse(
|
||||||
String egoURIParam,
|
String egoURIParam,
|
||||||
SparklineVOContainer egoPubSparklineVO,
|
SparklineVOContainer egoPubSparklineVO,
|
||||||
SparklineVOContainer uniqueCoauthorsSparklineVO, String egoPubSparklineVisContainer, String uniqueCoauthorsSparklineVisContainer, HttpServletRequest request,
|
SparklineVOContainer uniqueCoauthorsSparklineVO,
|
||||||
|
VisVOContainer coAuthorshipVO,
|
||||||
|
String egoPubSparklineVisContainer,
|
||||||
|
String uniqueCoauthorsSparklineVisContainer,
|
||||||
|
HttpServletRequest request,
|
||||||
HttpServletResponse response,
|
HttpServletResponse response,
|
||||||
VitroRequest vreq) {
|
VitroRequest vreq) {
|
||||||
|
|
||||||
|
@ -372,6 +377,15 @@ public class VisualizationRequestHandler {
|
||||||
|
|
||||||
request.setAttribute("egoURIParam", egoURIParam);
|
request.setAttribute("egoURIParam", egoURIParam);
|
||||||
|
|
||||||
|
if (coAuthorshipVO.getNodes() != null) {
|
||||||
|
request.setAttribute("numOfAuthors", coAuthorshipVO.getNodes().size());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (coAuthorshipVO.getEdges() != null) {
|
||||||
|
request.setAttribute("numOfCoAuthorShips", coAuthorshipVO.getEdges().size());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
request.setAttribute("egoPubSparklineVO", egoPubSparklineVO);
|
request.setAttribute("egoPubSparklineVO", egoPubSparklineVO);
|
||||||
request.setAttribute("uniqueCoauthorsSparklineVO", uniqueCoauthorsSparklineVO);
|
request.setAttribute("uniqueCoauthorsSparklineVO", uniqueCoauthorsSparklineVO);
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,10 @@
|
||||||
<c:set var='egoPubSparklineContainerID' value='${requestScope.egoPubSparklineContainerID}' />
|
<c:set var='egoPubSparklineContainerID' value='${requestScope.egoPubSparklineContainerID}' />
|
||||||
<c:set var='uniqueCoauthorsSparklineVisContainerID' value='${requestScope.uniqueCoauthorsSparklineVisContainerID}' />
|
<c:set var='uniqueCoauthorsSparklineVisContainerID' value='${requestScope.uniqueCoauthorsSparklineVisContainerID}' />
|
||||||
|
|
||||||
|
<c:set var='numOfAuthors' value='${requestScope.numOfAuthors}' />
|
||||||
|
<c:set var='numOfCoAuthorShips' value='${requestScope.numOfCoAuthorShips}' />
|
||||||
|
|
||||||
|
|
||||||
<c:url var="egoSparklineDataURL" value="/admin/visQuery">
|
<c:url var="egoSparklineDataURL" value="/admin/visQuery">
|
||||||
<c:param name="render_mode" value="data" />
|
<c:param name="render_mode" value="data" />
|
||||||
<c:param name="vis" value="person_pub_count" />
|
<c:param name="vis" value="person_pub_count" />
|
||||||
|
@ -150,11 +154,23 @@
|
||||||
${uniqueCoauthorsSparkline.sparklineContent}
|
${uniqueCoauthorsSparkline.sparklineContent}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2 class="sub_headings">Co-Author Network <a href="${coAuthorshipDownloadFile}">(.GraphML File)</a></h2>
|
<h2 class="sub_headings">Co-Author Network
|
||||||
|
<%-- A simple if/else condition --%>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test='${numOfCoAuthorShips > 0}'>
|
||||||
|
<a href="${coAuthorshipDownloadFile}">(.GraphML File)</a></h2>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
</h2>
|
||||||
|
<span id="no_coauthorships">Currently there are no multi-author papers for <span id="no_coauthorships_person">this author</span> in the VIVO database.</span>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<c:if test='${numOfCoAuthorShips > 0}'>
|
||||||
|
|
||||||
<div id="bodyPannel">
|
<div id="bodyPannel">
|
||||||
|
|
||||||
|
@ -190,6 +206,8 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</c:if>
|
||||||
|
|
||||||
<div class="vis_stats">
|
<div class="vis_stats">
|
||||||
|
|
||||||
<h2 class="sub_headings">Tables</h2>
|
<h2 class="sub_headings">Tables</h2>
|
||||||
|
@ -199,10 +217,14 @@
|
||||||
${egoPubSparkline.table}
|
${egoPubSparkline.table}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<c:if test='${numOfCoAuthorShips > 0}'>
|
||||||
|
|
||||||
<div class="vis-tables">
|
<div class="vis-tables">
|
||||||
<p id="coauth_table_container" class="datatable"></p>
|
<p id="coauth_table_container" class="datatable"></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</c:if>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -214,12 +236,27 @@
|
||||||
<script language="JavaScript" type="text/javascript">
|
<script language="JavaScript" type="text/javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
$("#coauth_table_container").empty().html('<img id="loadingData" with="auto" src="${loadingImageLink}" />');
|
<c:choose>
|
||||||
|
<c:when test='${numOfCoAuthorShips > 0}'>
|
||||||
|
$("#coauth_table_container").empty().html('<img id="loadingData" with="auto" src="${loadingImageLink}" />');
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
setProfileName('no_coauthorships_person', $('#ego_label').text());
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
processProfileInformation("ego_label",
|
processProfileInformation("ego_label",
|
||||||
"ego_moniker",
|
"ego_moniker",
|
||||||
"ego_profile_image",
|
"ego_profile_image",
|
||||||
jQuery.parseJSON(getWellFormedURLs("${requestScope.egoURIParam}", "profile_info")));
|
jQuery.parseJSON(getWellFormedURLs("${requestScope.egoURIParam}", "profile_info")));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
Loading…
Add table
Add a link
Reference in a new issue