﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:variable name ="CommunityGroupUser" select="Surveys/CommunityGroupUser"></xsl:variable>
    <xsl:template match="/">

        <div style="padding:10px;">
            <xsl:if test ="$CommunityGroupUser = 'True'">
                <xsl:for-each select ="/Surveys/Survey">
                    <div style="padding:5px;text-align:left;" class="label">
                        <div style="padding-left:220px;">
                            <a
                                style="font-weight:bold;"
                                class="ArticleFont" href="http://{../HostName}/SurveyAnswers.aspx?ID={ItemSurveyID}">
                                <xsl:value-of select ="DisplayName"/>.&#xa0;&#xa0;&#xa0;<xsl:value-of select ="SurveyDate"/>
                            </a>
                        </div>
                    </div>
                </xsl:for-each>
            </xsl:if>
            <xsl:if test ="$CommunityGroupUser != 'True'">
                <b>
                    <div style="margin-top:50px;height:100px;text-aligne:center;color:red" class='label'>
                        You are not authorized to view this page.
                    </div>
                </b>
            </xsl:if>

        </div>

    </xsl:template>
</xsl:stylesheet>
