Merge r1390-1395 from rel-1.1.-maint: custom sorting and collation

This commit is contained in:
rjy7 2010-09-28 15:02:39 +00:00
parent cf56748128
commit 9a918e911f
4 changed files with 65 additions and 15 deletions

View file

@ -2516,6 +2516,7 @@
<vitro:displayRankAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#int">-1</vitro:displayRankAnnot>
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:displayLimitAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#int">-1</vitro:displayLimitAnnot>
<vitro:customShortViewAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#string">informationResourceShortView.jsp</vitro:customShortViewAnnot>
</rdf:Description>
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#wipo-ipc">
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
@ -3293,6 +3294,7 @@
<vitro:fullPropertyNameAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#string">has authorship</vitro:fullPropertyNameAnnot>
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:publicDescriptionAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#string">This relates a person to their authorship information.</vitro:publicDescriptionAnnot>
<vitro:collateBySubclassAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</vitro:collateBySubclassAnnot>
</rdf:Description>
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#AcademicDegree">
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>

View file

@ -11,10 +11,10 @@
<c:choose>
<c:when test="${!empty individual.objectPropertyMap['http://vivoweb.org/ontology/core#linkedInformationResource']}"><%-- this Authorship is linked to an InformationResource --%>
<c:set var="infoResource" value="${individual.objectPropertyMap['http://vivoweb.org/ontology/core#linkedInformationResource'].objectPropertyStatements[0].object}" />
<c:set var="name" value="${infoResource.name}"/>
<%-- <c:set var="label" value="${infoResource.moniker}" /> --%>
<c:set var="name" value="${infoResource.name}"/>
<c:set var="label" value="${infoResource.VClass.name}"/>
<c:set var="uri" value="${infoResource.URI}"/>
<c:set var="year" value="${infoResource.dataPropertyMap['http://vivoweb.org/ontology/core#year'].dataPropertyStatements[0].data}" />
</c:when>
<c:otherwise><%-- this Position is not linked to a Publication yet; use Authorship name as a placeholder and add link to the Authorship so user can add more information --%>
<c:choose>
@ -60,10 +60,10 @@
<c:choose>
<c:when test="${!empty uri}">
<c:url var="olink" value="/entity"><c:param name="uri" value="${uri}"/></c:url>
<a href="<c:out value="${olink}"/>">${name}</a> ${label}
<a href="<c:out value="${olink}"/>">${name}</a> ${label}&nbsp;${year}
</c:when>
<c:otherwise>
<strong>${name}</strong> ${label}
<strong>${name}</strong> ${label}&nbsp;${year}
</c:otherwise>
</c:choose>
</c:when>

View file

@ -0,0 +1,43 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%-- rjy7 NIHVIVO-1158 Under core:authorInAuthorship on a person's page, we are now displaying the object property statements
for the related property core:linkedInformationResource, so that we can collate by publication subclass. The subject is the
Authorship, and the object is the InformationResource, so the authorship short view defined on Authorships no longer applies.
We thus define an information resource short view to display the publications. --%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<c:choose>
<c:when test="${!empty individual}"><%-- individual is the OBJECT of the property referenced -- the InformationResource individual --%>
<c:choose>
<c:when test="${!empty predicateUri}">
<c:choose>
<c:when test="${predicateUri == 'http://vivoweb.org/ontology/core#authorInAuthorship'}">
<c:set var="name" value="${individual.name}"/>
<c:set var="uri" value="${individual.URI}"/>
<c:set var="year" value="${individual.dataPropertyMap['http://vivoweb.org/ontology/core#year'].dataPropertyStatements[0].data}" />
</c:when>
<c:otherwise>
<c:set var="name" value="unknown predicate - please contact your VIVO support team"/>
<c:set var="uri" value="${predicateUri}"/>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${!empty uri}">
<c:url var="olink" value="/entity"><c:param name="uri" value="${uri}"/></c:url>
<a href="<c:out value="${olink}"/>">${name}</a> ${year}
</c:when>
<c:otherwise>
<strong>${name}</strong> ${year}
</c:otherwise>
</c:choose>
</c:when>
<c:otherwise>
<c:out value="No predicate available for custom rendering ..."/>
</c:otherwise>
</c:choose>
</c:when>
<c:otherwise>
<c:out value="Got nothing to draw here ..."/>
</c:otherwise>
</c:choose>

View file

@ -4,22 +4,27 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://vitro.mannlib.cornell.edu/vitro/tags/StringProcessorTag" prefix="p" %>
<jsp:useBean id="now" class="org.joda.time.DateTime"/>
<c:choose>
<c:when test="${!empty individual}"><%-- individual is the OBJECT of the property referenced -- the Position, not the Person or Organization --%>
<c:set var="startYear" value="${individual.dataPropertyMap['http://vivoweb.org/ontology/core#startYear'].dataPropertyStatements[0].data}"/>
<c:set var="endYear" value="${individual.dataPropertyMap['http://vivoweb.org/ontology/core#endYear'].dataPropertyStatements[0].data}"/>
<c:if test="${!empty startYear}">
<c:choose>
<c:when test="${!empty endYear}">
<c:set var="timeSpan" value=", ${startYear} - ${endYear}"/>
</c:when>
<c:otherwise>
<c:set var="timeSpan" value=", ${startYear} - "/>
</c:otherwise>
</c:choose>
</c:if>
<c:choose>
<c:when test="${! empty startYear}">
<c:choose>
<c:when test="${! empty endYear}">
<c:set var="timeSpan" value=", ${startYear} - ${endYear}"/>
</c:when>
<c:otherwise>
<c:set var="timeSpan" value=", ${startYear} - "/>
</c:otherwise>
</c:choose>
</c:when>
<c:when test="${! empty endYear}">
<c:set var="timeSpan" value=", - ${endYear}" />
</c:when>
</c:choose>
<c:choose><%-- use working title in preference to HR title --%>
<c:when test="${!empty individual.dataPropertyMap['http://vivoweb.org/ontology/core#titleOrRole'].dataPropertyStatements[0].data}">