Merge from booking branch

This commit is contained in:
Paul Schneider 2015-11-17 22:22:59 +01:00
commit 9a2652739b
266 changed files with 12833 additions and 2337 deletions

View file

@ -0,0 +1,22 @@
<%@ Page Title="Change your Password" Language="C#" Inherits="System.Web.Mvc.ViewPage<ChangePasswordModel>" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<%= Html.ValidationSummary("Modification de mot de passe") %>
<% using(Html.BeginForm("ChangePassword", "Account")) { %>
<label for="UserName">User Name:</label>
<%= Html.TextBox( "UserName" ) %>
<%= Html.ValidationMessage("UserName", "*") %><br/>
<label for="OldPassword">Old password:</label>
<%= Html.Password( "OldPassword" ) %>
<%= Html.ValidationMessage("OldPassword", "*") %><br/>
<label for="NewPassword">New password:</label>
<%= Html.Password( "NewPassword" ) %>
<%= Html.ValidationMessage("NewPassword", "*") %><br/>
<label for="ConfirmPassword">Confirm password:</label>
<%= Html.Password( "ConfirmPassword" ) %>
<%= Html.ValidationMessage("ConfirmPassword", "*") %>
<input type="submit"/>
<% } %>
</asp:Content>

View file

@ -0,0 +1,6 @@
<%@ Page Title="Successfully changed your password" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<div>
<%= Html.ActionLink("Register","Register")%></div>
<div><%= Html.ActionLink("ChangePassword","ChangePassword")%></div>
</asp:Content>

View file

@ -0,0 +1,74 @@
<%@ Page Title="Circles" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Register Assembly="Yavsc.WebControls" TagPrefix="yavsc" Namespace="Yavsc.WebControls" %>
<asp:Content ID="headContent" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript" src="<%=Url.Content("~/Scripts/stupidtable.js")%>"></script>
</asp:Content>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
<table id="tbc">
<thead>
<tr>
<th data-sort="string"><%=Html.Translate("Title")%>
</th>
</tr>
</thead>
<style>
.btnselcircle { cursor: pointer; }
</style>
<tbody id="tbcb">
<% int lc=0;
foreach (var ci in (IEnumerable<CircleBase>) ViewData["Circles"]) { lc++; %>
<tr class="<%= (lc%2==0)?"even ":"odd " %>row" id="c_<%=ci.Id%>">
<td cid="<%=ci.Id%>" class="btnselcircle"><%=ci.Title%></td>
<td><input type="button" value="<%=Html.Translate("Remove")%>"
class="btnremovecircle actionlink" cid="<%=ci.Id%>"/>
</td>
</tr>
<% } %>
</tbody>
</table>
<div class="actionlink" id="btednvcirc" did="fncirc">Ajouter un cercle</div>
<script>
$(function(){
$("#tbc").stupidtable();
});
</script>
</asp:Content>
<asp:Content ID="MASContentContent" ContentPlaceHolderID="MASContent" runat="server">
<div id="fncirc" class="hidden">
<div class="panel">
<form>
<fieldset>
<legend id="lgdnvcirc"></legend>
<label for="title"><b><%=Html.Translate("Title")%></b></label>
<input type="text" id="title" name="title" class="inputtext" onchange="onCircleChanged"/>
<span id="Err_cr_title" class="field-validation-valid error"></span>
<input type="button" id="btnnewcircle"
value="<%=Html.Translate("Create")%>" class="actionlink rowbtnct" />
<input type="button" id="btneditcircle"
value="<%=Html.Translate("Modify")%>" class="actionlink rowbtnct" />
<input type="hidden" name="id" id="id" />
</fieldset>
</form>
</div>
</div>
<script type="text/javascript" src="<%=Url.Content("~/Scripts/yavsc.circles.js")%>" >
</script>
<script type="text/javascript">
$(document).ready(function () {
$('#btednvcirc').click(editNewCircle);
$("#btnnewcircle").click(addCircle);
$("#btneditcircle").click(modifyCircle);
$(".btnremovecircle").click(removeCircle);
$(".btnselcircle").click(selectCircle);
});
</script>
</asp:Content>

View file

@ -0,0 +1,4 @@
<%@ Page Title="Comptes utilisateur" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
Pas de contenu :-(
</asp:Content>

View file

@ -0,0 +1,32 @@
<%@ Page Title="Login" Language="C#" Inherits="System.Web.Mvc.ViewPage<LoginModel>" MasterPageFile="~/Models/NoLogin.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<div class="panel">
<%= Html.ValidationSummary("Ouverture de session") %>
<% using(Html.BeginForm("Login", "Account")) %>
<% { %>
<%= Html.LabelFor(model => model.UserName) %>
<%= Html.TextBox( "UserName" ) %>
<%= Html.ValidationMessage("UserName", "*") %><br/>
<%= Html.LabelFor(model => model.Password) %>
<%= Html.Password( "Password" ) %>
<%= Html.ValidationMessage("Password", "*") %><br/>
<%= Html.LabelFor(model => model.RememberMe) %>
<%= Html.CheckBox("RememberMe") %>
<%= Html.ValidationMessage("RememberMe", "") %><br/>
<%= Html.Hidden("returnUrl",ViewData["returnUrl"]) %>
<%= Html.AntiForgeryToken() %>
<!-- Html.AntiForgeryToken() -->
<input type="submit"/>
<% } %></div>
<div class="panel">
<%= Html.ActionLink("S'enregistrer","GetRegister",new {returnUrl=ViewData["returnUrl"]}, new { @class="actionlink" }) %>
</div>
<div class="panel">
<a href="<%= Url.RouteUrl ("Default", new { controller = "Google", action= "Login", returnUrl=ViewData["returnUrl"] }) %>" class="actionlink">
Identification avec un compte Google
<img src="/App_Themes/images/sign-in-with-google.png" style="max-height:1.5em; max-width:6em;" alt="Google sign in">
</a>
</div>
</asp:Content>

View file

@ -0,0 +1,140 @@
<%@ Page Title="Profile_edition" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<ProfileEdition>" %>
<asp:Content ContentPlaceHolderID="init" ID="init1" runat="server">
<% Title = ViewData["UserName"] + " : " +Html.Translate("Profile_edition"); %>
</asp:Content>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
<style>
table.layout { border-width: 0; }
table.layout TR TD { max-width:40%; }
</style>
<%= Html.ValidationSummary() %>
<% using(Html.BeginForm("Profile", "Account", FormMethod.Post, new { enctype = "multipart/form-data" })) %>
<% { %>
<%= Html.Hidden("UserName",ViewData["ProfileUserName"]) %>
<fieldset><legend>Informations publiques</legend>
<%= Html.LabelFor(model => model.NewUserName) %> :
<%= Html.TextBox("NewUserName") %>
<%= Html.ValidationMessage("NewUserName", "*") %>
<br>
<%= Html.LabelFor(model => model.WebSite) %> :
<%= Html.TextBox("WebSite") %>
<%= Html.ValidationMessage("WebSite", "*") %>
<br>
Avatar : <img src="<%=Url.AvatarUrl(HttpContext.Current.User.Identity.Name)%>" alt="avatar" class="iconsmall" />
<input type="file" id="AvatarFile" name="AvatarFile"/>
<%= Html.ValidationMessage("AvatarFile", "*") %>
</fieldset>
<fieldset><legend>Informations administratives</legend>
<%= Html.LabelFor(model => model.Name) %> :
<%= Html.TextBox("Name") %>
<%= Html.ValidationMessage("Name", "*") %>
</fieldset>
<fieldset><legend>Blog</legend>
<div class="spanel">
<%= Html.LabelFor(model => model.BlogVisible) %> :
<%= Html.CheckBox("BlogVisible") %>
<%= Html.ValidationMessage("BlogVisible", "*") %>
</div><div class="spanel">
<%= Html.LabelFor(model => model.BlogTitle) %> :
<%= Html.TextBox("BlogTitle") %>
<%= Html.ValidationMessage("BlogTitle", "*") %>
</div>
</fieldset>
<fieldset><legend>Contact</legend>
<div class="spanel">
<%= Html.LabelFor(model => model.Phone) %>
<%= Html.TextBox("Phone") %>
<%= Html.ValidationMessage("Phone", "*") %>
</div><div class="spanel">
<%= Html.LabelFor(model => model.Mobile) %>
<%= Html.TextBox("Mobile") %>
<%= Html.ValidationMessage("Mobile", "*") %>
</div><div class="spanel">
<%= Html.LabelFor(model => model.Address) %>
<%= Html.TextBox("Address") %>
<%= Html.ValidationMessage("Address", "*") %>
</div><div class="spanel">
<%= Html.LabelFor(model => model.CityAndState) %>
<%= Html.TextBox("CityAndState") %>
<%= Html.ValidationMessage("CityAndState", "*") %>
</div><div class="spanel">
<%= Html.LabelFor(model => model.ZipCode) %>
<%= Html.TextBox("ZipCode") %>
<%= Html.ValidationMessage("ZipCode", "*") %>
</div><div class="spanel">
<%= Html.LabelFor(model => model.Country) %>
<%= Html.TextBox("Country") %>
<%= Html.ValidationMessage("Country", "*") %>
</div>
</fieldset>
<fieldset><legend>Disponibilité</legend>
<div class="spanel">
<%= Html.LabelFor(model => model.GoogleCalendar) %> :
<%= Html.Encode(Model.GoogleCalendar) %>
<%= Html.ActionLink("Choisir l'agenda","ChooseCalendar","Google",new { returnUrl= Request.Url.AbsolutePath }, new { @class="actionlink" }) %>
</div></fieldset>
<fieldset><legend>Informations de facturation</legend>
<div class="spanel">
<%= Html.LabelFor(model => model.BankCode) %> :
<%= Html.TextBox("BankCode") %>
<%= Html.ValidationMessage("BankCode", "*") %>
</div><div class="spanel">
<%= Html.LabelFor(model => model.WicketCode) %> :
<%= Html.TextBox("WicketCode") %>
<%= Html.ValidationMessage("WicketCode", "*") %>
</div><div class="spanel">
<%= Html.LabelFor(model => model.AccountNumber) %> :
<%= Html.TextBox("AccountNumber") %>
<%= Html.ValidationMessage("AccountNumber", "*") %>
</div><div class="spanel">
<%= Html.LabelFor(model => model.BankedKey) %> :
<%= Html.TextBox("BankedKey") %>
<%= Html.ValidationMessage("BankedKey", "*") %>
</div><div class="spanel">
<%= Html.LabelFor(model => model.BIC) %> :
<%= Html.TextBox("BIC") %>
<%= Html.ValidationMessage("BIC", "*") %>
</div><div class="spanel">
<%= Html.LabelFor(model => model.IBAN) %> :
<%= Html.TextBox("IBAN") %>
<%= Html.ValidationMessage("IBAN", "*") %>
</div>
</fieldset>
<input type="submit"/>
<% } %>
<aside>
<%= Html.ActionLink("Changer de mot de passe","ChangePassword", "Account",null, new { @class="actionlink" })%>
<%= Html.ActionLink("Désincription", "Unregister", "Account", new { id = ViewData["UserName"] } , new { @class="actionlink" })%>
</aside>
<aside>
<% if (Roles.IsUserInRole((string)ViewData ["UserName"],"Admin")) { %>
This user is Admin.
<% } %>
<code>HasBankAccount:<%= Model.HasBankAccount %></code>
<% if (!Model.HasBankAccount) { %><span class="hint">
IBAN+BIC ou Codes banque, guichet, compte et clé RIB</span>
<% } %>, <code>IsBillable:<%=Model.IsBillable%></code>
<% if (!Model.IsBillable) { %>
<span class="hint">un nom et au choix, une adresse postale valide,
ou un téléphone, ou un email, ou un Mobile</span> <% } %>
</aside>
</asp:Content>

View file

@ -0,0 +1,73 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<RegisterClientModel>" %>
<%= Html.ValidationSummary() %>
<% using(Html.BeginForm("Register")) %>
<% { %>
<h1>Nouvel utilisateur</h1>
<span class="field-validation-valid error" data-valmsg-replace="false" id="Err_ur_IsApprouved">*</span>
<table class="layout">
<tr><td align="right">
<%= Html.LabelFor(model => model.Name) %>
</td><td>
<%= Html.TextBox( "Name" ) %>
<%= Html.ValidationMessage("Name", "*", new { @id="Err_ur_Name", @class="error" }) %></td></tr>
<tr><td align="right">
<%= Html.LabelFor(model => model.UserName) %>
</td><td>
<%= Html.TextBox( "UserName" ) %>
<%= Html.ValidationMessage("UserName", "*", new { @id="Err_ur_UserName", @class="error" }) %></td></tr>
<tr><td align="right">
<%= Html.LabelFor(model => model.Password) %>
</td><td>
<%= Html.Password( "Password" ) %>
<%= Html.ValidationMessage("Password", "*", new { @id="Err_ur_Password", @class="error" }) %>
</td></tr>
<tr><td align="right">
<%= Html.LabelFor(model => model.Email) %>
</td><td>
<%= Html.TextBox( "Email" ) %>
<%= Html.ValidationMessage("Email", "*", new { @id="Err_ur_Email", @class="error" }) %>
</td></tr>
<tr><td align="right">
<%= Html.LabelFor(model => model.Address) %>
</td><td>
<%= Html.TextBox( "Address" ) %>
<%= Html.ValidationMessage("Address", "*", new { @id="Err_ur_Address", @class="error" }) %></td></tr>
<tr><td align="right">
<%= Html.LabelFor(model => model.CityAndState) %>
</td><td>
<%= Html.TextBox( "CityAndState" ) %>
<%= Html.ValidationMessage("CityAndState", "*", new { @id="Err_ur_CityAndState", @class="error" }) %>
</td></tr>
<tr><td align="right">
<%= Html.LabelFor(model => model.ZipCode) %>
</td><td>
<%= Html.TextBox( "ZipCode" ) %>
<%= Html.ValidationMessage("ZipCode", "*", new { @id="Err_ur_ZipCode", @class="error" }) %></td></tr>
<tr><td align="right">
<%= Html.LabelFor(model => model.Phone) %>
</td><td>
<%= Html.TextBox( "Phone" ) %>
<%= Html.ValidationMessage("Phone", "*", new { @id="Err_ur_Phone", @class="error" }) %></td></tr>
<tr><td align="right">
<%= Html.LabelFor(model => model.Mobile) %>
</td><td>
<%= Html.TextBox( "Mobile" ) %>
<%= Html.ValidationMessage("Mobile", "*", new { @id="Err_ur_Mobile", @class="error" }) %></td></tr>
</table>
<input type="button" id="btnnewuser" class="actionlink" value="Enregistrer">
<% } %>

View file

@ -0,0 +1,39 @@
<%@ Page Title="Register" Language="C#" Inherits="System.Web.Mvc.ViewPage<RegisterViewModel>" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<%= Html.ValidationSummary() %>
<% using(Html.BeginForm("Register", "Account")) %>
<% { %>
<table class="layout">
<tr><td align="right">
<%= Html.LabelFor(model => model.UserName) %>
</td><td>
<%= Html.TextBox( "UserName" ) %>
<%= Html.ValidationMessage("UserName", "*") %></td></tr>
<tr><td align="right">
<%= Html.LabelFor(model => model.Password) %>
</td><td>
<%= Html.Password( "Password" ) %>
<%= Html.ValidationMessage("Password", "*") %>
</td></tr>
<tr><td align="right">
<%= Html.LabelFor(model => model.ConfirmPassword) %>
</td><td>
<%= Html.Password( "ConfirmPassword" ) %>
<%= Html.ValidationMessage("ConfirmPassword", "*") %>
</td></tr>
<tr><td align="right">
<%= Html.LabelFor(model => model.Email) %>
</td><td>
<%= Html.TextBox( "Email" ) %>
<%= Html.ValidationMessage("Email", "*") %>
</td></tr>
</table>
<br/>
<%= Html.Hidden("returnUrl",ViewData["returnUrl"]) %>
<input type="submit"/>
<% } %>
</asp:Content>

View file

@ -0,0 +1,13 @@
<%@ Page Title="Comptes utilisateur" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
Votre compte utilisateur
<%= Html.Encode(YavscHelpers.SiteName) %>
a été créé, un e-mail de validation de votre compte a été envoyé a l'adresse fournie:<br/>
&lt;<%= Html.Encode(ViewData["email"]) %>&gt;.<br/>
Vous devriez le recevoir rapidement.<br/>
Pour valider votre compte, suivez le lien indiqué dans cet e-mail.
<div>
<a class="actionlink" href="<%=ViewData["returnUrl"]%>">Retour</a>
</div>
</asp:Content>

View file

@ -0,0 +1,23 @@
<%@ Page Title="Reset your Password" Language="C#" Inherits="System.Web.Mvc.ViewPage<LostPasswordModel>" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<%= Html.ValidationSummary("Modification de mot de passe") %>
<% using(Html.BeginForm("ResetPassword", "Account")) { %>
Enter one of the following : <br/>
<ul><li>
<label for="UserName">Your user name (login):</label>
<%= Html.TextBox( "UserName" ) %>
<%= Html.ValidationMessage("UserName", "*") %></li>
<li>
<label for="Email">The e-mail address you used to register here:</label>
<%= Html.TextBox( "Email" ) %>
<%= Html.ValidationMessage("Email", "*") %>
</li>
</ul>
Then, hit the following button:
<input type="submit" value="I lost my password!"/> <br/>
A message will be sent to you, containning a link that you'll can use to reset your password.
<% } %>
</asp:Content>

View file

@ -0,0 +1,12 @@

<%@ Page Title="Unregister" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
Warning: This will delete all of your data here, your profile, your posts and other data.
<% using(Html.BeginForm("Unregister", "Account")) { %>
<label for="confirmed">Unregister</label>
<%=Html.CheckBox("confirmed")%>
<input type="submit"/>
<%= Html.Hidden("UserName") %>
<% } %>
</asp:Content>

View file

@ -0,0 +1,2 @@
<%@ Page Title="Comptes utilisateur - Validation" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/App.master" %>
<!-- tout est dans le message du modèle App.master ViewData["Message"] -->

View 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>

View 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>
<% } %>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View file

@ -0,0 +1,9 @@
<%@ Page Title="Back office" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
</asp:Content>
<asp:Content ID="MASContentContent" ContentPlaceHolderID="MASContent" runat="server">
<ul><li>
<%= Html.ActionLink("Catalog","Catalog","FrontOffice" ) %>
</li></ul>
</asp:Content>

View file

@ -0,0 +1,14 @@
<%@ Page Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="initContent" ContentPlaceHolderID="init" runat="server">
</asp:Content>
<asp:Content ID="headContent" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="overHeaderOneContent" ContentPlaceHolderID="overHeaderOne" runat="server">
</asp:Content>
<asp:Content ID="headerContent" ContentPlaceHolderID="header" runat="server">
</asp:Content>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
kjgftkgt
</asp:Content>
<asp:Content ID="MASContentContent" ContentPlaceHolderID="MASContent" runat="server">
</asp:Content>

View file

@ -0,0 +1,243 @@
<%@ Page Title="Bill_edition" Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogEntry>" MasterPageFile="~/Models/App.master" %>
<%@ Register Assembly="Yavsc.WebControls" TagPrefix="yavsc" Namespace="Yavsc.WebControls" %>
<asp:Content ContentPlaceHolderID="head" ID="HeadContent1" runat="server">
<script type="text/javascript" src="<%=Url.Content("~/Scripts/rangy-core.js")%>"></script>
<script type="text/javascript" src="<%=Url.Content("~/Scripts/rangy-selectionsaverestore.js")%>"></script>
<script type="text/javascript" src="<%=Url.Content("~/Scripts/jquery.htmlClean.min.js")%>"></script>
<script type="text/javascript" src="<%=Url.Content("~/Scripts/hallo.js")%>"></script>
<script type="text/javascript" src="<%=Url.Content("~/Scripts/to-markdown.js")%>"></script>
<script type="text/javascript" src="<%=Url.Content("~/Scripts/showdown.js")%>"></script>
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<% using(Html.BeginForm("ValidateEdit","Blogs")) { %>
<fieldset>
<legend>Contrôle d'accès au Billet</legend>
<%= Html.LabelFor(model => model.Visible) %> : <%= Html.CheckBox( "Visible" ) %>
<i>Note: Si un ou plusieurs cercles sont séléctionnés ici,
le billet ne sera visible qu'aux membres de ces cercles.</i>
<%= Html.ValidationMessage("Visible", "*") %>
<%= Html.LabelFor(model => model.AllowedCircles) %>
<%= Html.ListBox("AllowedCircles") %>
<%= Html.ValidationMessage("AllowedCircles", "*") %>
</fieldset>
<span id="viewsource">
<i class="fa fa-code menuitem"><%=Html.Translate("View_source")%></i></span>
<span id="hidesource" class="hidden">
<i class="fa fa-code menuitem"><%=Html.Translate("Hide_source")%></i>
</span>
<fieldset id="source" class="hidden">
<%=Html.Hidden("Author")%>
<%=Html.Hidden("Id")%>
<%= Html.LabelFor(model => model.Photo) %>
<%=Html.TextBox("Photo")%>
<%=Html.ValidationMessage("Photo")%><br>
<%= Html.LabelFor(model => model.Title) %>
<%=Html.TextBox("Title")%>
<%=Html.ValidationMessage("Title")%><br>
<%=Html.TextArea("Content")%>
<%=Html.ValidationMessage("Content")%>
</fieldset>
<input type="submit" id="validate" value="Valider" class="fa fa-check menuitem">
<% } %>
<form id="frmajax">
<fieldset>
<legend>Attacher des fichiers</legend>
<input type="file" name="attached" id="postedfile" multiple>
<input type="button" value="attacher les ficher" onclick="submitFile()">
<input type="button" value="importer les documents" onclick="submitImport()">
</fieldset>
</form>
<span class="placard editable" for="Photo">
<img src="<%=Model.Photo%>" alt="photo" id="vphoto" >
</span>
<!-- TODO? Model.Photo.(Legend|Date|Location|ref) -->
<h1 id="vtitle" for="Title" class="editable" ><%=Html.Markdown(Model.Title)%></h1>
<div id="vcontent" for="Content" class="editable">
<%=Html.Markdown(Model.Content,"/bfiles/"+Model.Id+"/")%>
</div>
<hr><h2>Fichiers attachées</h2>
<%= Html.FileList("~/bfiles/"+Model.Id) %>
<hr>
<script>
$(document).ready(function(){
$('#hidesource').click(function(){
$('#source').addClass('hidden');
$('#viewsource').removeClass('hidden');
$('#hidesource').addClass('hidden');
});
$('#viewsource').click(function(){
$('#source').removeClass('hidden');
$('#viewsource').addClass('hidden');
$('#hidesource').removeClass('hidden');
});
jQuery('.placard').hallo({plugins: {'hallo-image-insert-edit': { lang: 'fr' } } });
jQuery('#vtitle').hallo({
plugins: {
'halloformat': {},
'halloreundo': {}
},
toolbar: 'halloToolbarFixed',
lang: 'fr'
});
jQuery('#vcontent').hallo({
plugins: {
'halloformat': {},
'halloheadings': {},
'hallolists': {},
'hallo-image-insert-edit': {
lang: 'fr'
},
'halloreundo': {},
'hallocleanhtml': {
format: false,
allowedTags: [
'i',
'p',
'em',
'strong',
'br',
'ol',
'ul',
'li',
'a',
'audio',
'video',
'img',
'table',
'tr',
'td',
'th',
'style'
]
},
'halloblacklist': {tags: ['style']},
},
toolbar: 'halloToolbarFixed'
});
var markdownize = function(content) {
if (!content) return '';
var html = content.split("\n").map($.trim).filter(function(line) {
return line != "";
}).join("\n");
return toMarkdown(html);
};
var converter = new showdown.Converter(),
htmlize = function(content) {
return converter.makeHtml(content);
};
// Method that converts the HTML contents to Markdown
var showSource = function(id,content) {
if (!content) content = '';
var markdown = markdownize(content);
if (jQuery('#'+id).val() === markdown) {
return;
}
jQuery('#'+id).val( markdown );
};
var updateHtml = function(id,content) {
var jView = jQuery('*[for="'+id+'"]');
if (markdownize(jView.html()) === content) {
return;
}
var html = htmlize(content);
jView.html(html);
};
jQuery('.placard').bind('hallomodified', function(event, data) {
// TODO get image source from data.content
$('#'+this.attributes["for"].value).val(
$('#vphoto').attr('src'));
});
// Update Markdown every time content is modified
var onMDModified = ( function (event, data) {
showSource(this.attributes["for"].value, data.content);
});
jQuery('#vtitle').bind('hallomodified', onMDModified);
jQuery('#vcontent').bind('hallomodified', onMDModified);
jQuery('#Content').bind('keyup', function() {
updateHtml(this.id, this.value);
});
jQuery('#Title').bind('keyup', function() {
updateHtml(this.id, this.value);
});
// showSource("Title",jQuery('#vtitle').html());
// showSource("Content",jQuery('#vcontent').html());
});
</script>
<script>
function submitFilesTo(method)
{
var data = new FormData($('#frmajax').get()[0]);
Yavsc.notice('Submitting via '+method);
$.ajax({
url: apiBaseUrl+'/Blogs/'+method+'/'+$('#Id').val(),
type: "POST",
data: data,
processData: false,
contentType: false,
success: function(data) {
$('#Content').val(data+"\n"+$('#Content').val());
Yavsc.notice(false);
},
error: Yavsc.onAjaxError,
});
}
function submitImport()
{ submitFilesTo('Import'); }
function submitFile()
{ submitFilesTo('PostFile'); }
function submitBaseDoc()
{
var data = new FormData($('#frmajax').get()[0]);
Yavsc.notice('Submitting via '+method);
$.ajax({
url: apiBaseUrl+'/Blogs/'+method+'/'+$('#Id').val(),
type: "POST",
data: data,
processData: false,
contentType: false,
success: function(data) {
$('#Content').val(data+"\n"+$('#Content').val());
Yavsc.notice('Posted updated');
},
error: Yavsc.onAjaxError,
});
}
</script>
<aside>
Id:<%= Html.ActionLink( Model.Id.ToString() , "UserPost", new { user= Model.Author, title=Model.Title, id = Model.Id }, new { @class = "usertitleref actionlink" }) %>
, Posted: <%= Model.Posted.ToString("yyyy/MM/dd") %> - Modified: <%= Model.Modified.ToString("yyyy/MM/dd") %>
Visible: <%= Model.Visible? "oui":"non" %> <%= Html.ActionLink("Supprimer","RemovePost", new { user=Model.Author, title = Model.Title, id = Model.Id }, new { @class="actionlink" } ) %>
</aside>
</asp:Content>

View file

@ -0,0 +1,18 @@
<%@ Page Title="Articles" Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogEntryCollection>" MasterPageFile="~/Models/App.master" EnableTheming="True" StylesheetTheme="dark" %>
<%@ Register Assembly="Yavsc.WebControls" TagPrefix="yavsc" Namespace="Yavsc.WebControls" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<div>
<% foreach (var g in Model.GroupByTitle()) { %>
<div class="panel">
<h2><a href="<%= Url.RouteUrl("Titles", new { title = g.Key }) %>" class="usertitleref"><%=Html.Encode(g.Key)%></a></h2>
<% foreach (var p in g) { %>
<div class="postpreview">
<p><%= Html.Markdown(p.Intro,"/bfiles/"+p.Id+"/") %></p>
<%= Html.Partial("PostActions",p)%>
</div> <% } %>
</div>
<% } %>
</div>
<%= Html.RenderPageLinks((int)ViewData["PageIndex"],(int)ViewData["PageSize"],(int)ViewData["ResultCount"])%>
</asp:Content>

View file

@ -0,0 +1,4 @@
<%@ 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 : &lt;<%= Html.Encode(ViewData["BlogUser"]) %>/<%= Html.Encode(ViewData["PostTitle"]) %>&gt;
</asp:Content>

View file

@ -0,0 +1,26 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BasePost>" %>
<aside>
(<%= Model.Posted.ToString("D") %>
- <%= Model.Modified.ToString("D") %> <%= Model.Visible? "":", Invisible!" %>)
<% if (Membership.GetUser()!=null) {
if (Membership.GetUser().UserName==Model.Author || Roles.IsUserInRole("Admin"))
{ %>
<% if (Model is BlogEntry) { %><%= Html.Partial("TagControl",Model)%>
<i class="fa fa-pencil"><%=Html.Translate("DoComment")%></i>
<aside class="control" class="hidden">
<% using (Html.BeginForm("Comment","Blogs")) { %>
<%=Html.Hidden("Author")%>
<%=Html.Hidden("Title")%>
<%=Html.TextArea("CommentText","")%>
<%=Html.Hidden("PostId",Model.Id)%>
<input type="submit" value="Poster un commentaire"/>
<% } %>
</aside>
<% } %>
<a href="<%= Url.RouteUrl("Default", new { action = "Edit", postid = Model.Id })%>" class="actionlink">
<i class="fa fa-pencil"><%=Html.Translate("Edit")%></i>
</a>
<a href="<%= Url.RouteUrl("Default", new { action = "RemovePost", postid = Model.Id })%>" class="actionlink">
<i class="fa fa-remove"><%=Html.Translate("Remove")%></i></a>
<% }} %>
</aside>

View file

@ -0,0 +1,20 @@
<%@ Page Title="Bill_removal" Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogEntry>" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<%= Html.ValidationSummary() %>
<% using (Html.BeginForm("RemovePost","Blogs",new {postid=Model.Id})) { %>
<%= Html.LabelFor(model => model.Title) %> :
<%= Html.TextBox( "Title" ) %>
<%= Html.ValidationMessage("Title", "*") %><br/>
Identifiant du post : <%= Model.Id %><br/>
<span class="preview"><%= Html.Markdown(Model.Content) %></span>
<label for="confirm">supprimer le billet</label>
<%= Html.CheckBox( "confirm" ) %>
<%= Html.ValidationMessage("confirm", "*") %>
<%= Html.Hidden("returnUrl") %>
<input type="submit"/>
<% } %>
</asp:Content>

View file

@ -0,0 +1,22 @@
<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogEntryCollection>" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<%= Html.ValidationSummary() %>
<% using (Html.BeginForm("RemoveTitle","Blogs")) { %>
<%= Html.LabelFor(model => model.Titles) %> :
<%= Html.TextBox( "Titles" ) %>
<%= Html.ValidationMessage("Titles", "*") %><br/>
<%= Html.Hidden("Author") %>
<label for="confirm">supprimer le billet</label>
<%= Html.CheckBox( "confirm" ) %>
<%= Html.ValidationMessage("AgreeToRemove", "*") %>
<%= Html.Hidden("returnUrl") %>
<input type="submit"/>
<% } %>
</asp:Content>

View file

@ -0,0 +1,47 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogEntry>" %>
<p id="tags<%=Model.Id%>" data-postid="<%=Model.Id%>" class="fa fa-tag">
<% if (Model.Tags != null) {
foreach ( var tagname in Model.Tags) { %>
<span class="tagname"><%=tagname%></span> <%
%><% } } %>
</p>
<% 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 %>
<span id="viewtagger<%=Model.Id%>">
<i class="fa fa-tag menuitem" id="viewtaggerbtn<%=Model.Id%>"><%=Html.Translate("DoTag")%></i></span>
<span id="hidetagger<%=Model.Id%>" class="hidden">
<i class="fa fa-tag menuitem" id="hidetaggerbtn<%=Model.Id%>" ><%=Html.Translate("Tags")%> - <%=Html.Translate("Hide")%></i>
Note: Ils sont utilisé pour classifier le document. Par exemple, le tag <code>Accueil</code> rend le document
éligible à une place en page d'Accueil.
</span>
<form id="tagger<%=Model.Id%>" class="maskable" data-btn-show="viewtagger<%=Model.Id%>" data-btn-hide="hidetagger<%=Model.Id%>" >
<fieldset>
<legend>Associer des tags au billet</legend>
<label for="newtag"><%= Html.Translate("Tag_name")%>: </label>
<span id="Err_tag<%=Model.Id%>" class="error"></span>
<input type="text" id="newtag<%=Model.Id%>" class="taginput">
<span id="Err_model<%=Model.Id%>" class="error"></span>
<input id="sendnewtag<%=Model.Id%>" type="submit" class="submittag fa fa-tag" value="<%=Html.Translate("Submit")%>">
</fieldset>
</form>
<script>
$('#sendnewtag<%=Model.Id%>').click(function(e){
Tags.tag(<%=Model.Id%>,$('#newtag<%=Model.Id%>').val(),
function(postid,tagname){
var nTagDisplay = $('<span class="tagname">'+tagname+'</span>');
nTagDisplay.click( function() {
var postid=$(this).parent().data('postid');
var $thistag = $(this);
Tags.untag(postid, $thistag.text(), function () { $thistag.remove(); } );
});
nTagDisplay.appendTo('#tags'+postid);
$('#newtag'+postid).val('');
}
);
e.preventDefault();
});
$('#sendnewtag<%=Model.Id%>').on('submit', function(e) { e.preventDefault(); });
</script>
<% } %>
<% } %>

View file

@ -0,0 +1,12 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<TagInfo>" %>
<div class="panel">
<i class="fa fa-tag"><%=Html.Encode(Model.Name)%></i>
<% foreach (var t in Model.Titles) { %>
<a href="<%= Url.RouteUrl("Titles", new { title = t.Title }) %>">
<img src="<%=Url.Encode(t.Photo)%>" alt="placard" class="photo">
<%= Html.Markdown(t.Title,"/bfiles/"+t.Id+"/")%></a>
<div class="postpreview">
<p><%= Html.Markdown(t.Intro,"/bfiles/"+t.Id+"/") %></p>
</div>
<% } %>
</div>

View file

@ -0,0 +1,34 @@
<%@ Page Title="Titre" Language="C#" Inherits="System.Web.Mvc.ViewPage<UTBlogEntryCollection>" MasterPageFile="~/Models/App.master"%>
<%@ Register Assembly="Yavsc.WebControls" TagPrefix="yavsc" Namespace="Yavsc.WebControls" %>
<asp:Content ContentPlaceHolderID="init" ID="init1" runat="server">
<% Title = Model.Title + " - " + YavscHelpers.SiteName; %>
</asp:Content>
<asp:Content ContentPlaceHolderID="overHeaderOne" ID="header1" runat="server">
<h1>
<%=Html.ActionLink(Model.Title, "Title", new{title=Model.Title}, null)%>
- <a href="<%= Url.RouteUrl("Default",new {controller="Home" }) %>"><%= YavscHelpers.SiteName %></a>
</h1>
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<% foreach (BlogEntry e in this.Model) { %>
<div class="post<% if (!e.Visible) { %> hiddenpost<% } %>" >
<% if (e.Photo!=null) { %><img src="<%=e.Photo%>" alt="" class="photo"><% } %>
<%= Html.Markdown(e.Content,"/bfiles/"+e.Id+"/") %>
<%= Html.Partial("PostActions",e)%>
</div>
<% } %>
<%
if (((int) ViewData["RecordCount"]) > ((int) ViewData["PageSize"])) {
rp1.ResultCount = (int) ViewData["RecordCount"];
rp1.PageIndex = (int) ViewData["PageIndex"];
rp1.PageSize = (int) ViewData["PageSize"];
%><aside><form runat="server" id="form1">
<yavsc:ResultPages id="rp1" Action = "?pageIndex={0}" runat="server">
<None><i>Pas de contenu</i></None>
</yavsc:ResultPages>
</form>
</aside>
<% } %>
</asp:Content>

View file

@ -0,0 +1,5 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogEntryCollection>" MasterPageFile="~/Models/App.master"%>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
Pas d'article trouvé ici: &lt;<%= Html.Encode(ViewData["BlogUser"]) %>/<%= Html.Encode(ViewData["PostTitle"]) %>&gt;
<br/> <%= Html.ActionLink("Poster?","Post/", new { user = ViewData["BlogUser"], title = ViewData["PostTitle"]}, new { @class="actionlink" }) %>
</asp:Content>

View file

@ -0,0 +1,41 @@
<%@ Page Title="Billet" Language="C#" Inherits="System.Web.Mvc.ViewPage<UUTBlogEntryCollection>" MasterPageFile="~/Models/App.master"%>
<asp:Content ContentPlaceHolderID="init" ID="init1" runat="server">
<% Title = Model.Title+ " - " + ViewData ["BlogTitle"] ; %>
</asp:Content>
<asp:Content ContentPlaceHolderID="overHeaderOne" ID="header1" runat="server">
<% if (!string.IsNullOrEmpty((string)ViewData["Avatar"])) { %>
<a href="<%= Url.Action("UserPosts", new{user=Model.Author}) %>" id="avatar">
<img src="<%=ViewData["Avatar"]%>" />
</a>
<% } %>
<h1 class="blogtitle">
<a href="<%= Url.RouteUrl("BlogByTitle", new{ user=Model.Author, title = Model.Title}) %>">
<%=Model.Title%>
</a>
- <%= Html.ActionLink((string)ViewData ["BlogTitle"] ,"UserPosts",new{user=Model.Author}, null) %>
-
<a href="<%=Url.Content("~/")%>"><%= YavscHelpers.SiteName %></a>
</h1>
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<% foreach (var be in Model) { %>
<div class="post">
<% if (be.Photo != null) { %>
<img src="<%=Url.Content(be.Photo)%>" alt="<%=be.Title%>" class="photo">
<% } %>
<%= Html.Markdown(be.Content,"/bfiles/"+be.Id+"/") %>
<%= Html.Partial("PostActions",be)%>
<% string username = Membership.GetUser()==null ? null : Membership.GetUser().UserName; %>
<% foreach (var c in (Comment[]) BlogManager.GetComments(be.Id)) { %>
<div class="comment" style="min-height:32px;">
<img class="avatar" src="<%= Url.RouteUrl("Default", new { action="Avatar", controller="Account", user = c.From } ) %>" alt="<%=c.From%>"/>
<%= Html.Markdown(c.CommentText) %>
<% if (Model.Author == username || c.From == username ) { %>
<%= Html.ActionLink("Supprimer","RemoveComment", new { cmtid = c.Id } , new { @class="actionlink" })%>
<% } %>
</div><% } %>
</div><% } %>
</asp:Content>

View file

@ -0,0 +1,48 @@
<%@ Page Title="Blog" Language="C#" Inherits="System.Web.Mvc.ViewPage<UUBlogEntryCollection>" MasterPageFile="~/Models/App.master"%>
<%@ Register Assembly="Yavsc.WebControls" TagPrefix="yavsc" Namespace="Yavsc.WebControls" %>
<asp:Content ContentPlaceHolderID="init" ID="init1" runat="server">
<% Title = (string) ViewData ["BlogTitle"] ; %>
</asp:Content>
<asp:Content ContentPlaceHolderID="overHeaderOne" ID="header1" runat="server">
<% if (!string.IsNullOrEmpty((string)ViewData["Avatar"])) { %>
<a href="<%=Url.RouteUrl( "Blogs", new { user = Model.Author } )%>" id="avatar">
<img src="<%=ViewData["Avatar"]%>" />
</a>
<% } %>
<h1 class="blogtitle">
<a href="<%=Url.RouteUrl( "Blogs", new { user = Model.Author } )%>">
<%=Html.Encode(ViewData["BlogTitle"])%></a>
- <a href="<%= Url.RouteUrl( "Default", new { controller = "Home" } ) %>"><%= YavscHelpers.SiteName %></a>
</h1>
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<% foreach (BlogEntry e in this.Model) { %>
<div class="postpreview<% if (!e.Visible) { %> hiddenpost<% } %>" >
<h2><a href="<%= Url.RouteUrl("BlogByTitle", new { user=e.Author, title=e.Title, postid = e.Id })%>" class="usertitleref">
<%=Html.Markdown(e.Title)%></a></h2>
<% bool truncated = false; %>
<%= Html.MarkdownToHtmlIntro(out truncated, e.Content,"/bfiles/"+e.Id+"/") %>
<% if (truncated) { %>
<a href="<%= Url.RouteUrl( "BlogByTitle", new { user=e.Author , title=e.Title, postid = e.Id}) %>">
<i><%=Html.Translate("ReadMore")%></i></a>
<% } %>
<%= Html.Partial("PostActions",e)%>
</div>
<% } %>
<aside>
<form runat="server" id="form1" method="GET">
<%
rp1.ResultCount = (int) ViewData["RecordCount"];
rp1.PageIndex = (int) ViewData["PageIndex"];
%>
<yavsc:ResultPages id="rp1" Action = "?pageIndex={0}" runat="server">
<None><i>Pas de contenu</i></None>
</yavsc:ResultPages>
</form>
</aside>
</asp:Content>

View file

@ -0,0 +1,20 @@
<%@ Page Title="File posting" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<FileUpload>" %>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
<% using(Html.BeginForm("Create", "FileSystem", FormMethod.Post, new { enctype = "multipart/form-data" })) { %>
<div>
<input type="file" ID="AFile" multiple="multiple" runat="server"/>
<%= Html.ValidationMessage("AFile") %>
<br />
<input type="submit" name="Envoyer" />
<br />
<asp:Label ID="Label1"
runat="server"/>
</div>
<% } %>
</asp:Content>

View file

@ -0,0 +1,3 @@
<%@ Page Title="File System - File removal" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
</asp:Content>

View file

@ -0,0 +1,11 @@
<%@ Page Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<System.IO.FileInfo>" %>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
<%= Model.Name %><br/>
Création :
<%= Model.CreationTime %><br/>
Dérnière modification :
<%= Model.LastWriteTime %><br/>
Dernier accès :
<%= Model.LastAccessTime %><br/>
Lien permanent : <a href="<%= ViewData["url"] %>"><%= ViewData["url"] %></a>
</asp:Content>

View file

@ -0,0 +1,5 @@
<%@ Page Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
<%= Html.ActionLink("Delete","FileSystem") %>
<%= Html.ActionLink("Rename","FileSystem") %>
</asp:Content>

View file

@ -0,0 +1,12 @@
<%@ Page Title="Files" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<System.IO.FileInfo[]>" %>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
<h1> Index
</h1>
<ul>
<% foreach (System.IO.FileInfo fi in Model) { %>
<li> <%= Html.ActionLink(fi.Name,"Details",new {id = fi.Name}) %> </li>
<% } %>
</ul>
<%= Html.ActionLink("Ajouter des fichiers","Create") %>
</asp:Content>

View file

@ -0,0 +1,38 @@
<%@ Page Title="Basket" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<CommandSet>" %>
<asp:Content ContentPlaceHolderID="init" ID="init1" runat="server">
<% Title = Title +" "+ Model.Count+" article(s)"; %>
</asp:Content>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
<% if (Model.Count>0) { %>
<ul>
<% foreach (Command cmd in Model.Values) { %>
<li>
<%= cmd.Id %>
<%= cmd.CreationDate %>
<%= cmd.Status %>
<%= cmd.ProductRef %>
<ul>
<% if (cmd.Parameters!=null)
foreach (string key in cmd.Parameters.Keys) { %>
<li><%=key%>: <%=cmd.Parameters[key]%></li>
<% } %>
</ul>
</li>
<% } %>
</ul>
<% } %>
</asp:Content>
<asp:Content ID="MASContentContent" ContentPlaceHolderID="MASContent" runat="server">
<ul><li>
<%= Html.ActionLink("Catalog","Catalog" ) %>
</li><li>
<%= Html.ActionLink("Estimates","Estimates" ) %>
</li></ul>
</asp:Content>

View file

@ -0,0 +1,31 @@
<%@ Page Title="Catalog" Language="C#" Inherits="System.Web.Mvc.ViewPage<Brand>" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="header" ID="headerContent" runat="server">
<h1><% if (Model.Logo!=null) { %>
<img src="<%=Model.Logo.Src%>" alt="<%=Model.Logo.Alt%>"/>
<% } %>
<%=Html.Encode(Model.Name)%></h1>
<p><i><%=Html.Encode(Model.Slogan)%></i></p>
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<% foreach (ProductCategory pc in Model.Categories ) { %>
<div>
<h2><%= Html.ActionLink( pc.Name, "ProductCategory", new { id = Model.Name, pc = pc.Reference }, new { @class="actionlink" } ) %></h2>
</div>
<% foreach (Product p in pc.Products ) { %>
<div>
<h3><%= Html.ActionLink( p.Name, "Product", new { id = Model.Name, pc = pc.Reference , pref = p.Reference }, new { @class="actionlink" } ) %></h3>
<p>
<%= p.Description %>
<% if (p.Images !=null)
foreach (ProductImage i in p.Images ) { %>
<img src="<%=i.Src%>" alt="<%=i.Alt%>"/>
<% } %>
</p>
</div>
<% } %>
<% } %>
</asp:Content>

View file

@ -0,0 +1,28 @@
<%@ Page Title="Catalog" Language="C#" Inherits="System.Web.Mvc.ViewPage<Catalog>" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<% foreach (Brand b in Model.Brands ) { %><div>
<h1> <%= Html.ActionLink( b.Name, "Brand", new { id = b.Name }, new { @class="actionlink" } ) %> </h1>
<p><i><%= Html.Encode( b.Slogan ) %></i></p>
<% foreach (ProductCategory pc in b.Categories ) { %>
<div>
<h2><%= Html.ActionLink( pc.Name, "ProductCategory", new { brandid= b.Name, pcid = pc.Reference }, new { @class="actionlink" } ) %></h2>
</div>
<% foreach (Product p in pc.Products ) { %>
<div>
<h3><%= Html.ActionLink( p.Name, "Product", new { id = b.Name, pc = pc.Reference , pref = p.Reference }, new { @class="actionlink" } ) %></h3>
<p>
<%= p.Description %>
<% if (p.Images !=null)
foreach (ProductImage i in p.Images ) { %>
<img src="<%=i.Src%>" alt="<%=i.Alt%>"/>
<% } %>
</p>
</div>
<% } %>
<% } %>
</div><% } %>
</asp:Content>

View file

@ -0,0 +1,13 @@
<%@ Page Title="Commande" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<FormCollection>" %>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
<%= Html.ActionLink("Votre panier","Basket","FrontOffice" ) %>
</asp:Content>
<asp:Content ID="MASContentContent" ContentPlaceHolderID="MASContent" runat="server">
<ul><li>
<%= Html.ActionLink("Catalog","Catalog" ) %>
</li><li>
<%= Html.ActionLink("Estimates","Estimates" ) %>
</li></ul>
</asp:Content>

View file

@ -0,0 +1,357 @@
<%@ Page Title="Devis" Language="C#" Inherits="System.Web.Mvc.ViewPage<Estimate>" MasterPageFile="~/Models/App.master" %>
<%@ Register Assembly="Yavsc.WebControls" TagPrefix="yavsc" Namespace="Yavsc.WebControls" %>
<asp:Content ContentPlaceHolderID="head" ID="head1" runat="server" >
<script type="text/javascript" src="<%=Url.Content("~/Scripts/stupidtable.js")%>"></script>
<script>
</script>
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<%= Html.ValidationSummary("Devis") %>
<% using (Html.BeginForm("Estimate","FrontOffice")) { %>
<%= Html.LabelFor(model => model.Title) %>:<%= Html.TextBox( "Title" ) %>
<%= Html.ValidationMessage("Title", "*") %>
<br/>
<%= Html.Hidden ("Responsible") %>
<%= Html.LabelFor(model => model.Client) %>:
<% Client.Value = Model.Client ; %>
<yavsc:InputUserName
id="Client"
name="Client"
emptyvalue="*nouvel utilisateur*"
onchange="onClientChange(this.value);"
runat="server" >
</yavsc:InputUserName>
<script>
function onClientChange(newval)
{
if (newval=='')
$("#dfnuser").removeClass("hidden");
else
$("#dfnuser").addClass("hidden");
}
</script>
<%= Html.ValidationMessage("Client", "*") %>
<br/>
<%= Html.LabelFor(model => model.Description) %>:<%=Html.TextArea( "Description") %>
<%= Html.ValidationMessage("Description", "*") %>
<br/>
<%= Html.Hidden( "Id" ) %>
<br/>
<% if (Model.Id==0) { %>
<input type="submit" name="submit" value="Create"/>
<% } else { %>
<input type="submit" name="submit" value="Update"/>
<% } %>
<% if (Model.Id>0) { %>
<table id="tbwrts">
<thead>
<tr>
<th data-sort="string"><%=Yavsc.Model.LocalizedText.Description%></th>
<th data-sort="string"><%=Yavsc.Model.LocalizedText.Product_reference%></th>
<th data-sort="int"><%=Yavsc.Model.LocalizedText.Count%></th>
<th data-sort="float"><%=Yavsc.Model.LocalizedText.Unitary_cost%></th>
</tr>
</thead>
<tbody id="wrts">
<% int lc=0;
if (Model.Lines!=null)
foreach (Writting wr in Model.Lines) { lc++; %>
<tr class="<%= (wr.Id%2==0)?"even ":"odd " %>row" id="wr<%=wr.Id%>">
<td><%=wr.Description%></td>
<td><%=wr.ProductReference%></td>
<td><%=wr.Count%></td>
<td><%=wr.UnitaryCost%></td>
<td>
<input type="button" value="X" class="actionlink rowbtnrm"/>
</td>
</tr>
<% } %>
</tbody>
</table>
<% } %>
<% } %>
</asp:Content>
<asp:Content ContentPlaceHolderID="MASContent" ID="MASContent1" runat="server">
<aside>
<div id="dfnuser" class="hidden">
<%= Html.Partial("~/Views/Account/Register.ascx",new RegisterClientModel(),new ViewDataDictionary(ViewData)
{
TemplateInfo = new System.Web.Mvc.TemplateInfo
{
HtmlFieldPrefix = ViewData.TemplateInfo.HtmlFieldPrefix==""?"ur":ViewData.TemplateInfo.HtmlFieldPrefix+"_ur"
}
}) %>
</div>
</aside>
<aside>
<%= Html.Partial("Writting",new Writting(),new ViewDataDictionary(ViewData)
{
TemplateInfo = new System.Web.Mvc.TemplateInfo
{
HtmlFieldPrefix = ViewData.TemplateInfo.HtmlFieldPrefix==""?"wr":ViewData.TemplateInfo.HtmlFieldPrefix+"_wr"
}
}) %>
<form>
<div>
<input type="button" id="btnnew" value="Nouvelle écriture" class="actionlink"/>
<input type="button" id="btncreate" value="Ecrire" class="actionlink"/>
<input type="button" id="btnmodify" value="Modifier" class="hidden actionlink"/>
</div> </form>
<tt id="msg" class="hidden message"></tt>
<style>
th { cursor:pointer; }
.row { cursor:pointer; }
table.tablesorter td:hover { background-color: rgba(0,64,0,0.5); }
.hidden { display:none; }
.selected td { background-color: rgba(0,64,0,0.5); }
</style>
<script>
jQuery.support.cors = true;
function message(msg) {
if (msg) {
$("#msg").removeClass("hidden");
$("#msg").text(msg);
} else { $("#msg").addClass("hidden"); } }
function GetWritting () {
return {
Id: Number($("#wr_Id").val()),
UnitaryCost: Number($("#wr_UnitaryCost").val()),
Count: parseInt($("#wr_Count").val()),
ProductReference: $("#wr_ProductReference").val(),
Description: $("#wr_Description").val()
};
}
function wredit(pwrid)
{
if (wr_Id.value>0) {
$("#wr"+wr_Id.value).removeClass("selected");
$("#wr"+wr_Id.value).addClass((wr_Id.value%2==0)?"even":"odd");
}
$("#wr_Id").val(pwrid);
if (pwrid>0) {
$("#btncreate").addClass("hidden");
$("#btnmodify").removeClass("hidden");
$("#btndrop").removeClass("hidden");
$("#wr"+wr_Id.value).removeClass((wr_Id.value%2==0)?"even":"odd");
$("#wr"+wr_Id.value).addClass("selected");
} else {
$("#btncreate").removeClass("hidden");
$("#btnmodify").addClass("hidden");
$("#btndrop").addClass("hidden");
}
}
function delRow(e) {
clearWrittingValidation();
e.stopPropagation(); // do not edit this row on this click
// from <row id= ...><tr><td><input type="button" >
var hid=e.delegateTarget.parentNode.parentNode.id;
var vwrid = Number(hid.substr(2));
$.ajax({
url: "<%=Url.Content("~/api/WorkFlow/DropWritting")%>",
type: "Get",
data: { wrid: vwrid },
contentType: 'application/json; charset=utf-8',
success: function () {
$("#wr"+vwrid).remove(); // removes clicked row
wredit(0); // set current form target id to none
message(false); // hides current message
// $("#tbwrts").update();// rebuilds the cache for the tablesorter js
// $("#tbwrts").tablesorter( {sortList: [[0,0], [1,0]]} ); // .update();
},
error: function (xhr, ajaxOptions, thrownError) {
if (xhr.status!=400)
message(xhr.status+" : "+xhr.responseText);
else message(false);
}
});
}
function setRow() {
var wrt = GetWritting();
clearWrittingValidation();
$.ajax({
url: "<%=Url.Content("~/api/WorkFlow/UpdateWritting")%>",
type: 'POST',
data: wrt,
success: function () {
var cells = document.getElementById("wr"+wrt.Id).getElementsByTagName("TD");
cells[0].innerHTML=wrt.Description;
cells[1].innerHTML=wrt.ProductReference;
cells[2].innerHTML=wrt.Count;
cells[3].innerHTML=wrt.UnitaryCost;
message(false);
},
statusCode: {
400: function(data) {
$.each(data.responseJSON, function (key, value) {
var errspanid = "Err_" + value.key.replace(".","_");
var errspan = document.getElementById(errspanid);
if (errspan==null)
alert('enoent '+errspanid);
else
errspan.innerHTML=value.errors.join("<br/>");
});
}
},
error: function (xhr, ajaxOptions, thrownError) {
if (xhr.status!=400)
message(xhr.status+" : "+xhr.responseText);
else message(false);
}
});
}
function addUser()
{
var user={
UserName: $("#ur_UserName").val(),
Name: $("#ur_Name").val(),
Password: $("#ur_Password").val(),
Email: $("#ur_Email").val(),
Address: $("#ur_Address").val(),
CityAndState: $("#ur_CityAndState").val(),
ZipCode: $("#ur_ZipCode").val(),
Phone: $("#ur_Phone").val(),
Mobile: $("#ur_Mobile").val(),
IsApprouved: true
};
clearRegistrationValidation();
$.ajax({
url: "<%=Url.Content("~/api/FrontOffice/Register")%>",
type: "POST",
data: user,
success: function (data) {
$("#Client option:last").after($('<option>'+user.UserName+'</option>'));
Client.value = user.UserName;
onClientChange(Client.value);
},
statusCode: {
400: function(data) {
$.each(data.responseJSON, function (key, value) {
var errspanid = "Err_ur_" + value.key.replace("model.","");
var errspan = document.getElementById(errspanid);
if (errspan==null)
alert('enoent '+errspanid);
else
errspan.innerHTML=value.errors.join("<br/>");
});
}
},
error: function (xhr, ajaxOptions, thrownError) {
if (xhr.status!=400)
message(xhr.status+" : "+xhr.responseText);
else message(false);
}});
}
function clearWrittingValidation() {
$("#Err_wr_Description").text("");
$("#Err_wr_ProductReference").text("");
$("#Err_wr_UnitaryCost").text("");
$("#Err_wr_Count").text("");
}
function clearRegistrationValidation(){
$("#Err_ur_Name").text("");
$("#Err_ur_UserName").text("");
$("#Err_ur_Mobile").text("");
$("#Err_ur_Phone").text("");
$("#Err_ur_Email").text("");
$("#Err_ur_Address").text("");
$("#Err_ur_ZipCode").text("");
$("#Err_ur_CityAndState").text("");
$("#Err_ur_IsApprouved").text("");
}
function addRow(){
var wrt = GetWritting(); // gets a writting object from input controls
var estid = parseInt($("#Id").val());
clearWrittingValidation();
$.ajax({
url: "<%=Url.Content("~/api/WorkFlow/Write?estid=")%>"+estid,
type: "POST",
data: wrt,
dataType: "json",
success: function (data) {
wrt.Id = Number(data);
wredit(wrt.Id);
var wridval = 'wr'+wrt.Id;
jQuery('<tr/>', {
id: wridval,
"class": 'selected row',
}).appendTo('#wrts');
$("<td>"+wrt.Description+"</td>").appendTo("#"+wridval);
$("<td>"+wrt.ProductReference+"</td>").appendTo("#"+wridval);
$("<td>"+wrt.Count+"</td>").appendTo("#"+wridval);
$("<td>"+wrt.UnitaryCost+"</td>").appendTo("#"+wridval);
var btrm = $("<input type=\"button\" value=\"X\" class=\"actionlink rowbtnrm\"/>");
$("<td></td>").append(btrm).appendTo("#"+wridval);
btrm.click(function (e) {delRow(e);});
$("#"+wridval).click(function(ev){onEditRow(ev);});
message(false);
},
statusCode: {
400: Yavsc.onAjaxBadInput
},
error: function (xhr, ajaxOptions, thrownError) {
if (xhr.status!=400)
message(xhr.status+" : "+xhr.responseText);
else message(false);
}
});
}
function onEditRow(e) {
var cells = e.delegateTarget.getElementsByTagName("TD");
var hid=e.delegateTarget.id;
var vwrid = Number(hid.substr(2));
wredit(vwrid);
$("#wr_Description").val(cells[0].innerHTML);
$("#wr_ProductReference").val(cells[1].innerHTML);
$("#wr_Count").val(cells[2].innerHTML);
$("#wr_UnitaryCost").val(Number(cells[3].innerHTML.replace(",",".")));
}
$(document).ready(function () {
$("#btnnewuser").click(addUser);
$("#btncreate").click(addRow);
$("#btnmodify").click(setRow);
$(".row").click(function (e) {onEditRow(e);});
$(".rowbtnrm").click(function (e) {delRow(e);});
$("#btnnew").click(function () {
wredit(0);
$("#wr_Description").val("");
$("#wr_ProductReference").val("");
$("#wr_Count").val(1);
$("#wr_UnitaryCost").val(0);
});
$("#tbwrts").stupidtable();
});
</script>
<a class="actionlink" href="<%=Url.Content(Yavsc.WebApiConfig.UrlPrefixRelative)%>/FrontOffice/EstimateToTex?id=<%=Model.Id%>"><%= LocalizedText.Tex_version %></a>
<a class="actionlink" href="<%=Url.Content(Yavsc.WebApiConfig.UrlPrefixRelative)%>/FrontOffice/EstimateToPdf?id=<%=Model.Id%>"><%= LocalizedText.Pdf_version %></a>
</aside>
</asp:Content>

View file

@ -0,0 +1,24 @@
<%@ Page Title="My estimates" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Estimate>>" %>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
<% if (((int)ViewData["ResponsibleCount"])>0) { %>
<div>
Les estimations que vous avez faites (<%=ViewData["ResponsibleCount"]%>):<br>
<%
foreach (Estimate estim in Model) {
if (string.Compare(estim.Responsible,(string) ViewData["UserName"])==0) { %>
<%= Html.ActionLink("Titre:"+estim.Title+" Client:"+estim.Client,"Estimate",new{id=estim.Id}) %>
<br>
<% }}%>
</div>
<% } %>
<% if (((int)ViewData["ClientCount"])>0) { %>
<div>
Vos estimations en tant que client
(<%=ViewData["ClientCount"]%>):<br>
<% foreach (Estimate estim in Model) { %>
<%= Html.ActionLink("Titre:"+estim.Title+" Responsable:"+estim.Responsible,"Estimate",new{id=estim.Id}) %>
<br><% } %>
</div>
<% } %>
</asp:Content>

View file

@ -0,0 +1,20 @@
<%@ Page Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<EventPub>" %>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
<% using (Html.BeginForm()) { %>
<%= Html.LabelFor(model => model.Title) %>: <%=Model.Title%><br/>
<%= Html.LabelFor(model => model.Description) %>: <%=Model.Description%> <br/>
<%= Html.LabelFor(model => model.Location) %>: <%=Model.Location%> <br/>
<%= Html.LabelFor(model => model.StartDate) %>: <%=Model.StartDate%> <br/>
<%= Html.LabelFor(model => model.EndDate) %>: <%=Model.EndDate%> <br/>
<%= Html.LabelFor(model => model.Circles) %>: <%=Model.Circles%> <br/>
<%= Html.LabelFor(model => model.ImgLocator) %>: <%=Model.ImgLocator%> <br/>
<%= Html.LabelFor(model => model.EventWebPage) %>: <%=Model.EventWebPage%> <br/>
<%= Html.LabelFor(model => model.ProviderName) %>: <%=Model.ProviderName%> <br/>
<%= Html.LabelFor(model => model.Comment) %>: <%=Model.Comment%> <br/>
<% } %>
</asp:Content>

View file

@ -0,0 +1,11 @@
<%@ Page Title="Front office" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
</asp:Content>
<asp:Content ID="MASContentContent" ContentPlaceHolderID="MASContent" runat="server">
<ul><li>
<%= Html.ActionLink("Catalog","Catalog" ) %>
</li><li>
<%= Html.ActionLink("Estimates","Estimates" ) %>
</li></ul>
</asp:Content>

View file

@ -0,0 +1,33 @@
<%@ Page Title="Catalog" Language="C#" Inherits="System.Web.Mvc.ViewPage<PhysicalProduct>" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="init" ID="init1" runat="server">
<% Title = Model.Name; %>
</asp:Content>
<asp:Content ContentPlaceHolderID="header" ID="headerContent" runat="server">
<i><%= Html.Encode(Model.Reference) %></i></asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<div class="product">
<p><%= Html.Encode(Model.Description) %></p>
<% if (Model.Images!=null) foreach (ProductImage i in Model.Images) { %>
<img src="<%=i.Src%>" alt="<%=i.Alt%>"/>
<% } %>
<% if (Model.UnitaryPrice !=null) { %>
Prix unitaire : <%= Html.Encode(Model.UnitaryPrice.Quantity.ToString())%>
<%= Html.Encode(Model.UnitaryPrice.Unit.Name)%>
<% } else { %> Gratuit! <% } %>
</div>
<div class="booking">
<!---
- TODO: better
- ASSERT (Model.CommandForm!=null) --->
<%= Html.CommandForm(Model,"Ajouter au panier") %>
<% if (Model.CommandValidityDates!=null) { %>
Offre valable du <%= Model.CommandValidityDates.StartDate.ToString("dd/MM/yyyy") %> au
<%= Model.CommandValidityDates.EndDate.ToString("dd/MM/yyyy") %>.
<% } %>
</div>
</asp:Content>

View file

@ -0,0 +1,20 @@
<%@ Page Title="Catalog" Language="C#" Inherits="System.Web.Mvc.ViewPage<ProductCategory>" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<% foreach (Product p in Model.Products ) { %>
<h3><%= Html.ActionLink( p.Name, "Product", new { id = ViewData["BrandId"], pc = Model.Reference , pref = p.Reference }, new { @class="actionlink" } ) %></h3>
<p>
<%= p.Description %>
<% if (p.Images !=null)
foreach (ProductImage i in p.Images ) { %>
<img src="<%=i.Src%>" alt="<%=i.Alt%>"/>
<% } %>
</p>
<% } %>
</asp:Content>

View file

@ -0,0 +1,5 @@
<%@ Page Title="Référence absente au catalogue" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
<!-- TODO more details -->
</asp:Content>

View file

@ -0,0 +1,31 @@
<%@ Page Title="Catalog" Language="C#" Inherits="System.Web.Mvc.ViewPage<Service>" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="init" ID="init1" runat="server">
<% Title = ViewData ["BrandName"] + " " + Model.Name; %>
</asp:Content>
<asp:Content ContentPlaceHolderID="header" ID="headerContent" runat="server">
<h2> <%=ViewData ["ProdCatName"]%> - <%= Html.ActionLink( Model.Name, "Product", new { id = ViewData ["BrandName"], pc = ViewData ["ProdCatRef"] , pref = Model.Reference } ) %></h2>
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<div class="service">
<p><%= Html.Encode(Model.Description) %></p>
<% if (Model.Images!=null) foreach (ProductImage i in Model.Images) { %>
<img src="<%=i.Src%>" alt="<%=i.Alt%>"/>
<% } %>
<% if (Model.HourPrice !=null) { %>
Prix horaire de la prestation :
<%= Html.Encode(Model.HourPrice.Quantity.ToString())%>
<%= Html.Encode(Model.HourPrice.Unit.Name)%>
<% } %>
</div>
<div class="booking">
<%= Html.CommandForm(Model,"Ajouter au panier") %>
<% if (Model.CommandValidityDates!=null) { %>
Offre valable du <%= Model.CommandValidityDates.StartDate.ToString("dd/MM/yyyy") %> au
<%= Model.CommandValidityDates.EndDate.ToString("dd/MM/yyyy") %>.
<% } %>
</div>
</asp:Content>

View file

@ -0,0 +1,25 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Writting>" %>
<%= Html.ValidationSummary("Ligne de devis") %>
<% using (Html.BeginForm("Write","WorkFlow")) { %>
<div>
<%= Html.Hidden( "Id" ) %>
<%= Html.LabelFor(model => model.Description) %>:<%= Html.TextArea( "Description" ) %>
<%= Html.ValidationMessage("Description", "*", new { @id="Err_wr_Description", @class="error" }) %>
<br/>
<%= Html.LabelFor(model => model.ProductReference) %>:<%= Html.TextBox( "ProductReference" ) %>
<%= Html.ValidationMessage("ProductReference", "*", new { @id="Err_wr_ProductReference", @class="error" }) %>
<br/>
<%= Html.LabelFor(model => model.UnitaryCost) %>:<%= Html.TextBox( "UnitaryCost" ) %>
<%= Html.ValidationMessage("UnitaryCost", "", new { @id="Err_wr_UnitaryCost", @class="error" }) %>
<br/>
<%= Html.LabelFor(model => model.Count) %>:<%= Html.TextBox( "Count" ) %>
<%= Html.ValidationMessage("Count", "", new { @id="Err_wr_Count" , @class="error"}) %>
</div>
<% } %>

View file

@ -0,0 +1,6 @@
<%@ Page Title="Catalog" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
AccessToken : <%= Session["AccessToken"] %>
Target in error : <%= ViewData["TargetNameError"] %>
</asp:Content>

View file

@ -0,0 +1,65 @@
<%@ Page Title="Booking" Language="C#" Inherits="System.Web.Mvc.ViewPage<BookQuery>" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="head" ID="headContent" runat="server">
<link rel="stylesheet" type="text/css" href="/App_Themes/jquery.timepicker.css" />
<script type="text/javascript" src="/Scripts/globalize/globalize.js"></script>
<script type="text/javascript" src="/Scripts/jquery.mousewheel.js"></script>
<script type="text/javascript" src="/Scripts/globalize/cultures/globalize.culture.fr.js"></script>
<script type="text/javascript" src="/Scripts/datepicker-fr.js"></script>
<script type="text/javascript" src="/Scripts/datepicker-en-GB.js"></script>
<script type="text/javascript" src="/Scripts/jquery.timepicker.min.js"></script>
<script type="text/javascript" src="/Scripts/datepair.js"></script>
<script type="text/javascript" src="/Scripts/jquery.datepair.min.js"></script>
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<% using ( Html.BeginForm("Book","Google") ) { %>
<div id="book" >Date d'intervention :
Intervention souhaitée entre le
<input type="text" id="StartDate" name="StartDate" class="start date" value="<%=Model.StartDate.ToString("yyyy/MM/dd")%>">
<%= Html.ValidationMessageFor( model=>model.StartDate ) %>
et le
<input type="text" id="EndDate" name="EndDate" class="end date" value="<%=Model.StartDate.ToString("yyyy/MM/dd")%>">
<%= Html.ValidationMessageFor(model=>model.EndDate) %>
<br>
Heure et durée d'intervention souhaitée
<%= Html.LabelFor(model=>model.StartHour) %>
<input type="text" id="StartHour" name="StartHour" class="start time" value="<%=Model.StartHour%>">
<%= Html.ValidationMessageFor(model=>model.StartHour) %>
<%= Html.LabelFor(model=>model.EndHour) %>
<input type="text" id="EndHour" name="EndHour" class="end time" value="<%=Model.EndHour%>">
<%= Html.ValidationMessageFor(model=>model.EndHour) %>
</div>
<fieldset>
<legend>Intervenant</legend>
<%= Html.LabelFor(model=>model.Role) %>:
<%= Html.TextBoxFor(model=>model.Role) %>
<%= Html.ValidationMessageFor(model=>model.Role) %>
<br>
<%= Html.LabelFor(model=>model.Person) %>:
<%= Html.TextBoxFor(model=>model.Person) %>
<%= Html.ValidationMessageFor(model=>model.Person) %>
</fieldset>
<script>
$(document).ready(function(){
var tpconfig = {
'timeFormat': 'H:i',
'showDuration': true,
'disableTimeRanges': [
['17:01pm', '24:01pm'],
['0am', '9am']
]};
$.datepicker.setDefaults($.datepicker.regional[ "fr" ] );
var dpconfig = {
'format': 'yy/mm/dd',
'autoclose': true } ;
$('#book .time').timepicker(tpconfig);
$('#book .date').datepicker(dpconfig);
$('#book').datepair();
});
</script>
<input type="submit">
<% } %>
</asp:Content>

View file

@ -0,0 +1,5 @@
<%@ Page Title="Catalog" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
</asp:Content>

View file

@ -0,0 +1,13 @@
<%@ Page Title="Google calendar usage" Language="C#" Inherits="System.Web.Mvc.ViewPage<IFreeDateSet>" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<% using ( Html.BeginForm("ChooseAStartingDate","Google") ) { %>
<% foreach (Period e in Model.Values) { %>
<input type="radio" name="datechoice" value="du <%=e.Start%> au <%=e.End%>" />
<% } %>
<input type="hidden" name="returnUrl" id="returnUrl" value="<%=Html.Encode(ViewData["returnUrl"])%>">
<input type="submit">
<% } %>
</asp:Content>

View file

@ -0,0 +1,17 @@
<%@ Page Title="Google calendar usage" Language="C#" Inherits="System.Web.Mvc.ViewPage<CalendarList>" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<% using ( Html.BeginForm("SetCalendar","Google") ) { %>
<input type="radio" name="calchoice" id ="c0" value="0" >
<label for="c0">Calendrier intégré</label><br>
<% foreach (CalendarListEntry e in Model.items.Where(x=>x.accessRole=="owner")) { %>
<input type="radio" name="calchoice" id="c<%=e.id%>" value="<%=e.id%>" />
<label for="c<%=e.id%>"><%=Html.Encode(e.summary)%> <br>
<i><%=Html.Encode(e.description)%></i></label> <br>
<% } %>
<input type="hidden" name="returnUrl" id="returnUrl" value="<%=Html.Encode(ViewData["returnUrl"])%>">
<input type="submit">
<% } %>
</asp:Content>

View file

@ -0,0 +1,4 @@
<%@ Page Title="Google interface" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
</asp:Content>

View file

@ -0,0 +1,9 @@
<%@ Page Title="Google error message" Language="C#" Inherits="System.Web.Mvc.ViewPage<OtherWebException>" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<h2><%= Html.Encode(Model.Title)%></h2>
<pre>
<code>
<%= Html.Encode(Model.Content) %>
</code></pre>
</asp:Content>

View file

@ -0,0 +1,19 @@
<%@ Page Title="Assemblies" Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<System.Reflection.AssemblyName>>" MasterPageFile="~/Models/App.master"%>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<div class="panel">
<p>
Running assembly :
<%= GetType().Assembly.FullName %></p>
</div>
<div class="panel">
<p>
Assemblies referenced in this application :
</p>
<ul>
<% foreach (System.Reflection.AssemblyName item in Model) { %>
<li><%= item.FullName %></li>
<% } %>
</ul>
</div>
</asp:Content>

View file

@ -0,0 +1,37 @@
<%@ Page Title="Contact" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<div class="panel">
<p>
Directeur : <br>
Adresse postale : <br>
Tél. : +33 <br>
Tél. : +33 <br>
SIREN : <br>
SIRET : <br>
Activité Principalement Exercée (APE) : <br>
</p>
<% using (Html.BeginForm("Contact", "Home")) { %>
<fieldset>
<legend>Message</legend>
<p>
<%= Html.Label("email") %>:
<%= Html.ValidationMessage("email") %><br/>
<%= Html.TextBox("email") %>
</p>
<p>
<%= Html.Label("reason") %>:
<%= Html.ValidationMessage("reason") %><br/>
<%= Html.TextBox("reason") %>
</p>
<p>
<%= Html.Label("body") %>:
<%= Html.ValidationMessage("body") %><br/>
<%= Html.TextArea("body") %>
</p>
</fieldset>
<input type="submit" value="<%=Html.Translate("Submit")%>">
<% } %>
</div>
</asp:Content>

View file

@ -0,0 +1,5 @@
<%@ Page Title="Credits" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
<div>Icons made by <a href="http://www.flaticon.com/authors/vectorgraphit" title="Vectorgraphit">Vectorgraphit</a> from <a href="http://www.flaticon.com" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></div>
</asp:Content>

View file

@ -0,0 +1,16 @@
<%@ Page Title="Home" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/App.master"%>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<%= Html.Partial("TagPanel",ViewData["Accueil"]) %>
<%= Html.Partial("TagPanel",ViewData["Événements"]) %>
<%= Html.Partial("TagPanel",ViewData["Mentions légales"]) %>
</asp:Content>
<asp:Content ContentPlaceHolderID="MASContent" ID="MASContentContent" runat="server">
<div class="panel">
<%= Html.ActionLink("Les articles", "Index", "Blogs") %>
<%= Html.ActionLink("Contact", "Contact", "Home", null, new { @class="actionlink" }) %>
<%= Html.ActionLink("Credits", "Credits", "Home", null, new { @class="actionlink" }) %>
<%= Html.ActionLink("Version des librairies", "AssemblyInfo", "Home", null, new { @class="actionlink" }) %>
</div>
</asp:Content>

View file

@ -0,0 +1,13 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<TagInfo>" %>
<div class="panel">
<h2><%=Html.Encode(Model.Name)%></h2>
<% foreach (var t in Model.Titles) { %>
<div class="postpreview">
<a href="<%= Url.RouteUrl("Titles", new { title = t.Title }) %>">
<% if (t.Photo != null ) { %>
<img src="<%=t.Photo%>" alt="placard" class="photo"><% } %>
<%= Html.Markdown(t.Title,"/bfiles/"+t.Id+"/")%></a>
<%= Html.Markdown(t.Intro,"/bfiles/"+t.Id+"/") %>
</div>
<% } %>
</div>

41
booking/Views/Web.config Normal file
View file

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<httpHandlers>
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler" />
</httpHandlers>
<!--
Enabling request validation in view pages would cause validation to occur
after the input has already been processed by the controller. By default
MVC performs request validation before a controller processes the input.
To change this behavior apply the ValidateInputAttribute to a
controller or action.
-->
<pages validateRequest="true" pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<controls>
<add assembly="System.Web.Mvc" namespace="System.Web.Mvc" tagPrefix="mvc" />
<add tagPrefix="yavsc" namespace="Yavsc.WebControls" assembly="Yavsc.WebControls" />
</controls>
<namespaces>
<add namespace="Yavsc.Helpers" />
<add namespace="Yavsc.Admin" />
<add namespace="Yavsc.CatExts" />
<add namespace="Yavsc.Model.RolesAndMembers" />
<add namespace="Yavsc.Model.Admin" />
<add namespace="Yavsc.Model.Blogs" />
<add namespace="Yavsc.Model.WorkFlow" />
<add namespace="Yavsc.Model.Google" />
<add namespace="Yavsc.Model.FrontOffice" />
<add namespace="Yavsc.Model.Circles" />
<add namespace="Yavsc.Model.Calendar" />
<add namespace="System.Collections.Generic" />
</namespaces>
</pages>
</system.web>
<system.webServer>
<!-- <validation validateIntegratedModeConfiguration="false" /> -->
<handlers>
<remove name="BlockViewHandler" />
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer></configuration>

View file

@ -0,0 +1,9 @@
<%@ Page Title="Workflow" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/App.master"%>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<div>
<%= Html.ActionLink("blogs","Index","WorkFlow") %>
</div>
</asp:Content>

View file

@ -0,0 +1,20 @@
<%@ Page Title="Nouveau projet" Language="C#" Inherits="System.Web.Mvc.ViewPage<WorkFlow.NewProjectModel>" MasterPageFile="~/Models/App.master" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<div>
<%= Html.ValidationSummary("Nouveau projet") %>
<% using ( Html.BeginForm("NewProject", "WorkFlow") ) { %>
<%= Html.LabelFor(model => model.Name) %> :
<%= Html.TextBox( "Name" ) %>
<%= Html.ValidationMessage("Name", "*") %><br/>
<%= Html.LabelFor(model => model.Manager) %> :
<%= Html.TextBox( "Manager" ) %>
<%= Html.ValidationMessage("Manager", "*") %><br/>
<%= Html.LabelFor(model => model.Description) %> :
<%= Html.TextBox( "Description" ) %>
<%= Html.ValidationMessage("Description", "*") %><br/>
<input type="submit"/>
<% } %>
</div>
</asp:Content>