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">
51 <jsp:param name="entity" value="study" />
52 <jsp:param name="disable" value="true" />
56 =============================================================================================================================
59 <jsp:include page="/jsp/toolbar.jsp">
60 <jsp:param name="tools" value="back" />
62 <div id=top-spacer></div>
63 <jsp:include page="/jsp/menuitem.jsp">
64 <jsp:param name="menu" value="open" />
66 <jsp:include page="/jsp/studyProperties.jsp" />
70 =============================================================================================================================
75 <s:text name="title.prop.study" />
77 <div id=article-body class=text>
79 <form name="edit" action="valid-edit" method="post">
80 <table width=100% cellpadding=0 cellspacing=0 border=0 class=text>
82 <tr height=10><td width=20></td></tr>
84 <td width=16><img src="<s:url value="/skin/image.downarrow.png"/>" border="none"/></td>
85 <td width=24%><b><s:text name="field.studytitle"/></b></td>
91 <tr height=5><td></td></tr>
93 <% if (action.equals("edititle")) {
96 <s:a href="%{#undo}"><img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="button.cancel"/>"/></s:a>
99 <input type=text size="108" name=title value="<s:property value="studyTitle"/>">
102 <button type="submit" name="saveTitle" value="" style="width:24px; height:16px; border:0; cursor:pointer; cursor:hand; background:transparent">
103 <img src="<s:url value="/skin/image.export.png"/>" title="<s:text name="button.save"/>"/>
108 <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>
110 <td colspan=4><s:property value="studyTitle"/></td>
113 <tr height=10><td width=20></td></tr>
115 <td><img src="<s:url value="/skin/image.downarrow.png"/>" border="none"/></td>
116 <td><b><s:text name="label.members"/></b></td>
118 <tr height=5><td></td></tr>
119 <% if (action.equals("edibutor")) {
123 <s:a href="%{#undo}"><img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="button.cancel"/>"/></s:a>
125 <td><s:text name="label.presents"/></td>
126 <td colspan=3><s:text name="label.absents"/></td>
128 <button type="submit" name="saveContributors" value="" style="width:24px; height:16px; border:0; cursor:pointer; cursor:hand; background:transparent">
129 <img src="<s:url value="/skin/image.export.png"/>" title="<s:text name="button.save"/>"/>
133 <tr height=1 bgcolor=#AAAAAA><td colspan=6></td></tr>
135 // Scriptlet implementation is required due to specific iteration
136 ValueStack stack = ActionContext.getContext().getValueStack();
137 Object stacktop = stack.peek();
138 StudyPropertiesAction controler = (StudyPropertiesAction)stacktop;
140 Iterator<User> members = controler.getContributors().iterator();
141 for (Iterator<User> staff = controler.getCandidates().iterator(); staff.hasNext(); ) {
143 if (members.hasNext()) {
144 User user = members.next();
145 out.print("<td><input type=checkbox name=\"members\" value=\"" + String.valueOf(String.valueOf(user.getIndex())) + "\" checked/></td>");
147 out.print(user.toString());
150 out.print("<td></td><td></td>");
152 for (int j=0; j<3; j++) {
153 if (staff.hasNext()) {
154 User user = staff.next();
155 out.print("<td><input type=checkbox name=\"candidates\" value=\"" + String.valueOf(user.getIndex()) + "\" /> ");
156 out.print(user.toString());
159 out.print("<td></td>");
164 while (members.hasNext()) {
165 User user = members.next();
167 out.print("<td><input type=checkbox name=\"members\" value=\"" + String.valueOf(user.getIndex()) + "\" checked/></td>");
169 out.print(user.toString());
176 <td><s:text name="label.contributor"/></td>
179 <td><s:text name="label.manager"/></td>
181 <tr height=1 bgcolor=#AAAAAA><td colspan=6></td></tr>
184 <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>
187 <s:if test="contributors.size > 0">
188 <s:iterator value="contributors" status="counter">
189 <s:if test="#counter.last"><s:property value="toString()"/></s:if>
190 <s:else><s:property value="toString()"/>,</s:else>
193 <s:property value="%{'-'}"/>
196 <td><s:property value="%{author.toString()}"/></td>
199 %> <tr height=15><td width=20></td></tr>
201 <td><img src="<s:url value="/skin/image.downarrow.png"/>" border="none"/></td>
202 <td><b><s:text name="label.approcycle"/></b></td>
204 <tr height=5><td></td></tr>
207 <td><s:text name="field.documentype"/></td>
208 <td><s:text name="label.PROMOTION"/></td>
209 <td><s:text name="label.REVIEW"/></td>
210 <td><s:text name="label.APPROVAL"/></td>
212 <tr height=1 bgcolor=#AAAAAA><td colspan=6></td></tr>
214 <s:set var="edited" value="cycle"/>
215 <s:set var="height" value=""/>
216 <s:iterator value="validations" status="counter">
217 <s:url id="edicycle" namespace="/study" action="edit-cycle">
218 <s:param name="cycle" value="documentType"/>
220 <s:if test="#counter.last"><s:set var="height" value="24"/></s:if>
221 <tr height="<s:property value="#height"/>">
223 <s:if test="#todo == 'display'">
224 <s:if test="#counter.last">
225 <s:if test="otherDocumentTypes.size > 0">
226 <s:a href="%{#addcycle}">
227 <img src="<s:url value="/skin/icon.ed.png"/>" border="none" title="<s:text name="tooltip.addvalidation"/>" />
231 <s:a href="%{#edicycle}">
232 <img src="<s:url value="/skin/icon.ed.png"/>" border="none" title="<s:text name="tooltip.editvalidation"/>" />
235 </s:if><s:elseif test="#todo == 'edicycle' && documentType == #edited">
236 <s:a href="%{#undo}"><img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="button.cancel"/>"/></s:a>
240 <s:if test="#counter.last">
241 <s:if test="#todo == 'edicycle' && documentType == #edited">
242 <select name="documentType" onChange="setType()">
243 <option value="0"> <s:text name="menu.select"/></option>
244 <s:iterator value="otherDocumentTypes">
245 <option value="<s:property value="index"/>"><s:text name="type.document.%{name}"/></option>
249 <s:if test="validations.size > 0"><i><s:text name="label.other"/></i></s:if>
250 <s:else><i><s:text name="label.all"/></i></s:else>
253 <s:if test="#todo == 'edicycle' && documentType == #edited">
254 <input type="hidden" name="documentType" value="<s:property value="documentTypeIndex"/>"/>
256 <s:text name="type.document.%{documentType}"/>
260 <s:if test="#todo == 'edicycle' && documentType == #edited">
261 <s:set var="selection" value="publisherIndex"/>
262 <select name="publisher">
263 <option value="0"><s:text name="label.bytheauthor"/></option>
264 <s:if test="%{#selection != 0}"><option value="<s:property value="#selection"/>" selected><s:text name="label.me"/></option></s:if>
265 <s:else><option value="<s:property value="author.index"/>"><s:text name="label.me"/></option></s:else>
268 <s:if test="publisherIndex > 0"><s:property value="publisherName"/></s:if>
269 <s:else><i><s:property value="publisherName"/></i></s:else>
273 <s:if test="#todo == 'edicycle' && documentType == #edited">
274 <s:set var="selection" value="reviewerIndex"/>
275 <select name="reviewer">
276 <option value="0">- <s:text name="label.skipped"/> -</option>
277 <s:iterator value="validationActors">
278 <s:if test="%{index == #selection}"><option value="<s:property value="index"/>" selected><s:property value="toString()"/></option></s:if>
279 <s:else><option value="<s:property value="index"/>"><s:property value="toString()"/></option></s:else>
283 <s:if test="reviewerIndex > 0"><s:property value="reviewerName"/></s:if>
284 <s:else><font color="#A1A192"><i><s:property value="reviewerName"/></i></font></s:else>
288 <s:if test="#todo == 'edicycle' && documentType == #edited">
289 <s:set var="selection" value="approverIndex"/>
290 <select name="approver">
291 <option value="0">- <s:text name="label.skipped"/> -</option>
292 <s:iterator value="validationActors">
293 <s:if test="%{index == #selection}"><option value="<s:property value="index"/>" selected><s:property value="toString()"/></option></s:if>
294 <s:else><option value="<s:property value="index"/>"><s:property value="toString()"/></option></s:else>
298 <s:if test="approverIndex > 0"><s:property value="approverName"/></s:if>
299 <s:else><font color="#A1A192"><i><s:property value="approverName"/></i></font></s:else>
303 <s:if test="#todo == 'edicycle' && documentType == #edited">
304 <button type="submit" name="saveCycle" value="" style="width:24px; height:16px; border:0; cursor:pointer; cursor:hand; background:transparent">
305 <img src="<s:url value="/skin/image.export.png"/>" title="<s:text name="button.save"/>"/>
311 <tr height=3><td></td></tr>