﻿<?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:import href="AutoSuggestVer11.xslt"/>
    <xsl:import href="../ShareITDataList.xslt"/>

    <xsl:output method="xml" indent="yes"/>

    <xsl:template name="ParticipantsShareIT">
        <xsl:param name="SourceID" select="'N/A'"></xsl:param>
        <xsl:param name="Origin" select="'N/A'"></xsl:param>
        <xsl:param name="ShareITRecords" select="'N/A'"></xsl:param>
        <xsl:param name="Permissions" select="'N/A'"></xsl:param>

        <xsl:variable name="ParticipantsCount">
            <xsl:value-of select="count($ShareITRecords/ShareIT[Participant = 1])"/>            
        </xsl:variable>
       


        <div id="div_shareIt_{$SourceID}_participants" style="margin-top: 10px;">
            <div  style="margin-left: 10px; margin-bottom:3px;">
                <span class="labelHeader" style="margin-left:2px;">
                    Participants
                </span>
                <div>
                    <span class="labelHeader" style="margin-left:2px;font-size:9pt;">
                        People who see this goal in their own list
                    </span>
                </div>                
            </div>


            <div id="div_shareIt_{$SourceID}_participants_ListShareITData" class="tableLocal" style="margin-left:10px;height:100px;overflow-y: scroll">
                <xsl:call-template name="ShareItDataList">
                    <xsl:with-param name="ShareITRecords" select="$ShareITRecords/."></xsl:with-param>
                    <xsl:with-param name="SourceID" select="$SourceID"></xsl:with-param>
                    <xsl:with-param name="Origin">
                        <xsl:text>ParticipantsShareIt</xsl:text>
                    </xsl:with-param>
                    <xsl:with-param name="DisplayPermission">
                        <xsl:number value="1"/>
                    </xsl:with-param>
                    <xsl:with-param name="Permissions" select="$Permissions/."></xsl:with-param>
                    <xsl:with-param name="RootDivID">
                        <xsl:text>div_shareIt_</xsl:text>
                        <xsl:value-of select="$SourceID"></xsl:value-of>
                        <xsl:text>_participants</xsl:text>
                    </xsl:with-param>
                </xsl:call-template>
            </div>

            <xsl:call-template name="AutoSuggestVer11">
                <xsl:with-param name="SourceID" select="$SourceID"></xsl:with-param>
                <xsl:with-param name="TargetDivID">
                    <xsl:text>div_shareIt_</xsl:text>
                    <xsl:value-of select="$SourceID"/>
                    <xsl:text>_participants</xsl:text>
                </xsl:with-param>
                <xsl:with-param name="Origin">
                    <xsl:text>ParticipantsShareIt</xsl:text>
                </xsl:with-param>
            </xsl:call-template>
        </div>
    </xsl:template>
</xsl:stylesheet>
