1 <%@page language="java" contentType="text/html; charset=ISO-8859-1"
2 pageEncoding="ISO-8859-1"
4 <%@page import="org.splat.som.ApplicationRights"%>
5 <%@page import="java.util.ResourceBundle"%>
6 <%@page import="java.text.SimpleDateFormat"%>
7 <%@page import="org.splat.simer.Action"%>
8 <%@page import="com.opensymphony.xwork2.ActionContext"%>
9 <%@taglib prefix="s" uri="/struts-tags"%>
11 <!-- Initialization of the context
12 =============================================================================================================================
15 ApplicationRights rights = (ApplicationRights)session.getAttribute("user.rights");
16 Action anAction = (Action)ActionContext.getContext().getActionInvocation().getAction();
17 ResourceBundle locale = ResourceBundle.getBundle("som",
18 anAction.getApplicationSettings().getCurrentLocale());
19 String format = locale.getString("date.format");
20 SimpleDateFormat tostring = new SimpleDateFormat(format);
21 String result = "uptodate";
22 boolean connected = false;
24 if (rights.getUser() != null) connected = true;
25 if (session.getAttribute("search.result") == null) result = "obsolete";
28 <s:set var="user"><%=connected%></s:set>
29 <s:set var="format"><%=format%></s:set>
30 <s:set var="today"><%=tostring.format(java.util.Calendar.getInstance().getTime())%></s:set>
31 <script language="JavaScript" type="text/javascript" src="../js/search.js"></script>
34 $(document).ready(function () {
35 initialize('<%=result%>');
39 <!-- Search criteria section
40 =============================================================================================================================
43 <div id=section><s:text name="title.criteria"/></div>
44 <div id="article-body">
45 <form name="search" action="refresh-study" method="post">
46 <input type=hidden name="contextIndex" />
47 <s:set var="match1" value="criteriaMatch"/>
48 <s:set var="match2" value="contextMatch"/>
49 <s:set var="him" value="author"/>
51 <table width=100% cellpadding=0 cellspacing=0 border=0 class=text>
54 <b><s:text name="field.among"/></b>
55 <s:if test="%{#match1 == 'all'}">
56 <input type=radio name="criteriaMatch" value="all" checked onClick="changeFilter()"><s:text name="field.matchall"/>
58 <input type=radio name="criteriaMatch" value="any" onClick="changeFilter()"><s:text name="field.matchany"/>
60 <input type=radio name="criteriaMatch" value="all" onClick="changeFilter()"><s:text name="field.matchall"/>
62 <input type=radio name="criteriaMatch" value="any" checked onClick="changeFilter()"><s:text name="field.matchany"/>
65 <td width=60%>|
66 <b><s:text name="field.context"/></b>
67 <s:if test="%{#match2 == 'all'}">
68 <input type=radio name="contextMatch" value="all" checked onClick="changeFilter()"><s:text name="field.matchall"/>
70 <input type=radio name="contextMatch" value="any" onClick="changeFilter()"><s:text name="field.matchany"/>
72 <input type=radio name="contextMatch" value="all" onClick="changeFilter()"><s:text name="field.matchall"/>
74 <input type=radio name="contextMatch" value="any" checked onClick="changeFilter()"><s:text name="field.matchany"/>
78 <tr height=1 bgcolor=#AAAAAA><td colspan=2></td></tr>
81 <table width=100% cellpadding=0 cellspacing=0 border=0 class=text>
84 <table cellpadding=0 cellspacing=0 border=0 class=text>
86 <td colspan=2><s:text name="criterion.study"/> </td>
87 <td colspan=3 align=center>
88 <select name="state" style="width: <s:text name="size.search.select"/>" onChange="setState()">
89 <s:if test="state == 'ANY'"> <option value="ANY" selected><s:text name="criterion.any" /></option></s:if>
90 <s:else> <option value="ANY" ><s:text name="criterion.any" /></option></s:else>
92 <s:if test="state == 'inWORK'"> <option value="inWORK" selected><s:text name="criterion.inwork" /></option></s:if>
93 <s:else> <option value="inWORK" ><s:text name="criterion.inwork" /></option></s:else>
94 <s:if test="state == 'inDRAFT'"> <option value="inDRAFT" selected><s:text name="criterion.indraft" /></option></s:if>
95 <s:else> <option value="inDRAFT" ><s:text name="criterion.indraft" /></option></s:else>
96 <s:if test="state == 'inCHECK'"> <option value="inCHECK" selected><s:text name="criterion.incheck" /></option></s:if>
97 <s:else> <option value="inCHECK" ><s:text name="criterion.incheck" /></option></s:else>
99 <s:if test="state == 'APPROVED'"> <option value="APPROVED" selected><s:text name="criterion.approved" /></option></s:if>
100 <s:else> <option value="APPROVED" ><s:text name="criterion.approved" /></option></s:else>
101 <s:if test="state == 'TEMPLATE'"> <option value="TEMPLATE" selected><s:text name="criterion.template" /></option></s:if>
102 <s:else> <option value="TEMPLATE" ><s:text name="criterion.template" /></option></s:else>
107 <td colspan=2><s:text name="criterion.author"/> </td>
108 <td colspan=3 align=center>
109 <select name="author" style="width: <s:text name="size.search.select"/>" onChange="changeFilter()">
110 <option value="0"><s:text name="criterion.anybody" /></option>
111 <s:iterator value="candidates">
112 <s:if test="%{index == #him}">
113 <option value="<s:property value="index"/>" selected><s:property value="toString()"/></option>
115 <option value="<s:property value="index"/>"><s:property value="toString()"/></option>
122 <s:set var="tipdate">
123 <s:text name="help.search.date">
124 <s:param><s:text name="%{#format}"/></s:param>
125 <s:param><s:text name="%{#today}"/></s:param>
128 <td><s:text name="field.credate"/> </td>
129 <td><s:text name="field.after"/> </td>
130 <td><input type=text name=after size=7 onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /> </td>
131 <td><s:text name="field.before"/> </td>
132 <td><input type=text name=before size=7 onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /></td>
134 <td><s:text name="field.lasdate"/> </td>
135 <td><s:text name="field.after"/> </td>
136 <td><input type=text name=after size=7 onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /> </td>
137 <td><s:text name="field.before"/> </td>
138 <td><input type=text name="before" size=7 onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /></td>
141 <table cellpadding=0 cellspacing=0 border=0 class=text>
143 <td><s:text name="field.contain"/>: </td>
144 <td><input type=text name=words style="width: <s:text name="size.search.input"/>" value="<s:property value="%{words}"/>" onKeydown="changeFilter()" title="<s:text name="help.search.title"/>" /></td>
146 <td><s:text name="field.reference"/>: </td>
147 <td><input type=text name="reference" style="width: <s:text name="size.search.input"/>" value="<s:property value="%{reference}"/>" onKeydown="changeFilter()" title="<s:text name="help.search.refid"/>" /></td>
152 <table cellpadding=0 cellspacing=0 border=0 class=text>
153 <s:iterator value="simulationContexts">
155 <td><input type=checkbox checked onClick="removeContext('<s:property value="index"/>')"> </td>
157 <s:if test="%{type.isApproved()}"><s:text name="type.context.%{type.name}"/>: </s:if>
158 <s:else><s:property value="%{type.name}"/>: </s:else>
160 <td><s:property value="value"/></td>
164 <s:if test="%{actionType == 'setContext'}">
167 <img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="tooltip.cancel"/>" onClick="cancel()" />
170 <s:if test="%{selectedContextType.isApproved()}"><s:text name="type.context.%{selectedContextType.name}"/>: </s:if>
171 <s:else><s:property value="%{selectedContextType.name}"/>: </s:else>
174 <select name="contextValue" onChange="submit()">
175 <option value="-1"><s:text name="menu.select"/></option>
176 <s:iterator value="contextValueOptions">
177 <option value="<s:property value="index"/>"> <s:property value="value" /></option>
185 <s:if test="%{actionType != 'setContext'}">
186 <select name="contextType" onChange="submit()">
187 <option value="-1"><s:text name="menu.addcontext"/></option>
188 <s:iterator value="contextTypeOptions">
189 <option value="<s:property value="index"/>">
190 <s:if test="%{isApproved()}"> <s:text name="type.context.%{name}" /></s:if>
191 <s:else> <s:property value="%{name}" /></s:else>
200 <table width=100% cellpadding=0 cellspacing=0 border=0 class=text>
203 <td width=60% align=left><input type="submit" name="refresh" value="<s:text name="button.result"/>" disabled/></td>
212 =============================================================================================================================
216 <div id=section><s:text name="title.result"/></div>
217 <div id=article-body class=text>
219 <s:if test="result.size > 0">
220 <table width=100% cellpadding=0 cellspacing=0 border=0 class=text>
221 <tr height=20 valign=bottom>
223 <td width=80><s:text name="label.reference"/></td>
224 <td><s:text name="label.title"/><img src="<s:url value="/skin/icon.sortup.png"/>" border="none"/></td>
225 <td width=150><s:text name="label.manager"/></td>
227 <tr height=1 bgcolor=#AAAAAA><td colspan=4></td></tr>
228 <s:iterator value="result">
230 <td><img src="<s:url value="/skin/icon.%{progressState}.png"/>" width=12 height=12 border="none" title=""/></td>
231 <td><s:property value="reference"/></td>
233 <s:url id="open" namespace="/study" action="open-study?selection=0.0">
234 <s:param name="index" value="%{index}"/>
236 <s:a href="%{open}" cssClass="link"><s:property value="title"/></s:a>
238 <td><s:property value="authorName"/></td>
245 <s:text name="message.nostudy" />