﻿<?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:apply-templates select ="Notes/Note"/>
    </xsl:template>
    <xsl:template match="Note">
        <xsl:variable name ="TemplatePathURL">
            <xsl:value-of select="../../Notes/TemplateURL"/>
        </xsl:variable>
        <div id="div_Reply_{normalize-space(ItemID)}">
            <div>
                <span class="notesFrom">
                    <xsl:value-of select ="FirstName"/>&#xa0;
                    <xsl:value-of select ="LastName"/> Wrote on <xsl:value-of select ="NoteDateTime"/>
                </span>
            </div>
            <div class="noteSeperator">
                <span class="label" wrap="true">
                    <xsl:apply-templates select ="NoteDesc"></xsl:apply-templates>
                </span>
                <img src="{normalize-space($TemplatePathURL)}Web/Images/big_spacer.gif"></img>
                <a href="#" class="link" onClick='return Notes_DeleteNote("{normalize-space(ItemID)}", "div_Reply_{normalize-space(ItemID)}");'>
                    Delete
                </a>
            </div>
        </div>
    </xsl:template>

    <xsl:template match ='NoteDesc'>
        <xsl:call-template name='break'></xsl:call-template>
    </xsl:template>

    <xsl:include href="GenericTemplates/Notes_LineBreak.xslt"/>
</xsl:stylesheet>