Subversion Repositories WebE

Rev

Rev 34 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
34 PointedEar 1
<%@taglib uri="/struts-tags" prefix="s"%>
2
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
3
<c:set var="contextPath" value="${pageContext.request.contextPath}" />
4
 
5
<html>
6
  <head>
35 PointedEar 7
  <s:if test="edit">
8
    <title>Beziehung bearbeiten</title>
9
  </s:if>
10
  <s:else>
11
    <title>Beziehungen anzeigen/bearbeiten</title>
12
  </s:else>
34 PointedEar 13
  </head>
14
  <body>
15
 
35 PointedEar 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>
34 PointedEar 22
 
35 PointedEar 23
  <s:if test="added">
24
    <p>
25
      Die Beziehung <b>&quot;<s:text name="modifiedRelationship.termFrom.name"/>&quot;
26
      &quot;<s:text name="modifiedRelationship.relationshipType.nameFrom"/>&quot;
27
      &quot;<s:text name="modifiedRelationship.termTo.name"/>&quot;</b>
28
      wurde hinzugef&uuml;gt.
29
    </p>
30
  </s:if>
31
 
32
  <s:if test="edit">
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
        &Auml;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&uuml;gen</s:submit>
55
    </s:else>
56
  </s:form>
57
 
58
  <h2>Definierte Beziehungen</h2>
34 PointedEar 59
  <s:if test="relationshipList.size() == 0">
35 PointedEar 60
    <p>Keine Beziehungen definiert</p>
34 PointedEar 61
  </s:if>
62
  <s:else>
63
    <table>
64
        <thead>
65
          <th>Begriff 1</th>
35 PointedEar 66
          <th>Beziehungstyp</th>
34 PointedEar 67
          <th>Begriff 2</th>
68
        </thead>
69
        <tbody>
70
          <s:iterator value="relationshipList" status="stat">
71
            <tr>
72
              <td><s:property value="termFrom.name" /></td>
73
              <td><s:property value="relationshipType.nameFrom" /></td>
74
              <td><s:property value="termTo.name" /></td>
75
 
76
              <td><s:url id="editURL" action="editRelationship">
77
                <s:param name="id" value="%{objectId}"></s:param>
78
              </s:url> <s:a href="%{editURL}">
79
                <img src="${contextPath}/resources/icons/page_white_edit.png" alt="edit" />
80
              </s:a></td>
81
 
82
              <td><s:url id="deleteURL" action="deleteRelationship">
83
                <s:param name="id" value="%{objectId}"></s:param>
84
              </s:url> <s:a href="%{deleteURL}">
85
                <img src="${contextPath}/resources/icons/delete.png" alt="delete" />
86
              </s:a></td>
87
            </tr>
88
          </s:iterator>
89
        </tbody>
90
      </table>
91
    </s:else>
92
  </body>
93
</html>