<%@ Page Title="" Language="C#" MasterPageFile="~/base.master" AutoEventWireup="true" CodeFile="ver_post.aspx.cs" Inherits="ver_post" %>

<asp:Content ID="head" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="content" ContentPlaceHolderID="content" runat="Server">
    <div class="post">
        <hr />
        <h1><asp:Literal ID="title_literal" runat="server" /> <small class="text-muted">Por: <asp:Literal ID="author_literal" runat="server" /></small></h1>
        <p class="lead">
            <asp:LinkButton ID="upvotes_button" OnClick="OnUpvoteClick" runat="server"/>
            <asp:LinkButton ID="downvotes_button" OnClick="OnDownvoteClick" runat="server"/>
        </p>
        <hr />
        <asp:Literal ID="html_literal" runat="server" />
        <asp:button ID="editar_button" CssClass="btn btn-primary" OnClick="OnEditarClick" Text="Editar" runat="server"/>
        <asp:Button ID="delete_button" CssClass="btn btn-danger" OnClick="OnDeleteClick" Text="Eliminar" runat="server" />
        <div id="comment_div" runat="server">
            <hr />
            <h5>Comentar</h5>
            <div class="form-group">
                <asp:TextBox ID="comment_box" CssClass="form-control" TextMode="MultiLine" Rows="3" runat="server" />
                <asp:RequiredFieldValidator ControlToValidate="comment_box" Display="Dynamic" EnableClientScript="false" runat="server" />
            </div>
            <asp:Button ID="comentar" CssClass="btn btn-primary" Text="Comentar" OnClick="OnComentarClick" runat="server" />
        </div>
        <hr />
        <h5>Comentarios</h5>
        <asp:Repeater ID="comment_repeater" runat="server">
            <ItemTemplate>
                <div class="comment">
                    <hr />
                    <p class="lead">
                        <%# Eval("user.username") %>
                        <asp:Button CommandArgument='<%# Eval("id") + "-" + Eval("user.id")%>' Text="Eliminar" OnClick="OnDeleteCommentClick" CssClass="btn btn-outline-danger btn-sm" runat="server"/>
                    </p>
                    <p><%# Eval("html") %></p>
                </div>
            </ItemTemplate>
        </asp:Repeater>
    </div>
</asp:Content>
<asp:Content ID="script" ContentPlaceHolderID="script" runat="Server">
</asp:Content>

