Merge from booking branch
This commit is contained in:
parent
25906d0227
commit
9a2652739b
266 changed files with 12833 additions and 2337 deletions
15
booking/Views/Admin/AddRole.aspx
Normal file
15
booking/Views/Admin/AddRole.aspx
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<%@ Page Title="Ajout d'un role" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/AppAdmin.master" %>
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
|
||||
<%= Html.ValidationSummary() %>
|
||||
<% using(Html.BeginForm())
|
||||
{ %>
|
||||
Nom du rôle :
|
||||
<%= Html.TextBox( "RoleName" ) %>
|
||||
<%= Html.ValidationMessage("RoleName", "*") %><br/>
|
||||
<input class="actionlink" type="submit"/>
|
||||
<% } %>
|
||||
<%= Html.Partial("AddMemberToRole")%>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
14
booking/Views/Admin/AddUserToRole.ascx
Normal file
14
booking/Views/Admin/AddUserToRole.ascx
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
|
||||
<%= Html.ValidationSummary() %>
|
||||
<% using(Ajax.BeginForm("AddUserToRole", "Admin", new AjaxOptions() { UpdateTargetId = "roleaddedresult" }))
|
||||
{ %>
|
||||
<fieldset>
|
||||
<div id="roleaddedresult"></div>
|
||||
<label for="UserName" >Utilisateur : </label><input type="text" name="UserName" id="UserName">
|
||||
<%= Html.ValidationMessage("UserName", "*") %><br/>
|
||||
<label for="RoleName" >Nom du rôle : </label>
|
||||
<input type="text" name="RoleName" id="RoleName">
|
||||
<%= Html.ValidationMessage("RoleName", "*") %><br/>
|
||||
<%= Ajax.ActionLink("AddUserToRole", "AddUserToRole", new { RoleName = "Admin" } , new AjaxOptions() { UpdateTargetId = "roleaddedresult" }) %>
|
||||
</fieldset>
|
||||
<% } %>
|
||||
31
booking/Views/Admin/Admin.aspx
Normal file
31
booking/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/AppAdmin.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>
|
||||
|
||||
7
booking/Views/Admin/BackupCreated.aspx
Normal file
7
booking/Views/Admin/BackupCreated.aspx
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<%@ Page Title="Backup created" Language="C#" MasterPageFile="~/Models/AppAdmin.master" Inherits="System.Web.Mvc.ViewPage<Export>" %>
|
||||
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<div><h2>Error message </h2> <%= Html.Encode(Model.Error) %></div>
|
||||
<div><h2>Message </h2> <%= Html.Encode(Model.Message) %></div>
|
||||
<div><h2>File name</h2> <%= Html.Encode(Model.FileName) %></div>
|
||||
<div><h2>Exit Code</h2> <%= Html.Encode(Model.ExitCode) %></div>
|
||||
</asp:Content>
|
||||
6
booking/Views/Admin/Backups.aspx
Normal file
6
booking/Views/Admin/Backups.aspx
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<%@ Page Language="C#" MasterPageFile="~/Models/AppAdmin.master" Inherits="System.Web.Mvc.ViewPage<DataAccess>" %>
|
||||
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
|
||||
|
||||
<%=Html.ActionLink("Create a database backup", "CreateBackup")%><br/>
|
||||
<%=Html.ActionLink("Restaurations", "Restore")%><br/>
|
||||
</asp:Content>
|
||||
23
booking/Views/Admin/CreateBackup.aspx
Normal file
23
booking/Views/Admin/CreateBackup.aspx
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<%@ Page Title="Backup creation" Language="C#" MasterPageFile="~/Models/AppAdmin.master" Inherits="System.Web.Mvc.ViewPage<DataAccess>" %>
|
||||
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<%= Html.ValidationSummary("CreateBackup","Admin") %>
|
||||
<% using (Html.BeginForm("CreateBackup")) { %>
|
||||
|
||||
<%= Html.LabelFor(model => model.Host) %>:
|
||||
<%= Html.TextBox( "Host" ) %>
|
||||
<%= Html.ValidationMessage("Host", "*") %><br/>
|
||||
<%= Html.LabelFor(model => model.Port) %>:
|
||||
<%= Html.TextBox( "Port" ) %>
|
||||
<%= Html.ValidationMessage("Port", "*") %><br/>
|
||||
<%= Html.LabelFor(model => model.DbName) %>:
|
||||
<%= Html.TextBox( "DbName" ) %>
|
||||
<%= Html.ValidationMessage("DbName", "*") %><br/>
|
||||
<%= Html.LabelFor(model => model.DbUser) %>:
|
||||
<%= Html.TextBox( "DbUser" ) %>
|
||||
<%= Html.ValidationMessage("DbUser", "*") %><br/>
|
||||
<%= Html.LabelFor(model => model.Password) %>:
|
||||
<%= Html.Password( "Password" ) %>
|
||||
<%= Html.ValidationMessage("Password", "*") %><br/>
|
||||
<input type="submit"/>
|
||||
<% } %>
|
||||
</asp:Content>
|
||||
12
booking/Views/Admin/Created.aspx
Normal file
12
booking/Views/Admin/Created.aspx
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<%@ Page Title="Db init" Language="C#" MasterPageFile="~/Models/NoLogin.master" Inherits="System.Web.Mvc.ViewPage<TaskOutput>" %>
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
<h1>Initialisation de la base de données</h1>
|
||||
<div><h2>Error message </h2> <%= Html.Encode(Model.Error) %></div>
|
||||
<div><h2>Message </h2> <%= Html.Encode(Model.Message) %></div>
|
||||
<div><h2>Exit Code</h2> <%= Html.Encode(Model.ExitCode) %></div>
|
||||
<form><fieldset><legend>Acces à la base de donnée</legend>
|
||||
<label>db Name:</label><%= Html.Encode(ViewData["DbName"]) %><br/>
|
||||
<label>db User:</label><%= Html.Encode(ViewData["DbUser"]) %><br/>
|
||||
<label>Hôte:</label><%= Html.Encode(ViewData["Host"]) %></fieldset>
|
||||
</form>
|
||||
</asp:Content>
|
||||
4
booking/Views/Admin/Index.aspx
Normal file
4
booking/Views/Admin/Index.aspx
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<%@ Page Title="Administration" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/AppAdmin.master" %>
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
</asp:Content>
|
||||
|
||||
23
booking/Views/Admin/InitDb.aspx
Normal file
23
booking/Views/Admin/InitDb.aspx
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<%@ Page Title="Init db" Language="C#" MasterPageFile="~/Models/NoLogin.master" Inherits="System.Web.Mvc.ViewPage<DataAccess>" %>
|
||||
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<%= Html.ValidationSummary("Init a new data base") %>
|
||||
<% using (Html.BeginForm("InitDb","Admin")) { %>
|
||||
<%= Html.LabelFor(model => model.Host) %>:
|
||||
<%= Html.TextBox( "Host" ) %>
|
||||
<%= Html.ValidationMessage("Host", "*") %><br/>
|
||||
<%= Html.LabelFor(model => model.Port) %>:
|
||||
<%= Html.TextBox( "Port" ) %>
|
||||
<%= Html.ValidationMessage("Port", "*") %><br/>
|
||||
<%= Html.LabelFor(model => model.DbName) %>:
|
||||
<%= Html.TextBox( "DbName" ) %>
|
||||
<%= Html.ValidationMessage("DbName", "*") %><br/>
|
||||
<%= Html.LabelFor(model => model.DbUser) %>:
|
||||
<%= Html.TextBox( "DbUser" ) %>
|
||||
<%= Html.ValidationMessage("DbUser", "*") %><br/>
|
||||
<%= Html.LabelFor(model => model.Password) %>:
|
||||
<%= Html.Password( "Password" ) %>
|
||||
<%= Html.ValidationMessage("Password", "*") %><br/>
|
||||
<label for="doInit">Executer le script de création de la base: </label><input type="checkbox" name="doInit" id="doInit" >
|
||||
<input type="submit"/>
|
||||
<% } %>
|
||||
</asp:Content>
|
||||
17
booking/Views/Admin/RemoveRole.aspx
Normal file
17
booking/Views/Admin/RemoveRole.aspx
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<%@ Page Title="User removal" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/AppAdmin.master" %>
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
<div>
|
||||
<%= Html.ValidationSummary() %>
|
||||
<% using ( Html.BeginForm("RemoveRole","Admin") ) { %>
|
||||
Supprimer le rôle
|
||||
<%= Html.Encode( ViewData["roletoremove"] ) %> ?
|
||||
<br/>
|
||||
<input type="hidden" name="rolename" value="<%=ViewData["roletoremove"]%>"/>
|
||||
<input class="actionlink" type="submit" name="submitbutton" value="Supprimer"/>
|
||||
<input class="actionlink" type="submit" name="submitbutton" value="Annuler" />
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
18
booking/Views/Admin/RemoveUser.aspx
Normal file
18
booking/Views/Admin/RemoveUser.aspx
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<%@ Page Title="User removal" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/AppAdmin.master" %>
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
<div>
|
||||
|
||||
<%= Html.ValidationSummary() %>
|
||||
<% using ( Html.BeginForm("RemoveUser","Admin") ) { %>
|
||||
Supprimer l'utilisateur
|
||||
<%= Html.Encode( ViewData["usertoremove"] ) %> ?
|
||||
<br/>
|
||||
<input type="hidden" name="username" value="<%=ViewData["usertoremove"]%>"/>
|
||||
<input class="actionlink" type="submit" name="submitbutton" value="Supprimer"/>
|
||||
<input class="actionlink" type="submit" name="submitbutton" value="Annuler" />
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
37
booking/Views/Admin/Restore.aspx
Normal file
37
booking/Views/Admin/Restore.aspx
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<%@ Page Title="Restore" Language="C#" MasterPageFile="~/Models/AppAdmin.master" Inherits="System.Web.Mvc.ViewPage<DataAccess>" %>
|
||||
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<%= Html.ValidationSummary("Restore a database backup") %>
|
||||
<% using (Html.BeginForm("Restore","Admin")) { %>
|
||||
|
||||
<% string [] bcfiles = (string[]) ViewData["Backups"]; %>
|
||||
<select name="backupName">
|
||||
<% foreach (string s in bcfiles)
|
||||
{
|
||||
%>
|
||||
<option value="<%=s%>"><%=s%></option>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</select>
|
||||
<label for="dataOnly">Data only :</label>
|
||||
<%= Html.CheckBox("dataOnly")%>
|
||||
|
||||
<%= Html.LabelFor(model => model.Host) %>:
|
||||
<%= Html.TextBox( "Host" ) %>
|
||||
<%= Html.ValidationMessage("Host", "*") %><br/>
|
||||
<%= Html.LabelFor(model => model.Port) %>:
|
||||
<%= Html.TextBox( "Port" ) %>
|
||||
<%= Html.ValidationMessage("Port", "*") %><br/>
|
||||
<%= Html.LabelFor(model => model.DbName) %>:
|
||||
<%= Html.TextBox( "DbName" ) %>
|
||||
<%= Html.ValidationMessage("DbName", "*") %><br/>
|
||||
<%= Html.LabelFor(model => model.DbUser) %>:
|
||||
<%= Html.TextBox( "DbUser" ) %>
|
||||
<%= Html.ValidationMessage("DbUser", "*") %><br/>
|
||||
<%= Html.LabelFor(model => model.Password) %>:
|
||||
<%= Html.Password( "Password" ) %>
|
||||
<%= Html.ValidationMessage("Password", "*") %><br/>
|
||||
|
||||
<input type="submit"/>
|
||||
<% } %>
|
||||
</asp:Content>
|
||||
8
booking/Views/Admin/Restored.aspx
Normal file
8
booking/Views/Admin/Restored.aspx
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<%@ Page Language="C#" MasterPageFile="~/Models/AppAdmin.master" Inherits="System.Web.Mvc.ViewPage<TaskOutput>" %>
|
||||
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<h1><%=Html.Encode(ViewData["BackupName"])%> Restauration</h1>
|
||||
<div><h2>Error message </h2> <%= Html.Encode(Model.Error) %></div>
|
||||
<div><h2>Message </h2> <%= Html.Encode(Model.Message) %></div>
|
||||
<div><h2>Exit Code</h2> <%= Html.Encode(Model.ExitCode) %></div>
|
||||
|
||||
</asp:Content>
|
||||
20
booking/Views/Admin/RoleList.aspx
Normal file
20
booking/Views/Admin/RoleList.aspx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<%@ 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>
|
||||
<%foreach (string rolename in (string[]) Model){ %>
|
||||
|
||||
<li><%=Html.ActionLink(rolename,"UsersInRole", new { rolename = rolename }, new { @class="actionlink" } )%> <% if (Roles.IsUserInRole("Admin")) { %>
|
||||
<%= Html.ActionLink("Supprimer","RemoveRole", new { rolename = rolename }, new { @class="actionlink" } ) %>
|
||||
<% } %></li>
|
||||
<% } %>
|
||||
|
||||
</ul>
|
||||
<% if (Roles.IsUserInRole("Admin")) { %>
|
||||
<%= Html.ActionLink("Ajouter un rôle","AddRole", null, new { @class="actionlink" } ) %>
|
||||
<% } %>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
16
booking/Views/Admin/UserList.aspx
Normal file
16
booking/Views/Admin/UserList.aspx
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<System.Web.Security.MembershipUserCollection>" MasterPageFile="~/Models/AppAdmin.master" %>
|
||||
<asp:Content ContentPlaceHolderID="init" ID="init1" runat="server">
|
||||
<% Page.Title = LocalizedText.User_List; %>
|
||||
</asp:Content>
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
<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%>
|
||||
<% if (Roles.IsUserInRole("Admin")) { %>
|
||||
<%= Html.ActionLink(LocalizedText.Remove,"RemoveUser", new { username = user.UserName }, new { @class="actionlink" } ) %>
|
||||
<% } %>
|
||||
</li><% }%>
|
||||
</ul>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
21
booking/Views/Admin/UsersInRole.aspx
Normal file
21
booking/Views/Admin/UsersInRole.aspx
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" Title="UsersInRoleOf" MasterPageFile="~/Models/AppAdmin.master" %>
|
||||
<asp:Content ContentPlaceHolderID="init" ID="init1" runat="server">
|
||||
<% ViewState["orgtitle"] = "Liste des utilisateurs assumant le rôle " + Html.Encode(ViewData["RoleName"]); %>
|
||||
<% Page.Title = "Liste des utilisateurs assumant le rôle " + Html.Encode(ViewData["RoleName"]) + " - " + YavscHelpers.SiteName; %>
|
||||
|
||||
</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">
|
||||
<%foreach (string username in (string[]) ViewData["UsersInRole"]){ %>
|
||||
<%= username %>
|
||||
<% } %>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ContentPlaceHolderID="MASContent" ID="MMC" runat="server" >
|
||||
<%= Html.Partial("AddUserToRole") %>
|
||||
</asp:Content>
|
||||
Loading…
Add table
Add a link
Reference in a new issue