Adding ability to edit user to individual relations for unusual individuals. NIHVIVO-231

This commit is contained in:
bdc34 2010-04-02 19:48:56 +00:00
parent 2bb8c5622f
commit 232c8d0ae5
3 changed files with 11 additions and 6 deletions

View file

@ -98,8 +98,6 @@ public class UserEditController extends BaseEditController {
new ArrayList<ObjectPropertyStatement>(mayEditAsUris.size());
for(String objURI: mayEditAsUris){
Individual editAs = getWebappDaoFactory().getIndividualDao().getIndividualByURI(objURI);
if( editAs == null )
continue;
ObjectPropertyStatement stmt = new ObjectPropertyStatementImpl();
stmt.setSubjectURI(u.getURI());
stmt.setPropertyURI(VitroVocabulary.MAY_EDIT_AS);

View file

@ -31,7 +31,9 @@
+ " Looking for " + RANGE_CLASS);
request.setAttribute("rangeClassUriJson", MiscWebUtils.escape(RANGE_CLASS));
request.setAttribute("predicateUriJson", MiscWebUtils.escape(PREDICATE));
request.setAttribute("predicateUriJson", MiscWebUtils.escape(PREDICATE));
request.setAttribute("objectUriJson" , MiscWebUtils.escape((String)request.getAttribute("objectUri")));
%>
<v:jsonset var="n3ForEdit" >
@ -116,7 +118,7 @@
<label for="delete"><h3>Remove the right to edit as this person?</h3></label>
<input type="hidden" name="subjectUri" value="${param.subjectUri}"/>
<input type="hidden" name="predicateUri" value="${param.predicateUri}"/>
<input type="hidden" name="objectUri" value="${param.objectUri}"/>
<input type="hidden" name="objectVar" value="${param.objectUri}"/>
<input type="hidden" name="editform" value="edit/admin/mayEditAs.jsp"/>
<v:input type="submit" id="delete" value="Remove" cancel="" />
</form>

View file

@ -63,10 +63,15 @@
<tr><td>User may edit as the following Individuals:</td></tr>
<c:forEach items="${requestScope.mayEditAsStmts }" var="stmt">
<tr>
<td>${stmt.object.name}</td>
<c:if test="${stmt.object == null or empty stmt.object.name }">
<td> ${stmt.objectURI}</td>
</c:if>
<c:if test="${stmt.object != null and !empty stmt.object.name }">
<td> ${stmt.object.name}</td>
</c:if>
<c:url var="deleteUrl" value="/edit/editRequestDispatch.jsp">
<c:param name="subjectUri">${user.URI}</c:param>
<c:param name="predicateUri">${requestScope.predicateUri}</c:param>
<c:param name="predicateUri">${stmt.propertyURI}</c:param>
<c:param name="objectUri">${stmt.objectURI}</c:param>
<c:param name="editform">admin/mayEditAs.jsp</c:param>
</c:url>