NIHVIVO-646 Handle authorships with no linked author in add authors to publication form.
This commit is contained in:
parent
7ae1a931e4
commit
e44bbf3929
2 changed files with 17 additions and 20 deletions
|
@ -330,11 +330,8 @@ SPARQL queries for existing values. --%>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
request.setAttribute("rankValue", rankValue);
|
request.setAttribute("rankValue", rankValue);
|
||||||
|
|
||||||
Individual author = authorship.getRelatedIndividual(vivoCore + "linkedAuthor");
|
request.setAttribute("author", authorship.getRelatedIndividual(vivoCore + "linkedAuthor"));
|
||||||
if ( author != null ) {
|
|
||||||
request.setAttribute("author", author);
|
|
||||||
}
|
|
||||||
|
|
||||||
// This value is used to replace a moved element after a failed reorder.
|
// This value is used to replace a moved element after a failed reorder.
|
||||||
// It's not the same as rank, because ranks may have gaps.
|
// It's not the same as rank, because ranks may have gaps.
|
||||||
|
@ -347,18 +344,22 @@ SPARQL queries for existing values. --%>
|
||||||
<%-- span.author will be used in the next phase, when we display a message that the author has been
|
<%-- span.author will be used in the next phase, when we display a message that the author has been
|
||||||
removed. That text will replace the a.authorLink, which will be removed. --%>
|
removed. That text will replace the a.authorLink, which will be removed. --%>
|
||||||
<span class="author">
|
<span class="author">
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${!empty author}">
|
||||||
|
<c:url var="authorHref" value="/individual">
|
||||||
|
<c:param name="uri" value="${author.URI}"/>
|
||||||
|
</c:url>
|
||||||
|
<a href="${authorHref}" id="${author.URI}" class="authorLink">${author.name}</a>
|
||||||
|
</c:when>
|
||||||
|
|
||||||
<% if (author != null) { // c:choose not working here, don't know why %>
|
<c:otherwise>
|
||||||
<c:url var="authorHref" value="/individual">
|
<c:url var="authorshipHref" value="/individual">
|
||||||
<c:param name="uri" value="${author.URI}"/>
|
<c:param name="uri" value="${authorshipUri}"/>
|
||||||
</c:url>
|
</c:url>
|
||||||
<a href="${authorHref}" id="${author.URI}" class="authorLink">${author.name}</a>
|
<a href="${authorshipHref}" id="${authorshipUri}" class="authorLink">${authorshipName}<em> (no linked author)</em></a>
|
||||||
<% } else { %>
|
</c:otherwise>
|
||||||
<c:url var="authorshipHref" value="/individual">
|
</c:choose>
|
||||||
<c:param name="uri" value="${authorshipUri}"/>
|
|
||||||
</c:url>
|
|
||||||
<a href="${authorshipHref}" id="${authorshipUri}" class="authorLink noAuthor">${authorshipName}</a> <em>(no linked author)</em>
|
|
||||||
<% } %>
|
|
||||||
<c:url var="deleteAuthorshipHref" value="/edit/primitiveDelete" />
|
<c:url var="deleteAuthorshipHref" value="/edit/primitiveDelete" />
|
||||||
<a href="${deleteAuthorshipHref}" class="remove">Remove</a>
|
<a href="${deleteAuthorshipHref}" class="remove">Remove</a>
|
||||||
<%-- <a href="${undoHref}" class="undo">Undo</a> --%>
|
<%-- <a href="${undoHref}" class="undo">Undo</a> --%>
|
||||||
|
|
|
@ -20,10 +20,6 @@
|
||||||
width: 15em;
|
width: 15em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#authorships a.authorLink.noAuthor {
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
#showAddForm span.or {
|
#showAddForm span.or {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue