﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
  <xsl:output method="xml" indent="yes"/>

  <xsl:template name="SourceInfoBox">
    <xsl:param name="SourceID" select="'N/A'"></xsl:param>
    <xsl:param name="PortalItemID" select="'N/A'"></xsl:param>
    <xsl:param name="Source" select="'N/A'"></xsl:param>
    <xsl:param name="TemplateURL" select="'N/A'"></xsl:param>
    <xsl:param name="CommunityAdmin" select="'N/A'"></xsl:param>


    <table class="tableMaster" cellpadding="0" cellspacing="0" style="border:1px solid #D2D3D4;">
      <tr>
        <td width="85%">
          <span id="span_Soutce_{$PortalItemID}" class="labelGoalTitle marginBottom15 marginLeft5 marginTop10" style="display:block;">
            <span id="span_Source_{$PortalItemID}_label">
              <xsl:value-of select="$Source"/>
            </span>
            <img src="{$TemplateURL}Web/Images/Ver_2_0/edit_goal.png" class="marginLeft10 onMouseOver"
                 onclick="document.getElementById('span_Soutce_{$PortalItemID}').style.display='none';
                          document.getElementById('txt_Source_{$PortalItemID}').style.display='inline';
                          document.getElementById('txtSource_{$PortalItemID}').focus();"></img>
          </span>
          <span id="txt_Source_{$PortalItemID}" class="labelGoalTitle" style="display:none;">
            <input id="txtSource_{$PortalItemID}" type="text" value="{$Source}" class="text marginTop10 marginBottom15 marginLeft5" style="width:150px;"
                   onblur="document.getElementById('span_Soutce_{$PortalItemID}').style.display='block';
                           document.getElementById('txt_Source_{$PortalItemID}').style.display='none';
                           updateDataXSource('{$PortalItemID}','{$SourceID}','txtSource_{$PortalItemID}');"></input>
          </span>
        </td>
        <xsl:if test="$CommunityAdmin">
          <td width="15%">
            <div id="btnStart_{$PortalItemID}" align="right"
                 class="verticallyMiddle onMouseOver marginBottom15 marginLeft5 marginTop15 textCenter divBrowseGradient spanBrowseGradientTextGray"
                 style="width:70px;line-height:22px;"
                 onclick="StartTransaction('{$PortalItemID}','{$SourceID}');">
              <span id="span_Column" class="capitalFont">start</span>
            </div>
          </td>
        </xsl:if>
      </tr>
      <tr>
        <td colspan="2">
          <table class="tableMaster textCenter verticallyMiddle capitalFont" height="30px"
                                                cellSpacing="0" cellPadding="0" >
            <td width="25%" id="cell_Transactions" class="textCenter verticallyMiddle selectedMenuGoalTabs"
                name="SourceMenuAction"
                onclick="portal_LoadSourceTransactions('divTransactions','{$PortalItemID}','{$SourceID}','LoadSourceTransactions');
                        goal_HightlightSelectedLink('cell_Transactions','defaultMenuGoal','selectedMenuGoalTabs','SourceMenuAction',0);">
              <span id="span_Transactions" class="onMouseOver">
                <xsl:text>Transactions</xsl:text>
              </span>
            </td>
            <td width="25%" id="cell_Columns" class="textCenter verticallyMiddle defaultMenuGoal"
                name="SourceMenuAction"
                onclick="portal_LoadSourceColumns('divTransactions','{$PortalItemID}','{$SourceID}');
                        goal_HightlightSelectedLink('cell_Columns','defaultMenuGoal','selectedMenuGoalTabs','SourceMenuAction',0);">
              <span id="span_Cols" class="onMouseOver">
                <xsl:text>Columns</xsl:text>
              </span>
            </td>
            <td width="25%" id="cell_Steps" class="textCenter verticallyMiddle defaultMenuGoal"
                name="SourceMenuAction"
                onclick="portal_LoadSourceSteps('divTransactions','{$PortalItemID}','{$SourceID}');
                        goal_HightlightSelectedLink('cell_Steps','defaultMenuGoal','selectedMenuGoalTabs','SourceMenuAction',0);">
              <span id="span_Steps" class="onMouseOver">
                <xsl:text>Steps</xsl:text>
              </span>
            </td>
            <td width="25%" id="cell_KeyLinks" class="textCenter verticallyMiddle defaultMenuGoal"
                name="SourceMenuAction"
                onclick="portal_LoadSourceKeyLinks('divTransactions','{$PortalItemID}','{$SourceID}');
                        goal_HightlightSelectedLink('cell_KeyLinks','defaultMenuGoal','selectedMenuGoalTabs','SourceMenuAction',0);">
              <span id="span_KeyLinks" class="onMouseOver">
                <xsl:text>Key Links</xsl:text>
              </span>
            </td>
          </table>
        </td>
      </tr>
    </table>
  </xsl:template>
</xsl:stylesheet>
