Rev 34 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@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>
<s:if test="edit">
<title>Beziehung bearbeiten</title>
</s:if>
<s:else>
<title>Beziehungen anzeigen/bearbeiten</title>
</s:else>
</head>
<body>
<s:if test="edit">
<h1>Beziehung bearbeiten</h1>
</s:if>
<s:else>
<h1>Beziehungen anzeigen/bearbeiten</h1>
</s:else>
<s:if test="added">
<p>
Die Beziehung <b>"<s:text name="modifiedRelationship.termFrom.name"/>"
"<s:text name="modifiedRelationship.relationshipType.nameFrom"/>"
"<s:text name="modifiedRelationship.termTo.name"/>"</b>
wurde hinzugefügt.
</p>
</s:if>
<s:if test="edit">
<h2>Diese Beziehung</h2>
</s:if>
<s:else>
<h2>Neue Beziehung</h2>
</s:else>
<s:form action="saveRelationship">
<s:hidden name="edit" />
<s:hidden name="relationship.objectId" />
<s:select name="term1" list="terms" listKey="objectId" listValue="name"
label="Begriff 1" value="relationship.termFrom.objectId" />
<s:select name="type" list="relationshipTypes" listKey="id" listValue="nameFrom"
label="Beziehungstyp" value="relationship.relationshipType.id"/>
<s:select name="term2" list="terms" listKey="objectId" listValue="name"
label="Begriff 2" value="relationship.termTo.objectId"/>
<s:if test="edit">
<s:submit type="button"><img src="${contextPath}/resources/icons/tick.png" alt="" />
Änderungen speichern</s:submit>
</s:if>
<s:else>
<s:submit type="button"><img src="${contextPath}/resources/icons/add.png" alt="" />
Hinzufügen</s:submit>
</s:else>
</s:form>
<h2>Definierte Beziehungen</h2>
<s:if test="relationshipList.size() == 0">
<p>Keine Beziehungen definiert</p>
</s:if>
<s:else>
<table>
<thead>
<th>Begriff 1</th>
<th>Beziehungstyp</th>
<th>Begriff 2</th>
</thead>
<tbody>
<s:iterator value="relationshipList" status="stat">
<tr>
<td><s:property value="termFrom.name" /></td>
<td><s:property value="relationshipType.nameFrom" /></td>
<td><s:property value="termTo.name" /></td>
<td><s:url id="editURL" action="editRelationship">
<s:param name="id" value="%{objectId}"></s:param>
</s:url> <s:a href="%{editURL}">
<img src="${contextPath}/resources/icons/page_white_edit.png" alt="edit" />
</s:a></td>
<td><s:url id="deleteURL" action="deleteRelationship">
<s:param name="id" value="%{objectId}"></s:param>
</s:url> <s:a href="%{deleteURL}">
<img src="${contextPath}/resources/icons/delete.png" alt="delete" />
</s:a></td>
</tr>
</s:iterator>
</tbody>
</table>
</s:else>
</body>
</html>