Subversion Repositories WebE

Rev

Rev 34 | Go to most recent revision | 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>Begriff bearbeiten</title>
  </s:if>
  <s:else>
    <title>Begriffe anzeigen/bearbeiten</title>
  </s:else>
  </head>
  <body>
  
  <s:if test="edit">
    <h1>Begriff bearbeiten</h1>
  </s:if>
  <s:else>
    <h1>Begriffe anzeigen/bearbeiten</h1>
  </s:else>
  
  <s:if test="added">
    <p>Der Begriff <b><s:text name="savedTerm.name"/></b> wurde hinzugef&uuml;gt.</p>  
  </s:if>
  
  <s:if test="edit">
    <h2>Dieser Begriff</h2>
  </s:if>
  <s:else>
    <h2>Neuer Begriff</h2>
  </s:else>

  <s:form action="saveTerm">
    <s:hidden name="edit" />
    <s:hidden name="term.objectId" />
    <s:textfield name="term.name" label="Name" />
    <s:if test="edit">
      <s:submit type="button"><img src="${contextPath}/resources/icons/tick.png" alt="" />
        Umbenennen</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>
  
  <s:if test="termList.size() == 0">
    <p>Keine Begriffe eingegeben</p>
  </s:if>
  <s:else>
    <h2>Gespeicherte Begriffe</h2>
    <table>
        <s:iterator value="termList" status="stat">
                <tr>
                        <td><s:property value="name" /></td>
            <td><s:url id="editURL" action="editTerm">
              <s:param name="id" value="%{objectId}"></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="deleteTerm">
              <s:param name="id" value="%{objectId}"></s:param>
            </s:url> <s:a href="%{deleteURL}">
              <img src="${contextPath}/resources/icons/delete.png" alt="delete" />
            </s:a></td>
                </tr>
        </s:iterator>
      </tbody>
    </table>
  </s:else>
  </body>
</html>