Salome HOME
e2543014966c67030574d56c08099a2881a22fed
[tools/siman.git] / Workspace / Siman / WebContent / jsp / toolbar.jsp
1 <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2         pageEncoding="ISO-8859-1"%>
3 <%@ taglib prefix="s" uri="/struts-tags"%>
4
5 <s:url id="properties" namespace="/" action="select">
6         <s:param name="menu">configuration</s:param>
7 </s:url>
8 <s:url id="scenario" namespace="/study" action="add-scenario"></s:url>
9 <s:url id="idea" namespace="/study" action="search-knowledge"></s:url>
10 <s:url id="back" namespace="/study" action="step-study"></s:url>
11
12 <table width=100% border=0 cellspacing=0 cellpadding=0>
13         <tr height=30 valign=middle>
14
15                 <s:if test="toolBarSettings.isToolStudy">
16                         <td width=30 align=left><s:if test="toolBarSettings.canUserEdit">
17                                 <s:a href="%{#properties}">
18                                         <img src="<s:url value="/skin/tool.property.png"/>" border="none"
19                                                 title="<s:text name="tooltip.property"/>" />
20                                 </s:a>
21                         </s:if> <s:else>
22                                 <s:a href="%{#properties}">
23                                         <img src="<s:url value="/skin/tool.property.png"/>" border="none"
24                                                 title="<s:text name="tooltip.details"/>" />
25                                 </s:a>
26                         </s:else></td>
27                         <td width=30 align=left><s:if
28                                 test="toolBarSettings.isEnabledScript">
29                                 <s:a href="%{#scenario}">
30                                         <img src="<s:url value="/skin/tool.scenario.png"/>" border="none"
31                                                 title="<s:text name="tooltip.scenario"/>" />
32                                 </s:a>
33                         </s:if> <s:else>
34                                 <img src="<s:url value="/skin/disabled.scenario.png"/>"
35                                         border="none" title="" />
36                         </s:else></td>
37                         
38                         <s:set var="mess">
39                                 <s:text name="message.info.data">
40                                         <s:param>/tmp/SimanSalome/<s:property
41                                                         value="openStudy.index" />/<s:property
42                                                         value="openStudy.selectedScenarioId" />/<s:property
43                                                         value="connectedUser.index" /></s:param>
44                                 </s:text>
45                         </s:set>
46                         <%-- URL for refreshing scenario view after checkin --%>
47                         <s:url id="refresh" forceAddSchemeHostAndPort="true"
48                                 namespace="/study" action="open-%{#entitype}" includeParams="none" escapeAmp="no">
49                                 <s:param name="selection" value="titleBarSettings.selectionState" />
50                                 <s:param name="message" value="#mess" />
51                         </s:url>
52                         
53                         <td align=right><img
54                                 src="<s:url value="/skin/image.vseparator.png"/>" border="none" />
55                         <s:if
56                                 test="openStudy.selectedStepRights.canCreateDocument() && (openStudy.moduleBar != null)">
57                                 <applet name="perform" id="perform"
58                                         code="org.splat.launcher.ToolbarApplet"
59                                         archive="../jap/splat-signedlauncher.jar"
60                                         width=<s:property value="openStudy.moduleBar.width"/>
61                                         height=<s:property value="openStudy.moduleBar.height"/>> <%-- Generate applet parameters for each tool button --%>
62                                         <s:iterator var="tool" value="openStudy.moduleBar.items"
63                                                 status="stat">
64                                                 <s:set var="arg" value="#tool.argument" />
65                                                 <param name="icon<s:property value="#stat.index" />"
66                                                         value="<s:property value="#tool.icon" />" />
67                                                 <param name="tool<s:property value="#stat.index" />"
68                                                         value="<s:property value="#tool.action" />" />
69                                                 <s:if test="#tool.action == 'runSalome'">
70                                                         <%-- 
71                         --siman --siman-study=s --siman-scenario=sc --siman-user=u -k
72                         --%>
73                                                         <s:set var="arg">--siman-study=<s:property
74                                                                         value="openStudy.index" /> --siman-scenario=<s:property
75                                                                         value="openStudy.selectedScenarioId" /> --siman-user=<s:property
76                                                                         value="connectedUser.index" />
77                                                         </s:set>
78                                                 </s:if>
79                                                 <s:if test="#arg != null">
80                                                         <param name="file<s:property value="#stat.index" />"
81                                                                 value="<s:property value="#arg" />" />
82                                                 </s:if>
83                                         </s:iterator>
84                                         <param name="refresh" value="<s:property value="%{refresh}"/>">
85                                 </applet>
86                         </s:if></td>
87                         
88             <td width=30 align=right><s:a action="init-study-comparison">
89                 <img src="<s:url value="/skin/tool.compare.png"/>" border="none"
90                     title="<s:text name="tooltip.compare"/>" style="background-color: transparent;"/>
91             </s:a></td>
92             <td align=right><img
93                 src="<s:url value="/skin/image.vseparator.png"/>" border="none" />
94             
95                         <td width=30 align=right><s:a href="%{#idea}">
96                                 <img src="<s:url value="/skin/icon.idea.png"/>" border="none"
97                                         title="<s:text name="tooltip.search"/>" />
98                         </s:a></td>
99                 </s:if>
100
101                 <s:elseif test="toolBarSettings.isToolStandard">
102                         <td width=30 align=left><s:a href="%{#properties}">
103                                 <img src="<s:url value="/skin/tool.property.png"/>" border="none"
104                                         title="<s:text name="tooltip.details"/>" />
105                         </s:a></td>
106                 </s:elseif>
107
108                 <s:elseif test="toolBarSettings.isToolBack">
109                         <td width=30 align=left><s:a href="%{#back}">
110                                 <img src="<s:url value="/skin/icon.back.png"/>" border="none"
111                                         title="<s:text name="tooltip.back"/>" />
112                         </s:a></td>
113                 </s:elseif>
114         </tr>
115 </table>