1. Made changes so that on individual pages the div containers for network links & sparkline image/text is only generated if there is content to be shown. This as opposed to always creating it first, hiding it & then shoing the container if there was any content.
2. Made sure that network link DIVs are separated by border & padding only if there is need. Now if a person only has grants, on it's profile page there is no longer border & padding on top of the co-investiogator link.
This commit is contained in:
parent
5ee4bf2ac6
commit
5cacc57292
6 changed files with 179 additions and 185 deletions
|
@ -92,6 +92,7 @@ p.datatable {
|
||||||
.toggle_visualization {
|
.toggle_visualization {
|
||||||
max-width: 180px;
|
max-width: 180px;
|
||||||
float:right;
|
float:right;
|
||||||
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#grant-count-sparkline-include,
|
#grant-count-sparkline-include,
|
||||||
|
|
|
@ -48,11 +48,13 @@ span.incomplete-data-holder,
|
||||||
}
|
}
|
||||||
|
|
||||||
.collaboratorship-link-container {
|
.collaboratorship-link-container {
|
||||||
|
width: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collaboratorship-link-separator {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
display: none;
|
|
||||||
border-top: 1px dotted #A6B1B0;
|
border-top: 1px dotted #A6B1B0;
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
width: 180px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.sparkline_text {
|
.sparkline_text {
|
||||||
|
|
|
@ -21,10 +21,6 @@ var visualization = {
|
||||||
if ($.trim(data) != "") {
|
if ($.trim(data) != "") {
|
||||||
containerCoAuthor.html(data);
|
containerCoAuthor.html(data);
|
||||||
containerCoAuthor.children("#pub_count_short_sparkline_vis");
|
containerCoAuthor.children("#pub_count_short_sparkline_vis");
|
||||||
|
|
||||||
/* Since there are publications there are chances that there will be co-authors as well, so show the
|
|
||||||
* co-author network icon.*/
|
|
||||||
$("#coauthorship_link_container").show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,27 +3,19 @@
|
||||||
<#-- Template for sparkline visualization on individual profile page -->
|
<#-- Template for sparkline visualization on individual profile page -->
|
||||||
|
|
||||||
<#-- Determine whether this person is an author -->
|
<#-- Determine whether this person is an author -->
|
||||||
<#assign authorship = propertyGroups.getProperty("${core}authorInAuthorship")!false>
|
<#assign authorship = propertyGroups.getProperty("${core}authorInAuthorship")!>
|
||||||
<#assign isAuthor = p.hasStatements(authorship)!false />
|
<#assign isAuthor = p.hasStatements(authorship)!false />
|
||||||
<#-- Uncomment the following line for a quick confirmation on Publications logic -->
|
|
||||||
<#-- <h1>Publications? <#if isAuthor>Ding Ding Ding!<#else>Wah Wuh!</#if></h1> -->
|
|
||||||
|
|
||||||
<#-- Determine whether this person is involved in any grants -->
|
<#-- Determine whether this person is involved in any grants -->
|
||||||
<#assign investigatorRole = propertyGroups.getProperty("${core}hasInvestigatorRole")!false>
|
<#assign investigatorRole = propertyGroups.getProperty("${core}hasInvestigatorRole")!>
|
||||||
<#assign piRole = propertyGroups.getProperty("${core}hasPrincipalInvestigatorRole")!false>
|
<#assign piRole = propertyGroups.getProperty("${core}hasPrincipalInvestigatorRole")!>
|
||||||
<#assign coPiRole = propertyGroups.getProperty("${core}hasCo-PrincipalInvestigatorRole")!false>
|
<#assign coPiRole = propertyGroups.getProperty("${core}hasCo-PrincipalInvestigatorRole")!>
|
||||||
<#if (p.hasStatements(investigatorRole) || p.hasStatements(piRole) || p.hasStatements(coPiRole))>
|
<#if (p.hasStatements(investigatorRole) || p.hasStatements(piRole) || p.hasStatements(coPiRole))>
|
||||||
<#assign isInvestigator = true />
|
<#assign isInvestigator = true />
|
||||||
<#else>
|
<#else>
|
||||||
<#assign isInvestigator = false />
|
<#assign isInvestigator = false />
|
||||||
</#if>
|
</#if>
|
||||||
<#-- Uncomment the following line for a quick confirmation on Grants logic -->
|
|
||||||
<#-- <h1>Grants? <#if isInvestigator>Ding Ding Ding!<#else>Wah Wuh!</#if></h1> -->
|
|
||||||
|
|
||||||
<#-- NO LONGER NEEDED! GET RID OF THIS AND ANY OTHER VIVO REFERENCE IN IndividualTemplateModel.java -->
|
|
||||||
<#-- <#if individual.visualizationUrl??> -->
|
|
||||||
|
|
||||||
<#if (isAuthor || isInvestigator)>
|
|
||||||
<#assign coAuthorIcon = '${urls.images}/visualization/co_author_icon.png'>
|
<#assign coAuthorIcon = '${urls.images}/visualization/co_author_icon.png'>
|
||||||
<#assign coInvestigatorIcon = '${urls.images}/visualization/co_investigator_icon.png'>
|
<#assign coInvestigatorIcon = '${urls.images}/visualization/co_investigator_icon.png'>
|
||||||
<#assign informationIcon = '${urls.images}/iconInfo.gif'>
|
<#assign informationIcon = '${urls.images}/iconInfo.gif'>
|
||||||
|
@ -33,12 +25,21 @@
|
||||||
<#assign coInvestigatorURL = '${urls.base}${standardVisualizationURLRoot}?vis=person_level&uri=${individual.uri}&vis_mode=copi'>
|
<#assign coInvestigatorURL = '${urls.base}${standardVisualizationURLRoot}?vis=person_level&uri=${individual.uri}&vis_mode=copi'>
|
||||||
<#assign visualizationHelperJavaScript = 'js/visualization/visualization-helper-functions.js'>
|
<#assign visualizationHelperJavaScript = 'js/visualization/visualization-helper-functions.js'>
|
||||||
|
|
||||||
<section id="sparklines-publications" role="region">
|
<#if (isAuthor || isInvestigator)>
|
||||||
|
|
||||||
<img class="infoIcon" src="${informationIcon}" alt="information icon" title="The publication information may be incomplete" />
|
${stylesheets.add("css/visualization/visualization.css")}
|
||||||
|
|
||||||
|
|
||||||
|
<section id="visualization-container" role="region">
|
||||||
|
|
||||||
|
<#if isAuthor>
|
||||||
|
|
||||||
|
<img class="infoIcon" src="${informationIcon}" alt="information icon." title="The publication and grant information may be incomplete." width="20px" height="21px" />
|
||||||
|
|
||||||
<div id="vis_container_coauthor"> </div>
|
<div id="vis_container_coauthor"> </div>
|
||||||
|
|
||||||
|
<div class="collaboratorship-link-separator"></div>
|
||||||
|
|
||||||
<div id="coauthorship_link_container" class="collaboratorship-link-container">
|
<div id="coauthorship_link_container" class="collaboratorship-link-container">
|
||||||
<div class="collaboratorship-icon">
|
<div class="collaboratorship-icon">
|
||||||
<a href="${coAuthorURL}"><img src="${coAuthorIcon}" alt="Co-author Network icon" width="30px" height="30px" /></a>
|
<a href="${coAuthorURL}"><img src="${coAuthorIcon}" alt="Co-author Network icon" width="30px" height="30px" /></a>
|
||||||
|
@ -46,14 +47,6 @@
|
||||||
<div class="collaboratorship-link"><a href="${coAuthorURL}">Co-Author Network</a></div>
|
<div class="collaboratorship-link"><a href="${coAuthorURL}">Co-Author Network</a></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="coinvestigator_link_container" class="collaboratorship-link-container">
|
|
||||||
<div class="collaboratorship-icon">
|
|
||||||
<a href="${coInvestigatorURL}"><img src="${coInvestigatorIcon}" alt="Co-investigator Network icon" width="30px" height="30px" /></a>
|
|
||||||
</div>
|
|
||||||
<div class="collaboratorship-link"><a href="${coInvestigatorURL}">Co-Investigator Network</a></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
${stylesheets.add("css/visualization/visualization.css")}
|
|
||||||
${scripts.add(googleJSAPI)}
|
${scripts.add(googleJSAPI)}
|
||||||
${scripts.add(visualizationHelperJavaScript)}
|
${scripts.add(visualizationHelperJavaScript)}
|
||||||
${scripts.add("/js/visualization/sparkline.js")}
|
${scripts.add("/js/visualization/sparkline.js")}
|
||||||
|
@ -61,23 +54,25 @@
|
||||||
<#-- Aside from the variable declarations, this should be moved to an external js file -->
|
<#-- Aside from the variable declarations, this should be moved to an external js file -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var visualizationUrl = '${individual.visualizationUrl}';
|
var visualizationUrl = '${individual.visualizationUrl}';
|
||||||
|
|
||||||
$(document).ready(function(){
|
|
||||||
$.ajax({
|
|
||||||
url: "${urls.base}/visualizationAjax",
|
|
||||||
data: ({vis: "utilities", vis_mode: "SHOW_GRANTS_LINK", uri: '${individual.uri}'}),
|
|
||||||
dataType: "json",
|
|
||||||
success:function(data){
|
|
||||||
/*
|
|
||||||
Collaboratorship links do not show up by default. They should show up only if there any data to
|
|
||||||
show on that page.
|
|
||||||
*/
|
|
||||||
if (data.numOfGrants !== undefined && data.numOfGrants > 0) {
|
|
||||||
$("#coinvestigator_link_container").show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
</section>
|
|
||||||
|
<#if isInvestigator>
|
||||||
|
<div class="collaboratorship-link-separator"></div>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#if isInvestigator>
|
||||||
|
|
||||||
|
<div id="coinvestigator_link_container" class="collaboratorship-link-container">
|
||||||
|
<div class="collaboratorship-icon">
|
||||||
|
<a href="${coInvestigatorURL}"><img src="${coInvestigatorIcon}" alt="Co-investigator Network icon" width="30px" height="30px" /></a>
|
||||||
|
</div>
|
||||||
|
<div class="collaboratorship-link"><a href="${coInvestigatorURL}">Co-Investigator Network</a></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
</#if>
|
</#if>
|
|
@ -97,7 +97,7 @@ $(document).ready(function(){
|
||||||
show on that page.
|
show on that page.
|
||||||
*/
|
*/
|
||||||
if (data.numOfGrants !== undefined && data.numOfGrants > 0) {
|
if (data.numOfGrants !== undefined && data.numOfGrants > 0) {
|
||||||
$("#coinvestigator_link_container").show();
|
$(".toggle_visualization").show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,7 +96,7 @@ $(document).ready(function(){
|
||||||
show on that page.
|
show on that page.
|
||||||
*/
|
*/
|
||||||
if (data.numOfPublications !== undefined && data.numOfPublications > 0) {
|
if (data.numOfPublications !== undefined && data.numOfPublications > 0) {
|
||||||
$("#coauthorship_link_container").show();
|
$(".toggle_visualization").show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue