diff --git a/productMods/js/visualization/coPIship/coPIship-person-level.js b/productMods/js/visualization/coPIship/coPIship-person-level.js index b0cb2a3c..28796980 100644 --- a/productMods/js/visualization/coPIship/coPIship-person-level.js +++ b/productMods/js/visualization/coPIship/coPIship-person-level.js @@ -46,16 +46,33 @@ function renderStatsOnNodeClicked(json){ $('#num_works > .investigator_stats_text').text(works); $('#num_investigators > .investigator_stats_text').text(persons); + var vivoProfileURL = $("a#profileUrl").detach(); + + $("#profile-links").empty().append(vivoProfileURL); + } else { $("#investigatorName").addClass('neutral_investigator_name').removeClass('investigator_name'); $('#num_works > .investigator_stats_text').text('Joint ' + works); $('#num_investigators > .investigator_stats_text').text('Joint ' + persons); + + if ($("#coInvestigationVisUrl").length > 0) { + + $("#coInvestigationVisUrl").attr("href", getWellFormedURLs(obj.url, relation)); + + } else { + + $("#profile-links") + .append(" | ") + .append('Co-investigator network'); + } + } $("#profileUrl").attr("href", getWellFormedURLs(obj.url, "profile")); - $("#coInvestigationVisUrl").attr("href", getWellFormedURLs(obj.url, relation)); + processProfileInformation("investigatorName", "profileMoniker", "profileImage", diff --git a/productMods/js/visualization/coauthorship/coauthorship-personlevel.js b/productMods/js/visualization/coauthorship/coauthorship-personlevel.js index d56700a9..b81f9212 100644 --- a/productMods/js/visualization/coauthorship/coauthorship-personlevel.js +++ b/productMods/js/visualization/coauthorship/coauthorship-personlevel.js @@ -44,16 +44,31 @@ function renderStatsOnNodeClicked(json){ $('#num_works > .author_stats_text').text(works); $('#num_authors > .author_stats_text').text(persons); + var vivoProfileURL = $("a#profileUrl").detach(); + + $("#profile-links").empty().append(vivoProfileURL); + } else { $("#authorName").addClass('neutral_author_name').removeClass('author_name'); $('#num_works > .author_stats_text').text('Joint ' + works); $('#num_authors > .author_stats_text').text('Joint ' + persons); - + + if ($("#coAuthorshipVisUrl").length > 0) { + + $("#coAuthorshipVisUrl").attr("href", getWellFormedURLs(obj.url, relation)); + + } else { + + $("#profile-links") + .append(" | ") + .append('Co-author network'); + } } $("#profileUrl").attr("href", getWellFormedURLs(obj.url, "profile")); - $("#coAuthorshipVisUrl").attr("href", getWellFormedURLs(obj.url, relation)); + processProfileInformation("authorName", "profileMoniker", "profileImage", @@ -63,7 +78,7 @@ function renderStatsOnNodeClicked(json){ - } else{ + } else { $("#profileUrl").attr("href","#"); $("#coAuthorshipVisUrl").attr("href","#"); } diff --git a/productMods/templates/freemarker/visualization/personlevel/coAuthorPersonLevel.ftl b/productMods/templates/freemarker/visualization/personlevel/coAuthorPersonLevel.ftl index 280d39db..c0507fce 100644 --- a/productMods/templates/freemarker/visualization/personlevel/coAuthorPersonLevel.ftl +++ b/productMods/templates/freemarker/visualization/personlevel/coAuthorPersonLevel.ftl @@ -171,7 +171,7 @@ $(document).ready(function(){