]> SALOME platform Git repositories - tools/siman.git/blob
Salome HOME
faf479624ef49902a93d41b7b0a39e2b6f73a940
[tools/siman.git] /
1 <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2     pageEncoding="ISO-8859-1"
3 %>
4 <%@ page import="org.splat.som.Study"%>
5 <%@ page import="org.splat.som.ApplicationRights"%>
6 <%@
7     taglib prefix="s" uri="/struts-tags"
8 %>
9 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
10
11 <!-- Initialization of the context
12      =============================================================================================================================
13   -->
14 <%  String  action = request.getParameter("action");
15
16     ApplicationRights user      = (ApplicationRights)session.getAttribute("user.rights");
17     String            result    = "uptodate";
18     boolean           anonymous = true;
19
20     if (user.canCreateStudy())                         anonymous = false;
21     if (session.getAttribute("search.result") == null) result    = "obsolete";
22 %>
23 <s:set var="todo"><%=action%></s:set>
24 <html>
25   <head>
26     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
27     <title><s:text name="name.module"/></title>
28     <link href=<s:url value="/skin/default.css"/> rel="stylesheet" type="text/css">
29     <script language="JavaScript" type="text/javascript" src="../jvs/search.js"></script>
30   </head>
31
32   <body onLoad="initialize('<%=result%>')">
33 <!-- Menu-bar
34      =============================================================================================================================
35   -->
36     <jsp:include page="/jsp/menubar.jsp">
37         <jsp:param name="menu" value="open" />
38     </jsp:include>
39     <div id=top-spacer></div>
40
41 <!-- Search menu
42      =============================================================================================================================
43   -->
44     <div id=left-pane>
45       <jsp:include page="/jsp/toolbar.jsp">
46         <jsp:param name="tools" value="none" />
47       </jsp:include>
48       <div id=top-spacer></div>
49       <jsp:include page="/jsp/menuitem.jsp">
50         <jsp:param name="menu" value="open" />
51       </jsp:include>
52     </div>
53
54     <div id=main-pane>
55
56 <!-- Search criteria section
57      =============================================================================================================================
58   -->
59       <div id="tab-bar">
60         <jsp:include page="/jsp/searchtabs.jsp"/>
61       </div>
62       <div id=article-box>
63         <div id="top-spacer"></div>
64         <div id="article-body">
65           <form name="search" action="refresh-study" method="post">
66           <input type=hidden name="contextIndex" />
67           <s:set var="valid"><s:text name="button.result"/></s:set>
68
69           <table width=100% cellpadding=0 cellspacing=0 border=0 class=text>
70             <tr height=20>
71               <td width=40%>&nbsp;&nbsp;<s:text name="field.among"/></td>
72               <td width=60%>&nbsp;&nbsp;<s:text name="field.context"/></td>
73             </tr>
74             <tr height=1 bgcolor=#AAAAAA><td colspan=3></td></tr>
75             <tr valign=top>
76               <td>
77               <div id="article-item">
78                 <s:if test="owner == 'all'">
79                   <input type=radio name="owner" value="all" checked onClick="unsetReference()"><s:text name="criterion.study.all"/>
80                 </s:if><s:else>
81                   <input type=radio name="owner" value="all"         onClick="unsetReference()"><s:text name="criterion.study.all"/>
82                 </s:else>
83                 <select name="state" style="width: <s:text name="size.study.state"/>" onChange="changeFilter()">
84                   <option value="0"><s:text name="menu.select" /></option>
85                   <s:if test="area == 'reference'">
86                     <s:if test="state == 'ARCHIVED'">  <option value="ARCHIVED"   selected><s:text name="criterion.archived" /></option></s:if>
87                     <s:else>                           <option value="ARCHIVED"           ><s:text name="criterion.archived" /></option></s:else>
88                     <s:if test="state == 'TEMPLATE'">  <option value="TEMPLATE"   selected><s:text name="criterion.template" /></option></s:if>
89                     <s:else>                           <option value="TEMPLATE"           ><s:text name="criterion.template" /></option></s:else>
90                   </s:if><s:else>
91                     <s:if test="state == 'inPROGRESS'"><option value="inPROGRESS" selected><s:text name="criterion.inprogress" /></option></s:if>
92                     <s:else>                           <option value="inPROGRESS"         ><s:text name="criterion.inprogress" /></option></s:else>
93                     <s:if test="state == 'inDRAFT'">   <option value="inDRAFT"    selected><s:text name="criterion.indraft" /></option></s:if>
94                     <s:else>                           <option value="inDRAFT"            ><s:text name="criterion.indraft" /></option></s:else>
95                     <s:if test="state == 'inCHECK'">   <option value="inCHECK"    selected><s:text name="criterion.incheck" /></option></s:if>
96                     <s:else>                           <option value="inCHECK"            ><s:text name="criterion.incheck" /></option></s:else>
97                     <s:if test="state == 'APPROVED'">  <option value="APPROVED"   selected><s:text name="criterion.approved" /></option></s:if>
98                     <s:else>                           <option value="APPROVED"           ><s:text name="criterion.approved" /></option></s:else>
99                   </s:else>
100                 </select>
101               </div>
102               <div id="article-item">
103                 <s:if test="owner == 'his'">
104                   <input type=radio name="owner" value="his" checked onClick="unsetReference()"><s:text name="criterion.study.his"/>
105                 </s:if><s:else>
106                   <input type=radio name="owner" value="his"         onClick="unsetReference()"><s:text name="criterion.study.his"/>
107                 </s:else>
108                 <s:set var="him" value="author"/>
109                 <select name="author" style="width: <s:text name="size.study.author"/>" onChange="changeFilter()">
110                   <option value="0"><s:text name="menu.select" /></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>
114                     </s:if><s:else>
115                       <option value="<s:property value="index"/>"><s:property value="toString()"/></option>
116                     </s:else>
117                   </s:iterator>
118                 </select>
119               </div>
120               <div id="article-item">
121 <%  if (anonymous) {
122 %>                <input type=radio name="owner" value="mine" disabled><font color="#A1A192"><s:text name="criterion.study.mine"/></font>
123 <%  } else {
124 %>              <s:if test="owner == 'mine'">
125                   <input type=radio name="owner" value="mine" checked onClick="unsetReference()"><s:text name="criterion.study.mine"/>
126                 </s:if><s:else>
127                   <input type=radio name="owner" value="mine"         onClick="unsetReference()"><s:text name="criterion.study.mine"/>
128                 </s:else>
129 <%  }  %>     </div>
130               <div id="article-item">
131                 <s:if test="owner == 'ref'">
132                   <input type=radio name="owner" value="ref" checked onClick="setReference()"><s:text name="criterion.study.ref"/>
133                 </s:if><s:else>
134                   <input type=radio name="owner" value="ref"         onClick="setReference()"><s:text name="criterion.study.ref"/>
135                 </s:else>
136                 <div id=refid>
137                   <input type=text name="reference" value="<s:property value="%{reference}"/>" size="18" onKeydown="changeFilter()"/>
138                 </div>
139               </div>
140               </td>
141               <td rowspan=2>
142                 <div id=contlist>
143
144                 <table cellpadding=0 cellspacing=0 border=0 class=text>
145                   <s:iterator value="simulationContexts">
146                     <tr>
147                       <td><input type=checkbox checked onClick="removeContext('<s:property value="index"/>')">&nbsp;</td>
148                       <td>
149                         <s:if test="%{type.isApproved()}"><s:text name="type.context.%{type.name}"/>:&nbsp;</s:if>
150                         <s:else><s:property value="%{type.name}"/>:&nbsp;</s:else>
151                       </td>
152                       <td><s:property value="value"/></td>
153                     </tr>
154                   </s:iterator>
155
156                   <s:if test="%{#todo == 'setContext'}">
157                     <tr>
158                       <td>
159                         <img src="<s:url value="/skin/icon.undo.png"/>" border="none" title="<s:text name="tooltip.cancel"/>" onClick="cancel()" />&nbsp;
160                       </td>
161                       <td>
162                         <s:if test="%{selectedContextType.isApproved()}"><s:text name="type.context.%{selectedContextType.name}"/>:&nbsp;</s:if>
163                         <s:else><s:property value="%{selectedContextType.name}"/>:&nbsp;</s:else>
164                       </td>
165                       <td>
166                         <select name="contextValue" onChange="submit()">
167                           <option value="-1"><s:text name="menu.select"/></option>
168                           <s:iterator value="contextValueOptions">
169                             <option value="<s:property value="index"/>">&nbsp;<s:property value="value" /></option>
170                           </s:iterator>
171                         </select>
172                       </td>
173                     </tr>
174                   </s:if>
175                 </table>
176
177                 <s:if test="%{#todo != 'setContext'}">
178                         <select name="contextType" onChange="submit()">
179                           <option value="-1"><s:text name="menu.addcontext"/></option>
180                           <s:iterator value="contextTypeOptions">
181                             <option value="<s:property value="index"/>">
182                               <s:if test="%{isApproved()}">&nbsp;<s:text name="type.context.%{name}" /></s:if>
183                               <s:else>&nbsp;<s:property value="%{name}" /></s:else>
184                             </option>
185                           </s:iterator>
186                         </select>
187                 </s:if>
188                 </div>
189               </td>
190             </tr>
191             <tr>
192               <td>
193                 <div id=wordin>
194                   <br/><s:text name="field.contain"/>&nbsp;:&nbsp;<input type=text name=words value="<s:property value="%{words}"/>" onKeydown="changeFilter()" />
195                 </div>
196               </td>
197             </tr>
198             <tr>
199               <td></td>
200               <td align=left>
201                 <input type="submit" name="refresh" value="<s:text name="button.result"/>" disabled/>
202               </td>
203             </tr>
204           </table>
205
206           </form>
207         </div>
208       </div>
209
210 <!-- Result list
211      =============================================================================================================================
212   -->
213       <div id=resulist>
214       <div id=article-box>
215         <div id=section><s:text name="title.result"/></div>
216         <div id=article-body class=text>
217
218           <s:if test="result.size > 0">
219             <table width=100% cellpadding=0 cellspacing=0 border=0 class=text>
220             <tr height=20 valign=bottom>
221               <td width=20></td>
222               <td width=80><s:text name="label.reference"/></td>
223               <td><s:text name="label.title"/><img src="<s:url value="/skin/icon.sortup.png"/>" border="none"/></td>
224               <td width=150><s:text name="label.manager"/></td>
225             </tr>
226             <tr height=1 bgcolor=#AAAAAA><td colspan=4></td></tr>
227               <s:iterator value="result">
228                 <tr>
229                   <td><img src="<s:url value="/skin/icon.%{progressState}.png"/>" width=12 height=12 border="none" title=""/></td>
230                   <td><s:property value="reference"/></td>
231                   <td>
232                       <s:url id="open" namespace="/study" action="open-study?selection=0.0">
233                         <s:param name="index" value="%{index}"/>
234                       </s:url>
235                       <s:a href="%{open}" cssClass="link"><s:property value="title"/></s:a>
236                   </td>
237                   <td><s:property value="authorName"/></td>
238                 </tr>
239               </s:iterator>
240             </table>
241           </s:if>
242
243           <s:else>
244             <s:text name="message.nostudy" />
245           </s:else>
246         </div>
247       </div>
248       </div>
249
250     </div>
251
252   </body>
253 </html>