Merge r1357 from rel-1.1-maint branch (reverting addition of description field to role custom form and short view)
This commit is contained in:
parent
5b25d92181
commit
24de7c4471
2 changed files with 17 additions and 40 deletions
|
@ -151,6 +151,16 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
<c:set var="labelRequired" ><%= (mode == 1 || mode == 3) ?"\"nonempty\"," : "" %></c:set>
|
||||
<c:set var="typeRequired" ><%= (mode == 1 || mode == 3) ?"\"nonempty\"" : "" %></c:set>
|
||||
|
||||
<%--
|
||||
<c:choose>
|
||||
<c:when test="${numDateFields == 1}">
|
||||
<c:set var="startYearPredicate" value="${vivoCore}year" />
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:set var="startYearPredicate" value="${vivoCore}startYear" />
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
--%>
|
||||
<c:set var="startYearPredicate">
|
||||
<c:choose>
|
||||
<c:when test="${numDateFields == 1}">${vivoCore}year</c:when>
|
||||
|
@ -166,11 +176,6 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
?role <${endYearPredicate}> ?endYear .
|
||||
</v:jsonset>
|
||||
|
||||
<c:set var="descriptionPredicate" value="${vivoCore}description" />
|
||||
<v:jsonset var="descriptionAssertion">
|
||||
?role <${descriptionPredicate}> ?roleDescription .
|
||||
</v:jsonset>
|
||||
|
||||
<v:jsonset var="roleLabelAssertion" >
|
||||
?role <${label}> ?roleLabel .
|
||||
</v:jsonset>
|
||||
|
@ -218,10 +223,6 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
SELECT ?existingStartYear WHERE { ?role <${endYearPredicate}> ?existingStartYear .}
|
||||
</v:jsonset>
|
||||
|
||||
<v:jsonset var="descriptionQuery">
|
||||
SELECT ?description WHERE { ?role <${descriptionPredicate}> ?description . }
|
||||
</v:jsonset>
|
||||
|
||||
<v:jsonset var="activityQuery">
|
||||
PREFIX core: <${vivoCore}>
|
||||
SELECT ?existingActivity WHERE { ?role core:roleIn ?existingActivity . }
|
||||
|
@ -250,25 +251,19 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
"object" : ["role", "${objectUriJson}", "URI" ],
|
||||
|
||||
"n3required" : [ "${n3ForNewRole}", "${startYearAssertion}", "${roleLabelAssertion}" ],
|
||||
"n3optional" : [ "${n3ForActivityLabel}", "${n3ForActivityType}", "${n3ForInverse}", "${endYearAssertion}", "${descriptionAssertion}" ],
|
||||
|
||||
"n3optional" : [ "${n3ForActivityLabel}", "${n3ForActivityType}", "${n3ForInverse}", "${endYearAssertion}" ],
|
||||
|
||||
"newResources" : { "role" : "${defaultNamespace}",
|
||||
"roleActivity" : "${defaultNamespace}" },
|
||||
|
||||
"urisInScope" : { "inverseRolePredicate" : "${inversePredicate}" },
|
||||
"literalsInScope": { },
|
||||
"urisOnForm" : [ "roleActivity", "roleActivityType" ],
|
||||
"literalsOnForm" : [ "activityLabel", "roleLabel", "startYear", "endYear", "roleDescription" ],
|
||||
"literalsOnForm" : [ "activityLabel", "roleLabel", "startYear", "endYear" ],
|
||||
"filesOnForm" : [ ],
|
||||
"sparqlForLiterals" : { },
|
||||
"sparqlForUris" : { },
|
||||
"sparqlForExistingLiterals" : {
|
||||
"activityLabel" : "${activityLabelQuery}",
|
||||
"roleLabel" : "${roleLabelQuery}",
|
||||
"startYear" : "${startYearQuery}",
|
||||
"endYear" : "${endYearQuery}",
|
||||
"roleDescription" : "${descriptionQuery}"
|
||||
},
|
||||
"sparqlForExistingLiterals" : { "activityLabel":"${activityLabelQuery}", "roleLabel":"${roleLabelQuery}", "startYear":"${startYearQuery}", "endYear":"${endYearQuery}" },
|
||||
"sparqlForExistingUris" : { "roleActivity":"${activityQuery}" , "roleActivityType":"${activityTypeQuery}" },
|
||||
"fields" : {
|
||||
"activityLabel" : {
|
||||
|
@ -336,17 +331,6 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
"rangeDatatypeUri" : "${gYearDatatypeUriJson}",
|
||||
"rangeLang" : "",
|
||||
"assertions" : ["${endYearAssertion}"]
|
||||
},
|
||||
"roleDescription" : {
|
||||
"newResource" : "false",
|
||||
"validators" : [ ],
|
||||
"optionsType" : "UNDEFINED",
|
||||
"literalOptions" : [ ],
|
||||
"predicateUri" : "",
|
||||
"objectClassUri" : "",
|
||||
"rangeDatatypeUri" : "",
|
||||
"rangeLang" : "",
|
||||
"assertions" : ["${descriptionAssertion}"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -437,7 +421,6 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
|
||||
<p><v:input type="text" id="roleLabel" label="Role in ### ${requiredHint}" size="50" /></p>
|
||||
|
||||
<v:input type="text" id="roleDescription" label="Role Description" size="50" />
|
||||
<c:choose>
|
||||
<c:when test="${numDateFields == 1}">
|
||||
<v:input type="text" label="Year ${requiredHint} ${yearHint}" id="startYear" size="7"/>
|
||||
|
|
|
@ -29,9 +29,7 @@ Optional vars:
|
|||
<c:when test="${!empty individual}"><%-- individual is the OBJECT of the property referenced -- the Role individual, not the Person or grant --%>
|
||||
<c:choose>
|
||||
<c:when test="${!empty predicateUri}">
|
||||
|
||||
<c:set var="description" value="${individual.dataPropertyMap['http://vivoweb.org/ontology/core#description'].dataPropertyStatements[0].data}" />
|
||||
|
||||
|
||||
<%-- get years off role --%>
|
||||
<c:set var="startYear" value="${individual.dataPropertyMap[startYearPredicate].dataPropertyStatements[0].data}"/>
|
||||
<c:if test="${! empty startYear}">
|
||||
|
@ -112,8 +110,6 @@ Optional vars:
|
|||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
|
||||
|
||||
<%-- only show error messages if logged in --%>
|
||||
<c:if test="${ ! showSelfEdits}">
|
||||
<c:set var="errorMsg" value=""/>
|
||||
|
@ -124,14 +120,12 @@ Optional vars:
|
|||
<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} ${startYear}${endYearVal} ${errorMsg}
|
||||
<c:if test="${! empty description}">
|
||||
<br />${description}
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<p:process><strong>${name}</strong> ${label}</p:process> ${errorMsg}
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:choose>
|
||||
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:out value="No predicate available for custom rendering ..."/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue