Merge from booking branch

This commit is contained in:
2015-11-17 22:22:59 +01:00
parent 25906d0227
commit 9a2652739b
266 changed files with 12929 additions and 2433 deletions

View File

@ -1,11 +0,0 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%= Html.ValidationSummary() %>
<% using(Ajax.BeginForm())
{ %>
Nom du rôle :
<%= Html.TextBox( "RoleName" ) %>
<%= Html.ValidationMessage("RoleName", "*") %><br/>
<input class="actionlink" type="submit"/>
<% } %>

View File

@ -9,7 +9,6 @@ Nom du rôle :
<%= Html.ValidationMessage("RoleName", "*") %><br/>
<input class="actionlink" type="submit"/>
<% } %>
<%= Html.Partial("AddMemberToRole")%>
</asp:Content>

View File

@ -6,7 +6,10 @@
<table>
<% foreach (string u in (string[])ViewData["admins"]) { %>
<tr><td>
<%= u %> </td><td><%= Html.ActionLink("Remove","RemoveFromRole",new { username = u, rolename="Admin", returnUrl = Request.Url.PathAndQuery })%>
<%= u %> </td><td>
<%= Html.ActionLink("Remove","RemoveFromRole",
new { username = u, rolename="Admin", returnUrl = Request.Url.PathAndQuery })%>
</td></tr>
<% } %>

View File

@ -1,4 +1,6 @@
<%@ Page Title="Liste des rôles" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/AppAdmin.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
Roles:
<ul>

View File

@ -6,8 +6,18 @@
<ul>
<%foreach (MembershipUser user in Model){ %>
<li><%=user.UserName%> (created <%=user.CreationDate.ToString("D")%>) <%=user.Email%> <%=(user.IsApproved)?"":"("+LocalizedText.Not_Approuved+")"%> <%=user.IsOnline?LocalizedText.Online:LocalizedText.Offline%>
<br>
Roles :
<ul>
<%foreach (string role in Roles.GetRolesForUser(user.UserName)){ %>
<li><%=role%></li>
<% } %>
</ul>
<% if (Roles.IsUserInRole("Admin")) { %>
<%= Html.ActionLink(LocalizedText.Remove,"RemoveUser", new { username = user.UserName }, new { @class="actionlink" } ) %>
<%= Html.ActionLink(LocalizedText.Remove,"RemoveUser", new { username = user.UserName, returnUrl = Request.Url.PathAndQuery }, new { @class="actionlink" } ) %>
<%= Html.ActionLink("Blogger","AddUserToRole", new { username = user.UserName, rolename="Blogger", returnUrl = Request.Url.PathAndQuery }, new { @class="actionlink" } ) %>
<% } %>
</li><% }%>
</ul>

View File

@ -1,11 +1,21 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title></title>
</head>
<body>
<div>
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" Title="UsersInRoleOf" MasterPageFile="~/Models/AppAdmin.master" %>
<asp:Content ContentPlaceHolderID="init" ID="init1" runat="server">
<% ViewState["orgtitle"] = string.Format ( LocalizedText.UsersInRole , Html.Encode(ViewData["RoleName"])); %>
<% Page.Title = ViewState["orgtitle"] + " - " + YavscHelpers.SiteName; %>
</div>
</body>
</asp:Content>
<asp:Content ContentPlaceHolderID="overHeaderOne" ID="header1" runat="server">
<h1><a href="<%= Url.RouteUrl("Default", new { action = "UsersInRole", RoleName = ViewData["RoleName"] } )%>">
<%=ViewState["orgtitle"]%></a>
- <a href="<%= Url.RouteUrl("Default",new {controller="Home" }) %>"><%= YavscHelpers.SiteName %></a>
</h1>
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<ul>
<%foreach (string username in (string[]) ViewData["UsersInRole"]){ %>
<li><%= username %></li>
<% } %>
</ul>
<%= Html.Partial("AddUserToRole") %>
</asp:Content>