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.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">
46 <jsp:param name="menu" value="study" />
50 =============================================================================================================================
52 <jsp:include page="/jsp/titlebar.jsp">
53 <jsp:param name="entity" value="study" />
54 <jsp:param name="disable" value="true" />
58 =============================================================================================================================
61 <jsp:include page="/jsp/toolbar.jsp">
62 <jsp:param name="tools" value="back" />
64 <div id=top-spacer></div>
65 <jsp:include page="/jsp/menuitem.jsp">
66 <jsp:param name="menu" value="open" />
68 <jsp:include page="/jsp/studyProperties.jsp" />
72 =============================================================================================================================
77 <s:text name="title.prop.study" />
79 <div id=article-body class=text>
81 <form name="edit" action="valid-edit" method="post">
82 <table width=100% cellpadding=0 cellspacing=0 border=0 class=text>
84 <tr height=10><td width=20></td></tr>
86 <td width=16><img src="<s:url value="/skin/image.downarrow.png"/>" border="none"/></td>
87 <td width=24%><b><s:text name="field.studytitle"/></b></td>
93 <tr height=5><td></td></tr>
95 <% if (action.equals("edititle")) {
98 <s:a href="%{#undo}"><img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="button.cancel"/>"/></s:a>
101 <input type=text size="108" name=title value="<s:property value="studyTitle"/>">
104 <button type="submit" name="saveTitle" value="" style="width:24px; height:16px; border:0; cursor:pointer; cursor:hand; background:transparent">
105 <img src="<s:url value="/skin/image.export.png"/>" title="<s:text name="button.save"/>"/>
110 <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>
112 <td colspan=4><s:property value="studyTitle"/></td>
115 <tr height=10><td width=20></td></tr>
117 <td><img src="<s:url value="/skin/image.downarrow.png"/>" border="none"/></td>
118 <td><b><s:text name="label.members"/></b></td>
120 <tr height=5><td></td></tr>
121 <% if (action.equals("edibutor")) {
125 <s:a href="%{#undo}"><img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="button.cancel"/>"/></s:a>
127 <td><s:text name="label.presents"/></td>
128 <td colspan=3><s:text name="label.absents"/></td>
130 <button type="submit" name="saveContributors" value="" style="width:24px; height:16px; border:0; cursor:pointer; cursor:hand; background:transparent">
131 <img src="<s:url value="/skin/image.export.png"/>" title="<s:text name="button.save"/>"/>
135 <tr height=1 bgcolor=#AAAAAA><td colspan=6></td></tr>
137 // Scriptlet implementation is required due to specific iteration
138 ValueStack stack = ActionContext.getContext().getValueStack();
139 Object stacktop = stack.peek();
140 StudyPropertiesAction controler = (StudyPropertiesAction)stacktop;
142 Iterator<User> members = controler.getContributors().iterator();
143 for (Iterator<User> staff = controler.getCandidates().iterator(); staff.hasNext(); ) {
145 if (members.hasNext()) {
146 User user = members.next();
147 out.print("<td><input type=checkbox name=\"members\" value=\"" + user.getIndex() + "\" checked/></td>");
149 out.print(user.toString());
152 out.print("<td></td><td></td>");
154 for (int j=0; j<3; j++) {
155 if (staff.hasNext()) {
156 User user = staff.next();
157 out.print("<td><input type=checkbox name=\"candidates\" value=\"" + user.getIndex() + "\" /> ");
158 out.print(user.toString());
161 out.print("<td></td>");
166 while (members.hasNext()) {
167 User user = members.next();
169 out.print("<td><input type=checkbox name=\"members\" value=\"" + user.getIndex() + "\" checked/></td>");
171 out.print(user.toString());
178 <td><s:text name="label.contributor"/></td>
181 <td><s:text name="label.manager"/></td>
183 <tr height=1 bgcolor=#AAAAAA><td colspan=6></td></tr>
186 <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>
189 <s:if test="contributors.size > 0">
190 <s:iterator value="contributors" status="counter">
191 <s:if test="#counter.last"><s:property value="toString()"/></s:if>
192 <s:else><s:property value="toString()"/>,</s:else>
195 <s:property value="%{'-'}"/>
198 <td><s:property value="%{author.toString()}"/></td>
201 %> <tr height=15><td width=20></td></tr>
203 <td><img src="<s:url value="/skin/image.downarrow.png"/>" border="none"/></td>
204 <td><b><s:text name="label.approcycle"/></b></td>
206 <tr height=5><td></td></tr>
209 <td><s:text name="field.documentype"/></td>
210 <td><s:text name="label.PROMOTION"/></td>
211 <td><s:text name="label.REVIEW"/></td>
212 <td><s:text name="label.APPROVAL"/></td>
214 <tr height=1 bgcolor=#AAAAAA><td colspan=6></td></tr>
216 <s:set var="edited" value="cycle"/>
217 <s:set var="height" value=""/>
218 <s:iterator value="validations" status="counter">
219 <s:url id="edicycle" namespace="/study" action="edit-cycle">
220 <s:param name="cycle" value="documentType"/>
222 <s:if test="#counter.last"><s:set var="height" value="24"/></s:if>
223 <tr height="<s:property value="#height"/>">
225 <s:if test="#todo == 'display'">
226 <s:if test="#counter.last">
227 <s:if test="otherDocumentTypes.size > 0">
228 <s:a href="%{#addcycle}">
229 <img src="<s:url value="/skin/icon.ed.png"/>" border="none" title="<s:text name="tooltip.addvalidation"/>" />
233 <s:a href="%{#edicycle}">
234 <img src="<s:url value="/skin/icon.ed.png"/>" border="none" title="<s:text name="tooltip.editvalidation"/>" />
237 </s:if><s:elseif test="#todo == 'edicycle' && documentType == #edited">
238 <s:a href="%{#undo}"><img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="button.cancel"/>"/></s:a>
242 <s:if test="#counter.last">
243 <s:if test="#todo == 'edicycle' && documentType == #edited">
244 <select name="documentType" onChange="setType()">
245 <option value="0"> <s:text name="menu.select"/></option>
246 <s:iterator value="otherDocumentTypes">
247 <option value="<s:property value="index"/>"><s:text name="type.document.%{name}"/></option>
251 <s:if test="validations.size > 0"><i><s:text name="label.other"/></i></s:if>
252 <s:else><i><s:text name="label.all"/></i></s:else>
255 <s:if test="#todo == 'edicycle' && documentType == #edited">
256 <input type="hidden" name="documentType" value="<s:property value="documentTypeIndex"/>"/>
258 <s:text name="type.document.%{documentType}"/>
262 <s:if test="#todo == 'edicycle' && documentType == #edited">
263 <s:set var="selection" value="publisherIndex"/>
264 <select name="publisher">
265 <option value="0"><s:text name="label.bytheauthor"/></option>
266 <s:if test="%{#selection != 0}"><option value="<s:property value="#selection"/>" selected><s:text name="label.me"/></option></s:if>
267 <s:else><option value="<s:property value="author.index"/>"><s:text name="label.me"/></option></s:else>
270 <s:if test="publisherIndex > 0"><s:property value="publisherName"/></s:if>
271 <s:else><i><s:property value="publisherName"/></i></s:else>
275 <s:if test="#todo == 'edicycle' && documentType == #edited">
276 <s:set var="selection" value="reviewerIndex"/>
277 <select name="reviewer">
278 <option value="0">- <s:text name="label.skipped"/> -</option>
279 <s:iterator value="validationActors">
280 <s:if test="%{index == #selection}"><option value="<s:property value="index"/>" selected><s:property value="toString()"/></option></s:if>
281 <s:else><option value="<s:property value="index"/>"><s:property value="toString()"/></option></s:else>
285 <s:if test="reviewerIndex > 0"><s:property value="reviewerName"/></s:if>
286 <s:else><font color="#A1A192"><i><s:property value="reviewerName"/></i></font></s:else>
290 <s:if test="#todo == 'edicycle' && documentType == #edited">
291 <s:set var="selection" value="approverIndex"/>
292 <select name="approver">
293 <option value="0">- <s:text name="label.skipped"/> -</option>
294 <s:iterator value="validationActors">
295 <s:if test="%{index == #selection}"><option value="<s:property value="index"/>" selected><s:property value="toString()"/></option></s:if>
296 <s:else><option value="<s:property value="index"/>"><s:property value="toString()"/></option></s:else>
300 <s:if test="approverIndex > 0"><s:property value="approverName"/></s:if>
301 <s:else><font color="#A1A192"><i><s:property value="approverName"/></i></font></s:else>
305 <s:if test="#todo == 'edicycle' && documentType == #edited">
306 <button type="submit" name="saveCycle" value="" style="width:24px; height:16px; border:0; cursor:pointer; cursor:hand; background:transparent">
307 <img src="<s:url value="/skin/image.export.png"/>" title="<s:text name="button.save"/>"/>
313 <tr height=3><td></td></tr>