diff --git a/productMods/config/listViewConfig-authorInAuthorship.xml b/productMods/config/listViewConfig-authorInAuthorship.xml
index aae6099c..31d4c7d5 100644
--- a/productMods/config/listViewConfig-authorInAuthorship.xml
+++ b/productMods/config/listViewConfig-authorInAuthorship.xml
@@ -24,6 +24,7 @@
?appearsIn
?partOf
?editor
+ ?hideThis
WHERE {
?subject ?property ?authorship
OPTIONAL { ?authorship core:linkedInformationResource ?infoResource .
@@ -54,9 +55,10 @@
}
OPTIONAL { ?infoResource core:dateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime
- }
+ }
+ OPTIONAL { ?authorship core:hideFromDisplay ?hideThis }
}
- NOT EXISTS { ?authorship core:hideFromDisplay ?hideThis }
+ # NOT EXISTS { ?authorship core:hideFromDisplay ?hideThis }
FILTER ( bound(?infoResource) )
diff --git a/productMods/config/listViewConfig-hasInvestigatorRole.xml b/productMods/config/listViewConfig-hasInvestigatorRole.xml
index ebf8b0d8..05b9e106 100644
--- a/productMods/config/listViewConfig-hasInvestigatorRole.xml
+++ b/productMods/config/listViewConfig-hasInvestigatorRole.xml
@@ -20,6 +20,7 @@
?adminedByLabel
?dateTimeStartRole ?dateTimeEndRole
?dateTimeStartGrant ?dateTimeEndGrant
+ ?hideThis
WHERE {
?subject ?property ?role
@@ -55,7 +56,8 @@
?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant
}
}
- NOT EXISTS { ?role core:hideFromDisplay ?hideThis }
+ OPTIONAL { ?role core:hideFromDisplay ?hideThis }
+ # NOT EXISTS { ?role core:hideFromDisplay ?hideThis }
FILTER ( bound(?activity) )
diff --git a/productMods/config/listViewConfig-organizationForPosition.xml b/productMods/config/listViewConfig-organizationForPosition.xml
index 4330cd3b..ec122fe2 100644
--- a/productMods/config/listViewConfig-organizationForPosition.xml
+++ b/productMods/config/listViewConfig-organizationForPosition.xml
@@ -14,7 +14,9 @@
?position
?positionTitle
?person ?personName
- ?dateTimeStart ?dateTimeEnd WHERE {
+ ?dateTimeStart ?dateTimeEnd
+ ?hideThis
+ WHERE {
?subject ?property ?position
OPTIONAL { ?position core:positionForPerson ?person .
?person rdfs:label ?personName
@@ -25,6 +27,7 @@
}
OPTIONAL { ?position rdfs:label ?positionTitle }
+ OPTIONAL { ?position core:hideFromDisplay ?hideThis }
OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
@@ -34,7 +37,7 @@
}
# 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) ||
afn:substring(str(?dateTimeEnd), 0, 4) >= afn:substring(str(afn:now()), 0, 4) )
diff --git a/productMods/js/individual/individualUtils.js b/productMods/js/individual/individualUtils.js
index df3a9ac5..fe8485f0 100644
--- a/productMods/js/individual/individualUtils.js
+++ b/productMods/js/individual/individualUtils.js
@@ -97,6 +97,35 @@ $(document).ready(function(){
$('#qrCodeImage').toggleClass('hidden');
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();
+ }
});
diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-authorInAuthorship.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-authorInAuthorship.ftl
index bb9f7491..64b9e80e 100644
--- a/productMods/templates/freemarker/body/partials/individual/propStatement-authorInAuthorship.ftl
+++ b/productMods/templates/freemarker/body/partials/individual/propStatement-authorInAuthorship.ftl
@@ -14,7 +14,16 @@
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
next statement -->
<#macro showAuthorship statement>
-
+<#if statement.hideThis?has_content>
+
+
+<#else>
<#local citationDetails>
<#if statement.subclass??>
<#if statement.subclass?contains("Article")>
@@ -103,5 +112,5 @@
#local>
${resourceTitle} ${citationDetails} <@dt.yearSpan "${statement.dateTime!}" />
-
+#if>
#macro>
diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-hasInvestigatorRole.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-hasInvestigatorRole.ftl
index f1309a32..f1cb574b 100644
--- a/productMods/templates/freemarker/body/partials/individual/propStatement-hasInvestigatorRole.ftl
+++ b/productMods/templates/freemarker/body/partials/individual/propStatement-hasInvestigatorRole.ftl
@@ -13,6 +13,16 @@
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
next statement -->
<#macro showRole statement>
+<#if statement.hideThis?has_content>
+
+
+<#else>
<#local linkedIndividual>
<#if statement.activity??>
${statement.activityLabel!statement.activityName!}
@@ -38,6 +48,6 @@
#if>
#local>
- ${linkedIndividual} ${awardOrAdminBy} ${dateTime!}
-
+ ${linkedIndividual} ${awardOrAdminBy} ${dateTime!} ${statement.subclass!}
+#if>
#macro>
\ No newline at end of file
diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-organizationForPosition.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-organizationForPosition.ftl
index bec9ec01..9874c81f 100644
--- a/productMods/templates/freemarker/body/partials/individual/propStatement-organizationForPosition.ftl
+++ b/productMods/templates/freemarker/body/partials/individual/propStatement-organizationForPosition.ftl
@@ -14,7 +14,16 @@
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
next statement -->
<#macro showPosition statement>
-
+<#if statement.hideThis?has_content>
+
+
+<#else>
<#local linkedIndividual>
<#if statement.person??>
${statement.personName}
@@ -25,5 +34,5 @@
#local>
<@s.join [ linkedIndividual, statement.positionTitle! ] /> <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
-
+#if>
#macro>
\ No newline at end of file