Subversion Repositories WebE

Rev

Rev 35 | 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
 
37 PointedEar 32
  <s:if test="terms.size() == 0">
33
    <p>Bitte definieren Sie zuerst mindestens einen
34
      <s:url id="termURL" action="listTerms" />
35
      <s:a href="%{termURL}">Begriff</s:a>.</p>
35 PointedEar 36
  </s:if>
37
  <s:else>
38
    <s:if test="edit">
37 PointedEar 39
      <h2>Diese Beziehung</h2>
35 PointedEar 40
    </s:if>
41
    <s:else>
37 PointedEar 42
      <h2>Neue Beziehung</h2>
35 PointedEar 43
    </s:else>
37 PointedEar 44
 
45
    <s:form action="saveRelationship">
46
      <s:hidden name="edit" />
47
      <s:hidden name="relationship.objectId" />
48
      <s:select name="term1" list="terms" listKey="objectId" listValue="name"
49
                label="Begriff 1" value="relationship.termFrom.objectId" />
50
      <s:select name="type" list="relationshipTypes" listKey="id" listValue="nameFrom"
51
                label="Beziehungstyp" value="relationship.relationshipType.id"/>
52
      <s:select name="term2" list="terms" listKey="objectId" listValue="name"
53
                label="Begriff 2" value="relationship.termTo.objectId"/>
54
      <s:textarea name="comment" label="Aenderungskommentar (optional)" />
55
      <s:if test="edit">
56
        <s:submit type="button"><img src="${contextPath}/resources/icons/tick.png" alt="" />
57
          &Auml;nderungen speichern</s:submit>
58
      </s:if>
59
      <s:else>
60
        <s:submit type="button"><img src="${contextPath}/resources/icons/add.png" alt="" />
61
          Hinzuf&uuml;gen</s:submit>
62
      </s:else>
63
    </s:form>
64
  </s:else>
35 PointedEar 65
 
37 PointedEar 66
  <s:if test="edit">
67
    <h3>&Auml;nderungsprotokoll</h3>
68
    <table>
69
      <thead>
70
        <th>Datum</th>
71
        <th>Benutzer</th>
72
        <th>Aktion</th>
73
        <th>Neuer Wert</th>
74
        <th>Kommentar</th>
75
      </thead>
76
      <tbody>
77
        <s:iterator value="relationship.object.history" status="stat">
78
          <tr>
79
            <td><s:date name="date" format="yyyy-MM-dd hh:mm:ss" /></td>
80
            <td><s:property value="user.firstname" /> <s:property value="user.lastname"/></td>
81
            <td><s:property value="actionType.name" /></td>
82
            <td><s:property value="value" /></td>
83
            <td><s:property value="comment" /></td>
84
          </tr>
85
        </s:iterator>
86
      </tbody>
87
    </table>
88
  </s:if>
89
 
35 PointedEar 90
  <h2>Definierte Beziehungen</h2>
34 PointedEar 91
  <s:if test="relationshipList.size() == 0">
35 PointedEar 92
    <p>Keine Beziehungen definiert</p>
34 PointedEar 93
  </s:if>
94
  <s:else>
95
    <table>
96
        <thead>
97
          <th>Begriff 1</th>
35 PointedEar 98
          <th>Beziehungstyp</th>
34 PointedEar 99
          <th>Begriff 2</th>
100
        </thead>
101
        <tbody>
102
          <s:iterator value="relationshipList" status="stat">
103
            <tr>
37 PointedEar 104
              <td><s:url id="term1URL" action="editTerm">
105
                <s:param name="id" value="%{termFrom.objectId}"></s:param>
106
              </s:url><s:a href="%{term1URL}"><s:property value="termFrom.name" /></s:a></td>
34 PointedEar 107
              <td><s:property value="relationshipType.nameFrom" /></td>
37 PointedEar 108
              <td><s:url id="term2URL" action="editTerm">
109
                  <s:param name="id" value="%{termTo.objectId}"></s:param>
110
                </s:url><s:a href="%{term2URL}"><s:property value="termTo.name" /></s:a></td>
34 PointedEar 111
 
112
              <td><s:url id="editURL" action="editRelationship">
37 PointedEar 113
                  <s:param name="id" value="%{objectId}"></s:param>
114
                </s:url><s:a href="%{editURL}"><img
115
                src="${contextPath}/resources/icons/page_white_edit.png"
116
                alt="Bearbeiten" title="Bearbeiten" /></s:a></td>
117
 
34 PointedEar 118
              <td><s:url id="deleteURL" action="deleteRelationship">
119
                <s:param name="id" value="%{objectId}"></s:param>
37 PointedEar 120
              </s:url><s:a href="%{deleteURL}" onclick="return window.confirm('Beziehung loeschen?')"><img
121
                src="${contextPath}/resources/icons/delete.png"
122
                alt="L&ouml;schen" title="L&ouml;schen" /></s:a></td>
34 PointedEar 123
            </tr>
124
          </s:iterator>
125
        </tbody>
126
      </table>
127
    </s:else>
128
  </body>
129
</html>