yavsc/web/Views/Blogs/PostActions.ascx

29 lines
1.2 KiB
Text
Raw Normal View History

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BasePost>" %>
2015-11-17 22:22:59 +01:00
<% if (Membership.GetUser()!=null) { %>
<aside>
(<%= Model.Posted.ToString("D") %>
- <%= Model.Modified.ToString("D") %> <%= Model.Visible? "":", Invisible!" %>)
2015-11-17 22:22:59 +01:00
<%= Html.Partial("RateControl",Model)%>
<%
if (Membership.GetUser().UserName==Model.Author || Roles.IsUserInRole("Admin"))
{ %>
2015-11-17 22:22:59 +01:00
<%= Html.Partial("TagControl",Model)%>
<% if (Model is BlogEntry) { %>
2015-10-19 21:41:13 +02:00
<i class="fa fa-pencil"><%=Html.Translate("DoComment")%></i>
<% using (Html.BeginForm("Comment","Blogs")) { %>
<filedset>
2015-10-19 21:41:13 +02:00
<%=Html.Hidden("Author")%>
<%=Html.Hidden("Title")%>
<%=Html.TextArea("CommentText","")%>
<%=Html.Hidden("PostId",Model.Id)%>
<input type="submit" value="Poster un commentaire"/>
</filedset> <% } %>
2015-10-19 21:41:13 +02:00
<% } %>
2015-11-17 22:22:59 +01:00
<a href="<%= Url.RouteUrl("Default", new { action = "EditId", postid = Model.Id })%>" class="actionlink">
<i class="fa fa-pencil"><%=Html.Translate("Edit")%></i>
</a>
<a href="<%= Url.RouteUrl("Default", new { action = "RemovePost", postid = Model.Id })%>" class="actionlink">
<i class="fa fa-remove"><%=Html.Translate("Remove")%></i></a>
2015-11-17 22:22:59 +01:00
<% } %>
</aside>
2015-11-17 22:22:59 +01:00
<% } %>