Subversion Repositories WebE

Rev

Rev 35 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35 Rev 37
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
  <s:if test="edit">
8
    <title>Beziehung bearbeiten</title>
8
    <title>Beziehung bearbeiten</title>
9
  </s:if>
9
  </s:if>
10
  <s:else>
10
  <s:else>
11
    <title>Beziehungen anzeigen/bearbeiten</title>
11
    <title>Beziehungen anzeigen/bearbeiten</title>
12
  </s:else>
12
  </s:else>
13
  </head>
13
  </head>
14
  <body>
14
  <body>
15
  
15
  
16
  <s:if test="edit">
16
  <s:if test="edit">
17
    <h1>Beziehung bearbeiten</h1>
17
    <h1>Beziehung bearbeiten</h1>
18
  </s:if>
18
  </s:if>
19
  <s:else>
19
  <s:else>
20
    <h1>Beziehungen anzeigen/bearbeiten</h1>
20
    <h1>Beziehungen anzeigen/bearbeiten</h1>
21
  </s:else>
21
  </s:else>
22
  
22
  
23
  <s:if test="added">
23
  <s:if test="added">
24
    <p>
24
    <p>
25
      Die Beziehung <b>&quot;<s:text name="modifiedRelationship.termFrom.name"/>&quot;
25
      Die Beziehung <b>&quot;<s:text name="modifiedRelationship.termFrom.name"/>&quot;
26
      &quot;<s:text name="modifiedRelationship.relationshipType.nameFrom"/>&quot;
26
      &quot;<s:text name="modifiedRelationship.relationshipType.nameFrom"/>&quot;
27
      &quot;<s:text name="modifiedRelationship.termTo.name"/>&quot;</b>
27
      &quot;<s:text name="modifiedRelationship.termTo.name"/>&quot;</b>
28
      wurde hinzugef&uuml;gt.
28
      wurde hinzugef&uuml;gt.
29
    </p>  
29
    </p>  
30
  </s:if>
30
  </s:if>
31
  
31
  
32
  <s:if test="edit">
32
  <s:if test="terms.size() == 0">
-
 
33
    <p>Bitte definieren Sie zuerst mindestens einen
-
 
34
      <s:url id="termURL" action="listTerms" />
33
    <h2>Diese Beziehung</h2>
35
      <s:a href="%{termURL}">Begriff</s:a>.</p>
34
  </s:if>
36
  </s:if>
35
  <s:else>
37
  <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">
38
    <s:if test="edit">
49
      <s:submit type="button"><img src="${contextPath}/resources/icons/tick.png" alt="" />
-
 
50
        &Auml;nderungen speichern</s:submit>
39
      <h2>Diese Beziehung</h2>
51
    </s:if>
40
    </s:if>
52
    <s:else>
41
    <s:else>
53
      <s:submit type="button"><img src="${contextPath}/resources/icons/add.png" alt="" />
-
 
54
        Hinzuf&uuml;gen</s:submit>
42
      <h2>Neue Beziehung</h2>
55
    </s:else>
43
    </s:else>
-
 
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>
56
  </s:form>
63
    </s:form>
-
 
64
  </s:else>
-
 
65
  
-
 
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>
57
  
89
  
58
  <h2>Definierte Beziehungen</h2>
90
  <h2>Definierte Beziehungen</h2>
59
  <s:if test="relationshipList.size() == 0">
91
  <s:if test="relationshipList.size() == 0">
60
    <p>Keine Beziehungen definiert</p>
92
    <p>Keine Beziehungen definiert</p>
61
  </s:if>
93
  </s:if>
62
  <s:else>
94
  <s:else>
63
    <table>
95
    <table>
64
        <thead>
96
        <thead>
65
          <th>Begriff 1</th>
97
          <th>Begriff 1</th>
66
          <th>Beziehungstyp</th>
98
          <th>Beziehungstyp</th>
67
          <th>Begriff 2</th>
99
          <th>Begriff 2</th>
68
        </thead>
100
        </thead>
69
        <tbody>
101
        <tbody>
70
          <s:iterator value="relationshipList" status="stat">
102
          <s:iterator value="relationshipList" status="stat">
71
            <tr>
103
            <tr>
-
 
104
              <td><s:url id="term1URL" action="editTerm">
-
 
105
                <s:param name="id" value="%{termFrom.objectId}"></s:param>
72
              <td><s:property value="termFrom.name" /></td>
106
              </s:url><s:a href="%{term1URL}"><s:property value="termFrom.name" /></s:a></td>
73
              <td><s:property value="relationshipType.nameFrom" /></td>
107
              <td><s:property value="relationshipType.nameFrom" /></td>
-
 
108
              <td><s:url id="term2URL" action="editTerm">
-
 
109
                  <s:param name="id" value="%{termTo.objectId}"></s:param>
74
              <td><s:property value="termTo.name" /></td>
110
                </s:url><s:a href="%{term2URL}"><s:property value="termTo.name" /></s:a></td>
75
  
111
  
76
              <td><s:url id="editURL" action="editRelationship">
112
              <td><s:url id="editURL" action="editRelationship">
77
                <s:param name="id" value="%{objectId}"></s:param>
113
                  <s:param name="id" value="%{objectId}"></s:param>
78
              </s:url> <s:a href="%{editURL}">
114
                </s:url><s:a href="%{editURL}"><img
79
                <img src="${contextPath}/resources/icons/page_white_edit.png" alt="edit" />
115
                src="${contextPath}/resources/icons/page_white_edit.png"
80
              </s:a></td>
116
                alt="Bearbeiten" title="Bearbeiten" /></s:a></td>
81
              
117
82
              <td><s:url id="deleteURL" action="deleteRelationship">
118
              <td><s:url id="deleteURL" action="deleteRelationship">
83
                <s:param name="id" value="%{objectId}"></s:param>
119
                <s:param name="id" value="%{objectId}"></s:param>
84
              </s:url> <s:a href="%{deleteURL}">
120
              </s:url><s:a href="%{deleteURL}" onclick="return window.confirm('Beziehung loeschen?')"><img
85
                <img src="${contextPath}/resources/icons/delete.png" alt="delete" />
121
                src="${contextPath}/resources/icons/delete.png"
86
              </s:a></td>
122
                alt="L&ouml;schen" title="L&ouml;schen" /></s:a></td>
87
            </tr>
123
            </tr>
88
          </s:iterator>
124
          </s:iterator>
89
        </tbody>
125
        </tbody>
90
      </table>
126
      </table>
91
    </s:else>
127
    </s:else>
92
  </body>
128
  </body>
93
</html>
129
</html>