yavsc/web/Views/Blogs/PostActions.ascx
Paul Schneider a62cff223c Fixes
* style.css:
* style.css:
* UsersInRole.aspx: refactoring

* HomeController.cs: Fixes the restricted area error page

* PostActions.ascx: html structure

* TagControl.ascx: Tags reside in a list here, treat it as an Html one

* RestrictedArea.aspx: Shows allowed users or/and roles in the error
  page

* Web.csproj: cleaning
2015-11-18 00:30:07 +01:00

29 lines
1.2 KiB
Text

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BasePost>" %>
<% if (Membership.GetUser()!=null) { %>
<aside>
(<%= Model.Posted.ToString("D") %>
- <%= Model.Modified.ToString("D") %> <%= Model.Visible? "":", Invisible!" %>)
<%= Html.Partial("RateControl",Model)%>
<%
if (Membership.GetUser().UserName==Model.Author || Roles.IsUserInRole("Admin"))
{ %>
<%= Html.Partial("TagControl",Model)%>
<% if (Model is BlogEntry) { %>
<i class="fa fa-pencil"><%=Html.Translate("DoComment")%></i>
<% using (Html.BeginForm("Comment","Blogs")) { %>
<filedset>
<%=Html.Hidden("Author")%>
<%=Html.Hidden("Title")%>
<%=Html.TextArea("CommentText","")%>
<%=Html.Hidden("PostId",Model.Id)%>
<input type="submit" value="Poster un commentaire"/>
</filedset> <% } %>
<% } %>
<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>
<% } %>
</aside>
<% } %>