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
This commit is contained in:
parent
cec3ce2330
commit
a62cff223c
10 changed files with 60 additions and 21 deletions
|
|
@ -10,15 +10,14 @@
|
|||
<%= Html.Partial("TagControl",Model)%>
|
||||
<% if (Model is BlogEntry) { %>
|
||||
<i class="fa fa-pencil"><%=Html.Translate("DoComment")%></i>
|
||||
<aside class="control" class="hidden">
|
||||
<% 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"/>
|
||||
<% } %>
|
||||
</aside>
|
||||
</filedset> <% } %>
|
||||
<% } %>
|
||||
<a href="<%= Url.RouteUrl("Default", new { action = "EditId", postid = Model.Id })%>" class="actionlink">
|
||||
<i class="fa fa-pencil"><%=Html.Translate("Edit")%></i>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BasePost>" %>
|
||||
<p id="tags<%=Model.Id%>" data-postid="<%=Model.Id%>" class="fa fa-tag">
|
||||
<ul id="tags<%=Model.Id%>" data-postid="<%=Model.Id%>" class="editablelist ">
|
||||
<% if (Model.Tags != null) {
|
||||
foreach ( var tagname in Model.Tags) { %>
|
||||
<span class="tagname"><%=tagname%></span> <%
|
||||
<li class="tagname fa fa-tag"><%=tagname%></li> <%
|
||||
%><% } } %>
|
||||
</p>
|
||||
</ul>
|
||||
<% if (Membership.GetUser()!=null) { %>
|
||||
<% if (Membership.GetUser().UserName==Model.Author || Roles.IsUserInRole("Admin"))
|
||||
{ // grant all permissions: to choose a given set of tags, also create some new tags %>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue