user friendly admin interface
/trunk/src/ch/ffhs/webE/action/LoginAction.java |
---|
35,7 → 35,6 |
if ("".equals(getUserName()) || "".equals(getPw()) |
|| getUserName() == null || getPw() == null) |
{ |
addFieldError("userName", "Falscher Username oder Passwort"); |
return ERROR; |
} |
42,7 → 41,6 |
String verifiedUser = verifyUser(getUserName(), getPw()); |
if (verifiedUser.equals("failed")) |
{ |
addFieldError("userName", "Falscher Username oder Passwort"); |
return ERROR; |
} |
else |
55,14 → 53,9 |
} |
} |
/** |
* Logout ausführen. Zerstört die Daten in der Session |
* @return String |
*/ |
public String doLogout() |
{ |
//Kill Session content |
ActionContext.getContext().getSession().clear(); |
// TODO: Kill session content for logout |
return SUCCESS; |
} |
/trunk/WebContent/admin/userAddForm.jsp |
---|
15,12 → 15,7 |
<s:textfield name="user.lastname" label="Nachname" /> |
<s:checkbox name="user.admin" |
label="Soll der User admin sein?" /> |
<s:if test="user.id != ''"> |
<s:submit value="Edit" /> |
</s:if><s:else> |
<s:submit value="Add" /> |
</s:else> |
</s:form> |
</body> |
/trunk/WebContent/admin/relTypeList.jsp |
---|
1,7 → 1,4 |
<%@taglib uri="/struts-tags" prefix="s"%> |
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> |
<c:set var="contextPath" value="${pageContext.request.contextPath}" /> |
<html> |
<head> |
<title>Beziehungstypen bearbeiten</title> |
12,8 → 9,8 |
<p>Hier können Sie die Beziehungstypen anpassen.</p> |
<s:if test="relTypeList.size() == 0"> |
<p>Keine Beziehungstypen gefunden</p> |
</s:if><s:else> |
<p>Keine Benutzer gefunden</p> |
</s:if> |
<table> |
<tr> |
<th>Bezeichnung A =< B</th> |
26,18 → 23,13 |
<td><s:url id="editURL" action="editRelType"> |
<s:param name="id" value="%{relationshipId}"></s:param> |
</s:url> <s:a href="%{editURL}"> |
<img src="${contextPath}/resources/icons/page_white_edit.png" alt="edit" /> |
</s:a></td> |
</s:url> <s:a href="%{editURL}">Ändern</s:a></td> |
<td><s:url id="deleteURL" action="deleteRelType"> |
<s:param name="id" value="%{relationshipId}"></s:param> |
</s:url> <s:a href="%{deleteURL}"> |
<img src="${contextPath}/resources/icons/delete.png" alt="delete" /> |
</s:a></td> |
</s:url> <s:a href="%{deleteURL}">Löschen</s:a></td> |
</tr> |
</s:iterator> |
</table> |
</s:else> |
</body> |
</html> |
/trunk/WebContent/admin/relTypeAddForm.jsp |
---|
11,13 → 11,7 |
<s:hidden name="relType.relationshipId" /> |
<s:textfield name="relType.nameFrom" label="Name vom Ausgangspunkt (z.B. ist Vater von)" /> |
<s:textfield name="relType.nameTo" label="Name vom Zielpunkt (z.B. ist Sohn von)" /> |
<s:if test="relType.relationshipId != ''"> |
<s:submit value="Edit" /> |
</s:if><s:else> |
<s:submit value="Add" /> |
</s:else> |
</s:form> |
</body> |
</html> |
/trunk/WebContent/admin/userList.jsp |
---|
1,7 → 1,4 |
<%@taglib uri="/struts-tags" prefix="s"%> |
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> |
<c:set var="contextPath" value="${pageContext.request.contextPath}" /> |
<html> |
<head> |
<title>User bearbeiten</title> |
31,15 → 28,10 |
<td><s:url id="editURL" action="editUser"> |
<s:param name="id" value="%{id}"></s:param> |
</s:url> <s:a href="%{editURL}"> |
<img src="${contextPath}/resources/icons/page_white_edit.png" alt="edit" /> |
</s:a></td> |
</s:url> <s:a href="%{editURL}">Edit</s:a></td> |
<td><s:url id="deleteURL" action="deleteUser"> |
<s:param name="id" value="%{id}"></s:param> |
</s:url> <s:a href="%{deleteURL}"> |
<img src="${contextPath}/resources/icons/delete.png" alt="delete" /> |
</s:a></td> |
</s:url> <s:a href="%{deleteURL}">Delete</s:a></td> |
</tr> |
</s:iterator> |
</table> |
/trunk/WebContent/index.jsp |
---|
9,12 → 9,10 |
<h1>Login</h1> |
<s:form action="Login"> |
<s:fielderror /> |
<s:textfield name="userName" label="Benutzername" /> |
<s:password name="pw" label="Passwort" /> |
<s:submit value="Login" /> |
<s:submit /> |
</s:form> |
<p> |
Klicken Sie <a href="index.jsp">hier</a> wenn Sie Ihr Passwort vergessen haben. |
</p> |