NIHVIVO-121 Tweaked text and overall experience of associating user accounts to individuals. Specifically, limited # of individuals that can be associated (max = 1) and also limited class of individuals available in select list (Person)

This commit is contained in:
nac26 2010-04-05 13:37:10 +00:00
parent 16f3dd4324
commit b931993a5e
2 changed files with 35 additions and 32 deletions

View file

@ -17,7 +17,7 @@
<%@ taglib prefix="v" uri="http://vitro.mannlib.cornell.edu/vitro/tags" %>
<%!
public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.forms.admin.mayEditAs.jsp");
public static String RANGE_CLASS = "http://xmlns.com/foaf/0.1/Agent";
public static String RANGE_CLASS = "http://xmlns.com/foaf/0.1/Person";
public static String PREDICATE = VitroVocabulary.MAY_EDIT_AS;
%>
<%
@ -97,12 +97,12 @@
});
if( request.getAttribute("object") != null ){//this block is for an edit of an existing object property statement
editConfig.prepareForObjPropUpdate( model );
formTitle = "Change person that user may edit as";
submitLabel = "save change";
formTitle = "Change person associated with this user account";
submitLabel = "Save Change";
} else {
editConfig.prepareForNonUpdate( model );
formTitle = "Add person that user may edit as";
submitLabel = "add edit right";
formTitle = "Select person to associate with this user account";
submitLabel = "Create Association";
}
%>
<jsp:include page="${preForm}"/>
@ -115,7 +115,7 @@
<c:if test="${!empty param.objectUri}" >
<form class="deleteForm" action="<c:url value="/edit/n3Delete.jsp"/>" method="post">
<label for="delete"><h3>Remove the right to edit as this person?</h3></label>
<label for="delete"><h3>Or remove this association?</h3></label>
<input type="hidden" name="subjectUri" value="${param.subjectUri}"/>
<input type="hidden" name="predicateUri" value="${param.predicateUri}"/>
<input type="hidden" name="objectVar" value="${param.objectUri}"/>

View file

@ -47,41 +47,44 @@
<c:if test="true"> <!-- test="${requestScope.user.roleURI == 1 }"> -->
<h3 class="associate">Associate user account with a person</h3>
<table class="form-background" border="0" cellpadding="2" cellspacing="2">
<tr align="center">
<td>
Add new individual that user may edit as
<c:url var="addUrl" value="/edit/editRequestDispatch.jsp">
<c:param name="subjectUri">${user.URI}</c:param>
<c:param name="editform">admin/mayEditAs.jsp</c:param>
</c:url>
<a href="${addUrl}">add</a>
</td>
</tr>
<c:if test="${requestScope.mayEditAsStmts != null }">
<tr><td>User may edit as the following Individuals:</td></tr>
<c:if test="${requestScope.mayEditAsStmts != null }">
<c:forEach items="${requestScope.mayEditAsStmts }" var="stmt">
<tr>
<c:url var="deleteUrl" value="/edit/editRequestDispatch.jsp">
<c:param name="subjectUri">${user.URI}</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>
<tr>
<td>
<c:if test="${stmt.object == null or empty stmt.object.name }">
<td> ${stmt.objectURI}</td>
<c:set var="associatedIndividual" value="${stmt.objectURI}" />
</c:if>
<c:if test="${stmt.object != null and !empty stmt.object.name }">
<td> ${stmt.object.name}</td>
<c:set var="associatedIndividual" value="${stmt.object.name}" />
</c:if>
<c:url var="deleteUrl" value="/edit/editRequestDispatch.jsp">
<c:param name="subjectUri">${user.URI}</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>
<td><a href="${deleteUrl}">delete</a></td>
</tr>
</c:forEach>
${associatedIndividual} -- <a href="${deleteUrl}">Change or Remove Association</a>
</td>
</tr>
</c:forEach>
<tr><td><em class="note">Note: <c:if test="${requestScope.user.roleURI == 1 }">This association allows the user to edit this person and be redirected to the person's profile when logging in.</c:if><c:if test="${requestScope.user.roleURI != 1 }">This association will result in the user being redirected to the person's profile when logging in.</c:if></em></td></tr>
</c:if>
<c:if test="${requestScope.mayEditAsStmts == null }">
<tr><td>There are no Individuals in the system that the user may edit as.</td></tr>
<tr>
<td>
<c:url var="addUrl" value="/edit/editRequestDispatch.jsp">
<c:param name="subjectUri">${user.URI}</c:param>
<c:param name="editform">admin/mayEditAs.jsp</c:param>
</c:url>
This user account is not associated with a person -- <a href="${addUrl}">Select a person</a>
</td>
</tr>
<tr>
<td><em class="note">Note: <c:if test="${requestScope.user.roleURI == 1 }">Until an association is made, the self editor has no permissions to edit. Associating this user account to a person allows the user to edit this person and be redirected to the person's profile when logging in.</c:if><c:if test="${requestScope.user.roleURI != 1 }">Associating this user account to a person will result in the user being redirected to the person's profile when logging in.</c:if></em></td>
</tr>
</c:if>
</table>