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"%>
9 <%@ taglib prefix="s" uri="/struts-tags"%>
10 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
13 <s:if test="actionType == null">
14 <s:set var="todo">display</s:set>
18 <s:property value="actionType" />
22 <s:url id="edititle" namespace="/study" action="edit-title" />
23 <s:url id="edibutor" namespace="/study" action="edit-contributor" />
24 <s:url id="addcycle" namespace="/study" action="edit-cycle">
25 <s:param name="cycle" value="%{'default'}"/>
27 <s:url id="undo" namespace="/study" action="prop-study" />
31 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
32 <link href=<s:url value="/skin/default.css"/> rel="stylesheet" type="text/css">
33 <script language="JavaScript">
36 // -------------------
37 var type = edit.documentType.value;
38 // if (type == "0") edit.saveCycle.disabled = true;
39 // else edit.saveCycle.disabled = false;
47 =============================================================================================================================
51 <s:text name="title.prop.study" />
53 <div id=article-body class=text>
55 <form name="edit" action="valid-edit" method="post">
56 <table width=100% cellpadding=0 cellspacing=0 border=0 class=text>
58 <tr height=10><td width=20></td></tr>
60 <td width=16><img src="<s:url value="/skin/image.downarrow.png"/>" border="none"/></td>
61 <td width=24%><b><s:text name="field.studytitle"/></b></td>
67 <tr height=5><td></td></tr>
70 <s:if test="actionType eq 'edititle'">
72 <s:a href="%{#undo}"><img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="button.cancel"/>"/></s:a>
75 <input type=text size="108" name=title value="<s:property value="studyTitle"/>">
78 <button type="submit" name="saveTitle" value="" style="width:24px; height:16px; border:0; cursor:pointer; cursor:hand; background:transparent">
79 <img src="<s:url value="/skin/image.export.png"/>" title="<s:text name="button.save"/>"/>
86 <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>
88 <td colspan=4><s:property value="studyTitle"/></td>
92 <tr height=10><td width=20></td></tr>
94 <td><img src="<s:url value="/skin/image.downarrow.png"/>" border="none"/></td>
95 <td><b><s:text name="label.members"/></b></td>
97 <tr height=5><td></td></tr>
99 <s:if test="actionType eq 'edibutor'">
102 <s:a href="%{#undo}"><img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="button.cancel"/>"/></s:a>
104 <td><s:text name="label.presents"/></td>
105 <td colspan=3><s:text name="label.absents"/></td>
107 <button type="submit" name="saveContributors" value="" style="width:24px; height:16px; border:0; cursor:pointer; cursor:hand; background:transparent">
108 <img src="<s:url value="/skin/image.export.png"/>" title="<s:text name="button.save"/>"/>
112 <tr height=1 bgcolor=#AAAAAA><td colspan=6></td></tr>
114 // Scriptlet implementation is required due to specific iteration
115 ValueStack stack = ActionContext.getContext().getValueStack();
116 Object stacktop = stack.peek();
117 StudyPropertiesAction controler = (StudyPropertiesAction)stacktop;
119 Iterator<User> members = controler.getContributors().iterator();
120 for (Iterator<User> staff = controler.getCandidates().iterator(); staff.hasNext(); ) {
122 if (members.hasNext()) {
123 User user = members.next();
124 out.print("<td><input type=checkbox name=\"members\" value=\"" + String.valueOf(String.valueOf(user.getIndex())) + "\" checked/></td>");
126 out.print(user.toString());
129 out.print("<td></td><td></td>");
131 for (int j=0; j<3; j++) {
132 if (staff.hasNext()) {
133 User user = staff.next();
134 out.print("<td><input type=checkbox name=\"candidates\" value=\"" + String.valueOf(user.getIndex()) + "\" /> ");
135 out.print(user.toString());
138 out.print("<td></td>");
143 while (members.hasNext()) {
144 User user = members.next();
146 out.print("<td><input type=checkbox name=\"members\" value=\"" + String.valueOf(user.getIndex()) + "\" checked/></td>");
148 out.print(user.toString());
156 <td><s:text name="label.contributor"/></td>
159 <td><s:text name="label.manager"/></td>
161 <tr height=1 bgcolor=#AAAAAA><td colspan=6></td></tr>
164 <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>
167 <s:if test="contributors.size > 0">
168 <s:iterator value="contributors" status="counter">
169 <s:if test="#counter.last"><s:property value="toString()"/></s:if>
170 <s:else><s:property value="toString()"/>,</s:else>
173 <s:property value="%{'-'}"/>
176 <td><s:property value="%{author.toString()}"/></td>
180 <tr height=15><td width=20></td></tr>
182 <td><img src="<s:url value="/skin/image.downarrow.png"/>" border="none"/></td>
183 <td><b><s:text name="label.approcycle"/></b></td>
185 <tr height=5><td></td></tr>
188 <td><s:text name="field.documentype"/></td>
189 <td><s:text name="label.PROMOTION"/></td>
190 <td><s:text name="label.REVIEW"/></td>
191 <td><s:text name="label.APPROVAL"/></td>
193 <tr height=1 bgcolor=#AAAAAA><td colspan=6></td></tr>
195 <s:set var="edited" value="cycle"/>
196 <s:set var="height" value=""/>
197 <s:iterator value="validations" status="counter">
198 <s:url id="edicycle" namespace="/study" action="edit-cycle">
199 <s:param name="cycle" value="documentType"/>
201 <s:if test="#counter.last"><s:set var="height" value="24"/></s:if>
202 <tr height="<s:property value="#height"/>">
204 <s:if test="#todo == 'display'">
205 <s:if test="#counter.last">
206 <s:if test="otherDocumentTypes.size > 0">
207 <s:a href="%{#addcycle}">
208 <img src="<s:url value="/skin/icon.ed.png"/>" border="none" title="<s:text name="tooltip.addvalidation"/>" />
212 <s:a href="%{#edicycle}">
213 <img src="<s:url value="/skin/icon.ed.png"/>" border="none" title="<s:text name="tooltip.editvalidation"/>" />
216 </s:if><s:elseif test="#todo == 'edicycle' && documentType == #edited">
217 <s:a href="%{#undo}"><img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="button.cancel"/>"/></s:a>
221 <s:if test="#counter.last">
222 <s:if test="#todo == 'edicycle' && documentType == #edited">
223 <select name="documentType" onChange="setType()">
224 <option value="0"> <s:text name="menu.select"/></option>
225 <s:iterator value="otherDocumentTypes">
226 <option value="<s:property value="index"/>"><s:text name="type.document.%{name}"/></option>
230 <s:if test="validations.size > 0"><i><s:text name="label.other"/></i></s:if>
231 <s:else><i><s:text name="label.all"/></i></s:else>
234 <s:if test="#todo == 'edicycle' && documentType == #edited">
235 <input type="hidden" name="documentType" value="<s:property value="documentTypeIndex"/>"/>
237 <s:text name="type.document.%{documentType}"/>
241 <s:if test="#todo == 'edicycle' && documentType == #edited">
242 <s:set var="selection" value="publisherIndex"/>
243 <select name="publisher">
244 <option value="0"><s:text name="label.bytheauthor"/></option>
245 <s:if test="%{#selection != 0}"><option value="<s:property value="#selection"/>" selected><s:text name="label.me"/></option></s:if>
246 <s:else><option value="<s:property value="author.index"/>"><s:text name="label.me"/></option></s:else>
249 <s:if test="publisherIndex > 0"><s:property value="publisherName"/></s:if>
250 <s:else><i><s:property value="publisherName"/></i></s:else>
254 <s:if test="#todo == 'edicycle' && documentType == #edited">
255 <s:set var="selection" value="reviewerIndex"/>
256 <select name="reviewer">
257 <option value="0">- <s:text name="label.skipped"/> -</option>
258 <s:iterator value="validationActors">
259 <s:if test="%{index == #selection}"><option value="<s:property value="index"/>" selected><s:property value="toString()"/></option></s:if>
260 <s:else><option value="<s:property value="index"/>"><s:property value="toString()"/></option></s:else>
264 <s:if test="reviewerIndex > 0"><s:property value="reviewerName"/></s:if>
265 <s:else><font color="#A1A192"><i><s:property value="reviewerName"/></i></font></s:else>
269 <s:if test="#todo == 'edicycle' && documentType == #edited">
270 <s:set var="selection" value="approverIndex"/>
271 <select name="approver">
272 <option value="0">- <s:text name="label.skipped"/> -</option>
273 <s:iterator value="validationActors">
274 <s:if test="%{index == #selection}"><option value="<s:property value="index"/>" selected><s:property value="toString()"/></option></s:if>
275 <s:else><option value="<s:property value="index"/>"><s:property value="toString()"/></option></s:else>
279 <s:if test="approverIndex > 0"><s:property value="approverName"/></s:if>
280 <s:else><font color="#A1A192"><i><s:property value="approverName"/></i></font></s:else>
284 <s:if test="#todo == 'edicycle' && documentType == #edited">
285 <button type="submit" name="saveCycle" value="" style="width:24px; height:16px; border:0; cursor:pointer; cursor:hand; background:transparent">
286 <img src="<s:url value="/skin/image.export.png"/>" title="<s:text name="button.save"/>"/>
292 <tr height=3><td></td></tr>