<%@page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
%>
-<%@page import="org.splat.som.ApplicationRights"%>
-<%@page import="java.util.ResourceBundle"%>
-<%@page import="java.text.SimpleDateFormat"%>
-<%@page import="org.splat.simer.Action"%>
-<%@page import="com.opensymphony.xwork2.ActionContext"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!-- Initialization of the context
=============================================================================================================================
-->
-<%
- ApplicationRights rights = (ApplicationRights)session.getAttribute("user.rights");
- Action anAction = (Action)ActionContext.getContext().getActionInvocation().getAction();
- ResourceBundle locale = ResourceBundle.getBundle("som",
- anAction.getApplicationSettings().getCurrentLocale());
- String format = locale.getString("date.format");
- SimpleDateFormat tostring = new SimpleDateFormat(format);
- String result = "uptodate";
- boolean connected = false;
-
- if (rights.getUser() != null) connected = true;
- if (session.getAttribute("search.result") == null) result = "obsolete";
-%>
-
-<s:set var="user"><%=connected%></s:set>
-<s:set var="format"><%=format%></s:set>
-<s:set var="today"><%=tostring.format(java.util.Calendar.getInstance().getTime())%></s:set>
<script language="JavaScript" type="text/javascript" src="../js/search.js"></script>
<script>
$(document).ready(function () {
- initialize('<%=result%>');
+ initialize('<s:property value="resultState"/>');
});
</script>
<!-- Search criteria section
=============================================================================================================================
-->
- <div id=article-box>
- <div id=section><s:text name="title.criteria"/></div>
+ <div id="article-box">
+ <div id="section"><s:text name="title.criteria"/></div>
<div id="article-body">
<form name="search" action="refresh-study" method="post">
- <input type=hidden name="contextIndex" />
+ <input type="hidden" name="contextIndex" />
<s:set var="match1" value="criteriaMatch"/>
<s:set var="match2" value="contextMatch"/>
<s:set var="him" value="author"/>
- <table width=100% cellpadding=0 cellspacing=0 border=0 class=text>
- <tr height=20>
- <td width=40%>
+ <table width="100%" cellpadding="0" cellspacing="0" border="0" class="text">
+ <tr height="20">
+ <td width="40%">
<b><s:text name="field.among"/></b>
<s:if test="%{#match1 == 'all'}">
- <input type=radio name="criteriaMatch" value="all" checked onClick="changeFilter()"><s:text name="field.matchall"/>
+ <input type="radio" name="criteriaMatch" value="all" checked onClick="changeFilter()"><s:text name="field.matchall"/>
- <input type=radio name="criteriaMatch" value="any" onClick="changeFilter()"><s:text name="field.matchany"/>
+ <input type="radio" name="criteriaMatch" value="any" onClick="changeFilter()"><s:text name="field.matchany"/>
</s:if><s:else>
- <input type=radio name="criteriaMatch" value="all" onClick="changeFilter()"><s:text name="field.matchall"/>
+ <input type="radio" name="criteriaMatch" value="all" onClick="changeFilter()"><s:text name="field.matchall"/>
- <input type=radio name="criteriaMatch" value="any" checked onClick="changeFilter()"><s:text name="field.matchany"/>
+ <input type="radio" name="criteriaMatch" value="any" checked onClick="changeFilter()"><s:text name="field.matchany"/>
</s:else>
</td>
- <td width=60%>|
+ <td width="60%">|
<b><s:text name="field.context"/></b>
<s:if test="%{#match2 == 'all'}">
- <input type=radio name="contextMatch" value="all" checked onClick="changeFilter()"><s:text name="field.matchall"/>
+ <input type="radio" name="contextMatch" value="all" checked onClick="changeFilter()"><s:text name="field.matchall"/>
- <input type=radio name="contextMatch" value="any" onClick="changeFilter()"><s:text name="field.matchany"/>
+ <input type="radio" name="contextMatch" value="any" onClick="changeFilter()"><s:text name="field.matchany"/>
</s:if><s:else>
- <input type=radio name="contextMatch" value="all" onClick="changeFilter()"><s:text name="field.matchall"/>
+ <input type="radio" name="contextMatch" value="all" onClick="changeFilter()"><s:text name="field.matchall"/>
- <input type=radio name="contextMatch" value="any" checked onClick="changeFilter()"><s:text name="field.matchany"/>
+ <input type="radio" name="contextMatch" value="any" checked onClick="changeFilter()"><s:text name="field.matchany"/>
</s:else>
</td>
</tr>
- <tr height=1 bgcolor=#AAAAAA><td colspan=2></td></tr>
+ <tr height="1" bgcolor="#AAAAAA"><td colspan="2"></td></tr>
</table>
- <table width=100% cellpadding=0 cellspacing=0 border=0 class=text>
- <tr valign=top>
- <td width=40%>
- <table cellpadding=0 cellspacing=0 border=0 class=text>
+ <table width="100%" cellpadding="0" cellspacing="0" border="0" class="text">
+ <tr valign="top">
+ <td width="40%">
+ <table cellpadding="0" cellspacing="0" border="0" class="text">
<tr>
- <td colspan=2><s:text name="criterion.study"/> </td>
- <td colspan=3 align=center>
- <select name="state" style="width: <s:text name="size.search.select"/>" onChange="setState()">
+ <td colspan="2"><s:text name="criterion.study"/> </td>
+ <td colspan="3" align="center">
+ <select name="state" style="width: <s:text name="size.search.select"/>" onChange="changeFilter()">
<s:if test="state == 'ANY'"> <option value="ANY" selected><s:text name="criterion.any" /></option></s:if>
<s:else> <option value="ANY" ><s:text name="criterion.any" /></option></s:else>
- <s:if test="#user">
+ <s:if test="connectedUser != null">
<s:if test="state == 'inWORK'"> <option value="inWORK" selected><s:text name="criterion.inwork" /></option></s:if>
<s:else> <option value="inWORK" ><s:text name="criterion.inwork" /></option></s:else>
<s:if test="state == 'inDRAFT'"> <option value="inDRAFT" selected><s:text name="criterion.indraft" /></option></s:if>
</td>
</tr>
<tr>
- <td colspan=2><s:text name="criterion.author"/> </td>
- <td colspan=3 align=center>
+ <td colspan="2"><s:text name="criterion.author"/> </td>
+ <td colspan="3" align="center">
<select name="author" style="width: <s:text name="size.search.select"/>" onChange="changeFilter()">
<option value="0"><s:text name="criterion.anybody" /></option>
<s:iterator value="candidates">
<tr>
<s:set var="tipdate">
<s:text name="help.search.date">
- <s:param><s:text name="%{#format}"/></s:param>
- <s:param><s:text name="%{#today}"/></s:param>
+ <s:param><s:text name="%{format}"/></s:param>
+ <s:param><s:text name="%{today}"/></s:param>
</s:text>
</s:set>
<td><s:text name="field.credate"/> </td>
<td><s:text name="field.after"/> </td>
- <td><input type=text name=after size=7 onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /> </td>
+ <td><input type="text" name=after size=7 onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /> </td>
<td><s:text name="field.before"/> </td>
- <td><input type=text name=before size=7 onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /></td>
+ <td><input type="text" name=before size=7 onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /></td>
</tr><tr>
<td><s:text name="field.lasdate"/> </td>
<td><s:text name="field.after"/> </td>
- <td><input type=text name=after size=7 onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /> </td>
+ <td><input type="text" name=after size=7 onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /> </td>
<td><s:text name="field.before"/> </td>
- <td><input type=text name="before" size=7 onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /></td>
+ <td><input type="text" name="before" size=7 onKeydown="changeFilter()" title="<s:property value="%{#tipdate}"/>" /></td>
</tr>
</table>
- <table cellpadding=0 cellspacing=0 border=0 class=text>
+ <table cellpadding="0" cellspacing="0" border="0" class="text">
<tr>
<td><s:text name="field.contain"/>: </td>
- <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>
+ <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>
</tr><tr>
<td><s:text name="field.reference"/>: </td>
- <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>
+ <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>
</tr>
</table>
</td>
- <td width=60%>
- <table cellpadding=0 cellspacing=0 border=0 class=text>
+ <td width="60%">
+ <table cellpadding="0" cellspacing="0" border="0" class="text">
<s:iterator value="simulationContexts">
<tr>
- <td><input type=checkbox checked onClick="removeContext('<s:property value="index"/>')"> </td>
+ <td><input type="checkbox" checked onClick="removeContext('<s:property value="index"/>')"> </td>
<td>
<s:if test="%{type.isApproved()}"><s:text name="type.context.%{type.name}"/>: </s:if>
<s:else><s:property value="%{type.name}"/>: </s:else>
</tr>
</table>
- <table width=100% cellpadding=0 cellspacing=0 border=0 class=text>
+ <table width="100%" cellpadding="0" cellspacing="0" border="0" class="text">
<tr>
- <td width=40%></td>
- <td width=60% align=left><input type="submit" name="refresh" value="<s:text name="button.result"/>" disabled/></td>
+ <td width="40%"></td>
+ <td width="60%" align="left"><input type="submit" name="refresh" value="<s:text name="button.result"/>" disabled/></td>
</tr>
</table>
<!-- Result list
=============================================================================================================================
-->
- <div id=resulist>
- <div id=article-box>
- <div id=section><s:text name="title.result"/></div>
- <div id=article-body class=text>
+ <div id="resulist">
+ <div id="article-box">
+ <div id="section"><s:text name="title.result"/></div>
+ <div id="article-body" class="text">
<s:if test="result.size > 0">
- <table width=100% cellpadding=0 cellspacing=0 border=0 class=text>
- <tr height=20 valign=bottom>
- <td width=20></td>
- <td width=80><s:text name="label.reference"/></td>
+ <table width="100%" cellpadding="0" cellspacing="0" border="0" class="text">
+ <tr height="20" valign="bottom">
+ <td width="20"></td>
+ <td width="80"><s:text name="label.reference"/></td>
<td><s:text name="label.title"/><img src="<s:url value="/skin/icon.sortup.png"/>" border="none"/></td>
- <td width=150><s:text name="label.manager"/></td>
+ <td width="150"><s:text name="label.manager"/></td>
</tr>
- <tr height=1 bgcolor=#AAAAAA><td colspan=4></td></tr>
+ <tr height="1" bgcolor="#AAAAAA"><td colspan="4"></td></tr>
<s:iterator value="result">
<tr>
<td><img src="<s:url value="/skin/icon.%{progressState}.png"/>" width=12 height=12 border="none" title=""/></td>