<%@ Page Title="Billet" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/App.master"%> <% Title = Model.Title+" - "+((string) ((Profile)ViewData["BlogUserProfile"]).BlogTitle) ; %>

<%= Html.ActionLink(Model.Title,"UserPost",new{user=Model.UserName,title=Model.Title}) %> - <% if ((bool)ViewData["HasAvatar"]) { %> <%=Model.UserName%> <%=ViewData["BlogTitle"]%> <% } else { %> <%=Html.Encode(ViewData["BlogTitle"])%> <% } %>

<% BBCodeHelper.Init(); %> <%= BBCodeHelper.Parser.ToHtml(Model.Content) %>
<% string username = ""; if (Membership.GetUser()!=null) username = Membership.GetUser().UserName; %> <% foreach (var c in (Comment[])ViewData["Comments"]) { %>
<%=c.From%> <%= BBCodeHelper.Parser.ToHtml(c.CommentText) %> <% if ( username == Model.UserName || c.From == username ) { %> <%= Html.ActionLink("Supprimer","RemoveComment", new { cmtid = c.Id } , new { @class="actionlink" })%> <% } %>
<% } %>
<% using (Html.BeginForm("Comment","Blogs")) { %> <%=Html.Hidden("UserName")%> <%=Html.Hidden("Title")%> <%=Html.TextArea("CommentText","")%> <%=Html.Hidden("PostId",Model.Id)%> <% } %>
<% if (Membership.GetUser()!=null) if (Membership.GetUser().UserName==Model.UserName) { %> <%= Html.ActionLink("Editer","Edit", new { user = Model.UserName, title = Model.Title }, new { @class="actionlink" }) %> <%= Html.ActionLink("Supprimer","RemovePost", new { user = Model.UserName, title = Model.Title }, new { @class="actionlink" } ) %> <% } %>