+++ /dev/null
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"
-%>
-<%@ page import="java.util.Iterator"%>
-<%@ page import="com.opensymphony.xwork2.util.ValueStack"%>
-<%@ page import="com.opensymphony.xwork2.ActionContext"%>
-<%@ page import="org.splat.simer.StudyPropertiesAction"%>
-<%@ page import="org.splat.kernel.User"%>
-<%@
- taglib prefix="s" uri="/struts-tags"
-%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
-<% String action = request.getParameter("action");
- if (action == null) action = "display";
-%>
-<s:set var="todo"><%=action%></s:set>
-<s:url id="edititle" namespace="/study" action="edit-title" />
-<s:url id="edibutor" namespace="/study" action="edit-contributor" />
-<s:url id="addcycle" namespace="/study" action="edit-cycle">
- <s:param name="cycle" value="%{'default'}"/>
-</s:url>
-<s:url id="undo" namespace="/study" action="prop-study" />
-<html>
-
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title><s:text name="name.module"/></title>
- <link href=<s:url value="/skin/default.css"/> rel="stylesheet" type="text/css">
- <script language="JavaScript">
-
- function setType () {
-// -------------------
- var type = edit.documentType.value;
-// if (type == "0") edit.saveCycle.disabled = true;
-// else edit.saveCycle.disabled = false;
- }
- </script>
- </head>
-
- <body>
-<!-- Menu-bar
- =============================================================================================================================
- -->
- <jsp:include page="/jsp/menubar.jsp">
- <jsp:param name="menu" value="study" />
- </jsp:include>
-
-<!-- Title-bar
- =============================================================================================================================
- -->
- <jsp:include page="/jsp/titlebar.jsp">
- <jsp:param name="entity" value="study" />
- <jsp:param name="disable" value="true" />
- </jsp:include>
-
-<!-- Left pane
- =============================================================================================================================
- -->
- <div id=left-pane>
- <jsp:include page="/jsp/toolbar.jsp">
- <jsp:param name="tools" value="back" />
- </jsp:include>
- <div id=top-spacer></div>
- <jsp:include page="/jsp/menuitem.jsp">
- <jsp:param name="menu" value="open" />
- </jsp:include>
- <jsp:include page="/jsp/studyProperties.jsp" />
- </div>
-
-<!-- Properties form
- =============================================================================================================================
- -->
- <div id=main-pane>
- <div id=article-box>
- <div id=section>
- <s:text name="title.prop.study" />
- </div>
- <div id=article-body class=text>
-
- <form name="edit" action="valid-edit" method="post">
- <table width=100% cellpadding=0 cellspacing=0 border=0 class=text>
-
- <tr height=10><td width=20></td></tr>
- <tr>
- <td width=16><img src="<s:url value="/skin/image.downarrow.png"/>" border="none"/></td>
- <td width=24%><b><s:text name="field.studytitle"/></b></td>
- <td width=23%></td>
- <td width=23%></td>
- <td width=23%></td>
- <td width=24></td>
- </tr>
- <tr height=5><td></td></tr>
- <tr height=26>
-<% if (action.equals("edititle")) {
-%>
- <td>
- <s:a href="%{#undo}"><img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="button.cancel"/>"/></s:a>
- </td>
- <td colspan=4>
- <input type=text size="108" name=title value="<s:property value="studyTitle"/>">
- </td>
- <td align=right>
- <button type="submit" name="saveTitle" value="" style="width:24px; height:16px; border:0; cursor:pointer; cursor:hand; background:transparent">
- <img src="<s:url value="/skin/image.export.png"/>" title="<s:text name="button.save"/>"/>
- </button>
- </td>
-<% } else {
-%> <td>
- <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>
- </td>
- <td colspan=4><s:property value="studyTitle"/></td>
-<% }
-%> </tr>
- <tr height=10><td width=20></td></tr>
- <tr>
- <td><img src="<s:url value="/skin/image.downarrow.png"/>" border="none"/></td>
- <td><b><s:text name="label.members"/></b></td>
- </tr>
- <tr height=5><td></td></tr>
-<% if (action.equals("edibutor")) {
-%>
- <tr>
- <td>
- <s:a href="%{#undo}"><img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="button.cancel"/>"/></s:a>
- </td>
- <td><s:text name="label.presents"/></td>
- <td colspan=3><s:text name="label.absents"/></td>
- <td align=right>
- <button type="submit" name="saveContributors" value="" style="width:24px; height:16px; border:0; cursor:pointer; cursor:hand; background:transparent">
- <img src="<s:url value="/skin/image.export.png"/>" title="<s:text name="button.save"/>"/>
- </button>
- </td>
- </tr>
- <tr height=1 bgcolor=#AAAAAA><td colspan=6></td></tr>
-<%
-// Scriptlet implementation is required due to specific iteration
- ValueStack stack = ActionContext.getContext().getValueStack();
- Object stacktop = stack.peek();
- StudyPropertiesAction controler = (StudyPropertiesAction)stacktop;
-
- Iterator<User> members = controler.getContributors().iterator();
- for (Iterator<User> staff = controler.getCandidates().iterator(); staff.hasNext(); ) {
- out.print("<tr>");
- if (members.hasNext()) {
- User user = members.next();
- out.print("<td><input type=checkbox name=\"members\" value=\"" + user.getIndex() + "\" checked/></td>");
- out.print("<td>");
- out.print(user.toString());
- out.print("</td>");
- } else {
- out.print("<td></td><td></td>");
- }
- for (int j=0; j<3; j++) {
- if (staff.hasNext()) {
- User user = staff.next();
- out.print("<td><input type=checkbox name=\"candidates\" value=\"" + user.getIndex() + "\" /> ");
- out.print(user.toString());
- out.print("</td>");
- } else {
- out.print("<td></td>");
- }
- }
- out.print("</tr>");
- }
- while (members.hasNext()) {
- User user = members.next();
- out.print("<tr>");
- out.print("<td><input type=checkbox name=\"members\" value=\"" + user.getIndex() + "\" checked/></td>");
- out.print("<td>");
- out.print(user.toString());
- out.print("</td>");
- out.print("</tr>");
- }
- } else {
-%> <tr>
- <td></td>
- <td><s:text name="label.contributor"/></td>
- <td></td>
- <td></td>
- <td><s:text name="label.manager"/></td>
- </tr>
- <tr height=1 bgcolor=#AAAAAA><td colspan=6></td></tr>
- <tr>
- <td>
- <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>
- </td>
- <td colspan=3>
- <s:if test="contributors.size > 0">
- <s:iterator value="contributors" status="counter">
- <s:if test="#counter.last"><s:property value="toString()"/></s:if>
- <s:else><s:property value="toString()"/>,</s:else>
- </s:iterator>
- </s:if><s:else>
- <s:property value="%{'-'}"/>
- </s:else>
- </td>
- <td><s:property value="%{author.toString()}"/></td>
- </tr>
-<% }
-%> <tr height=15><td width=20></td></tr>
- <tr>
- <td><img src="<s:url value="/skin/image.downarrow.png"/>" border="none"/></td>
- <td><b><s:text name="label.approcycle"/></b></td>
- </tr>
- <tr height=5><td></td></tr>
- <tr>
- <td></td>
- <td><s:text name="field.documentype"/></td>
- <td><s:text name="label.PROMOTION"/></td>
- <td><s:text name="label.REVIEW"/></td>
- <td><s:text name="label.APPROVAL"/></td>
- </tr>
- <tr height=1 bgcolor=#AAAAAA><td colspan=6></td></tr>
-
- <s:set var="edited" value="cycle"/>
- <s:set var="height" value=""/>
- <s:iterator value="validations" status="counter">
- <s:url id="edicycle" namespace="/study" action="edit-cycle">
- <s:param name="cycle" value="documentType"/>
- </s:url>
- <s:if test="#counter.last"><s:set var="height" value="24"/></s:if>
- <tr height="<s:property value="#height"/>">
- <td>
- <s:if test="#todo == 'display'">
- <s:if test="#counter.last">
- <s:if test="otherDocumentTypes.size > 0">
- <s:a href="%{#addcycle}">
- <img src="<s:url value="/skin/icon.ed.png"/>" border="none" title="<s:text name="tooltip.addvalidation"/>" />
- </s:a>
- </s:if>
- </s:if><s:else>
- <s:a href="%{#edicycle}">
- <img src="<s:url value="/skin/icon.ed.png"/>" border="none" title="<s:text name="tooltip.editvalidation"/>" />
- </s:a>
- </s:else>
- </s:if><s:elseif test="#todo == 'edicycle' && documentType == #edited">
- <s:a href="%{#undo}"><img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="button.cancel"/>"/></s:a>
- </s:elseif>
- </td>
- <td>
- <s:if test="#counter.last">
- <s:if test="#todo == 'edicycle' && documentType == #edited">
- <select name="documentType" onChange="setType()">
- <option value="0"> <s:text name="menu.select"/></option>
- <s:iterator value="otherDocumentTypes">
- <option value="<s:property value="index"/>"><s:text name="type.document.%{name}"/></option>
- </s:iterator>
- </select>
- </s:if><s:else>
- <s:if test="validations.size > 0"><i><s:text name="label.other"/></i></s:if>
- <s:else><i><s:text name="label.all"/></i></s:else>
- </s:else>
- </s:if><s:else>
- <s:if test="#todo == 'edicycle' && documentType == #edited">
- <input type="hidden" name="documentType" value="<s:property value="documentTypeIndex"/>"/>
- </s:if>
- <s:text name="type.document.%{documentType}"/>
- </s:else>
- </td>
- <td>
- <s:if test="#todo == 'edicycle' && documentType == #edited">
- <s:set var="selection" value="publisherIndex"/>
- <select name="publisher">
- <option value="0"><s:text name="label.bytheauthor"/></option>
- <s:if test="%{#selection != 0}"><option value="<s:property value="#selection"/>" selected><s:text name="label.me"/></option></s:if>
- <s:else><option value="<s:property value="author.index"/>"><s:text name="label.me"/></option></s:else>
- </select>
- </s:if><s:else>
- <s:if test="publisherIndex > 0"><s:property value="publisherName"/></s:if>
- <s:else><i><s:property value="publisherName"/></i></s:else>
- </s:else>
- </td>
- <td>
- <s:if test="#todo == 'edicycle' && documentType == #edited">
- <s:set var="selection" value="reviewerIndex"/>
- <select name="reviewer">
- <option value="0">- <s:text name="label.skipped"/> -</option>
- <s:iterator value="validationActors">
- <s:if test="%{index == #selection}"><option value="<s:property value="index"/>" selected><s:property value="toString()"/></option></s:if>
- <s:else><option value="<s:property value="index"/>"><s:property value="toString()"/></option></s:else>
- </s:iterator>
- </select>
- </s:if><s:else>
- <s:if test="reviewerIndex > 0"><s:property value="reviewerName"/></s:if>
- <s:else><font color="#A1A192"><i><s:property value="reviewerName"/></i></font></s:else>
- </s:else>
- </td>
- <td>
- <s:if test="#todo == 'edicycle' && documentType == #edited">
- <s:set var="selection" value="approverIndex"/>
- <select name="approver">
- <option value="0">- <s:text name="label.skipped"/> -</option>
- <s:iterator value="validationActors">
- <s:if test="%{index == #selection}"><option value="<s:property value="index"/>" selected><s:property value="toString()"/></option></s:if>
- <s:else><option value="<s:property value="index"/>"><s:property value="toString()"/></option></s:else>
- </s:iterator>
- </select>
- </s:if><s:else>
- <s:if test="approverIndex > 0"><s:property value="approverName"/></s:if>
- <s:else><font color="#A1A192"><i><s:property value="approverName"/></i></font></s:else>
- </s:else>
- </td>
- <td align=right>
- <s:if test="#todo == 'edicycle' && documentType == #edited">
- <button type="submit" name="saveCycle" value="" style="width:24px; height:16px; border:0; cursor:pointer; cursor:hand; background:transparent">
- <img src="<s:url value="/skin/image.export.png"/>" title="<s:text name="button.save"/>"/>
- </button>
- </s:if>
- </td>
- </tr>
- </s:iterator>
- <tr height=3><td></td></tr>
- </table>
- </form>
- </div>
- </div>
- </div>
-
- </body>
-</html>
\ No newline at end of file