NIHVIVO-1871 Fix addPublicationToPerson form so at least we don't get to a broken form in repair mode. Redirecting to authorship page, which is a low-cost though not ideal solution.
This commit is contained in:
parent
94160c55eb
commit
06a97d36b1
1 changed files with 15 additions and 1 deletions
|
@ -63,7 +63,7 @@ core:informationResourceInAuthorship (InformationResource : Authorship) - invers
|
|||
Individual subject = (Individual) request.getAttribute("subject");
|
||||
Individual obj = (Individual) request.getAttribute("object");
|
||||
|
||||
//check to see if this is an edit of existing, if yes redirect to pub
|
||||
// Check to see if this is an edit of existing, if yes redirect to pub
|
||||
if( obj != null ){
|
||||
List<ObjectPropertyStatement> stmts = obj.getObjectPropertyStatements( nodeToPubProp );
|
||||
if( stmts != null && stmts.size() > 0 ){
|
||||
|
@ -78,6 +78,20 @@ core:informationResourceInAuthorship (InformationResource : Authorship) - invers
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* This form is not prepared to deal with editing an existing relationship, so redirect
|
||||
* to authorship page if no publication was found. This is not ideal, because you can't add
|
||||
* a linked information resource from that page, but you can at least continue to the back end.
|
||||
* May want to modify form in a future version to support repair mode.
|
||||
*/
|
||||
if (obj != null) {
|
||||
String objectUri = obj.getURI();
|
||||
%>
|
||||
<jsp:forward page="/individual">
|
||||
<jsp:param value="<%= objectUri %>" name="uri"/>
|
||||
</jsp:forward>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
<c:set var="vivoOnt" value="http://vivoweb.org/ontology" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue