refactoring
This commit is contained in:
parent
347ffc8a5a
commit
b5d19c5da6
38 changed files with 149 additions and 117 deletions
31
web/Views/Admin/Admin.aspx
Normal file
31
web/Views/Admin/Admin.aspx
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<%@ Page Title="Liste des administrateurs" Language="C#" Inherits="System.Web.Mvc.ViewPage<NewAdminModel>" MasterPageFile="~/Models/App.master" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
<div>
|
||||
|
||||
<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 })%>
|
||||
</td></tr>
|
||||
|
||||
<% } %>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h2>Ajout d'un administrateur
|
||||
</h2>
|
||||
<p><%= Html.ValidationSummary() %> </p>
|
||||
|
||||
<% using ( Html.BeginForm("Admin", "Admin") ) { %>
|
||||
|
||||
<%= Html.LabelFor(model => model.UserName) %> :
|
||||
<%= Html.DropDownListFor(model => model.UserName, (List<SelectListItem>)ViewData["useritems"] ) %>
|
||||
<%= Html.ValidationMessage("UserName", "*") %>
|
||||
|
||||
<input type="submit"/>
|
||||
<% } %>
|
||||
|
||||
</div>
|
||||
</asp:Content>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue