Rev 34 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 34 | Rev 35 | ||
|---|---|---|---|
| 1 | <%@taglib uri="/struts-tags" prefix="s"%> |
1 | <%@taglib uri="/struts-tags" prefix="s"%> |
| 2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> |
2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> |
| 3 | <c:set var="contextPath" value="${pageContext.request.contextPath}" />
|
3 | <c:set var="contextPath" value="${pageContext.request.contextPath}" />
|
| 4 | 4 | ||
| 5 | <html> |
5 | <html> |
| 6 | <head> |
6 | <head> |
| - | 7 | <s:if test="edit"> |
|
| 7 | <title>Beziehung bearbeiten/löschen</title> |
8 | <title>Beziehung bearbeiten</title> |
| - | 9 | </s:if> |
|
| - | 10 | <s:else> |
|
| - | 11 | <title>Beziehungen anzeigen/bearbeiten</title> |
|
| - | 12 | </s:else> |
|
| 8 | </head> |
13 | </head> |
| 9 | <body> |
14 | <body> |
| 10 | 15 | ||
| - | 16 | <s:if test="edit"> |
|
| - | 17 | <h1>Beziehung bearbeiten</h1> |
|
| - | 18 | </s:if> |
|
| - | 19 | <s:else> |
|
| - | 20 | <h1>Beziehungen anzeigen/bearbeiten</h1> |
|
| - | 21 | </s:else> |
|
| - | 22 | ||
| - | 23 | <s:if test="added"> |
|
| - | 24 | <p> |
|
| - | 25 | Die Beziehung <b>"<s:text name="modifiedRelationship.termFrom.name"/>" |
|
| - | 26 | "<s:text name="modifiedRelationship.relationshipType.nameFrom"/>" |
|
| - | 27 | "<s:text name="modifiedRelationship.termTo.name"/>"</b> |
|
| - | 28 | wurde hinzugefügt. |
|
| - | 29 | </p> |
|
| - | 30 | </s:if> |
|
| - | 31 | ||
| - | 32 | <s:if test="edit"> |
|
| 11 | <h1>Liste der Beziehungen</h1> |
33 | <h2>Diese Beziehung</h2> |
| - | 34 | </s:if> |
|
| - | 35 | <s:else> |
|
| - | 36 | <h2>Neue Beziehung</h2> |
|
| - | 37 | </s:else> |
|
| - | 38 | ||
| - | 39 | <s:form action="saveRelationship"> |
|
| - | 40 | <s:hidden name="edit" /> |
|
| - | 41 | <s:hidden name="relationship.objectId" /> |
|
| - | 42 | <s:select name="term1" list="terms" listKey="objectId" listValue="name" |
|
| - | 43 | label="Begriff 1" value="relationship.termFrom.objectId" /> |
|
| - | 44 | <s:select name="type" list="relationshipTypes" listKey="id" listValue="nameFrom" |
|
| - | 45 | label="Beziehungstyp" value="relationship.relationshipType.id"/> |
|
| - | 46 | <s:select name="term2" list="terms" listKey="objectId" listValue="name" |
|
| - | 47 | label="Begriff 2" value="relationship.termTo.objectId"/> |
|
| - | 48 | <s:if test="edit"> |
|
| - | 49 | <s:submit type="button"><img src="${contextPath}/resources/icons/tick.png" alt="" />
|
|
| - | 50 | Änderungen speichern</s:submit> |
|
| - | 51 | </s:if> |
|
| - | 52 | <s:else> |
|
| - | 53 | <s:submit type="button"><img src="${contextPath}/resources/icons/add.png" alt="" />
|
|
| - | 54 | Hinzufügen</s:submit> |
|
| - | 55 | </s:else> |
|
| - | 56 | </s:form> |
|
| 12 | 57 | ||
| - | 58 | <h2>Definierte Beziehungen</h2> |
|
| 13 | <s:if test="relationshipList.size() == 0"> |
59 | <s:if test="relationshipList.size() == 0"> |
| 14 | <p>Keine Beziehung definiert</p> |
60 | <p>Keine Beziehungen definiert</p> |
| 15 | </s:if> |
61 | </s:if> |
| 16 | <s:else> |
62 | <s:else> |
| 17 | <table> |
63 | <table> |
| 18 | <thead> |
64 | <thead> |
| 19 | <th>Begriff 1</th> |
65 | <th>Begriff 1</th> |
| 20 | <th>Beziehung</th> |
66 | <th>Beziehungstyp</th> |
| 21 | <th>Begriff 2</th> |
67 | <th>Begriff 2</th> |
| 22 | </thead> |
68 | </thead> |
| 23 | <tbody> |
69 | <tbody> |
| 24 | <s:iterator value="relationshipList" status="stat"> |
70 | <s:iterator value="relationshipList" status="stat"> |
| 25 | <tr> |
71 | <tr> |
| 26 | <td><s:property value="termFrom.name" /></td> |
72 | <td><s:property value="termFrom.name" /></td> |
| 27 | <td><s:property value="relationshipType.nameFrom" /></td> |
73 | <td><s:property value="relationshipType.nameFrom" /></td> |
| 28 | <td><s:property value="termTo.name" /></td> |
74 | <td><s:property value="termTo.name" /></td> |
| 29 | 75 | ||
| 30 | <td><s:url id="editURL" action="editRelationship"> |
76 | <td><s:url id="editURL" action="editRelationship"> |
| 31 | <s:param name="id" value="%{objectId}"></s:param>
|
77 | <s:param name="id" value="%{objectId}"></s:param>
|
| 32 | </s:url> <s:a href="%{editURL}">
|
78 | </s:url> <s:a href="%{editURL}">
|
| 33 | <img src="${contextPath}/resources/icons/page_white_edit.png" alt="edit" />
|
79 | <img src="${contextPath}/resources/icons/page_white_edit.png" alt="edit" />
|
| 34 | </s:a></td> |
80 | </s:a></td> |
| 35 | 81 | ||
| 36 | <td><s:url id="deleteURL" action="deleteRelationship"> |
82 | <td><s:url id="deleteURL" action="deleteRelationship"> |
| 37 | <s:param name="id" value="%{objectId}"></s:param>
|
83 | <s:param name="id" value="%{objectId}"></s:param>
|
| 38 | </s:url> <s:a href="%{deleteURL}">
|
84 | </s:url> <s:a href="%{deleteURL}">
|
| 39 | <img src="${contextPath}/resources/icons/delete.png" alt="delete" />
|
85 | <img src="${contextPath}/resources/icons/delete.png" alt="delete" />
|
| 40 | </s:a></td> |
86 | </s:a></td> |
| 41 | </tr> |
87 | </tr> |
| 42 | </s:iterator> |
88 | </s:iterator> |
| 43 | </tbody> |
89 | </tbody> |
| 44 | </table> |
90 | </table> |
| 45 | </s:else> |
91 | </s:else> |
| 46 | </body> |
92 | </body> |
| 47 | </html> |
93 | </html> |