<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xslc="http://xslcomponents.org/TR/WD-xslc">
<xsl:import href="../../xslc.xsl"/>
<xsl:import href="../../Common.xsl"/>
<xsl:import href="../../Treeview.xsl"/>
<xsl:variable name="XDBServerPictosPath">
<xsl:value-of select="$XMLC_Portal"/>XDBServer/</xsl:variable>
<xsl:template match="/">
<xsl:apply-templates select="document"/>
</xsl:template>
<xsl:template match="document">
<xsl:call-template name="xslc:Page">
<xsl:with-param name="Title" select="/document/Locales/XDB_MenuTitle"/>
<xsl:with-param name="ToolbarButtonsLeft">
<ToolbarButton>
<xsl:call-template name="ToolButtonRefresh"/>
</ToolbarButton>
</xsl:with-param>
<xsl:with-param name="PageMargin">8</xsl:with-param>
<xsl:with-param name="Head">
<xsl:call-template name="xslc:TreeviewHeader"/>
</xsl:with-param>
<xsl:with-param name="Body">
<table width="100%" height="100%">
<tr>
<td valign="top">
<xsl:call-template name="xslc:TabControl">
<xsl:with-param name="ActivePageName">XDB_Menu</xsl:with-param>
<xsl:with-param name="Tabs">
<Tab Name="XDB_Menu">
<a href="{/document/Aliases/XDBServerManagerDLL}XDB_Menu">
<img align="absmiddle" border="0" src="{$XMLC_PictosPath}ico_service.gif"/> <xsl:value-of select="/document/Locales/XDB_Menu"/>
</a>
</Tab>
</xsl:with-param>
<xsl:with-param name="DisplayTabs">0</xsl:with-param>
<xsl:with-param name="Width">100%</xsl:with-param>
<xsl:with-param name="Height">100%</xsl:with-param>
<xsl:with-param name="Page">
<xsl:call-template name="Menu.Tree"/>
</xsl:with-param>
</xsl:call-template>
</td>
</tr>
</table>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="Menu.Tree">
<xsl:call-template name="xslc:Treeview">
<xsl:with-param name="Tree">
<Item Expanded="1" ImagePath="{$XDBServerPictosPath}Tree/Databases.gif" HRef="{/document/Aliases/XDBServerManagerDLL}" Target="_top" Caption="{/document/Locales/DatabasesCaption}">
<xsl:apply-templates select="Databases"/>
</Item>
<Item ImagePath="{$XMLC_PictosPath}button_print.gif" Expanded="False" Caption="{/document/Locales/Reports}"/>
<xsl:if test="/document/XMLC_Params/XMLC_Administrator = '1'">
<Item ImagePath="{$XMLC_PictosPath}Button_Tools.gif" Expanded="False" ModuleID="Administration" Caption="{/document/Locales/Administration}"/>
</xsl:if>
<xsl:if test="/document/XMLC_Params/XMLC_Supervisor = '1'">
<Item OnClick="return false;" ImagePath="{$XMLC_PictosPath}button_Configuration.gif" Expanded="False" Caption="{/document/Locales/Configuration}">
<Item ImagePath="{$XMLC_PictosPath}Button_Profile.gif" HRef="{/document/Aliases/XMLRADDLL}ListProfiles?ProjectName={/document/XMLC_Params/XMLC_InstanceName}" Target="Main" Caption="{/document/Locales/Profiles}"/>
<Item ImagePath="{$XMLC_PictosPath}button_login.gif" HRef="{/document/Aliases/XMLRADDLL}FormSecurity?ProjectName={/document/XMLC_Params/XMLC_InstanceName}" Target="Main" Caption="{/document/Locales/Security}"/>
<Item ImagePath="{$XMLC_PictosPath}button_email.gif" HRef="{/document/Aliases/XMLRADDLL}FormInitParams?ProjectName={/document/XMLC_Params/XMLC_InstanceName}&amp;InitParams.Name=SMTP" Target="Main" Caption="{/document/Locales/SMTP}"/>
<Item ImagePath="{$XMLC_PictosPath}button_im.gif" HRef="{/document/Aliases/XMLRADDLL}FormInitParams?ProjectName={/document/XMLC_Params/XMLC_InstanceName}&amp;InitParams.Name=IM" Target="Main" Caption="{/document/Locales/Messenger}"/>
</Item>
</xsl:if>
<xsl:if test="/document/XMLC_Params/XMLC_Supervisor = '1'">
<Item OnClick="return false;" ImagePath="{$XMLC_PictosPath}button_Monitoring.gif" Expanded="False" Caption="{/document/Locales/Supervision}">
<Item ImagePath="{$XMLC_PictosPath}button_Monitoring.gif" HRef="{/document/Aliases/XDBServerManagerDLL}XMLC_DashBoard" Target="Main" Caption="{/document/Locales/Monitoring}"/>
<Item ImagePath="{$XMLC_PictosPath}button_Stats.gif" HRef="{/document/Aliases/XDBServerManagerDLL}XMLC_Stats" Target="Main" Caption="{/document/Locales/Stats}"/>
<Item ImagePath="{$XMLC_PictosPath}button_Trace.gif" HRef="{/document/Aliases/XMLRADDLL}XMLC_ListTrace?ProjectName={$XMLC_InstanceName}" Target="Main" Caption="{/document/Locales/Trace}"/>
<Item ImagePath="{$XMLC_PictosPath}Button_EventLog.gif" HRef="{/document/Aliases/XMLRADDLL}XMLC_ListEventLog?ProjectName={$XMLC_InstanceName}" Target="Main" Caption="{/document/Locales/Eventlog}"/>
</Item>
</xsl:if>
<Item ImagePath="{$XMLC_PictosPath}Button_Profile.gif" HRef="{/document/Aliases/XDBServerManagerDLL}XMLC_FormProfile" Target="Main" Caption="{/document/Locales/Preferences}"/>
<Item ImagePath="{$XMLC_PictosPath}button_help.gif" HRef="http://www.xmlrad.com" Target="_blank" Caption="{/document/Locales/Help}"/>
<xsl:choose>
<xsl:when test="/document/XMLC_Params/XMLC_Authenticated = '1'">
<Item ImagePath="{$XMLC_PictosPath}button_Logout.gif" HRef="{/document/Aliases/XDBServerManagerDLL}XMLC_Logout" Target="" Caption="{/document/Locales/Logout}"/>
</xsl:when>
<xsl:otherwise>
<Item ImagePath="{$XMLC_PictosPath}button_login.gif" HRef="{/document/Aliases/XDBServerManagerDLL}XMLC_FormLogin" Target="" Caption="{/document/Locales/Login}"/>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="Databases">
<xsl:apply-templates select="Database"/>
</xsl:template>
<xsl:template match="Database">
<Item ImagePath="{$XDBServerPictosPath}Tree/Database.gif" Caption="Database" Expanded="0" HRef="{/document/Aliases/XDBServerManagerDLL}XDB_FormDatabase?ID={ID}" Target="Main">
<Item ImagePath="{$XDBServerPictosPath}/Tree/Tables.gif" Caption="Tables" Expanded="0">
<xsl:apply-templates select="Tables/Table"/>
</Item>
</Item>
</xsl:template>
<xsl:template match="Table">
<Item ImagePath="{$XDBServerPictosPath}Tree/Table.gif" Caption="{Name}" Expanded="0" HRef="{/document/Aliases/XDBServerManagerDLL}XDB_FormTable?ID={ID}" Target="Main">
<Item ImagePath="{$XDBServerPictosPath}Tree/Clusters.gif" Caption="{/document/Locales/ClustersCaption}" Expanded="0">
<xsl:apply-templates select="Cluster">
<xsl:sort select="Name"/>
</xsl:apply-templates>
</Item>
<Item ImagePath="{$XDBServerPictosPath}Tree/Fields.gif" Caption="{/document/Locales/FieldsCaption}" Expanded="0">
<xsl:apply-templates select="Fields/Field">
<xsl:sort select="Name"/>
</xsl:apply-templates>
</Item>
<Item ImagePath="{$XDBServerPictosPath}Tree/Relations.gif" Caption="{/document/Locales/RelationsCaption}" Expanded="0">
<xsl:apply-templates select="Relation">
<xsl:sort select="Name"/>
</xsl:apply-templates>
</Item>
<Item ImagePath="{$XDBServerPictosPath}Tree/Views.gif" Caption="{/document/Locales/ViewsCaption}" Expanded="0">
<xsl:apply-templates select="View">
<xsl:sort select="Name"/>
</xsl:apply-templates>
</Item>
</Item>
</xsl:template>
<xsl:template match="Field">
<Item ImagePath="{$XDBServerPictosPath}Tree/Field.gif" HRef="{/document/Aliases/XDBServerManagerDLL}XDB_FormField?ID={ID}" Target="Main" Caption="{Name}"/>
</xsl:template>
<xsl:template match="View">
<Item ImagePath="{$XDBServerPictosPath}Tree/View.gif" HRef="{/document/Aliases/XDBServerManagerDLL}XDB_FormView?ID={ID}" Target="Main" Caption="{Name}"/>
</xsl:template>
<xsl:template match="Relation">
<Item ImagePath="{$XDBServerPictosPath}Tree/Relation.gif" HRef="{/document/Aliases/XDBServerManagerDLL}XDB_FormRelation?ID={ID}" Target="Main" Caption="{Name}"/>
</xsl:template>
<xsl:template match="Cluster">
<Item ImagePath="{$XDBServerPictosPath}Tree/Cluster.gif" HRef="{/document/Aliases/XDBServerManagerDLL}XDB_FormCluster?ID={ID}" Target="Main" Caption="{Name}"/>
</xsl:template>
</xsl:stylesheet>
