﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
         <xsl:variable name ="BrandID" select="normalize-space(BrandLocations/BrandID)"></xsl:variable>
         <xsl:variable name ="SelectedBrandTabID" select="normalize-space(BrandLocations/SelectedBrandTabID)"></xsl:variable>
         <xsl:variable name="IsAuthenticated" select="normalize-space(BrandLocations/IsAuthenticated)"></xsl:variable>
         <xsl:variable name="UserPermission" select="normalize-space(BrandLocations/UserPermission)"></xsl:variable>
         <xsl:variable name="IsCommunityAdmin" select="normalize-space(BrandLocations/IsCommunityAdmin)"></xsl:variable>
         <xsl:variable name="TimeStamp" select="normalize-space(BrandLocations/TimeStamp)"></xsl:variable>
         
        <div id="divLocationsData" style="margin-left:10px;margin-right:10px;margin-top:2px;margin-bottom:2px;background-color:White;">
            <div id="divHeaderHTMLContainer" style="margin:15px;">
                <xsl:value-of select ="BrandLocations/HeaderHTML" disable-output-escaping ="yes"/>
            </div>
             <div class="borderStanderd brandHeaderBorder" id="divLocationsContent">
                  <table cellpadding="0" cellspacing="0" width="100%"
                         style="padding-left:10px;padding-right:10px;padding-top:2px;padding-bottom:2px;background-color:White;">
                       <tr>
                            <td>
                                 <span class="labelSize12">Location Name</span>
                            </td>
                            <td>
                                 <span class="labelSize12">Address 1</span>
                            </td>
                            <td>
                                 <span class="labelSize12">Address 2</span>
                            </td>
                            <!--<td>
                                 <span class="labelSize12">Address 3</span>
                            </td>-->
                            <td>
                                 <span class="labelSize12">City</span>
                            </td>
                            <td>
                                 <span class="labelSize12">State</span>
                            </td>
                            <td>
                                 <span class="labelSize12">Postal Code</span>
                            </td>
                            <td>
                                 <span class="labelSize12">Country</span>
                            </td>
                            <td>
                                 <span class="labelSize12">Primary Phone</span>
                            </td>
                       </tr>
                       <xsl:for-each select ="BrandLocations/BrandLocation">
                            <tr>
                                 <td>
                                      <span class="label">
                                           <xsl:value-of select ="LocationName"></xsl:value-of>
                                      </span>
                                 </td>
                                 <td>
                                      <span class="label">
                                           <xsl:value-of select ="Address1"></xsl:value-of>
                                      </span>
                                 </td>
                                 <td>
                                      <span class="label">
                                           <xsl:value-of select ="Address2"></xsl:value-of>
                                      </span>
                                 </td>
                                 <!--<td>
                                      <span class="label">
                                           <xsl:value-of select ="Address3"></xsl:value-of>
                                      </span>
                                 </td>-->
                                 <td>
                                      <span class="label">
                                           <xsl:value-of select ="City"></xsl:value-of>
                                      </span>
                                 </td>
                                 <td>
                                      <span class="label">
                                           <xsl:value-of select ="State"></xsl:value-of>
                                      </span>
                                 </td>
                                 <td>
                                      <span class="label">
                                           <xsl:value-of select ="PostalCode"></xsl:value-of>
                                      </span>
                                 </td>
                                 <td>
                                      <span class="label">
                                           <xsl:value-of select ="Country"></xsl:value-of>
                                      </span>
                                 </td>
                                 <td>
                                      <span class="label">
                                           <xsl:value-of select ="PhoneMain"></xsl:value-of>
                                      </span>
                                 </td>
                            </tr>
                       </xsl:for-each>
                  </table>
                  <div id="divTextBoxLocationsTab" style="padding: 20px;display: block;">
                       <input id="txtAddLocation" class="textAreaGoal" value="Add new location here..."
                              onClick='return Brand_DisplayAddLocation("{$BrandID}", "divAddBrandLocation","divTextBoxLocationsTab");'/>
                  </div>
                  <div id="divAddBrandLocation" style="padding: 20px;display: none;">
                       
                  </div>
             </div>
            <div id="divFooterHTMLContainer" style="margin:15px;">
                <xsl:value-of select ="BrandLocations/FooterHTML" disable-output-escaping ="yes"/>
            </div>
        </div>
    </xsl:template>
</xsl:stylesheet>
