Subversion Repositories WebE

Compare Revisions

Last modification

Ignore whitespace Rev 35 → Rev 37

/trunk/WebContent/decorators/mainTemplate.jsp
10,61 → 10,60
<c:set var="isAdmin" value="${fn:contains(requestURI, '/admin/')}" />
 
<%@ page pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ontologie - <decorator:title />
</title>
<link rel="stylesheet" type="text/css"
href="${contextPath}/resources/css/main.css"
/>
</head>
<body>
 
<%-- Only serves as a container for the different site elements!
Do not write any text directly into the page-container div! --%>
<div id="page-container">
<div id="header">
<table width="100%" border="0" cellspacing="0" cellpadding="0"
class="header"
>
<tr>
<td>&nbsp;</td>
<td
style="vertical-align: top; font-size: 12pt; text-align: right;"
>
<div>
<strong>Semantic Web Project</strong><br /> by Michael
Moos<br /> Thomas Lahn
</div></td>
<td width="56" class="no_padding"><img
src="${contextPath}/resources/images/ontology_logo.jpg"
width="56" height="56" alt="logo"
/>
</td>
</tr>
</table>
</div>
 
<!-- Load nav bars depending on the location -->
<c:if test="${isUser}">
<div id="navbar">
<%@ include file="/user/nav.jsp"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><decorator:title /> &ndash; Ontologie-Editor</title>
<link rel="stylesheet" type="text/css"
href="${contextPath}/resources/css/main.css"
/>
</head>
<body>
<%-- Only serves as a container for the different site elements!
Do not write any text directly into the page-container div! --%>
<div id="page-container">
<div id="header">
<table width="100%" border="0" cellspacing="0" cellpadding="0"
class="header"
>
<tr>
<td>&nbsp;</td>
<td
style="vertical-align: top; font-size: 12pt; text-align: right;"
>
<div>
<strong>Ontologie-Editor</strong><br /> von
Michael&nbsp;Moos<br /> &amp; Thomas&nbsp;Lahn
</div></td>
<td width="56" class="no_padding"><img
src="${contextPath}/resources/images/ontology_logo.jpg"
width="56" height="56" alt="logo"
/>
</td>
</tr>
</table>
</div>
</c:if>
<c:if test="${isAdmin}">
<div id="navbar">
<%@ include file="/admin/nav.jsp"%>
<!-- Load nav bars depending on the location -->
<c:if test="${isUser}">
<div id="navbar">
<%@ include file="/user/nav.jsp"%>
</div>
</c:if>
<c:if test="${isAdmin}">
<div id="navbar">
<%@ include file="/admin/nav.jsp"%>
</div>
</c:if>
<!-- Content DIV loaded via decorator -->
<div id="content">
<decorator:body />
</div>
</c:if>
 
<!-- Content DIV loaded via decorator -->
<div id="content">
<decorator:body />
</div>
 
</div>
</body>
</body>
</html>
/trunk/WebContent/admin/relTypeAdd.jsp
File deleted
\ No newline at end of file
Property changes:
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
Index: admin/relTypeList.jsp
===================================================================
--- admin/relTypeList.jsp (revision 35)
+++ admin/relTypeList.jsp (nonexistent)
@@ -1,43 +0,0 @@
-<%@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>
-<title>Beziehungstypen bearbeiten</title>
-</head>
-<body>
-
-<h1>Beziehungstypen</h1>
-<p>Hier k&ouml;nnen Sie die Beziehungstypen anpassen.</p>
-
-<s:if test="relTypeList.size() == 0">
-<p>Keine Beziehungstypen gefunden</p>
-</s:if><s:else>
-<table>
- <tr>
- <th>Bezeichnung A =&lt; B</th>
- <th>Bezeichnung B =&lt; A</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>
\ No newline at end of file
/admin/relTypeList.jsp
Property changes:
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
Index: admin/userList.jsp
===================================================================
--- admin/userList.jsp (revision 35)
+++ admin/userList.jsp (nonexistent)
@@ -1,49 +0,0 @@
-<%@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>
-<title>User bearbeiten</title>
-</head>
-<body>
-
-<h1>UserListe</h1>
-<p>Die Liste:</p>
-
-<s:if test="userList.size() == 0">
-<p>Keine Benutzer gefunden</p>
-</s:if>
-<s:else>
-<table>
- <tr>
- <th>Username</th>
- <th>Vorname</th>
- <th>Nachname</th>
- <th>Admin?</th>
- </tr>
-<s:iterator value="userList" status="stat">
- <tr>
- <td><s:property value="username" /></td>
- <td><s:property value="firstname" /></td>
- <td><s:property value="lastname" /></td>
- <td><s:property value="admin" /></td>
-
- <td><s:url id="editURL" action="editUser">
- <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="deleteUser">
- <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>
\ No newline at end of file
/admin/userList.jsp
Property changes:
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
Index: admin/relTypeAddForm.jsp
===================================================================
--- admin/relTypeAddForm.jsp (revision 35)
+++ admin/relTypeAddForm.jsp (nonexistent)
@@ -1,23 +0,0 @@
-<%@taglib uri="/struts-tags" prefix="s"%>
-<html>
-<head>
-<title>Beziehungstyp erstellen</title>
-</head>
-<body>
-
-<h1>Beziehungstyp hinzuf&uuml;gen</h1>
-<p>Bitte geben Sie die Daten f&uuml;r den Beziehungstypen ein</p>
-<s:form action="doRelTypeAdd">
- <s:hidden name="relType.id" />
- <s:textfield name="relType.nameFrom" label="Name vom Ausgangspunkt (z.B. ist Vater von)" />
- <s:textfield name="relType.nameTo" label="Name vom Zielpunkt (z.B. ist Sohn von)" />
-
- <s:if test="relType.id != ''">
- <s:submit value="Edit" />
- </s:if><s:else>
- <s:submit value="Add" />
- </s:else>
-
-</s:form>
-</body>
-</html>
/admin/relTypeAddForm.jsp
Property changes:
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
Index: admin/userAdd.jsp
===================================================================
--- admin/userAdd.jsp (revision 35)
+++ admin/userAdd.jsp (nonexistent)
@@ -1,17 +0,0 @@
-<html>
-<head>
-<title>User added</title>
-</head>
-<body>
-
- <h1>
- User hinzugef&uuml;gt
- </h1>
- <p>
- Der Benutzer wurde hinzugef&uuml;gt
- </p>
- <p>
- TODO: Weiterleitung!!
- </p>
-</body>
-</html>
\ No newline at end of file
/admin/userAdd.jsp
Property changes:
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
Index: admin/userAddForm.jsp
===================================================================
--- admin/userAddForm.jsp (revision 35)
+++ admin/userAddForm.jsp (nonexistent)
@@ -1,27 +0,0 @@
-<%@taglib uri="/struts-tags" prefix="s"%>
-<html>
-<head>
-<title>User erstellen</title>
-</head>
-<body>
-
-<h1>User hinzuf&uuml;gen</h1>
-<p>Bitte geben Sie die Benutzerdaten ein</p>
-<s:form action="doUserAdd">
- <s:hidden name="user.id" />
- <s:textfield name="user.username" label="User Name" />
- <s:password name="user.password" label="Password" />
- <s:textfield name="user.firstname" label="Vorname" />
- <s:textfield name="user.lastname" label="Nachname" />
- <s:checkbox name="user.admin"
- label="Soll der User admin sein?" />
-
- <s:if test="user.id != ''">
- <s:submit value="Edit" />
- </s:if><s:else>
- <s:submit value="Add" />
- </s:else>
-
-</s:form>
-</body>
-</html>
/admin/userAddForm.jsp
Property changes:
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
Index: admin/nav.jsp
===================================================================
--- admin/nav.jsp (revision 35)
+++ admin/nav.jsp (revision 37)
@@ -1,21 +1,14 @@
<div id="navigation">
<ul>
- <li>User
+ <li>Verwalten
<ul>
- <li><a href="userAddForm">Hinzuf&uuml;gen</a></li>
- <li><a href="userList">&Auml;ndern, L&ouml;schen</a></li>
+ <li><a href="listUsers">Benutzer</a></li>
+ <li><a href="listRelTypes">Beziehungstypen</a></li>
</ul></li>
- <li>Beziehungstypen
+ <li>Benutzerfunktionen
<ul>
- <li><a href="relTypeAddForm">Hinzuf&uuml;gen</a></li>
- <li><a href="relTypeList">&Auml;ndern, L&ouml;schen</a></li>
+ <li><a href="../Logout">Abmelden</a></li>
</ul></li>
-
- <li>User-Settings
- <ul>
- <li><a href="../Logout">Logout</a></li>
- </ul></li>
-
</ul>
</div>
/trunk/WebContent/admin/relTypes.jsp
0,0 → 1,87
<%@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>
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: admin/users.jsp
===================================================================
--- admin/users.jsp (nonexistent)
+++ admin/users.jsp (revision 37)
@@ -0,0 +1,93 @@
+<%@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>
+ <title>User bearbeiten</title>
+ </head>
+ <body>
+ <s:if test="edit">
+ <h1>Benutzer bearbeiten</h1>
+ </s:if>
+ <s:else>
+ <h1>Benutzer verwalten</h1>
+ </s:else>
+
+ <s:if test="added">
+ <p>Der Benutzer <b><s:text name="savedUser.username"/>
+ <s:if test="savedUser.firstname.length() > 0 || savedUser.lastname.length() > 0))">
+ (<s:text name="savedUser.firstname"/> <s:text name="savedUser.lastname"/>)
+ </s:if></b>
+ wurde hinzugef&uuml;gt.</p>
+ </s:if>
+
+ <s:if test="edit">
+ <h2>Dieser Benutzer</h2>
+ </s:if>
+ <s:else>
+ <h2>Neuer Benutzer</h2>
+ </s:else>
+
+ <s:form action="saveUser">
+ <s:hidden name="edit" />
+ <s:hidden name="user.id" />
+ <s:textfield name="user.username" label="Benutzername" required="true" />
+ <s:password name="user.password" label="Passwort" required="true" />
+ <s:textfield name="user.firstname" label="Vorname" />
+ <s:textfield name="user.lastname" label="Nachname" />
+ <s:checkbox name="user.admin" label="Administrator" />
+
+ <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>Registrierte Benutzer</h2>
+ <s:if test="userList.size() == 0">
+ <p>Keine Benutzer gefunden</p>
+ </s:if>
+ <s:else>
+ <table>
+ <thead>
+ <tr>
+ <th>Benutzername</th>
+ <th>Vorname</th>
+ <th>Nachname</th>
+ <th>Administrator</th>
+ </tr>
+ </thead>
+ <tbody>
+ <s:iterator value="userList" status="stat">
+ <tr>
+ <td><s:property value="username" /></td>
+ <td><s:property value="firstname" /></td>
+ <td><s:property value="lastname" /></td>
+ <td><s:if test="admin">ja</s:if><s:else>nein</s:else></td>
+
+ <td><s:url id="editURL" action="editUser">
+ <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>
+
+ <s:if test="!admin">
+ <td><s:url id="deleteURL" action="deleteUser">
+ <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>
+ </s:if>
+ </tr>
+ </s:iterator>
+ </tbody>
+ </table>
+ </s:else>
+ </body>
+</html>
\ No newline at end of file
/admin/users.jsp
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: user/nav.jsp
===================================================================
--- user/nav.jsp (revision 35)
+++ user/nav.jsp (revision 37)
@@ -1,19 +1,15 @@
<div id="navigation">
<ul>
- <li>Begriffe
+ <li>Ontologie
<ul>
- <li><a href="listTerms">Anzeigen/Bearbeiten</a></li>
+ <li><a href="listTerms">Begriffe</a></li>
+ <li><a href="listRelationships">Beziehungen</li>
</ul></li>
- <li>Beziehungen
+ <li>Benutzerfunktionen
<ul>
- <li><a href="listRelationships">Anzeigen/Bearbeiten</a></li>
+ <li><a href="../Logout">Abmelden</a></li>
</ul></li>
- <li>User-Settings
- <ul>
- <li><a href="../Logout">Logout</a></li>
- </ul></li>
-
</ul>
-</div>
+</div>
\ No newline at end of file
/trunk/WebContent/user/relationships.jsp
29,32 → 29,64
</p>
</s:if>
<s:if test="edit">
<h2>Diese Beziehung</h2>
<s:if test="terms.size() == 0">
<p>Bitte definieren Sie zuerst mindestens einen
<s:url id="termURL" action="listTerms" />
<s:a href="%{termURL}">Begriff</s:a>.</p>
</s:if>
<s:else>
<h2>Neue Beziehung</h2>
</s:else>
<s:form action="saveRelationship">
<s:hidden name="edit" />
<s:hidden name="relationship.objectId" />
<s:select name="term1" list="terms" listKey="objectId" listValue="name"
label="Begriff 1" value="relationship.termFrom.objectId" />
<s:select name="type" list="relationshipTypes" listKey="id" listValue="nameFrom"
label="Beziehungstyp" value="relationship.relationshipType.id"/>
<s:select name="term2" list="terms" listKey="objectId" listValue="name"
label="Begriff 2" value="relationship.termTo.objectId"/>
<s:if test="edit">
<s:submit type="button"><img src="${contextPath}/resources/icons/tick.png" alt="" />
&Auml;nderungen speichern</s:submit>
<h2>Diese Beziehung</h2>
</s:if>
<s:else>
<s:submit type="button"><img src="${contextPath}/resources/icons/add.png" alt="" />
Hinzuf&uuml;gen</s:submit>
<h2>Neue Beziehung</h2>
</s:else>
</s:form>
<s:form action="saveRelationship">
<s:hidden name="edit" />
<s:hidden name="relationship.objectId" />
<s:select name="term1" list="terms" listKey="objectId" listValue="name"
label="Begriff 1" value="relationship.termFrom.objectId" />
<s:select name="type" list="relationshipTypes" listKey="id" listValue="nameFrom"
label="Beziehungstyp" value="relationship.relationshipType.id"/>
<s:select name="term2" list="terms" listKey="objectId" listValue="name"
label="Begriff 2" value="relationship.termTo.objectId"/>
<s:textarea name="comment" label="Aenderungskommentar (optional)" />
<s:if test="edit">
<s:submit type="button"><img src="${contextPath}/resources/icons/tick.png" alt="" />
&Auml;nderungen 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>
</s:else>
<s:if test="edit">
<h3>&Auml;nderungsprotokoll</h3>
<table>
<thead>
<th>Datum</th>
<th>Benutzer</th>
<th>Aktion</th>
<th>Neuer Wert</th>
<th>Kommentar</th>
</thead>
<tbody>
<s:iterator value="relationship.object.history" status="stat">
<tr>
<td><s:date name="date" format="yyyy-MM-dd hh:mm:ss" /></td>
<td><s:property value="user.firstname" /> <s:property value="user.lastname"/></td>
<td><s:property value="actionType.name" /></td>
<td><s:property value="value" /></td>
<td><s:property value="comment" /></td>
</tr>
</s:iterator>
</tbody>
</table>
</s:if>
<h2>Definierte Beziehungen</h2>
<s:if test="relationshipList.size() == 0">
<p>Keine Beziehungen definiert</p>
69,21 → 101,25
<tbody>
<s:iterator value="relationshipList" status="stat">
<tr>
<td><s:property value="termFrom.name" /></td>
<td><s:url id="term1URL" action="editTerm">
<s:param name="id" value="%{termFrom.objectId}"></s:param>
</s:url><s:a href="%{term1URL}"><s:property value="termFrom.name" /></s:a></td>
<td><s:property value="relationshipType.nameFrom" /></td>
<td><s:property value="termTo.name" /></td>
<td><s:url id="term2URL" action="editTerm">
<s:param name="id" value="%{termTo.objectId}"></s:param>
</s:url><s:a href="%{term2URL}"><s:property value="termTo.name" /></s:a></td>
<td><s:url id="editURL" action="editRelationship">
<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>
<s:param name="id" value="%{objectId}"></s:param>
</s:url><s:a href="%{editURL}"><img
src="${contextPath}/resources/icons/page_white_edit.png"
alt="Bearbeiten" title="Bearbeiten" /></s:a></td>
 
<td><s:url id="deleteURL" action="deleteRelationship">
<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>
</s:url><s:a href="%{deleteURL}" onclick="return window.confirm('Beziehung loeschen?')"><img
src="${contextPath}/resources/icons/delete.png"
alt="L&ouml;schen" title="L&ouml;schen" /></s:a></td>
</tr>
</s:iterator>
</tbody>
/trunk/WebContent/user/terms.jsp
4,72 → 4,169
 
<html>
<head>
<s:if test="edit">
<title>Begriff bearbeiten</title>
</s:if>
<s:else>
<title>Begriffe anzeigen/bearbeiten</title>
</s:else>
<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" />
<body>
<s:if test="edit">
<s:submit type="button"><img src="${contextPath}/resources/icons/tick.png" alt="" />
Umbenennen</s:submit>
<h1>Begriff bearbeiten</h1>
</s:if>
<s:else>
<s:submit type="button"><img src="${contextPath}/resources/icons/add.png" alt="" />
Hinzuf&uuml;gen
</s:submit>
<h1>Begriffe anzeigen/bearbeiten</h1>
</s:else>
</s:form>
<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" required="true" />
<s:textarea name="comment" label="Aenderungskommentar (optional)" />
<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="edit">
<h3>Beziehungen</h3>
<s:if test="term.relationshipsForTermFrom.size() == 0 && term.relationshipsForTermTo.size() == 0">
<p>Dieser Begriff steht mit keinem anderen in Beziehung.</p>
</s:if>
<s:else>
<p>Dieser Begriff steht zur Zeit in folgenden Beziehungen:</p>
<table>
<thead>
<th>Begriff 1</th>
<th>Beziehungstyp</th>
<th>Begriff 2</th>
</thead>
<tbody>
<s:iterator value="term.relationshipsForTermFrom">
<tr>
<td><s:property value="termFrom.name" /></td>
<td><s:property value="relationshipType.nameFrom" /></td>
<td><s:url id="term1URL" action="editTerm">
<s:param name="id" value="%{termTo.objectId}"></s:param>
</s:url><s:a href="%{term1URL}"><s:property value="termTo.name" /></s:a></td>
<td><s:url id="editURL" action="editRelationship">
<s:param name="id" value="%{objectId}" />
</s:url><s:a href="%{editURL}"><img
src="${contextPath}/resources/icons/page_white_edit.png"
alt="Bearbeiten" title="Bearbeiten" />
</s:a></td>
<td><s:url id="deleteURL" action="deleteRelationship">
<s:param name="id" value="%{objectId}"></s:param>
</s:url><s:a href="%{deleteURL}"
onclick="return window.confirm('Beziehung loeschen?')"><img
src="${contextPath}/resources/icons/delete.png"
alt="L&ouml;schen" title="L&ouml;schen""/></s:a></td>
</tr>
</s:iterator>
<s:iterator value="term.relationshipsForTermTo">
<tr>
<td><s:property value="termTo.name" /></td>
<td><s:property value="relationshipType.nameTo" /></td>
<td><s:url id="term2URL" action="editTerm">
<s:param name="id" value="%{termFrom.objectId}" />
</s:url><s:a href="%{term2URL}"><s:property value="termFrom.name" /></s:a></td>
<td><s:url id="editURL" action="editRelationship">
<s:param name="id" value="%{objectId}"></s:param>
</s:url><s:a href="%{editURL}"><img
src="${contextPath}/resources/icons/page_white_edit.png"
alt="Bearbeiten" title="Bearbeiten" />
</s:a></td>
<td><s:url id="deleteURL" action="deleteRelationship">
<s:param name="id" value="%{objectId}"></s:param>
</s:url><s:a href="%{deleteURL}"
onclick="return window.confirm('Beziehung loeschen?')"><img
src="${contextPath}/resources/icons/delete.png"
alt="L&ouml;schen" title="L&ouml;schen" /></s:a></td>
</tr>
</s:iterator>
</tbody>
</table>
</s:else>
<s:if test="termList.size() == 0">
<p>Keine Begriffe eingegeben</p>
</s:if>
<s:else>
<h3>&Auml;nderungsprotokoll</h3>
<s:if test="term.object.history.size() == 0">
<p>Es sind keine &Auml;nderungen f&uuml;r diesen Begriff protokolliert.</p>
</s:if>
<s:else>
<table>
<thead>
<th>Datum</th>
<th>Benutzer</th>
<th>Aktion</th>
<th>Neuer Name</th>
<th>Kommentar</th>
</thead>
<tbody>
<s:iterator value="term.object.history" status="stat">
<tr>
<td><s:date name="date" format="yyyy-MM-dd hh:mm:ss" /></td>
<td><s:property value="user.firstname" /> <s:property value="user.lastname"/></td>
<td><s:property value="actionType.name" /></td>
<td><s:property value="value" /></td>
<td><s:property value="comment" /></td>
</tr>
</s:iterator>
</tbody>
</table>
</s:else>
</s:if>
<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:if test="termList.size() == 0">
<p>Es wurden noch keine Begriffe eingegeben.</p>
</s:if>
<s:else>
<table>
<tbody>
<s:iterator value="termList" status="stat">
<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>
</s:url>
<tr>
<td><s:a href="%{editURL}"><s:property value="name" /></s:a></td>
<td><s:a href="%{editURL}"><img
src="${contextPath}/resources/icons/page_white_edit.png"
alt="Bearbeiten" title="Bearbeiten" /></s:a></td>
<s:if test="false">
<td><s:url id="deleteURL" action="deleteTerm">
<s:param name="id" value="%{objectId}"></s:param>
</s:url><s:a href="%{deleteURL}" onclick="return window.confirm('Begriff loeschen?')"><img
src="${contextPath}/resources/icons/delete.png"
alt="L&ouml;schen" title="L&ouml;schen" /></s:a></td>
</s:if>
</tr>
</s:iterator>
</tbody>
</table>
</s:else>
</body>
</html>