Subversion Repositories WebE

Rev

Rev 35 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
33 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>
37 PointedEar 7
    <s:if test="edit">
8
      <title>Begriff bearbeiten</title>
9
    </s:if>
10
    <s:else>
11
      <title>Begriffe anzeigen/bearbeiten</title>
12
    </s:else>
33 PointedEar 13
  </head>
37 PointedEar 14
  <body>
35 PointedEar 15
    <s:if test="edit">
37 PointedEar 16
      <h1>Begriff bearbeiten</h1>
35 PointedEar 17
    </s:if>
18
    <s:else>
37 PointedEar 19
      <h1>Begriffe anzeigen/bearbeiten</h1>
35 PointedEar 20
    </s:else>
37 PointedEar 21
 
22
    <s:if test="added">
23
      <p>Der Begriff <b><s:text name="savedTerm.name"/></b> wurde hinzugef&uuml;gt.</p>
24
    </s:if>
25
 
26
    <s:if test="edit">
27
      <h2>Dieser Begriff</h2>
28
    </s:if>
29
    <s:else>
30
      <h2>Neuer Begriff</h2>
31
    </s:else>
32
 
33
    <s:form action="saveTerm">
34
      <s:hidden name="edit" />
35
      <s:hidden name="term.objectId" />
36
      <s:textfield name="term.name" label="Name" required="true" />
37
      <s:textarea name="comment" label="Aenderungskommentar (optional)" />
38
      <s:if test="edit">
39
        <s:submit type="button"><img src="${contextPath}/resources/icons/tick.png" alt="" />
40
          Umbenennen</s:submit>
41
      </s:if>
42
      <s:else>
43
        <s:submit type="button"><img src="${contextPath}/resources/icons/add.png" alt="" />
44
          Hinzuf&uuml;gen
45
        </s:submit>
46
      </s:else>
47
    </s:form>
48
 
49
    <s:if test="edit">
50
      <h3>Beziehungen</h3>
51
 
52
      <s:if test="term.relationshipsForTermFrom.size() == 0 && term.relationshipsForTermTo.size() == 0">
53
        <p>Dieser Begriff steht mit keinem anderen in Beziehung.</p>
54
 
55
      </s:if>
56
      <s:else>
57
        <p>Dieser Begriff steht zur Zeit in folgenden Beziehungen:</p>
58
 
59
        <table>
60
          <thead>
61
            <th>Begriff 1</th>
62
            <th>Beziehungstyp</th>
63
            <th>Begriff 2</th>
64
          </thead>
65
          <tbody>
66
            <s:iterator value="term.relationshipsForTermFrom">
67
              <tr>
68
                <td><s:property value="termFrom.name" /></td>
69
                <td><s:property value="relationshipType.nameFrom" /></td>
70
                <td><s:url id="term1URL" action="editTerm">
71
                    <s:param name="id" value="%{termTo.objectId}"></s:param>
72
                  </s:url><s:a href="%{term1URL}"><s:property value="termTo.name" /></s:a></td>
73
                <td><s:url id="editURL" action="editRelationship">
74
                    <s:param name="id" value="%{objectId}" />
75
                  </s:url><s:a href="%{editURL}"><img
76
                    src="${contextPath}/resources/icons/page_white_edit.png"
77
                    alt="Bearbeiten" title="Bearbeiten" />
78
                </s:a></td>
79
 
80
                <td><s:url id="deleteURL" action="deleteRelationship">
81
                    <s:param name="id" value="%{objectId}"></s:param>
82
                  </s:url><s:a href="%{deleteURL}"
83
                    onclick="return window.confirm('Beziehung loeschen?')"><img
84
                    src="${contextPath}/resources/icons/delete.png"
85
                    alt="L&ouml;schen" title="L&ouml;schen""/></s:a></td>
86
              </tr>
87
            </s:iterator>
88
            <s:iterator value="term.relationshipsForTermTo">
89
              <tr>
90
                <td><s:property value="termTo.name" /></td>
91
                <td><s:property value="relationshipType.nameTo" /></td>
92
                <td><s:url id="term2URL" action="editTerm">
93
                    <s:param name="id" value="%{termFrom.objectId}" />
94
                  </s:url><s:a href="%{term2URL}"><s:property value="termFrom.name" /></s:a></td>
95
                <td><s:url id="editURL" action="editRelationship">
96
                   <s:param name="id" value="%{objectId}"></s:param>
97
                  </s:url><s:a href="%{editURL}"><img
98
                  src="${contextPath}/resources/icons/page_white_edit.png"
99
                  alt="Bearbeiten" title="Bearbeiten" />
100
                </s:a></td>
101
 
102
                <td><s:url id="deleteURL" action="deleteRelationship">
103
                    <s:param name="id" value="%{objectId}"></s:param>
104
                  </s:url><s:a href="%{deleteURL}"
105
                  onclick="return window.confirm('Beziehung loeschen?')"><img
106
                  src="${contextPath}/resources/icons/delete.png"
107
                  alt="L&ouml;schen" title="L&ouml;schen" /></s:a></td>
108
              </tr>
109
            </s:iterator>
110
          </tbody>
111
        </table>
112
      </s:else>
35 PointedEar 113
 
37 PointedEar 114
      <h3>&Auml;nderungsprotokoll</h3>
115
      <s:if test="term.object.history.size() == 0">
116
        <p>Es sind keine &Auml;nderungen f&uuml;r diesen Begriff protokolliert.</p>
117
      </s:if>
118
      <s:else>
119
        <table>
120
          <thead>
121
            <th>Datum</th>
122
            <th>Benutzer</th>
123
            <th>Aktion</th>
124
            <th>Neuer Name</th>
125
            <th>Kommentar</th>
126
          </thead>
127
          <tbody>
128
            <s:iterator value="term.object.history" status="stat">
129
              <tr>
130
                <td><s:date name="date" format="yyyy-MM-dd hh:mm:ss" /></td>
131
                <td><s:property value="user.firstname" /> <s:property value="user.lastname"/></td>
132
                <td><s:property value="actionType.name" /></td>
133
                <td><s:property value="value" /></td>
134
                <td><s:property value="comment" /></td>
135
              </tr>
136
            </s:iterator>
137
          </tbody>
138
        </table>
139
      </s:else>
140
    </s:if>
141
 
35 PointedEar 142
    <h2>Gespeicherte Begriffe</h2>
37 PointedEar 143
    <s:if test="termList.size() == 0">
144
      <p>Es wurden noch keine Begriffe eingegeben.</p>
145
    </s:if>
146
    <s:else>
147
      <table>
148
        <tbody>
149
          <s:iterator value="termList" status="stat">
150
            <s:url id="editURL" action="editTerm">
35 PointedEar 151
              <s:param name="id" value="%{objectId}"></s:param>
37 PointedEar 152
            </s:url>
153
          	<tr>
154
          		<td><s:a href="%{editURL}"><s:property value="name" /></s:a></td>
155
              <td><s:a href="%{editURL}"><img
156
                src="${contextPath}/resources/icons/page_white_edit.png"
157
                alt="Bearbeiten" title="Bearbeiten" /></s:a></td>
158
 
159
              <s:if test="false">
160
                <td><s:url id="deleteURL" action="deleteTerm">
161
                  <s:param name="id" value="%{objectId}"></s:param>
162
                </s:url><s:a href="%{deleteURL}" onclick="return window.confirm('Begriff loeschen?')"><img
163
                  src="${contextPath}/resources/icons/delete.png"
164
                  alt="L&ouml;schen" title="L&ouml;schen" /></s:a></td>
165
              </s:if>
166
          	</tr>
167
          </s:iterator>
168
        </tbody>
169
      </table>
170
    </s:else>
33 PointedEar 171
  </body>
172
</html>