1 <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 pageEncoding="ISO-8859-1"
5 taglib prefix="s" uri="/struts-tags"
7 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
9 <!-- Initialization of the edit action, if any
10 =============================================================================================================================
12 <% String action = request.getParameter("action");
13 String type = request.getParameter("index");
14 if (action == null) action = "display";
16 <s:set var="todo"><%=action%></s:set>
20 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
21 <title><s:text name="name.module"/></title>
22 <link href=<s:url value="/skin/default.css"/> rel="stylesheet" type="text/css">
23 <link href="../rtef/rte.css" rel="stylesheet" type="text/css">
24 <script language="JavaScript" type="text/javascript" src="../rtef/lang/fr.js"></script>
25 <script language="JavaScript" type="text/javascript" src="../rtef/richtext.js"></script>
26 <script language="JavaScript" type="text/javascript" src="../rtef/xhtml.js"></script>
27 <script language="JavaScript" type="text/javascript" src="../jvs/popup.js"></script>
28 <script language="JavaScript" type="text/javascript" src="../jvs/action.js"></script>
30 <script language="JavaScript">
34 var substitutions = new Array (
35 new RegExp("[\r\n]",'g'), " ", // For removing carriage returns & line feeds
36 new RegExp("<p> "), "<p>", // For removing of the 1st paragraph
37 new RegExp(" </p>"), "</p>", // For removing of the 1st paragraph
39 new RegExp("é",'g'), "é",
40 new RegExp("è",'g'), "è",
41 new RegExp("ê",'g'), "ê",
42 new RegExp("ë",'g'), "ë",
43 new RegExp("à",'g'), "à",
44 new RegExp("â",'g'), "â",
45 new RegExp("î",'g'), "î",
46 new RegExp("ï",'g'), "ï",
47 new RegExp("ô",'g'), "ô",
48 new RegExp("ù",'g'), "ù",
49 new RegExp("û",'g'), "û",
50 new RegExp("ü",'g'), "ü",
52 new RegExp("ç",'g'), "ç"
55 function initialize (action) {
56 // ----------------------------
57 if (action == "setContext") {
58 edit.elements[2].focus();
60 if (action == "renameDocument") {
61 edoc.documentTitle.focus();
63 if (action == "renameKnowledge") {
64 edit.knowledgeTitle.focus();
66 if (action == "addKnowledge") {
67 edit.elements[1].focus();
69 if (action != "display") {
70 edit.elements[0].focus();
73 function setValue () {
74 // -------------------
75 var select = edit.elements[0].value; // contextValue select input
76 if (select == "0") { // Creation of a new context type
77 tds = document.getElementById("select");
78 tde = document.getElementById("enter");
79 tds.style.display = "none"; // Hides the select input
80 tde.style.display = "block"; // Displays the text input
82 edit.elements[2].focus();
84 function clean (html) {
85 // ---------------------
87 for (i=0; i<substitutions.length; i = i+2) {
88 html = html.replace(substitutions[i], substitutions[i+1]);
92 function submitEdit () {
93 // ----------------------
94 updateRTEs(); // Sets the value of knowledgeValue input
95 edit.knowledgeValue.value = clean(edit.knowledgeValue.value);
101 <body onLoad="initialize('<%=action%>')">
103 =============================================================================================================================
105 <jsp:include page="/jsp/menubar.jsp">
106 <jsp:param name="menu" value="study" />
110 =============================================================================================================================
112 <jsp:include page="/jsp/titlebar.jsp">
113 <jsp:param name="entity" value="study" />
117 =============================================================================================================================
120 <s:if test="%{writeAccess && userRights.canCreateDocument()}">
121 <jsp:include page="/jsp/toolbar.jsp">
122 <jsp:param name="tools" value="study" />
126 <jsp:include page="/jsp/toolbar.jsp">
127 <jsp:param name="tools" value="standard" />
130 <div id=top-spacer></div>
131 <jsp:include page="/jsp/menuitem.jsp">
132 <jsp:param name="menu" value="study" />
134 <jsp:include page="/jsp/studyProperties.jsp" />
139 <!-- Description and simulation context sections
140 =============================================================================================================================
145 <div id="tab-description">
146 <span id="tab-front"> <s:text name="title.description"/> </span>
148 <div id="tab-context">
149 <span id="tab-front"> <s:text name="title.context"/> </span>
153 <!-- Display of contents
155 <div id="article-box">
156 <table width=100% border=0 cellspacing=0 cellpadding=0>
158 <td width=38%> <!-- Must conform to the width of above tab-description -->
159 <div id="top-spacer"></div>
160 <div id=article-body class=text>
161 <jsp:include page="/jsp/readDescription.jsp">
162 <jsp:param name="entity" value="study" />
166 <td width=1></td> <!-- Trick for aligning the vertical separator with the tab -->
167 <td width=1 bgcolor=#AAAAAA></td>
169 <div id="top-spacer"></div>
170 <div id="article-body">
171 <s:if test="%{#todo == 'newContext' || #todo == 'selectContext' || #todo == 'setContext'}">
172 <form name="edit" action="<%=action%>?selection=<s:property value="selection"/>" method="post">
173 <jsp:include page="/jsp/editContext.jsp">
174 <jsp:param name="action" value="<%=action%>" />
175 <jsp:param name="type" value="<%=type%>" />
180 <jsp:include page="/jsp/readContext.jsp" />
188 <!-- Knowledge elements section
189 =============================================================================================================================
191 <s:if test="knowledges != null">
193 <div id=section><s:text name="title.knowledge"/></div>
194 <div id=article-body class=text>
195 <s:if test="%{#todo == 'addKnowledge' || #todo == 'renameKnowledge' || #todo == 'editKnowledge'}">
196 <form name="edit" action="setKnowledge" method="post">
197 <jsp:include page="/jsp/editKnowledge.jsp">
198 <jsp:param name="action" value="<%=action%>" />
199 <jsp:param name="index" value="<%=type%>" />
204 <jsp:include page="/jsp/readKnowledge.jsp">
205 <jsp:param name="entity" value="study" />
212 <!-- Documents section
213 =============================================================================================================================
215 <s:if test="documents != null">
217 <div id=section><s:text name="title.document"/></div>
218 <div id=article-body class=text>
219 <s:if test="%{writeAccess == 'true' && stepEnabled == 'true'}">
220 <form name="edoc" action="setDocument" method="post">
221 <jsp:include page="/jsp/editContents.jsp">
222 <jsp:param name="action" value="<%=action%>" />
223 <jsp:param name="index" value="<%=type%>" />
228 <jsp:include page="/jsp/readContents.jsp">
229 <jsp:param name="entity" value="study" />
236 =============================================================================================================================
238 <s:if test="%{writeAccess == 'true' && stepEnabled == 'true'}">
240 <div id=section><s:text name="title.comment"/></div>
241 <div id=article-body class=text>
242 <jsp:include page="/jsp/readComment.jsp"/>