merging r4252 to the trunk
This commit is contained in:
parent
d5624a9669
commit
cefee06309
7 changed files with 76 additions and 12 deletions
|
@ -24,6 +24,7 @@
|
||||||
?appearsIn
|
?appearsIn
|
||||||
?partOf
|
?partOf
|
||||||
?editor
|
?editor
|
||||||
|
?hideThis
|
||||||
WHERE {
|
WHERE {
|
||||||
?subject ?property ?authorship
|
?subject ?property ?authorship
|
||||||
OPTIONAL { ?authorship core:linkedInformationResource ?infoResource .
|
OPTIONAL { ?authorship core:linkedInformationResource ?infoResource .
|
||||||
|
@ -55,8 +56,9 @@
|
||||||
OPTIONAL { ?infoResource core:dateTimeValue ?dateTimeValue .
|
OPTIONAL { ?infoResource core:dateTimeValue ?dateTimeValue .
|
||||||
?dateTimeValue core:dateTime ?dateTime
|
?dateTimeValue core:dateTime ?dateTime
|
||||||
}
|
}
|
||||||
|
OPTIONAL { ?authorship core:hideFromDisplay ?hideThis }
|
||||||
}
|
}
|
||||||
NOT EXISTS { ?authorship core:hideFromDisplay ?hideThis }
|
# NOT EXISTS { ?authorship core:hideFromDisplay ?hideThis }
|
||||||
<critical-data-required>
|
<critical-data-required>
|
||||||
FILTER ( bound(?infoResource) )
|
FILTER ( bound(?infoResource) )
|
||||||
</critical-data-required>
|
</critical-data-required>
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
?adminedByLabel
|
?adminedByLabel
|
||||||
?dateTimeStartRole ?dateTimeEndRole
|
?dateTimeStartRole ?dateTimeEndRole
|
||||||
?dateTimeStartGrant ?dateTimeEndGrant
|
?dateTimeStartGrant ?dateTimeEndGrant
|
||||||
|
?hideThis
|
||||||
WHERE {
|
WHERE {
|
||||||
|
|
||||||
?subject ?property ?role
|
?subject ?property ?role
|
||||||
|
@ -55,7 +56,8 @@
|
||||||
?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant
|
?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
NOT EXISTS { ?role core:hideFromDisplay ?hideThis }
|
OPTIONAL { ?role core:hideFromDisplay ?hideThis }
|
||||||
|
# NOT EXISTS { ?role core:hideFromDisplay ?hideThis }
|
||||||
<critical-data-required>
|
<critical-data-required>
|
||||||
FILTER ( bound(?activity) )
|
FILTER ( bound(?activity) )
|
||||||
</critical-data-required>
|
</critical-data-required>
|
||||||
|
|
|
@ -14,7 +14,9 @@
|
||||||
?position
|
?position
|
||||||
?positionTitle
|
?positionTitle
|
||||||
?person ?personName
|
?person ?personName
|
||||||
?dateTimeStart ?dateTimeEnd WHERE {
|
?dateTimeStart ?dateTimeEnd
|
||||||
|
?hideThis
|
||||||
|
WHERE {
|
||||||
?subject ?property ?position
|
?subject ?property ?position
|
||||||
OPTIONAL { ?position core:positionForPerson ?person .
|
OPTIONAL { ?position core:positionForPerson ?person .
|
||||||
?person rdfs:label ?personName
|
?person rdfs:label ?personName
|
||||||
|
@ -25,6 +27,7 @@
|
||||||
}
|
}
|
||||||
</collated>
|
</collated>
|
||||||
OPTIONAL { ?position rdfs:label ?positionTitle }
|
OPTIONAL { ?position rdfs:label ?positionTitle }
|
||||||
|
OPTIONAL { ?position core:hideFromDisplay ?hideThis }
|
||||||
OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval
|
OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval
|
||||||
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
|
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
|
||||||
?dateTimeStartValue core:dateTime ?dateTimeStart
|
?dateTimeStartValue core:dateTime ?dateTimeStart
|
||||||
|
@ -34,7 +37,7 @@
|
||||||
}
|
}
|
||||||
# Get current positions only: end date is either null or not in the past
|
# Get current positions only: end date is either null or not in the past
|
||||||
}
|
}
|
||||||
NOT EXISTS { ?position core:hideFromDisplay ?hideThis }
|
# NOT EXISTS { ?position core:hideFromDisplay ?hideThis }
|
||||||
FILTER ( !bound(?dateTimeEnd) ||
|
FILTER ( !bound(?dateTimeEnd) ||
|
||||||
afn:substring(str(?dateTimeEnd), 0, 4) >= afn:substring(str(afn:now()), 0, 4) )
|
afn:substring(str(?dateTimeEnd), 0, 4) >= afn:substring(str(afn:now()), 0, 4) )
|
||||||
<critical-data-required>
|
<critical-data-required>
|
||||||
|
|
|
@ -98,5 +98,34 @@ $(document).ready(function(){
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// For pubs and grants on the foaf:person profile, and affiliated people
|
||||||
|
// on the foaf:organization profile -- if a pub/grant/person has been hidden
|
||||||
|
// via the "manage" link, we need to ensure that the subclass heading gets removed
|
||||||
|
// if there are no items to display for that subclass.
|
||||||
|
$.each($('h3'), function() {
|
||||||
|
if ( $(this).next().attr('class') == "subclass-property-list hideThis" ) {
|
||||||
|
if ( $(this).next().children().length == 0 ) {
|
||||||
|
$(this).closest('li').remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// if there are no selected pubs, hide the manage link; same for grants
|
||||||
|
// and affiliated people on the org profile page
|
||||||
|
if ( $('ul#authorInAuthorshipList').children('li').length < 1 && $('h3#authorInAuthorship').attr('class') != "hiddenPubs" ) {
|
||||||
|
$('a#managePubLink').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 &&
|
||||||
|
$('h3#hasResearcherRole').attr('class') != "hiddenGrants" ) {
|
||||||
|
$('a#manageGrantLink').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $('ul#organizationForPositionList').children('li').length < 1 && $('h3#organizationForPosition').attr('class') != "hiddenPeople" ) {
|
||||||
|
$('a#managePeopleLink').hide();
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,16 @@
|
||||||
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
|
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
|
||||||
next statement -->
|
next statement -->
|
||||||
<#macro showAuthorship statement>
|
<#macro showAuthorship statement>
|
||||||
|
<#if statement.hideThis?has_content>
|
||||||
|
<span class="hideThis"> </span>
|
||||||
|
<script type="text/javascript" >
|
||||||
|
$('span.hideThis').parent().parent().addClass("hideThis");
|
||||||
|
if ( $('h3#authorInAuthorship').attr('class').length == 0 ) {
|
||||||
|
$('h3#authorInAuthorship').addClass('hiddenPubs');
|
||||||
|
}
|
||||||
|
$('span.hideThis').parent().remove();
|
||||||
|
</script>
|
||||||
|
<#else>
|
||||||
<#local citationDetails>
|
<#local citationDetails>
|
||||||
<#if statement.subclass??>
|
<#if statement.subclass??>
|
||||||
<#if statement.subclass?contains("Article")>
|
<#if statement.subclass?contains("Article")>
|
||||||
|
@ -103,5 +112,5 @@
|
||||||
</#local>
|
</#local>
|
||||||
|
|
||||||
${resourceTitle} ${citationDetails} <@dt.yearSpan "${statement.dateTime!}" />
|
${resourceTitle} ${citationDetails} <@dt.yearSpan "${statement.dateTime!}" />
|
||||||
|
</#if>
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
|
@ -13,6 +13,16 @@
|
||||||
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
|
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
|
||||||
next statement -->
|
next statement -->
|
||||||
<#macro showRole statement>
|
<#macro showRole statement>
|
||||||
|
<#if statement.hideThis?has_content>
|
||||||
|
<span class="hideThis"> </span>
|
||||||
|
<script type="text/javascript" >
|
||||||
|
$('span.hideThis').parent().parent().addClass("hideThis");
|
||||||
|
if ( $('h3#hasResearcherRole').attr('class').length == 0 ) {
|
||||||
|
$('h3#hasResearcherRole').addClass('hiddenGrants');
|
||||||
|
}
|
||||||
|
$('span.hideThis').parent().remove();
|
||||||
|
</script>
|
||||||
|
<#else>
|
||||||
<#local linkedIndividual>
|
<#local linkedIndividual>
|
||||||
<#if statement.activity??>
|
<#if statement.activity??>
|
||||||
<a href="${profileUrl(statement.uri("activity"))}" title="activity name">${statement.activityLabel!statement.activityName!}</a>
|
<a href="${profileUrl(statement.uri("activity"))}" title="activity name">${statement.activityLabel!statement.activityName!}</a>
|
||||||
|
@ -38,6 +48,6 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#local>
|
</#local>
|
||||||
|
|
||||||
${linkedIndividual} ${awardOrAdminBy} ${dateTime!}
|
${linkedIndividual} ${awardOrAdminBy} ${dateTime!} ${statement.subclass!}
|
||||||
|
</#if>
|
||||||
</#macro>
|
</#macro>
|
|
@ -14,7 +14,16 @@
|
||||||
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
|
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
|
||||||
next statement -->
|
next statement -->
|
||||||
<#macro showPosition statement>
|
<#macro showPosition statement>
|
||||||
|
<#if statement.hideThis?has_content>
|
||||||
|
<span class="hideThis"> </span>
|
||||||
|
<script type="text/javascript" >
|
||||||
|
$('span.hideThis').parent().parent().addClass("hideThis");
|
||||||
|
if ( $('h3#organizationForPosition').attr('class').length == 0 ) {
|
||||||
|
$('h3#organizationForPosition').addClass('hiddenPeople');
|
||||||
|
}
|
||||||
|
$('span.hideThis').parent().remove();
|
||||||
|
</script>
|
||||||
|
<#else>
|
||||||
<#local linkedIndividual>
|
<#local linkedIndividual>
|
||||||
<#if statement.person??>
|
<#if statement.person??>
|
||||||
<a href="${profileUrl(statement.uri("person"))}" title="person name">${statement.personName}</a>
|
<a href="${profileUrl(statement.uri("person"))}" title="person name">${statement.personName}</a>
|
||||||
|
@ -25,5 +34,5 @@
|
||||||
</#local>
|
</#local>
|
||||||
|
|
||||||
<@s.join [ linkedIndividual, statement.positionTitle! ] /> <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
|
<@s.join [ linkedIndividual, statement.positionTitle! ] /> <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
|
||||||
|
</#if>
|
||||||
</#macro>
|
</#macro>
|
Loading…
Add table
Reference in a new issue