1 <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 pageEncoding="ISO-8859-1"
4 <%@ page import="java.util.Iterator"%>
5 <%@ page import="com.opensymphony.xwork2.util.ValueStack"%>
6 <%@ page import="com.opensymphony.xwork2.ActionContext"%>
7 <%@ page import="org.splat.simer.StudyPropertiesAction"%>
8 <%@ page import="org.splat.dal.bo.kernel.User"%>
10 taglib prefix="s" uri="/struts-tags"
12 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
14 <% String action = request.getParameter("action");
15 if (action == null) action = "display";
17 <s:set var="todo"><%=action%></s:set>
18 <s:url id="edititle" namespace="/study" action="edit-title" />
19 <s:url id="edibutor" namespace="/study" action="edit-contributor" />
20 <s:url id="addcycle" namespace="/study" action="edit-cycle">
21 <s:param name="cycle" value="%{'default'}"/>
23 <s:url id="undo" namespace="/study" action="prop-study" />
27 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
28 <title><s:text name="name.module"/></title>
29 <link href=<s:url value="/skin/default.css"/> rel="stylesheet" type="text/css">
30 <script language="JavaScript">
33 // -------------------
34 var type = edit.documentType.value;
35 // if (type == "0") edit.saveCycle.disabled = true;
36 // else edit.saveCycle.disabled = false;
43 =============================================================================================================================
45 <jsp:include page="/jsp/menubar.jsp" />
48 =============================================================================================================================
50 <jsp:include page="/jsp/titlebar.jsp" />
53 =============================================================================================================================
56 <jsp:include page="/jsp/toolbar.jsp" />
57 <div id=top-spacer></div>
58 <jsp:include page="/jsp/menuitem.jsp">
59 <jsp:param name="menu" value="open" />
61 <jsp:include page="/jsp/studyProperties.jsp" />
65 =============================================================================================================================
70 <s:text name="title.prop.study" />
72 <div id=article-body class=text>
74 <form name="edit" action="valid-edit" method="post">
75 <table width=100% cellpadding=0 cellspacing=0 border=0 class=text>
77 <tr height=10><td width=20></td></tr>
79 <td width=16><img src="<s:url value="/skin/image.downarrow.png"/>" border="none"/></td>
80 <td width=24%><b><s:text name="field.studytitle"/></b></td>
86 <tr height=5><td></td></tr>
88 <% if (action.equals("edititle")) {
91 <s:a href="%{#undo}"><img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="button.cancel"/>"/></s:a>
94 <input type=text size="108" name=title value="<s:property value="studyTitle"/>">
97 <button type="submit" name="saveTitle" value="" style="width:24px; height:16px; border:0; cursor:pointer; cursor:hand; background:transparent">
98 <img src="<s:url value="/skin/image.export.png"/>" title="<s:text name="button.save"/>"/>
103 <s:if test="#todo == 'display'"><s:a href="%{#edititle}"><img src="<s:url value="/skin/icon.ed.png"/>" border="none" title="<s:text name="tooltip.edit.title"/>"/></s:a></s:if>
105 <td colspan=4><s:property value="studyTitle"/></td>
108 <tr height=10><td width=20></td></tr>
110 <td><img src="<s:url value="/skin/image.downarrow.png"/>" border="none"/></td>
111 <td><b><s:text name="label.members"/></b></td>
113 <tr height=5><td></td></tr>
114 <% if (action.equals("edibutor")) {
118 <s:a href="%{#undo}"><img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="button.cancel"/>"/></s:a>
120 <td><s:text name="label.presents"/></td>
121 <td colspan=3><s:text name="label.absents"/></td>
123 <button type="submit" name="saveContributors" value="" style="width:24px; height:16px; border:0; cursor:pointer; cursor:hand; background:transparent">
124 <img src="<s:url value="/skin/image.export.png"/>" title="<s:text name="button.save"/>"/>
128 <tr height=1 bgcolor=#AAAAAA><td colspan=6></td></tr>
130 // Scriptlet implementation is required due to specific iteration
131 ValueStack stack = ActionContext.getContext().getValueStack();
132 Object stacktop = stack.peek();
133 StudyPropertiesAction controler = (StudyPropertiesAction)stacktop;
135 Iterator<User> members = controler.getContributors().iterator();
136 for (Iterator<User> staff = controler.getCandidates().iterator(); staff.hasNext(); ) {
138 if (members.hasNext()) {
139 User user = members.next();
140 out.print("<td><input type=checkbox name=\"members\" value=\"" + String.valueOf(String.valueOf(user.getIndex())) + "\" checked/></td>");
142 out.print(user.toString());
145 out.print("<td></td><td></td>");
147 for (int j=0; j<3; j++) {
148 if (staff.hasNext()) {
149 User user = staff.next();
150 out.print("<td><input type=checkbox name=\"candidates\" value=\"" + String.valueOf(user.getIndex()) + "\" /> ");
151 out.print(user.toString());
154 out.print("<td></td>");
159 while (members.hasNext()) {
160 User user = members.next();
162 out.print("<td><input type=checkbox name=\"members\" value=\"" + String.valueOf(user.getIndex()) + "\" checked/></td>");
164 out.print(user.toString());
171 <td><s:text name="label.contributor"/></td>
174 <td><s:text name="label.manager"/></td>
176 <tr height=1 bgcolor=#AAAAAA><td colspan=6></td></tr>
179 <s:if test="#todo == 'display'"><s:a href="%{#edibutor}"><img src="<s:url value="/skin/icon.ed.png"/>" border="none" title="<s:text name="tooltip.edit.members"/>"/></s:a></s:if>
182 <s:if test="contributors.size > 0">
183 <s:iterator value="contributors" status="counter">
184 <s:if test="#counter.last"><s:property value="toString()"/></s:if>
185 <s:else><s:property value="toString()"/>,</s:else>
188 <s:property value="%{'-'}"/>
191 <td><s:property value="%{author.toString()}"/></td>
194 %> <tr height=15><td width=20></td></tr>
196 <td><img src="<s:url value="/skin/image.downarrow.png"/>" border="none"/></td>
197 <td><b><s:text name="label.approcycle"/></b></td>
199 <tr height=5><td></td></tr>
202 <td><s:text name="field.documentype"/></td>
203 <td><s:text name="label.PROMOTION"/></td>
204 <td><s:text name="label.REVIEW"/></td>
205 <td><s:text name="label.APPROVAL"/></td>
207 <tr height=1 bgcolor=#AAAAAA><td colspan=6></td></tr>
209 <s:set var="edited" value="cycle"/>
210 <s:set var="height" value=""/>
211 <s:iterator value="validations" status="counter">
212 <s:url id="edicycle" namespace="/study" action="edit-cycle">
213 <s:param name="cycle" value="documentType"/>
215 <s:if test="#counter.last"><s:set var="height" value="24"/></s:if>
216 <tr height="<s:property value="#height"/>">
218 <s:if test="#todo == 'display'">
219 <s:if test="#counter.last">
220 <s:if test="otherDocumentTypes.size > 0">
221 <s:a href="%{#addcycle}">
222 <img src="<s:url value="/skin/icon.ed.png"/>" border="none" title="<s:text name="tooltip.addvalidation"/>" />
226 <s:a href="%{#edicycle}">
227 <img src="<s:url value="/skin/icon.ed.png"/>" border="none" title="<s:text name="tooltip.editvalidation"/>" />
230 </s:if><s:elseif test="#todo == 'edicycle' && documentType == #edited">
231 <s:a href="%{#undo}"><img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="button.cancel"/>"/></s:a>
235 <s:if test="#counter.last">
236 <s:if test="#todo == 'edicycle' && documentType == #edited">
237 <select name="documentType" onChange="setType()">
238 <option value="0"> <s:text name="menu.select"/></option>
239 <s:iterator value="otherDocumentTypes">
240 <option value="<s:property value="index"/>"><s:text name="type.document.%{name}"/></option>
244 <s:if test="validations.size > 0"><i><s:text name="label.other"/></i></s:if>
245 <s:else><i><s:text name="label.all"/></i></s:else>
248 <s:if test="#todo == 'edicycle' && documentType == #edited">
249 <input type="hidden" name="documentType" value="<s:property value="documentTypeIndex"/>"/>
251 <s:text name="type.document.%{documentType}"/>
255 <s:if test="#todo == 'edicycle' && documentType == #edited">
256 <s:set var="selection" value="publisherIndex"/>
257 <select name="publisher">
258 <option value="0"><s:text name="label.bytheauthor"/></option>
259 <s:if test="%{#selection != 0}"><option value="<s:property value="#selection"/>" selected><s:text name="label.me"/></option></s:if>
260 <s:else><option value="<s:property value="author.index"/>"><s:text name="label.me"/></option></s:else>
263 <s:if test="publisherIndex > 0"><s:property value="publisherName"/></s:if>
264 <s:else><i><s:property value="publisherName"/></i></s:else>
268 <s:if test="#todo == 'edicycle' && documentType == #edited">
269 <s:set var="selection" value="reviewerIndex"/>
270 <select name="reviewer">
271 <option value="0">- <s:text name="label.skipped"/> -</option>
272 <s:iterator value="validationActors">
273 <s:if test="%{index == #selection}"><option value="<s:property value="index"/>" selected><s:property value="toString()"/></option></s:if>
274 <s:else><option value="<s:property value="index"/>"><s:property value="toString()"/></option></s:else>
278 <s:if test="reviewerIndex > 0"><s:property value="reviewerName"/></s:if>
279 <s:else><font color="#A1A192"><i><s:property value="reviewerName"/></i></font></s:else>
283 <s:if test="#todo == 'edicycle' && documentType == #edited">
284 <s:set var="selection" value="approverIndex"/>
285 <select name="approver">
286 <option value="0">- <s:text name="label.skipped"/> -</option>
287 <s:iterator value="validationActors">
288 <s:if test="%{index == #selection}"><option value="<s:property value="index"/>" selected><s:property value="toString()"/></option></s:if>
289 <s:else><option value="<s:property value="index"/>"><s:property value="toString()"/></option></s:else>
293 <s:if test="approverIndex > 0"><s:property value="approverName"/></s:if>
294 <s:else><font color="#A1A192"><i><s:property value="approverName"/></i></font></s:else>
298 <s:if test="#todo == 'edicycle' && documentType == #edited">
299 <button type="submit" name="saveCycle" value="" style="width:24px; height:16px; border:0; cursor:pointer; cursor:hand; background:transparent">
300 <img src="<s:url value="/skin/image.export.png"/>" title="<s:text name="button.save"/>"/>
306 <tr height=3><td></td></tr>