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
|
|
@ -11,11 +11,10 @@
|
|||
</h1>
|
||||
</asp:Content>
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
<ul>
|
||||
<ul class="editablelist userlist">
|
||||
<%foreach (string username in (string[]) ViewData["UsersInRole"]){ %>
|
||||
<li><%= username %></li>
|
||||
<% } %>
|
||||
</ul>
|
||||
|
||||
<%= Html.Partial("AddUserToRole") %>
|
||||
</asp:Content>
|
||||
|
|
@ -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 %>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogEntryCollection>" MasterPageFile="~/Models/App.master"%>
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
Ce contenu est d'accès restreint : <<%= Html.Encode(ViewData["ControllerName"]) %>/<%= Html.Encode(ViewData["ActionName"]) %>>
|
||||
Ce contenu est d'accès restreint :<br>
|
||||
<<%= Html.Encode(ViewData["ControllerName"]) %>/<%= Html.Encode(ViewData["ActionName"]) %>><br>
|
||||
|
||||
Demandez à l'administrateur les autorisations suffisantes pour accèder à cet emplacement.
|
||||
|
||||
Ci après les tièrces parties autorisée actuellement :<br>
|
||||
|
||||
Roles autorisés :<%= Html.Encode(ViewData["Roles"]) %><br>
|
||||
Utilisateurs autorisés :<%= Html.Encode(ViewData["Users"]) %><br>
|
||||
</asp:Content>
|
||||
Loading…
Add table
Add a link
Reference in a new issue