hide the manage pubs and manage grants links if there are no pubs or grants

This commit is contained in:
tworrall 2012-06-20 21:24:35 +00:00
parent 5936f35cd0
commit 5f026bb847
2 changed files with 13 additions and 1 deletions

View file

@ -241,7 +241,7 @@ a.qrCloseLink {
background: #f4f4f4;
}
/* <---- Manage Prop Link, individual-properties.ftl -----*/
a#managePropLink {
a.manageLinks {
float:right;font-size:.8em;
padding-right:10px;
display:inline;

View file

@ -97,4 +97,16 @@ $(document).ready(function(){
$('#qrCodeImage').toggleClass('hidden');
return false;
});
// if there are no selected pub, hide the manage link; same for grants
if ( $('ul#authorInAuthorshipList').children('li').length < 1 ) {
$('a#managePropLink').hide();
}
if ( $('ul#hasResearcherRoleList').children('li').length < 1 &&
$('ul#hasPrincipalInvestigatorRoleList').children('li').length < 1 &&
$('ul#hasCo-PrincipalInvestigatorRoleList').children('li').length < 1 &&
$('ul#hasInvestigatorRoleList').children('li').length < 1 ) {
$('a#manageGrantLink').hide();
}
});