<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="/topic_show">
    <table width="100%" cellpadding="4" cellspacing="0">
      <xsl:apply-templates select="Reply"></xsl:apply-templates>
    </table>
  </xsl:template>

  <!-- one Reply -->
  <xsl:template match="Reply">
    <tr>
      <td>
        <table width="100%" cellspacing="0" cellpadding="0" style="border-collapse:collapse;border:1px solid #B8D7F3;" border="1">
          <tr  style="height:32px; background: url(/forum/template/communityserver/header_bg.jpg) repeat-x scroll left top ;color:white;">
            <td style="padding:6px;"  colspan="2">
              <img src="/forum/template/communityserver/icon_post.gif"/>&#160;
              <b>
                <xsl:value-of select="PostedDate"/>
              </b>
            </td>
          </tr>
          <tr>
            <td valign="top" style="width:20%;padding:6px;background-color:#F4F4F4;">
              <table width="100%">
                <tr>
                  <td align="center">
                    <a style="color:#617D78">
                      <xsl:attribute name="href">
                        <xsl:value-of select="url_profile"></xsl:value-of>
                      </xsl:attribute>
                      <img src="/forum/template/communityserver/icon_post.gif" border="0"/>&#160;
                      <b>
                        <xsl:value-of select="UserName"></xsl:value-of>
                      </b>
                    </a>
                  </td>
                </tr>
                <tr>
                  <td style="height:60px;text-align:center;">
                    <xsl:if test="ImageUrl!='/images/noimage.gif'">
                      <a>
                        <xsl:attribute name="href">
                          <xsl:value-of select="url_profile"/>
                        </xsl:attribute>
                        <img border="0" width="100">
                          <xsl:attribute name="src">
                            <xsl:value-of select="ImageUrl"></xsl:value-of>
                          </xsl:attribute>
                        </img>
                      </a>
                    </xsl:if>
                  </td>
                </tr>
                <tr>
                  <td align="center">
                    <img src="/forum/template/communityserver/rank.gif"/>
                  </td>
                </tr>
                <tr>
                  <td align="center">
                    <xsl:value-of select="Posts"></xsl:value-of>&#xa0; bài
                  </td>
                </tr>
                <tr>
                  <td align="center">
                    <xsl:value-of select="Slogan"></xsl:value-of>
                  </td>
                </tr>
              </table>
            </td>
            <td valign="top">
              <table width="100%" cellspacing="0" cellpadding="0" style="border-color:#B8D7F3">
                <tr>
                  <td style="background-color:#DDDDDD;height:40px;">
                    <table cellpadding="6" cellspacing="0" width="100%">
                      <tr>
                        <td style="color:#020202"><b>Trả lời</b></td>
                        <td align="right">
                          <!--edit-->
                          <xsl:if test="url_edit!=''">
                            <a style="background-color:#EEEEEE;color:#020202;border:1px solid #999999;padding:4px;">
                              <xsl:attribute name="href">
                                <xsl:value-of select="url_edit"></xsl:value-of>
                              </xsl:attribute>
                              <xsl:attribute name="alt">Sửa bài viết</xsl:attribute>
                              <img src="/forum/template/communityserver/edit.gif" border="0"/>
                              <b>Sửa</b>
                            </a>
                          </xsl:if>
                          &#xa0;
                          <!-- quote -->
                          <xsl:if test="url_quote!=''">
                            <a style="background-color:#EEEEEE;color:#020202;border:1px solid #999999;padding:4px;">
                              <xsl:attribute name="href">
                                <xsl:value-of select="url_quote"></xsl:value-of>
                              </xsl:attribute>
                              <xsl:attribute name="alt">Trích dẫn bài viết này</xsl:attribute>
                              <img src="/forum/template/communityserver/edit.gif" border="0"/>
                              <b>Trích</b>
                            </a>
                          </xsl:if>
                        </td>
                      </tr>
                    </table>
                  </td>
                </tr>
                <tr>
                  <td style="padding:6px;">
                    <xsl:value-of select="Content" disable-output-escaping="yes"></xsl:value-of>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td style="height:12px;">
      </td>
    </tr>
  </xsl:template>
</xsl:stylesheet> 

