<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"
-%>
-<%@ page import="org.splat.som.StepRights"%>
-<%@ page import="org.splat.simer.OpenStudy"%>
-<%@ page import="org.splat.wapp.ToolBar"%>
-<%@ page import="org.splat.wapp.ToolButton"%>
-<%@ page import="java.util.Iterator"%>
-<%@
- taglib prefix="s" uri="/struts-tags"
-%>
+ pageEncoding="ISO-8859-1"%>
+<%@ taglib prefix="s" uri="/struts-tags"%>
<s:url id="properties" namespace="/" action="select">
- <s:param name="menu">configuration</s:param>
+ <s:param name="menu">configuration</s:param>
</s:url>
-<s:url id="scenario" namespace="/study" action="add-scenario"></s:url>
-<s:url id="idea" namespace="/study" action="notyetimplemented"></s:url>
-<s:url id="back" namespace="/study" action="step-study"></s:url>
+<s:url id="scenario" namespace="/study" action="add-scenario"></s:url>
+<s:url id="idea" namespace="/study" action="notyetimplemented"></s:url>
+<s:url id="back" namespace="/study" action="step-study"></s:url>
<table width=100% border=0 cellspacing=0 cellpadding=0>
- <tr height=30 valign=middle>
-
- <s:if test="toolBarSettings.isToolStudy">
- <td width=30 align=left>
- <s:if test="toolBarSettings.canUserEdit">
- <s:a href="%{#properties}"><img src="<s:url value="/skin/tool.property.png"/>" border="none" title="<s:text name="tooltip.property"/>" /></s:a>
- </s:if>
- <s:else>
- <s:a href="%{#properties}"><img src="<s:url value="/skin/tool.property.png"/>" border="none" title="<s:text name="tooltip.details"/>" /></s:a>
- </s:else>
- </td>
- <td width=30 align=left>
- <s:if test="toolBarSettings.isEnabledScript">
- <s:a href="%{#scenario}"><img src="<s:url value="/skin/tool.scenario.png"/>" border="none" title="<s:text name="tooltip.scenario"/>"/></s:a>
- </s:if>
- <s:else>
- <img src="<s:url value="/skin/disabled.scenario.png"/>" border="none" title="" />
- </s:else>
+ <tr height=30 valign=middle>
- </td>
- <td align=right>
- <img src="<s:url value="/skin/image.vseparator.png"/>" border="none" />
-<% OpenStudy study = (OpenStudy)session.getAttribute("study.open");
- ToolBar mbar = study.getModuleBar();
- if (study.getSelectedStepRights().canCreateDocument() && mbar != null) {
-%>
- <applet name="perform" id="perform" code="org.splat.launcher.ToolbarApplet.class" archive="../jap/splat-signedlauncher.jar" width=<%=mbar.getWidth()%> height=<%=mbar.getHeight()%>>
-<% Iterator<ToolButton> item = mbar.asList().iterator();
- for (int i=0; item.hasNext(); i++) {
- ToolButton tool = item.next();
- String arg = tool.getArgument();
-%> <param name="icon<%=i%>" value="<%=tool.getIcon()%>" />
- <param name="tool<%=i%>" value="<%=tool.getAction()%>" />
-<% if (arg != null) {
-%> <param name="file<%=i%>" value="<%=arg%>" />
-<% }
- }
-%> </applet>
-<% }
-%> </td>
- <td width=30 align=right>
- <s:a href="%{#idea}"><img src="<s:url value="/skin/icon.idea.png"/>" border="none" title="<s:text name="tooltip.search"/>" /></s:a>
- </td>
- </s:if>
-
- <s:elseif test="toolBarSettings.isToolStandard">
- <td width=30 align=left>
- <s:a href="%{#properties}"><img src="<s:url value="/skin/tool.property.png"/>" border="none" title="<s:text name="tooltip.details"/>" /></s:a>
- </td>
- </s:elseif>
-
- <s:elseif test="toolBarSettings.isToolBack">
- <td width=30 align=left>
- <s:a href="%{#back}"><img src="<s:url value="/skin/icon.back.png"/>" border="none" title="<s:text name="tooltip.back"/>" /></s:a>
- </td>
- </s:elseif>
-</tr>
+ <s:if test="toolBarSettings.isToolStudy">
+ <td width=30 align=left><s:if test="toolBarSettings.canUserEdit">
+ <s:a href="%{#properties}">
+ <img src="<s:url value="/skin/tool.property.png"/>" border="none"
+ title="<s:text name="tooltip.property"/>" />
+ </s:a>
+ </s:if> <s:else>
+ <s:a href="%{#properties}">
+ <img src="<s:url value="/skin/tool.property.png"/>" border="none"
+ title="<s:text name="tooltip.details"/>" />
+ </s:a>
+ </s:else></td>
+ <td width=30 align=left><s:if
+ test="toolBarSettings.isEnabledScript">
+ <s:a href="%{#scenario}">
+ <img src="<s:url value="/skin/tool.scenario.png"/>" border="none"
+ title="<s:text name="tooltip.scenario"/>" />
+ </s:a>
+ </s:if> <s:else>
+ <img src="<s:url value="/skin/disabled.scenario.png"/>"
+ border="none" title="" />
+ </s:else></td>
+ <%-- URL for refreshing scenario view after checkin --%>
+ <s:url id="refresh" forceAddSchemeHostAndPort="true"
+ namespace="/study" action="open-%{#entitype}">
+ <s:param name="selection" value="titleBarSettings.selectionState" />
+ </s:url>
+ <td align=right><img
+ src="<s:url value="/skin/image.vseparator.png"/>" border="none" />
+ <s:if
+ test="openStudy.selectedStepRights.canCreateDocument() && (openStudy.moduleBar != null)">
+ <applet name="perform" id="perform"
+ code="org.splat.launcher.ToolbarApplet"
+ archive="../jap/splat-signedlauncher.jar"
+ width=<s:property value="openStudy.moduleBar.width"/>
+ height=<s:property value="openStudy.moduleBar.height"/>> <%-- Generate applet parameters for each tool button --%>
+ <s:iterator var="tool" value="openStudy.moduleBar.items"
+ status="stat">
+ <s:set var="arg" value="#tool.argument" />
+ <param name="icon<s:property value="#stat.index" />"
+ value="<s:property value="#tool.icon" />" />
+ <param name="tool<s:property value="#stat.index" />"
+ value="<s:property value="#tool.action" />" />
+ <s:if test="#tool.action == 'runSalome'">
+ <%--
+ --siman --siman-study=s --siman-scenario=sc --siman-user=u -k
+ --%>
+ <s:set var="arg">--siman --siman-study=<s:property
+ value="openStudy.index" /> --siman-scenario=<s:property
+ value="openStudy.selectedScenarioId" /> --siman-user=<s:property
+ value="connectedUser.username" /> -k</s:set>
+ </s:if>
+ <s:if test="#arg != null">
+ <param name="file<s:property value="#stat.index" />"
+ value="<s:property value="#arg" />" />
+ </s:if>
+ </s:iterator>
+ <param name="refresh" value="<s:property value="%{refresh}"/>">
+ </applet>
+ </s:if></td>
+ <td width=30 align=right><s:a href="%{#idea}">
+ <img src="<s:url value="/skin/icon.idea.png"/>" border="none"
+ title="<s:text name="tooltip.search"/>" />
+ </s:a></td>
+ </s:if>
+
+ <s:elseif test="toolBarSettings.isToolStandard">
+ <td width=30 align=left><s:a href="%{#properties}">
+ <img src="<s:url value="/skin/tool.property.png"/>" border="none"
+ title="<s:text name="tooltip.details"/>" />
+ </s:a></td>
+ </s:elseif>
+
+ <s:elseif test="toolBarSettings.isToolBack">
+ <td width=30 align=left><s:a href="%{#back}">
+ <img src="<s:url value="/skin/icon.back.png"/>" border="none"
+ title="<s:text name="tooltip.back"/>" />
+ </s:a></td>
+ </s:elseif>
+ </tr>
</table>
\ No newline at end of file