﻿<?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="AddTemplateSummary">
        <xsl:param name="TemplateItemID" select="'N/A'"></xsl:param>
        <xsl:param name="BrandID" select="'N/A'"></xsl:param>
        <xsl:param name="TemplateURL" select="'N/A'"></xsl:param>


        <div id="div_TemplateSummary">
            <table class="tableMaster">
                <tr>
                    <td>
                        <div id="div_AddTopicButton" >
                            <div class="verticallyMiddle onMouseOver divBrowseGradient spanBrowseGradientTextGray textCenter" style="width:70px;line-height:25px;"
                                 onclick="return ClientPortal_DisplayAddNewTemplateTopic('div_AddTopicButton','div_AddNewTopic','txt_{$TemplateItemID}_Topic');">

                                <span id="span_SaveTopic" class="capitalFont">Add Topic</span>
                            </div>
                        </div>
                        <div id="div_AddNewTopic" style="display:none;border:2px solid rgb(217, 217, 217);padding:10px;">
                            <table>
                                <tr>
                                    <td width="20%" style="margin-bottom:10px;">
                                        <span class="publicationSummary">
                                            Topic
                                        </span>
                                    </td>
                                    <td>
                                        <input id="txt_{$TemplateItemID}_Topic" type="text" class="text"
                                               onblur="clientPortal_autoPopulateTopicKey('{$TemplateItemID}','txt_{$TemplateItemID}_Topic','txt_{$TemplateItemID}_Key');"></input>
                                    </td>
                                </tr>
                                <tr style="display:none;">
                                    <td>
                                        <span class="publicationSummary">
                                            Key
                                        </span>
                                    </td>
                                    <td>
                                        <input id="txt_{$TemplateItemID}_Key" type="text" class="text"></input>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <span class="publicationSummary">
                                            Sort
                                        </span>
                                    </td>
                                    <td>
                                        <input id="txt_{$TemplateItemID}_Sort" type="text" class="text" style="width:60px;"
                                               onBlur="numberOnly('txt_{$TemplateItemID}_Sort');"></input>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <div class="verticallyMiddle onMouseOver divBrowseGradient spanBrowseGradientTextGray textCenter" style="width:60px;line-height:20px;"
                                                 onclick="clientPortal_saveTemplateTopic('txt_{$TemplateItemID}_Topic',
                                                                                        'txt_{$TemplateItemID}_Sort',
                                                                                        '{$TemplateItemID}',
                                                                                        'div_TemplateTopics','{$BrandID}','txt_{$TemplateItemID}_Key');">

                                            <span id="span_SaveTopic" class="capitalFont">Save</span>
                                        </div>
                                    </td>
                                    <td>
                                        <div class="verticallyMiddle onMouseOver divBrowseGradient spanBrowseGradientTextGray textCenter" style="width:60px;line-height:20px;"
                                                 onclick="ClientPortal_DisplayAddNewTemplateTopic('div_AddNewTopic','div_AddTopicButton','txt_{$TemplateItemID}_Topic');">
                                            <span id="span_CancelTopic" class="capitalFont">Cancel</span>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
    </xsl:template>
</xsl:stylesheet>
