﻿<?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="LifeSpace" select="AjaxRequest/CommunityData/Community/LifeSpace"/>
        <xsl:variable name="LifeSpaceID" select="AjaxRequest/CommunityData/Community/LifeSpaceID"/>
        <xsl:variable name="ItemID" select="AjaxRequest/CommunityData/Community/ItemID"/>
        <xsl:variable name="Section" select="AjaxRequest/CommunityData/Community/Section"/>
        <xsl:variable name="Community" select="AjaxRequest/CommunityData/Community/Community"/>
        <xsl:variable name="ImageURL" select="AjaxRequest/CommunityData/Community/ImageURL"/>
        <xsl:variable name="TemplateURL" select="AjaxRequest/TemplateURL" />

        <div style="border: 2px solid #385D8A;">
            <table class="tableMaster" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td align="left" rowspan="2">
                        <xsl:if test="$ImageURL != ''">
                            <img id="imgCommunity" style="display:none;" src="{$ImageURL}" onload='setWidthAndHeightImage(this,"100");'
                                onerror="setWidth(this);" />
                        </xsl:if>
                    </td>
                    <h1 style="display: inline; vertical-align: text-top; vertical-align: top;">
                        <td width="100%">
                            <!--<div id="divHeader" align="left" style="padding-left: 10px; padding-top: 2px;">
                                <span style="font-family: Calibri, Verdana, Arial; font-size: 14pt; font-weight: bold; color: #17375E;">
                                    <xsl:value-of select="$LifeSpace"></xsl:value-of> :
                                    <xsl:value-of select="$Section"></xsl:value-of> :
                                </span>
                                <b>
                                    <a class="link" style="font-size: 14pt;"
                                       onmouseover="this.style.textDecoration='underline';"
                                       onmouseout="this.style.textDecoration='none';"
                                       href="http://{AjaxRequest/HostName}/Community.aspx?ID={$ItemID}">
                                        <xsl:value-of select="$Community"></xsl:value-of>
                                    </a>

                                </b>
                            </div>-->
                            <div id="divHeader" align="left" style="padding-left: 10px; padding-top: 2px;">
                                <a class="link" href="http://{normalize-space(AjaxRequest/HostName)}/Community.aspx?ID={$ItemID}">
                                    <h1 onmouseover="this.style.textDecoration='underline';"
                                   onmouseout="this.style.textDecoration='none';"
                                        style="margin:0px;font-size: 14pt; font-weight: bold;">
                                        <xsl:value-of select="$LifeSpace"></xsl:value-of> :
                                        <xsl:value-of select="$Section"></xsl:value-of> :
                                        <xsl:value-of select="$Community"></xsl:value-of>
                                    </h1>
                                </a>
                            </div>
                        </td>
                    </h1>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <center>
                            <table>
                                <tr>
                                    <td style="padding-left: 20px; padding-right: 20px;">
                                        <div align="center">
                                            <a id="linkFollowIt" href="#"
                                               onclick="return followCommunity('{$ItemID}'
                                                            , 'divOperations', 'Community');">
                                                <img class="link" style="border: 0;"
                                                     onload='setWidthAndHeightImage(this,"35");'
                                                     src="{$TemplateURL}Web/Images/FollowIt.jpg" />
                                                <div></div>
                                                <span class="labelHeader">Follow It</span>
                                            </a>
                                        </div>
                                    </td>
                                    <td style="padding-left: 20px; padding-right: 20px;">
                                        <div align="center">
                                            <a id="linkAddContent" href="#"
                                               onclick="return Community_AddContentWithBox('{$ItemID}'
                                                            , 'divOperations', 0);">
                                                <img class="link" style="border: 0;"
                                                      onload='setWidthAndHeightImage(this,"35");'
                                                      src="{$TemplateURL}Web/Images/AddContent.jpg" />
                                                <div>
                                                </div>
                                                <span class="labelHeader">Add Content</span>
                                            </a>
                                        </div>
                                    </td>
                                    <td style="padding-left: 20px; padding-right: 20px;">
                                        <div align="center">
                                            <a id="lnkCreateGoal" class="link" href="http://{normalize-space(AjaxRequest/HostName)}/CreateGoal.aspx?ID={$LifeSpaceID}">
                                                <img class="link" style="border: 0;"
                                                      onload='setWidthAndHeightImage(this,"35");'
                                                      src="{$TemplateURL}Web/Images/CreateGoal.jpg"/>
                                                <div></div>
                                                <span class="labelHeader">Create Goal</span>
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </center>
                    </td>
                </tr>
            </table>
        </div>
    </xsl:template>
</xsl:stylesheet>
