--- /dev/null
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+ pageEncoding="ISO-8859-1"
+%>
+<%@
+ taglib prefix="s" uri="/struts-tags"
+%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+
+<!-- Initialization of the edit action, if any
+ =============================================================================================================================
+ -->
+<% String action = request.getParameter("action");
+ String type = request.getParameter("index");
+ if (action == null) action = "display";
+%>
+<s:set var="todo"><%=action%></s:set>
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title><s:text name="name.module"/></title>
+ <link href=<s:url value="/skin/default.css"/> rel="stylesheet" type="text/css">
+ <link href="../rtef/rte.css" rel="stylesheet" type="text/css">
+ <script language="JavaScript" type="text/javascript" src="../rtef/lang/fr.js"></script>
+ <script language="JavaScript" type="text/javascript" src="../rtef/richtext.js"></script>
+ <script language="JavaScript" type="text/javascript" src="../rtef/xhtml.js"></script>
+ <script language="JavaScript" type="text/javascript" src="../js/popup.js"></script>
+ <script language="JavaScript" type="text/javascript" src="../js/action.js"></script>
+
+ <script language="JavaScript">
+
+ initTextEditor();
+
+ var substitutions = new Array (
+ new RegExp("[\r\n]",'g'), " ", // For removing carriage returns & line feeds
+ new RegExp("<p> "), "<p>", // For removing of the 1st paragraph
+ new RegExp(" </p>"), "</p>", // For removing of the 1st paragraph
+
+ new RegExp("é",'g'), "é",
+ new RegExp("è",'g'), "è",
+ new RegExp("ê",'g'), "ê",
+ new RegExp("ë",'g'), "ë",
+ new RegExp("à",'g'), "à",
+ new RegExp("â",'g'), "â",
+ new RegExp("î",'g'), "î",
+ new RegExp("ï",'g'), "ï",
+ new RegExp("ô",'g'), "ô",
+ new RegExp("ù",'g'), "ù",
+ new RegExp("û",'g'), "û",
+ new RegExp("ü",'g'), "ü",
+
+ new RegExp("ç",'g'), "ç"
+ );
+
+ function initialize (action) {
+// ----------------------------
+ if (action == "setContext") {
+ edit.elements[2].focus();
+ } else
+ if (action == "renameDocument") {
+ edoc.documentTitle.focus();
+ } else
+ if (action == "renameKnowledge") {
+ edit.knowledgeTitle.focus();
+ } else
+ if (action == "addKnowledge") {
+ edit.elements[1].focus();
+ } else
+ if (action != "display") {
+ edit.elements[0].focus();
+ }
+ }
+ function setValue () {
+// -------------------
+ var select = edit.elements[0].value; // contextValue select input
+ if (select == "0") { // Creation of a new context type
+ tds = document.getElementById("select");
+ tde = document.getElementById("enter");
+ tds.style.display = "none"; // Hides the select input
+ tde.style.display = "block"; // Displays the text input
+ }
+ edit.elements[2].focus();
+ }
+ function clean (html) {
+// ---------------------
+ html = trim(html);
+ for (i=0; i<substitutions.length; i = i+2) {
+ html = html.replace(substitutions[i], substitutions[i+1]);
+ }
+ return html;
+ }
+ function submitEdit () {
+// ----------------------
+ updateRTEs(); // Sets the value of knowledgeValue input
+ edit.knowledgeValue.value = clean(edit.knowledgeValue.value);
+ edit.submit();
+ }
+ </script>
+ </head>
+
+ <body onLoad="initialize('<%=action%>')">
+<!-- Menu-bar
+ =============================================================================================================================
+ -->
+ <jsp:include page="/jsp/menubar.jsp" />
+
+<!-- Title-bar
+ =============================================================================================================================
+ -->
+ <jsp:include page="/jsp/titlebar.jsp" />
+
+<!-- Left pane
+ =============================================================================================================================
+ -->
+ <div id=left-pane>
+ <jsp:include page="/jsp/toolbar.jsp" />
+ <div id=top-spacer></div>
+ <jsp:include page="/jsp/menuitem.jsp" />
+ <jsp:include page="/jsp/studyProperties.jsp" />
+ </div>
+
+ <div id=main-pane>
+
+<!-- Description and simulation context sections
+ =============================================================================================================================
+
+ Display of tabs
+ -->
+ <div id="tab-bar">
+ <div id="tab-description">
+ <span id="tab-front"> <s:text name="title.description"/> </span>
+ </div>
+ <div id="tab-context">
+ <span id="tab-front"> <s:text name="title.context"/> </span>
+ </div>
+ </div>
+
+<!-- Display of contents
+ -->
+ <div id="article-box">
+ <table width=100% border=0 cellspacing=0 cellpadding=0>
+ <tr valign=top>
+ <td width=38%> <!-- Must conform to the width of above tab-description -->
+ <div id="top-spacer"></div>
+ <div id=article-body class=text>
+ <jsp:include page="/jsp/readDescription.jsp">
+ <jsp:param name="entity" value="study" />
+ </jsp:include>
+ </div>
+ </td>
+ <td width=1></td> <!-- Trick for aligning the vertical separator with the tab -->
+ <td width=1 bgcolor=#AAAAAA></td>
+ <td>
+ <div id="top-spacer"></div>
+ <div id="article-body">
+ <s:if test="%{#todo == 'newContext' || #todo == 'selectContext' || #todo == 'setContext'}">
+ <form name="edit" action="<%=action%>?selection=<s:property value="selection"/>" method="post">
+ <jsp:include page="/jsp/editContext.jsp">
+ <jsp:param name="action" value="<%=action%>" />
+ <jsp:param name="type" value="<%=type%>" />
+ </jsp:include>
+ </form>
+ </s:if>
+ <s:else>
+ <jsp:include page="/jsp/readContext.jsp" />
+ </s:else>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+
+<!-- Knowledge elements section
+ =============================================================================================================================
+ -->
+ <s:if test="knowledges != null">
+ <div id=article-box>
+ <div id=section><s:text name="title.knowledge"/></div>
+ <div id=article-body class=text>
+ <s:if test="%{#todo == 'addKnowledge' || #todo == 'renameKnowledge' || #todo == 'editKnowledge'}">
+ <form name="edit" action="setKnowledge" method="post">
+ <jsp:include page="/jsp/editKnowledge.jsp">
+ <jsp:param name="action" value="<%=action%>" />
+ <jsp:param name="index" value="<%=type%>" />
+ </jsp:include>
+ </form>
+ </s:if>
+ <s:else>
+ <jsp:include page="/jsp/readKnowledge.jsp">
+ <jsp:param name="entity" value="study" />
+ </jsp:include>
+ </s:else>
+ </div>
+ </div>
+ </s:if>
+
+<!-- Documents section
+ =============================================================================================================================
+ -->
+ <s:if test="documents != null">
+ <div id=article-box>
+ <div id=section><s:text name="title.document"/></div>
+ <div id=article-body class=text>
+ <s:if test="%{writeAccess == 'true' && stepEnabled == 'true'}">
+ <form name="edoc" action="setDocument" method="post">
+ <jsp:include page="/jsp/editContents.jsp">
+ <jsp:param name="action" value="<%=action%>" />
+ <jsp:param name="index" value="<%=type%>" />
+ </jsp:include>
+ </form>
+ </s:if>
+ <s:else>
+ <jsp:include page="/jsp/readContents.jsp">
+ <jsp:param name="entity" value="study" />
+ </jsp:include>
+ </s:else>
+ </div>
+ </div>
+
+<!-- Comment section
+ =============================================================================================================================
+ -->
+ <s:if test="%{writeAccess == 'true' && stepEnabled == 'true'}">
+ <div id=article-box>
+ <div id=section><s:text name="title.comment"/></div>
+ <div id=article-body class=text>
+ <jsp:include page="/jsp/readComment.jsp"/>
+ </div>
+ </div>
+ </s:if>
+ </s:if>
+
+ </div>
+ </body>
+</html>
\ No newline at end of file
<!-- Edition of simulation contexts
-->
<action name="add-context" class="editSimulationContextAction" method="initialize">
- <result name="create">/study/displayStudyStep.jsp?action=newContext</result>
- <result name="select">/study/displayStudyStep.jsp?action=selectContext</result>
+ <result name="create">/study/displayStudy.jsp?action=newContext</result>
+ <result name="select">/study/displayStudy.jsp?action=selectContext</result>
</action>
<action name="selectContext" class="editSimulationContextAction" method="selectContext">
- <result name="create">/study/displayStudyStep.jsp?action=newContext</result>
- <result name="set">/study/displayStudyStep.jsp?action=setContext&index=%{contextType.index}</result>
+ <result name="create">/study/displayStudy.jsp?action=newContext</result>
+ <result name="set">/study/displayStudy.jsp?action=setContext&index=%{contextType.index}</result>
</action>
<action name="newContext" class="editSimulationContextAction" method="createContext">
<result name="success" type="tiles">page.displaystudy</result>
- <result name="input">/study/displayStudyStep.jsp?action=newContext</result>
+ <result name="input">/study/displayStudy.jsp?action=newContext</result>
<result name="error" type="tiles">page.displaystudy</result>
</action>
<action name="setContext" class="editSimulationContextAction" method="setContext">
<result name="success" type="tiles">page.displaystudy</result>
- <result name="input">/study/displayStudyStep.jsp?action=setContext&index=%{contextType.index}</result>
+ <result name="input">/study/displayStudy.jsp?action=setContext&index=%{contextType.index}</result>
<result name="error" type="tiles">page.displaystudy</result>
</action>
<action name="remove-context" class="editSimulationContextAction" method="deleteContext">
<!-- Edition of knowledge elements
-->
<action name="add-knowledge" class="editKnowledgeElementAction" method="initialize">
- <result name="success">/study/displayStudyStep.jsp?action=addKnowledge&index=%{knowledgeType}</result>
+ <result name="success">/study/displayStudy.jsp?action=addKnowledge&index=%{knowledgeType}</result>
</action>
<action name="edit-knowledge" class="editKnowledgeElementAction" method="initialize">
<result name="success" type="tiles">page.displaystudy</result>