Salome HOME
Scenario view is refreshed now after check in. Labels of activities are fixed.
[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="notyetimplemented"></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                         <%-- URL for refreshing scenario view after checkin --%>
38                         <s:url id="refresh" forceAddSchemeHostAndPort="true"
39                                 namespace="/study" action="open-%{#entitype}">
40                                 <s:param name="selection" value="titleBarSettings.selectionState" />
41                         </s:url>
42                         <td align=right><img
43                                 src="<s:url value="/skin/image.vseparator.png"/>" border="none" />
44                         <s:if
45                                 test="openStudy.selectedStepRights.canCreateDocument() && (openStudy.moduleBar != null)">
46                                 <applet name="perform" id="perform"
47                                         code="org.splat.launcher.ToolbarApplet"
48                                         archive="../jap/splat-signedlauncher.jar"
49                                         width=<s:property value="openStudy.moduleBar.width"/>
50                                         height=<s:property value="openStudy.moduleBar.height"/>> <%-- Generate applet parameters for each tool button --%>
51                                         <s:iterator var="tool" value="openStudy.moduleBar.items"
52                                                 status="stat">
53                                                 <s:set var="arg" value="#tool.argument" />
54                                                 <param name="icon<s:property value="#stat.index" />"
55                                                         value="<s:property value="#tool.icon" />" />
56                                                 <param name="tool<s:property value="#stat.index" />"
57                                                         value="<s:property value="#tool.action" />" />
58                                                 <s:if test="#tool.action == 'runSalome'">
59                                                         <%-- 
60                         --siman --siman-study=s --siman-scenario=sc --siman-user=u -k
61                         --%>
62                                                         <s:set var="arg">--siman --siman-study=<s:property
63                                                                         value="openStudy.index" /> --siman-scenario=<s:property
64                                                                         value="openStudy.selectedScenarioId" /> --siman-user=<s:property
65                                                                         value="connectedUser.username" /> -k</s:set>
66                                                 </s:if>
67                                                 <s:if test="#arg != null">
68                                                         <param name="file<s:property value="#stat.index" />"
69                                                                 value="<s:property value="#arg" />" />
70                                                 </s:if>
71                                         </s:iterator>
72                                         <param name="refresh" value="<s:property value="%{refresh}"/>">
73                                 </applet>
74                         </s:if></td>
75                         <td width=30 align=right><s:a href="%{#idea}">
76                                 <img src="<s:url value="/skin/icon.idea.png"/>" border="none"
77                                         title="<s:text name="tooltip.search"/>" />
78                         </s:a></td>
79                 </s:if>
80
81                 <s:elseif test="toolBarSettings.isToolStandard">
82                         <td width=30 align=left><s:a href="%{#properties}">
83                                 <img src="<s:url value="/skin/tool.property.png"/>" border="none"
84                                         title="<s:text name="tooltip.details"/>" />
85                         </s:a></td>
86                 </s:elseif>
87
88                 <s:elseif test="toolBarSettings.isToolBack">
89                         <td width=30 align=left><s:a href="%{#back}">
90                                 <img src="<s:url value="/skin/icon.back.png"/>" border="none"
91                                         title="<s:text name="tooltip.back"/>" />
92                         </s:a></td>
93                 </s:elseif>
94         </tr>
95 </table>