Subversion Repositories WebE

Rev

Rev 34 | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

1
<%@taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="contextPath" value="${pageContext.request.contextPath}" />

<html>
  <head>
    <s:if test="edit">
      <title>Beziehungstyp bearbeiten</title>
    </s:if>
    <s:else>
      <title>Beziehungstypen verwalten</title>
    </s:else>
  </head>
  <body>  
    <s:if test="edit">
      <h1>Beziehungstyp bearbeiten</h1>
    </s:if>
    <s:else>
      <h1>Beziehungstypen verwalten</h1>
    </s:else>
    
    <s:if test="edit">
      <h2>Dieser Beziehungstyp</h2>
    </s:if>
    <s:else>
      <h2>Neuer Beziehungstyp</h2>
    </s:else>    
  
    <s:form action="doRelTypeAdd">
      <s:hidden name="relType.id" />
      <s:textfield name="relType.nameFrom"
        label="Bezeichnung A --> B (z.B. &quot;ist Sohn von&quot;)"
      />
      <s:textfield name="relType.nameTo"
        label="Bezeichnung A <-- B (z.B. &quot;ist Vater von&quot;)"
      />
  
      <s:if test="edit">
        <s:submit type="button"><img src="${contextPath}/resources/icons/tick.png" alt="" />
          Speichern</s:submit>
      </s:if>
      <s:else>
        <s:submit type="button"><img src="${contextPath}/resources/icons/add.png" alt="" />
          Hinzuf&uuml;gen
        </s:submit>
      </s:else>      
    </s:form>
  
    <h2>Definierte Beziehungstypen</h2>
    <s:if test="relTypeList.size() == 0">
      <p>Keine Beziehungstypen gefunden</p>
    </s:if>
    <s:else>
      <table>
        <tr>
          <th>A &rarr; B</th>
          <th>A &larr; B</th>
        </tr>
        <s:iterator value="relTypeList" status="stat">
          <tr>
            <td><s:property value="nameFrom" /></td>
            <td><s:property value="nameTo" /></td>
  
            <td><s:url id="editURL" action="editRelType">
                <s:param name="id" value="%{id}"></s:param>
              </s:url> <s:a href="%{editURL}">
                <img
                  src="${contextPath}/resources/icons/page_white_edit.png"
                  alt="edit"
                />
              </s:a>
            </td>
  
            <td><s:url id="deleteURL" action="deleteRelType">
                <s:param name="id" value="%{id}"></s:param>
              </s:url> <s:a href="%{deleteURL}">
                <img src="${contextPath}/resources/icons/delete.png"
                  alt="delete"
                />
              </s:a>
            </td>
          </tr>
        </s:iterator>
      </table>
    </s:else>
  </body>
</html>