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
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>
35 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>
14
  <body>
15
 
35 PointedEar 16
  <s:if test="edit">
17
    <h1>Begriff bearbeiten</h1>
18
  </s:if>
19
  <s:else>
20
    <h1>Begriffe anzeigen/bearbeiten</h1>
21
  </s:else>
33 PointedEar 22
 
35 PointedEar 23
  <s:if test="added">
24
    <p>Der Begriff <b><s:text name="savedTerm.name"/></b> wurde hinzugef&uuml;gt.</p>
25
  </s:if>
26
 
27
  <s:if test="edit">
28
    <h2>Dieser Begriff</h2>
29
  </s:if>
30
  <s:else>
31
    <h2>Neuer Begriff</h2>
32
  </s:else>
33
 
34
  <s:form action="saveTerm">
35
    <s:hidden name="edit" />
36
    <s:hidden name="term.objectId" />
37
    <s:textfield name="term.name" label="Name" />
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
 
33 PointedEar 49
  <s:if test="termList.size() == 0">
50
    <p>Keine Begriffe eingegeben</p>
51
  </s:if>
52
  <s:else>
35 PointedEar 53
    <h2>Gespeicherte Begriffe</h2>
33 PointedEar 54
    <table>
34 PointedEar 55
        <s:iterator value="termList" status="stat">
56
        	<tr>
57
        		<td><s:property value="name" /></td>
35 PointedEar 58
            <td><s:url id="editURL" action="editTerm">
59
              <s:param name="id" value="%{objectId}"></s:param>
60
            </s:url> <s:a href="%{editURL}">
61
              <img src="${contextPath}/resources/icons/page_white_edit.png" alt="edit" />
62
            </s:a></td>
63
 
64
            <td><s:url id="deleteURL" action="deleteTerm">
65
              <s:param name="id" value="%{objectId}"></s:param>
66
            </s:url> <s:a href="%{deleteURL}">
67
              <img src="${contextPath}/resources/icons/delete.png" alt="delete" />
68
            </s:a></td>
34 PointedEar 69
        	</tr>
70
        </s:iterator>
71
      </tbody>
33 PointedEar 72
    </table>
73
  </s:else>
74
  </body>
75
</html>