﻿<?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 ="countNode" select ="count(Publications/Publication)"></xsl:variable>
        <!--<xsl:variable name ="FaceBookSrc" select ="Publications/FaceBookSrc"></xsl:variable>
        <xsl:variable name ="TwitterSrc" select ="Publications/TwitterSrc"></xsl:variable>-->
        <xsl:variable name ="UserID" select ="Publications/UserID"></xsl:variable>
        <xsl:variable name ="TemplateURL" select ="Publications/TemplateURL"></xsl:variable>
        <xsl:variable name ="Mode" select ="Publications/Mode"></xsl:variable>
        <xsl:variable name ="PublicationCount" select ="Publications/PublicationCount"></xsl:variable>
        <xsl:variable name ="HostName" select="normalize-space(Publications/HostName)"></xsl:variable>
        <div id="divgetInspired_Container" style="margin-top:10px;">
            <table cellpadding="5" cellspacing="5" width="100%">
                <tr>
                    <td>
                        <xsl:for-each select="Publications/Publication">
                            <table cellpadding="0" cellspacing="0" width="100%">
                                <tr>
                                    <td width="10%"></td>
                                    <td width="80%"></td>
                                    <td width="10%"></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td align="cnter">
                                        <div id="divGetInspiredImage" style="margin-top:25px;">
                                            <xsl:if test ="normalize-space(ImageURL) != ''">
                                                <a href="http://{$HostName}/Publication.aspx?ID={normalize-space(ItemID)}">
                                                    <center>
                                                        <img src="{ImageURL}" style="border: 0px; vertical-align: middle; display: none;"
                                                       onload='setWidthAndHeightImage(this,"80");'></img>
                                                    </center>
                                                </a>
                                            </xsl:if>
                                        </div>
                                    </td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td style="text-align:center;">
                                        <div id="divGetInspiredPublication" style="vertical-align:top;">
                                            <div id="divGetInspiredPublicationHeader">
                                                <span id="spanGetInspiredTitle">
                                                    <a class="link" href="http://{$HostName}/Publication.aspx?ID={normalize-space(ItemID)}">
                                                        <xsl:value-of select="Title"/>
                                                    </a>
                                                </span>
                                                <!--<xsl:if test ="PublicationLevel = 2">
                                                    <span id="spanGetInspiredSubTitle" class="labelItalic labelHeader">
                                                        (<xsl:value-of select="Subtitle"/>)
                                                    </span>
                                                </xsl:if >
                                                <xsl:if test ="PublicationLevel = 4">
                                                    <span id="spanGetInspiredSubTitle" class="labelItalic labelHeader">
                                                        (<xsl:value-of select="Subtitle"/>)
                                                    </span>
                                                </xsl:if>-->
                                            </div>
                                        </div>
                                    </td>
                                    <td></td>
                                </tr>
                                <!--<td valign="top">
                                    </td>
                                </tr>-->
                                <!--<tr>
                                        <td>
                                        </td>
                                        <td>
                                            <div id="divPromotionLink">
                                            </div>
                                        </td>
                                    </tr>-->
                            </table>
                        </xsl:for-each>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: center;">
                        <div id="divGetInspiredAds" style="vertical-align:top;margin-top:15px;">
                            <xsl:value-of select="Publications/AdHtml" disable-output-escaping="yes"/>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: center;">
                        <a class="link" href="http://{$HostName}/ListPublications.aspx">
                            View All Publications
                        </a>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: center;">
                        <a class="link" href="http://{$HostName}/ListCommunities.aspx">
                            View All Communities
                        </a>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: center;">
                        <a class="link" href="http://{$HostName}/ListTemplates.aspx">
                            View All Templates
                        </a>
                    </td>
                </tr>
            </table>
        </div>
    </xsl:template>
</xsl:stylesheet>
