<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="SocialMessage.ascx.vb" Inherits="WebFoundations.WFWorkflow.UI.SocialMessage" %>
<%@ Register Namespace="WebFoundations.WFPortal.Controls" Assembly="WebFoundations.WFPortal.Controls" TagPrefix="wf" %>

<article id="<%=ClientID%>">
    <wf:UserAvatar runat="server" rel="author" ID="avatar" AlwaysShowPhoto="true" />
    <h5><asp:Literal runat="server" ID="lTitle" /><asp:Literal ID="lTime" runat="server" /><asp:Label runat="server" ID="lSubject" CssClass="subject" /></h5>
    <p><asp:Literal ID="lMessage" runat="server" /></p>
    <menu class="actions" type="list">
        <li><asp:LinkButton runat="server" ID="lnkLike" OnClick="Like_Click" /></li>
        <li><asp:LinkButton runat="server" ID="lnkComments" OnClick="Comments_Click" /></li>
        <li><asp:LinkButton runat="server" ID="lnkUnread" OnClick="Unread_Click" /></li>
        <li><asp:LinkButton runat="server" ID="lnkFlagged" OnClick="Flag_Click" /></li>
        <li><asp:LinkButton runat="server" ID="lnkRemove" OnClick="Remove_Click" /></li>
    </menu>

    <asp:PlaceHolder runat="server" ID="phComments" Visible="false">
        <asp:PlaceHolder runat="server" ID="phLoadAll" Visible="false">
            <aside class="load load-previous">
                <asp:LinkButton runat="server" Text="Visualizar comentários anteriores" ID="lnkLoadPrevious" OnClick="LoadPrevious_Click" />
            </aside>
        </asp:PlaceHolder>

        <asp:Repeater runat="server" ID="rptComments">
            <ItemTemplate>
                <article>
                    <wf:UserAvatar runat="server" rel="author" ID="msgCommentAvatar" AlwaysShowPhoto="true" />
                    <asp:Literal runat="server" ID="msgComment" />
                    <asp:LinkButton runat="server" ID="lnkRemoveComment" CssClass="remove" OnClick="RemoveComment_Click" />
                </article>
            </ItemTemplate>
        </asp:Repeater>

        <aside class="comment">
            <asp:TextBox runat="server" ID="txtComment" TextMode="MultiLine" placeholder="Escreva um comentário..." />
            <asp:RequiredFieldValidator ControlToValidate="txtComment" Display="Dynamic" runat="server" Text="*" ValidationGroup="comment" />
            <asp:Button runat="server" ID="bntComment" Text="Comentar" OnClick="Comment_Click" ValidationGroup="comment" />
        </aside>
    </asp:PlaceHolder>
</article>
