Passage à ASP.NET vNext
This commit is contained in:
parent
ea90fefc31
commit
388b004837
1929 changed files with 104611 additions and 235941 deletions
30
Yavsc/Views/Account/Authorize.cshtml
Normal file
30
Yavsc/Views/Account/Authorize.cshtml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
@{
|
||||
ViewData["Title"] = "Authorization Server";
|
||||
var identity = ViewData.Ticket != null ? ViewData.Ticket.Identity : null;
|
||||
var scopes = (Request.QueryString.Get("scope") ?? "").Split(' ');
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
|
||||
<form method="POST">
|
||||
<p>Hello, <%=identity.Name%></p>
|
||||
|
||||
<%if (ViewData["Message"]!=null) { %>
|
||||
<p><%=Html.Encode(ViewData["Message"])%></p>
|
||||
<% } %>
|
||||
<p>A third party application want to do the following on your behalf:</p>
|
||||
<ul>
|
||||
<% foreach (var scope in scopes)
|
||||
{ %>
|
||||
<li><%=scope%></li>
|
||||
<% } %>
|
||||
</ul>
|
||||
<p>
|
||||
<a href="<%=ViewData["redirect_uri"]%>">Retour</a>
|
||||
<%=Html.Hidden("redirect_uri",ViewData["redirect_uri"])%>
|
||||
<input type="submit" name="submit.Grant" value="Grant" />
|
||||
<input type="submit" name="submit.Login" value="Sign in as different user" />
|
||||
</p>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
10
Yavsc/Views/Account/ConfirmEmail.cshtml
Executable file
10
Yavsc/Views/Account/ConfirmEmail.cshtml
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
@{
|
||||
ViewData["Title"] = "Confirm Email";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<div>
|
||||
<p>
|
||||
Thank you for confirming your email. Please <a asp-controller="Account" asp-action="Login">Click here to Log in</a>.
|
||||
</p>
|
||||
</div>
|
||||
13
Yavsc/Views/Account/Delete.cshtml
Normal file
13
Yavsc/Views/Account/Delete.cshtml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
@model UnregisterViewModel
|
||||
@{
|
||||
ViewData["Title"] = @SR["Unregister"];
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
|
||||
<form asp-controller="Account" asp-action="Delete" method="post" class="form-horizontal" role="form">
|
||||
|
||||
@Html.Hidden("ReturnUrl")
|
||||
<input type="submit" value="@SR["Unregister"]" class="btn btn-default"/>
|
||||
</form>
|
||||
|
||||
42
Yavsc/Views/Account/ExternalLoginConfirmation.cshtml
Executable file
42
Yavsc/Views/Account/ExternalLoginConfirmation.cshtml
Executable file
|
|
@ -0,0 +1,42 @@
|
|||
@model ExternalLoginConfirmationViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Register";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<h3>Associate your @ViewData["LoginProvider"] account.</h3>
|
||||
|
||||
<form asp-controller="Account" asp-action="ExternalLoginConfirmation" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal" role="form">
|
||||
<h4>Association Form</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||
|
||||
<p class="text-info">
|
||||
You've successfully authenticated with <strong>@ViewData["LoginProvider"]</strong>.
|
||||
Please enter a user name for this site below and click the Register button to finish
|
||||
logging in.
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<label asp-for="Name" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Name" class="form-control" />
|
||||
<span asp-validation-for="Name" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Email" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Email" class="form-control" />
|
||||
<span asp-validation-for="Email" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">Register</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
8
Yavsc/Views/Account/ExternalLoginFailure.cshtml
Executable file
8
Yavsc/Views/Account/ExternalLoginFailure.cshtml
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
@{
|
||||
ViewData["Title"] = "Login Failure";
|
||||
}
|
||||
|
||||
<hgroup>
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<h3 class="text-danger">Unsuccessful login with service.</h3>
|
||||
</hgroup>
|
||||
6
Yavsc/Views/Account/Forbidden.cshtml
Normal file
6
Yavsc/Views/Account/Forbidden.cshtml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
@{
|
||||
ViewData["Title"] = SR["Forbidden"];
|
||||
}
|
||||
|
||||
|
||||
<a href="Login">@SR["Login"]</a>
|
||||
31
Yavsc/Views/Account/ForgotPassword.cshtml
Executable file
31
Yavsc/Views/Account/ForgotPassword.cshtml
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
@model ForgotPasswordViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Forgot your password?";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<p>
|
||||
For more information on how to enable reset password please see this <a href="http://go.microsoft.com/fwlink/?LinkID=532713">article</a>.
|
||||
</p>
|
||||
|
||||
@*<form asp-controller="Account" asp-action="ForgotPassword" method="post" class="form-horizontal" role="form">
|
||||
<h4>Enter your email.</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Email" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Email" class="form-control" />
|
||||
<span asp-validation-for="Email" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>*@
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
8
Yavsc/Views/Account/ForgotPasswordConfirmation.cshtml
Executable file
8
Yavsc/Views/Account/ForgotPasswordConfirmation.cshtml
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
@{
|
||||
ViewData["Title"] = "Forgot Password Confirmation";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<p>
|
||||
Please check your email to reset your password.
|
||||
</p>
|
||||
8
Yavsc/Views/Account/Lockout.cshtml
Executable file
8
Yavsc/Views/Account/Lockout.cshtml
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
@{
|
||||
ViewData["Title"] = "Locked out";
|
||||
}
|
||||
|
||||
<hgroup>
|
||||
<h1 class="text-danger">Locked out.</h1>
|
||||
<h2 class="text-danger">This account has been locked out, please try again later.</h2>
|
||||
</hgroup>
|
||||
90
Yavsc/Views/Account/Login.cshtml
Executable file
90
Yavsc/Views/Account/Login.cshtml
Executable file
|
|
@ -0,0 +1,90 @@
|
|||
@using System.Collections.Generic
|
||||
@using Microsoft.AspNet.Http
|
||||
@using Microsoft.AspNet.Http.Authentication
|
||||
@model LoginViewModel
|
||||
@inject SignInManager<ApplicationUser> SignInManager
|
||||
|
||||
@{
|
||||
ViewData["Title"] = SR["Log in"];
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<section>
|
||||
<form asp-controller="Account" asp-action="Login" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal" role="form">
|
||||
<h4>@SR["Use a local account to log in."]</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label for="UserName" class="col-md-2 control-label">@SR["UserName"]</label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="UserName" class="form-control" />
|
||||
<span asp-validation-for="UserName" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="Password" class="col-md-2 control-label">@SR["Password"]</label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Password" class="form-control" />
|
||||
<span asp-validation-for="Password" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<div class="checkbox">
|
||||
<input asp-for="RememberMe" />
|
||||
<label for="RememberMe" class="control-label">@SR["Remember me"]</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">@SR["Login"]</button>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<a asp-action="Register">@SR["Register as a new user?"]</a>
|
||||
</p>
|
||||
<p>
|
||||
<a asp-action="ForgotPassword">@SR["Forgot your password?"]</a>
|
||||
</p>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<section>
|
||||
<h4>@SR["Use another service to log in."]</h4>
|
||||
<hr />
|
||||
@{
|
||||
var loginProviders = SignInManager.GetExternalAuthenticationSchemes().ToList();
|
||||
if (loginProviders.Count == 0)
|
||||
{
|
||||
<div>
|
||||
<p>
|
||||
There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkID=532715">this article</a>
|
||||
for details on setting up this ASP.NET application to support logging in via external services.
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<form asp-controller="Account" asp-action="ExternalLogin" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal" role="form">
|
||||
<div>
|
||||
<p>
|
||||
@foreach (var provider in loginProviders)
|
||||
{
|
||||
<button type="submit" class="btn btn-default" name="provider" value="@provider.AuthenticationScheme" title="Log in using your @provider.DisplayName account">@provider.AuthenticationScheme</button>
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
}
|
||||
}
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
54
Yavsc/Views/Account/Register.cshtml
Executable file
54
Yavsc/Views/Account/Register.cshtml
Executable file
|
|
@ -0,0 +1,54 @@
|
|||
@model RegisterViewModel
|
||||
@{
|
||||
ViewData["Title"] = @SR["Register"];
|
||||
}
|
||||
|
||||
@section header{
|
||||
<script src="~/lib/jquery-validation/jquery.validate.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
|
||||
<form asp-controller="Account" asp-action="Register" data-toggle="validator" method="post" class="form-horizontal" role="form">
|
||||
<h4>@SR["Create a new account"].</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="UserName" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="UserName" class="form-control" placeholder="Your Name" required/>
|
||||
<span asp-validation-for="UserName" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Email" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Email" class="form-control" placeholder="Your@@email" required/>
|
||||
<span asp-validation-for="Email" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Password" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Password" class="form-control" />
|
||||
<span asp-validation-for="Password" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ConfirmPassword" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ConfirmPassword" class="form-control" />
|
||||
<span asp-validation-for="ConfirmPassword" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">@SR["Register"]</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
43
Yavsc/Views/Account/ResetPassword.cshtml
Executable file
43
Yavsc/Views/Account/ResetPassword.cshtml
Executable file
|
|
@ -0,0 +1,43 @@
|
|||
@model ResetPasswordViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Reset password";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
|
||||
<form asp-controller="Account" asp-action="ResetPassword" method="post" class="form-horizontal" role="form">
|
||||
<h4>Reset your password.</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||
<input asp-for="Code" type="hidden" />
|
||||
<div class="form-group">
|
||||
<label asp-for="Email" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Email" class="form-control" />
|
||||
<span asp-validation-for="Email" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Password" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Password" class="form-control" />
|
||||
<span asp-validation-for="Password" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ConfirmPassword" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ConfirmPassword" class="form-control" />
|
||||
<span asp-validation-for="ConfirmPassword" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">Reset</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
8
Yavsc/Views/Account/ResetPasswordConfirmation.cshtml
Executable file
8
Yavsc/Views/Account/ResetPasswordConfirmation.cshtml
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
@{
|
||||
ViewData["Title"] = "Reset password confirmation";
|
||||
}
|
||||
|
||||
<h1>@ViewData["Title"].</h1>
|
||||
<p>
|
||||
Your password has been reset. Please <a asp-controller="Account" asp-action="Login">Click here to log in</a>.
|
||||
</p>
|
||||
21
Yavsc/Views/Account/SendCode.cshtml
Executable file
21
Yavsc/Views/Account/SendCode.cshtml
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
@model SendCodeViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Send Verification Code";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
|
||||
<form asp-controller="Account" asp-action="SendCode" asp-route-returnurl="@Model.ReturnUrl" method="post" class="form-horizontal" role="form">
|
||||
<input asp-for="RememberMe" type="hidden" />
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
Select Two-Factor Authentication Provider:
|
||||
<select asp-for="SelectedProvider" asp-items="Model.Providers"></select>
|
||||
<button type="submit" class="btn btn-default">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
38
Yavsc/Views/Account/VerifyCode.cshtml
Executable file
38
Yavsc/Views/Account/VerifyCode.cshtml
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
@model VerifyCodeViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Verify";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
|
||||
<form asp-controller="Account" asp-action="VerifyCode" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal" role="form">
|
||||
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||
<input asp-for="Provider" type="hidden" />
|
||||
<input asp-for="RememberMe" type="hidden" />
|
||||
<h4>@ViewData["Status"]</h4>
|
||||
<hr />
|
||||
<div class="form-group">
|
||||
<label asp-for="Code" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Code" class="form-control" />
|
||||
<span asp-validation-for="Code" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<div class="checkbox">
|
||||
<input asp-for="RememberBrowser" />
|
||||
<label asp-for="RememberBrowser"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
57
Yavsc/Views/Activity/Create.cshtml
Normal file
57
Yavsc/Views/Activity/Create.cshtml
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
@model YavscWeb.Models.Activity
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
|
||||
<h2>Create</h2>
|
||||
|
||||
<form asp-action="Create">
|
||||
<div class="form-horizontal">
|
||||
<h4>Activity</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Code" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Code" class="form-control" />
|
||||
<span asp-validation-for="Code" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Name" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Name" class="form-control" />
|
||||
<span asp-validation-for="Name" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Description" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Description" class="form-control" />
|
||||
<span asp-validation-for="Description" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Photo" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Photo" class="form-control" />
|
||||
<span asp-validation-for="Photo" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Create" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
40
Yavsc/Views/Activity/Delete.cshtml
Normal file
40
Yavsc/Views/Activity/Delete.cshtml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
@model YavscWeb.Models.Activity
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Activity</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Description)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Description)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Name)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Name)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Photo)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Photo)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<div class="form-actions no-color">
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
37
Yavsc/Views/Activity/Details.cshtml
Normal file
37
Yavsc/Views/Activity/Details.cshtml
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
@model YavscWeb.Models.Activity
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>Activity</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Description)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Description)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Name)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Name)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Photo)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Photo)
|
||||
<img src="@Model.Photo" style="max-width:100%"/>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Code">Edit</a> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</p>
|
||||
51
Yavsc/Views/Activity/Edit.cshtml
Normal file
51
Yavsc/Views/Activity/Edit.cshtml
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
@model YavscWeb.Models.Activity
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
|
||||
<form asp-action="Edit">
|
||||
<div class="form-horizontal">
|
||||
<h4>Activity</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="Code" />
|
||||
<div class="form-group">
|
||||
<label asp-for="Description" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Description" class="form-control" />
|
||||
<span asp-validation-for="Description" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Name" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Name" class="form-control" />
|
||||
<span asp-validation-for="Name" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Photo" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Photo" class="form-control" />
|
||||
<span asp-validation-for="Photo" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
51
Yavsc/Views/Activity/Index.cshtml
Normal file
51
Yavsc/Views/Activity/Index.cshtml
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
@model IEnumerable<YavscWeb.Models.Activity>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Code)
|
||||
</th>
|
||||
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Description)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Name)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Photo)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Code)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Description)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Name)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Photo)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Code">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.Code">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.Code">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
53
Yavsc/Views/Application/Create.cshtml
Normal file
53
Yavsc/Views/Application/Create.cshtml
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
@model YavscWeb.Application
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
|
||||
<h2>Create</h2>
|
||||
|
||||
<form asp-action="Create">
|
||||
<div class="form-horizontal">
|
||||
<h4>Application</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="DisplayName" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="DisplayName" class="form-control" />
|
||||
<span asp-validation-for="DisplayName" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="LogoutRedirectUri" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="LogoutRedirectUri" class="form-control" />
|
||||
<span asp-validation-for="LogoutRedirectUri" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="RedirectUri" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="RedirectUri" class="form-control" />
|
||||
<span asp-validation-for="RedirectUri" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Secret" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Secret" class="form-control" />
|
||||
<span asp-validation-for="Secret" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Create" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
46
Yavsc/Views/Application/Delete.cshtml
Normal file
46
Yavsc/Views/Application/Delete.cshtml
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
@model YavscWeb.Application
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Application</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.DisplayName)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.DisplayName)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.LogoutRedirectUri)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.LogoutRedirectUri)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.RedirectUri)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.RedirectUri)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Secret)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Secret)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<div class="form-actions no-color">
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
42
Yavsc/Views/Application/Details.cshtml
Normal file
42
Yavsc/Views/Application/Details.cshtml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
@model YavscWeb.Application
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>Application</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.DisplayName)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.DisplayName)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.LogoutRedirectUri)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.LogoutRedirectUri)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.RedirectUri)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.RedirectUri)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Secret)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Secret)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
<a asp-action="Edit" asp-route-id="@Model.ApplicationID">Edit</a> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</p>
|
||||
54
Yavsc/Views/Application/Edit.cshtml
Normal file
54
Yavsc/Views/Application/Edit.cshtml
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
@model YavscWeb.Application
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
|
||||
<form asp-action="Edit">
|
||||
<div class="form-horizontal">
|
||||
<h4>Application</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="ApplicationID" />
|
||||
<div class="form-group">
|
||||
<label asp-for="DisplayName" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="DisplayName" class="form-control" />
|
||||
<span asp-validation-for="DisplayName" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="LogoutRedirectUri" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="LogoutRedirectUri" class="form-control" />
|
||||
<span asp-validation-for="LogoutRedirectUri" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="RedirectUri" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="RedirectUri" class="form-control" />
|
||||
<span asp-validation-for="RedirectUri" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Secret" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Secret" class="form-control" />
|
||||
<span asp-validation-for="Secret" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
50
Yavsc/Views/Application/Index.cshtml
Normal file
50
Yavsc/Views/Application/Index.cshtml
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
@model IEnumerable<YavscWeb.Application>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.DisplayName)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.LogoutRedirectUri)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.RedirectUri)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Secret)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DisplayName)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.LogoutRedirectUri)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.RedirectUri)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Secret)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.ApplicationID">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.ApplicationID">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.ApplicationID">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
16
Yavsc/Views/Blogs/Index.cshtml
Executable file
16
Yavsc/Views/Blogs/Index.cshtml
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
@model IEnumerable<blog>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Blog spot";
|
||||
}
|
||||
|
||||
<div class="row">
|
||||
@foreach (var entry in Model) {
|
||||
<div class="col-md-3">
|
||||
<h2> @entry.Title</h2>
|
||||
<ul>
|
||||
<li>Sample pages using ASP.NET MVC 6</li>
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
59
Yavsc/Views/Blogspot/Create.cshtml
Normal file
59
Yavsc/Views/Blogspot/Create.cshtml
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
@model YavscWeb.Models.Blog
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
|
||||
<h2>Create</h2>
|
||||
|
||||
<form asp-action="Create" role="form">
|
||||
<div class="form-horizontal">
|
||||
<h4>Blog</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
|
||||
<div class="form-group">
|
||||
<label asp-for="title" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="title" class="form-control" />
|
||||
<span asp-validation-for="title" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="photo" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="photo" class="form-control" />
|
||||
<span asp-validation-for="photo" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="bcontent" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<textarea asp-for="bcontent" class="form-control" >
|
||||
</textarea>
|
||||
<span asp-validation-for="bcontent" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="visible" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="visible" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
@Html.Hidden("AuthorId")
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Create" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
78
Yavsc/Views/Blogspot/Delete.cshtml
Normal file
78
Yavsc/Views/Blogspot/Delete.cshtml
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
@model YavscWeb.Models.Blog
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>Delete</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Blog</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@SR["Author"]
|
||||
</dt>
|
||||
<dd>
|
||||
@Model.Author
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.bcontent)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.bcontent)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.modified)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.modified)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.photo)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.photo)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.posted)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.posted)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.rate)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.rate)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.title)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.title)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.visible)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.visible)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<div class="form-actions no-color">
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
</body>
|
||||
</html>
|
||||
71
Yavsc/Views/Blogspot/Details.cshtml
Normal file
71
Yavsc/Views/Blogspot/Details.cshtml
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
@model YavscWeb.Models.Blog
|
||||
|
||||
@{
|
||||
ViewData["Title"]="Details";
|
||||
}
|
||||
|
||||
<div>
|
||||
<h4>Blog</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@SR["Author"]
|
||||
</dt>
|
||||
<dd>
|
||||
@Model.Author.UserName
|
||||
</dd>
|
||||
<dt>
|
||||
Contenu
|
||||
</dt>
|
||||
<dd>
|
||||
<div markdown="@Model.bcontent" base="~/@Model.Author.UserName/@Model.Id"
|
||||
site="SiteSettings.Value"></div>
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.modified)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.modified)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.photo)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.photo)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.posted)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.posted)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.rate)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.rate)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.title)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.title)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.visible)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.visible)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<ul>
|
||||
@if (await AuthorizationService.AuthorizeAsync(User, Model, new EditRequirement())) {
|
||||
<li>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a>
|
||||
</li>
|
||||
}
|
||||
<li>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</li>
|
||||
</ul>
|
||||
194
Yavsc/Views/Blogspot/Edit.cshtml
Normal file
194
Yavsc/Views/Blogspot/Edit.cshtml
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
@model YavscWeb.Models.Blog
|
||||
|
||||
@{
|
||||
ViewData["Title"] = SR["Blog post edition"];
|
||||
}
|
||||
|
||||
@section header{
|
||||
<link href="~/css/quill.snow.css" rel="stylesheet">
|
||||
<link href="~/css/dropzone.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
.box__dragndrop,
|
||||
.box__uploading,
|
||||
.box__success,
|
||||
.box__error {
|
||||
display: none;
|
||||
}
|
||||
.box.has-advanced-upload {
|
||||
background-color: white;
|
||||
outline: 2px dashed black;
|
||||
outline-offset: -10px;
|
||||
}
|
||||
.box.has-advanced-upload .box__dragndrop {
|
||||
display: inline;
|
||||
}
|
||||
.box.is-dragover {
|
||||
background-color: grey;
|
||||
}
|
||||
.ql-snow.ql-toolbar {
|
||||
border: outset grey 2px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
}
|
||||
|
||||
@section scripts{
|
||||
<script src="~/js/dropzone.js"></script>
|
||||
<script src="~/js/quill.js"></script>
|
||||
<script src="~/js/showdown.js"></script>
|
||||
<script src="~/js/to-markdown.js"></script>
|
||||
<script src="~/js/md-helpers.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
var editortitre = new Quill('#titlecnt', {
|
||||
modules: { toolbar: '#titletoolbar' },
|
||||
theme: 'snow'
|
||||
});
|
||||
var editorcontenu = new Quill('#contentcnt', {
|
||||
modules: { toolbar: '#contentbar' },
|
||||
theme: 'snow'
|
||||
});
|
||||
editortitre.on('selection-change', function(range) {
|
||||
if (range) {
|
||||
$('#contentbar').addClass('hidden');
|
||||
$('#titletoolbar').removeClass('hidden');
|
||||
}
|
||||
});
|
||||
editortitre.on('text-change',function(delta,source){
|
||||
if (source=='user')
|
||||
{
|
||||
updateMD('title',$('#titlecnt').html())
|
||||
}
|
||||
});
|
||||
editorcontenu.on('selection-change', function(range) {
|
||||
if (range) {
|
||||
$('#contentbar').removeClass('hidden');
|
||||
$('#titletoolbar').addClass('hidden');
|
||||
}
|
||||
});
|
||||
editorcontenu.on('text-change',function(delta,source){
|
||||
if (source=='user')
|
||||
{
|
||||
updateMD('bcontent',$('#contentcnt').html())
|
||||
}
|
||||
});
|
||||
|
||||
$('#contentcnt').focus(function(){
|
||||
$('#contentbar').removeClass('hidden');
|
||||
$('#titletoolbar').addClass('hidden');
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
<h2 > @SR["Blog post edition"] </h2>
|
||||
|
||||
<div id="titletoolbar" class="hidden ql-snow ql-toolbar">
|
||||
<button class="ql-format-button ql-bold"></button>
|
||||
<button class="ql-format-button ql-italic"></button>
|
||||
<button class="ql-format-button ql-strike"></button>
|
||||
</div>
|
||||
|
||||
<h2 id="titlecnt"><markdown>@Model.title</markdown></h2>
|
||||
|
||||
<div id="contentbar" class="hidden ql-snow ql-toolbar">
|
||||
<button class="ql-format-button ql-bold"></button>
|
||||
<button class="ql-format-button ql-italic"></button>
|
||||
<button class="ql-format-button ql-underline"></button>
|
||||
<button class="ql-format-button ql-strike"></button>
|
||||
|
||||
<span class="ql-format-group">
|
||||
<button class="ql-format-button ql-image"></button>
|
||||
<button class="ql-format-button ql-link"></button>
|
||||
</span>
|
||||
<span class="ql-format-group">
|
||||
<span title="List" class="ql-format-button ql-list"></span>
|
||||
<span class="ql-format-separator"></span>
|
||||
<span title="Bullet" class="ql-format-button ql-bullet"></span>
|
||||
<span class="ql-format-separator"></span>
|
||||
<select title="Text Alignment" class="ql-align">
|
||||
<option value="left" label="Left" selected=""></option>
|
||||
<option value="center" label="Center"></option>
|
||||
<option value="right" label="Right"></option>
|
||||
<option value="justify" label="Justify"></option>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div markdown="@Model.bcontent" base="~/@Model.Author.UserName/@Model.Id"
|
||||
site="SiteSettings.Value" id="contentcnt" ></div>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
<form asp-action="Edit" >
|
||||
<div class="form-horizontal">
|
||||
|
||||
<hr />
|
||||
<p class="text-success">@ViewData["StatusMessage"]</p>
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<input type="hidden" asp-for="AuthorId" />
|
||||
<div class="form-group">
|
||||
<label asp-for="title" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="title" class="form-control" />
|
||||
<span asp-validation-for="title" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="photo" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="photo" class="form-control" />
|
||||
<span asp-validation-for="photo" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="bcontent" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<textarea asp-for="bcontent" class="form-control" >
|
||||
</textarea>
|
||||
<span asp-validation-for="bcontent" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="visible" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="visible" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<div >
|
||||
<form asp-action="Create" asp-controller="UserFiles" method="post" class="dropzone" enctype="multipart/form-data">
|
||||
<div class="fallback">
|
||||
<input name="file" type="file" multiple />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Upload" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
78
Yavsc/Views/Blogspot/Index.cshtml
Normal file
78
Yavsc/Views/Blogspot/Index.cshtml
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
@model IEnumerable<YavscWeb.Models.Blog>
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
<p class="text-success">@ViewData["StatusMessage"]</p>
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
@SR["Author"]
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.title)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.modified)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.photo)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.posted)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.rate)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.visible)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@item.Author?.UserName
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.title)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.modified)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.photo)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.posted)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.rate)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.visible)
|
||||
</td>
|
||||
<td>
|
||||
<ul class="actiongroup">
|
||||
<li><a asp-action="Details" asp-route-id="@item.Id">Details</a>
|
||||
</li>
|
||||
@if (await AuthorizationService.AuthorizeAsync(User, item, new EditRequirement())) {
|
||||
<li><a asp-action="Edit" asp-route-id="@item.Id">Edit</a>
|
||||
</li>
|
||||
<li><a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
82
Yavsc/Views/Blogspot/title.cshtml
Normal file
82
Yavsc/Views/Blogspot/title.cshtml
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
@model IEnumerable<YavscWeb.Models.Blog>
|
||||
@{
|
||||
ViewData["Title"] = "Title";
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
<p class="text-success">@ViewData["StatusMessage"]</p>
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
@SR["Author"]
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.bcontent)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.modified)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.photo)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.posted)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.rate)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.title)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.visible)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@item.Author?.UserName
|
||||
</td>
|
||||
<td>
|
||||
<div md-content="@item.bcontent"/>@item.bcontent
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.modified)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.photo)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.posted)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.rate)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.title)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.visible)
|
||||
</td>
|
||||
<td>
|
||||
<ul class="actiongroup">
|
||||
<li>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a>
|
||||
</li><li>
|
||||
<a asp-action="Details" asp-route-id="@item.Id">Details</a>
|
||||
</li><li>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
82
Yavsc/Views/Blogspot/userposts.cshtml
Normal file
82
Yavsc/Views/Blogspot/userposts.cshtml
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
@model IEnumerable<YavscWeb.Models.Blog>
|
||||
@{
|
||||
ViewData["Title"] = "User posts";
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
<p class="text-success">@ViewData["StatusMessage"]</p>
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
@SR["Author"]
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.bcontent)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.modified)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.photo)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.posted)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.rate)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.title)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.visible)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@item.Author?.UserName
|
||||
</td>
|
||||
<td>
|
||||
<div md-content="@item.bcontent"/>@item.bcontent
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.modified)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.photo)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.posted)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.rate)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.title)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.visible)
|
||||
</td>
|
||||
<td>
|
||||
<ul class="actiongroup">
|
||||
<li>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a>
|
||||
</li><li>
|
||||
<a asp-action="Details" asp-route-id="@item.Id">Details</a>
|
||||
</li><li>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
25
Yavsc/Views/Circle/Create.cshtml
Normal file
25
Yavsc/Views/Circle/Create.cshtml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
@model YavscWeb.Models.CircleMember
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
|
||||
<h2>Create</h2>
|
||||
|
||||
<form asp-action="Create">
|
||||
<div class="form-horizontal">
|
||||
<h4>CircleMember</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Create" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
22
Yavsc/Views/Circle/Delete.cshtml
Normal file
22
Yavsc/Views/Circle/Delete.cshtml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
@model YavscWeb.Models.CircleMember
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>CircleMember</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<div class="form-actions no-color">
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
18
Yavsc/Views/Circle/Details.cshtml
Normal file
18
Yavsc/Views/Circle/Details.cshtml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
@model YavscWeb.Models.CircleMember
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>CircleMember</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</p>
|
||||
26
Yavsc/Views/Circle/Edit.cshtml
Normal file
26
Yavsc/Views/Circle/Edit.cshtml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
@model YavscWeb.Models.CircleMember
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
|
||||
<form asp-action="Edit">
|
||||
<div class="form-horizontal">
|
||||
<h4>CircleMember</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
26
Yavsc/Views/Circle/Index.cshtml
Normal file
26
Yavsc/Views/Circle/Index.cshtml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
@model IEnumerable<YavscWeb.Models.CircleMember>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
149
Yavsc/Views/Command/Create.cshtml
Normal file
149
Yavsc/Views/Command/Create.cshtml
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
@model BookQuery
|
||||
@{
|
||||
ViewData["Title"] = SR["Book "+Model.PerformerProfile.ActivityCode];
|
||||
}
|
||||
@section header{
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
<script src="~/lib/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
|
||||
<script src="~/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.fr.min.js" charset="UTF-8"></script>
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=@ViewBag.GoogleSettings.BrowserApiKey"></script>
|
||||
|
||||
<link rel="stylesheet" href="~/css/bootstrap-datepicker/bootstrap-datepicker3.standalone.min.css">
|
||||
<style>
|
||||
#map {
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
}
|
||||
#Location_combo li {
|
||||
cursor: pointer;
|
||||
}
|
||||
#Location_combo li:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
@section scripts{
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
$.validator.setDefaults({
|
||||
messages: {
|
||||
remote: "Ce lieu n'est pas identifié par les services de géo-localisation Google",
|
||||
required: "Veuillez renseigner ce champ"
|
||||
}
|
||||
});
|
||||
var gmap = new google.maps.Map(document.getElementById('map'), {
|
||||
zoom: 16,
|
||||
center: { lat: 48.862854, lng: 2.2056466 }
|
||||
});
|
||||
var marker;
|
||||
function chooseLoc(loc) {
|
||||
$('#Location_Address').val(loc.formatted_address);
|
||||
var pos = loc.geometry.location;
|
||||
var lat = new Number(pos.lat);
|
||||
var lng = new Number(pos.lng);
|
||||
$('#Location_Latitude').val(lat.toLocaleString());
|
||||
$('#Location_Longitude').val(lng.toLocaleString());
|
||||
gmap.setCenter(pos);
|
||||
if (marker) {
|
||||
marker.setMap(null);
|
||||
}
|
||||
marker = new google.maps.Marker({
|
||||
map: gmap,
|
||||
draggable: true,
|
||||
animation: google.maps.Animation.DROP,
|
||||
position: pos
|
||||
});
|
||||
google.maps.event.addListener(marker, 'dragend', function() {
|
||||
// TODO reverse geo code
|
||||
var pos = marker.getPosition();
|
||||
$('#Location_Latitude').val(pos.lat);
|
||||
$('#Location_Longitude').val(pos.lng);
|
||||
});
|
||||
$('#Location_Address').valid();
|
||||
return true;
|
||||
}
|
||||
|
||||
$('#EventDate').datepicker({language:'fr'});
|
||||
|
||||
$('#Location_Address').rules("add",
|
||||
{
|
||||
remote: {
|
||||
url: 'http://maps.googleapis.com/maps/api/geocode/json',
|
||||
type: 'get',
|
||||
data: {
|
||||
sensor: false,
|
||||
address: function () { return $('#Location_Address').val() }
|
||||
},
|
||||
dataType: 'json',
|
||||
dataFilter: function(datastr,type) {
|
||||
$('#Location_combo').html("");
|
||||
var data = JSON.parse(datastr);
|
||||
data.results.forEach(function(element) {
|
||||
if (element.formatted_address !== $('#Location_Address').val()) {
|
||||
$('<li>'+element.formatted_address+'</li>')
|
||||
.data("geoloc",element)
|
||||
.click(function() { chooseLoc($(this).data("geoloc")) })
|
||||
.appendTo($('#Location_combo'));}});
|
||||
return (data.status === 'OK') && (data.results.length == 1);
|
||||
},
|
||||
error: function(xhr, textStatus, errorThrown)
|
||||
{
|
||||
console.log('ajax loading error ... '+textStatus+' ... '+ errorThrown);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
<h2>@ViewData["Title"]</h2>
|
||||
<form asp-action="Create" id="FrmComCre" role="form">
|
||||
<div class="form-horizontal">
|
||||
<h4>@SR["Fill in your book query"]</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||
<div class="form-group" has-feedback>
|
||||
<fieldset>
|
||||
<legend><label for="EventDate" class="col-md-2 control-label" >
|
||||
@SR["EventDate"]
|
||||
</label></legend>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="EventDate" class="form-control" type="date" id="EventDate"
|
||||
data-val-required=@SR["ChooseAnEventDate"]
|
||||
/>
|
||||
<span asp-validation-for="EventDate" class="text-danger" >
|
||||
</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="form-group" has-feedback>
|
||||
<fieldset>
|
||||
<legend><label for="Location_Address" class="col-md-2 control-label">
|
||||
@SR["Location"]
|
||||
</label>
|
||||
</legend>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Location.Address" type="text" name="Location.Address" id="Location_Address"
|
||||
class="form-control" data-val-required=@SR["SpecifyPlace"]
|
||||
data-val-remote=@SR["GoogleDidntGeoLocalized"]>
|
||||
<span asp-validation-for="Location.Address" class="text-danger" ></span>
|
||||
<ul id="Location_combo" >
|
||||
</ul>
|
||||
<div id="map"></div>
|
||||
</div>
|
||||
@Html.HiddenFor(model=>model.Location.Latitude)
|
||||
@Html.HiddenFor(model=>model.Location.Longitude)
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="@SR["Create"]" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
@Html.HiddenFor(model=>model.Client.Id)
|
||||
@Html.HiddenFor(model=>model.PerformerId)
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
28
Yavsc/Views/Command/Delete.cshtml
Normal file
28
Yavsc/Views/Command/Delete.cshtml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
@model BookQuery
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Command</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ValidationDate)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ValidationDate)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<div class="form-actions no-color">
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
59
Yavsc/Views/Command/Details.cshtml
Normal file
59
Yavsc/Views/Command/Details.cshtml
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
@model BookQuery
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>Command</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.EventDate)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.EventDate)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Client)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Client.UserName)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Location.Address)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Location.Address)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.PerformerProfile)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.PerformerProfile.Performer.UserName)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ValidationDate)
|
||||
</dt>
|
||||
<dd>
|
||||
@if (Model.ValidationDate==null) {
|
||||
@SR["NotValidated"]
|
||||
}
|
||||
else {
|
||||
@Html.DisplayFor(model => model.ValidationDate)
|
||||
}
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</p>
|
||||
33
Yavsc/Views/Command/Edit.cshtml
Normal file
33
Yavsc/Views/Command/Edit.cshtml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
@model BookQuery
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
|
||||
<form asp-action="Edit">
|
||||
<div class="form-horizontal">
|
||||
<h4>Command</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<label asp-for="ValidationDate" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ValidationDate" class="form-control" />
|
||||
<span asp-validation-for="ValidationDate" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
62
Yavsc/Views/Command/Index.cshtml
Normal file
62
Yavsc/Views/Command/Index.cshtml
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
@model IEnumerable<BookQuery>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CreationDate)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.EventDate)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Location)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Client)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.PerformerProfile)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ValidationDate)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CreationDate)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.EventDate)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Location.Address)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Client.UserName)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.PerformerProfile.Performer.UserName)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ValidationDate)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
62
Yavsc/Views/Estimate/Create.cshtml
Normal file
62
Yavsc/Views/Estimate/Create.cshtml
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
@model YavscWeb.Models.Estimate
|
||||
|
||||
@{
|
||||
ViewData["Title"] = SR["Estimate"];
|
||||
}
|
||||
|
||||
<h2>Create</h2>
|
||||
|
||||
<form asp-action="Create">
|
||||
<div class="form-horizontal">
|
||||
<h4>Estimate</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Description" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Description" class="form-control" />
|
||||
<span asp-validation-for="Description" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Status" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Status" class="form-control" />
|
||||
<span asp-validation-for="Status" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Title" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Title" class="form-control" />
|
||||
<span asp-validation-for="Title" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="AttachedGraphics" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input id="NewGraphics" type="file" multiple>
|
||||
@Html.Hidden("AttachedGraphics")
|
||||
<span asp-validation-for="AttachedGraphics" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="AttachedFiles" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input id="NewFiles" type="file" multiple>
|
||||
@Html.Hidden("AttachedFiles")
|
||||
<span asp-validation-for="AttachedFiles" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Create" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
43
Yavsc/Views/Estimate/Delete.cshtml
Normal file
43
Yavsc/Views/Estimate/Delete.cshtml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
@model YavscWeb.Models.Estimate
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Estimate</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Description)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Description)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Status)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Status)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Title)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Title)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<div class="form-actions no-color">
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
36
Yavsc/Views/Estimate/Details.cshtml
Normal file
36
Yavsc/Views/Estimate/Details.cshtml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
@model YavscWeb.Models.Estimate
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>Estimate</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Description)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Description)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Status)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Status)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Title)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Title)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</p>
|
||||
70
Yavsc/Views/Estimate/Edit.cshtml
Normal file
70
Yavsc/Views/Estimate/Edit.cshtml
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
@model YavscWeb.Models.Estimate
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
|
||||
<form asp-action="Edit">
|
||||
<div class="form-horizontal">
|
||||
<h4>Estimate</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<label asp-for="Description" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Description" class="form-control" />
|
||||
<span asp-validation-for="Description" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Status" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Status" class="form-control" />
|
||||
<span asp-validation-for="Status" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Title" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Title" class="form-control" />
|
||||
<span asp-validation-for="Title" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="AttachedGraphics" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
@foreach (var f in Model.AttachedGraphics)
|
||||
{
|
||||
<img src="">
|
||||
}
|
||||
<input id="NewGraphics" type="file" multiple>
|
||||
@Html.Hidden("AttachedGraphics")
|
||||
<span asp-validation-for="AttachedGraphics" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="AttachedFiles" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input id="NewFiles" type="file" multiple>
|
||||
@Html.Hidden("AttachedFiles")
|
||||
<span asp-validation-for="AttachedFiles" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
44
Yavsc/Views/Estimate/Index.cshtml
Normal file
44
Yavsc/Views/Estimate/Index.cshtml
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
@model IEnumerable<YavscWeb.Models.Estimate>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = SR["My estimates"];
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Description)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Status)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Title)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Description)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Status)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Title)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
14
Yavsc/Views/FrontOffice/Book.cshtml
Normal file
14
Yavsc/Views/FrontOffice/Book.cshtml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
@model IEnumerable<PerformerProfile>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Book - " + (ViewBag.Activity?.Name ?? SR["Any"]);
|
||||
}
|
||||
<em>@ViewBag.Activity?.Description</em>
|
||||
|
||||
@foreach (var profile in Model) {
|
||||
await Html.RenderPartialAsync("_PerformerPartial", profile) ;
|
||||
<form action="~/Command/Create" >
|
||||
<input type="hidden" name="id" value="@profile.PerfomerId" />
|
||||
<input type="submit" value="@SR["Book this performer"]"/>
|
||||
</form>
|
||||
}
|
||||
177
Yavsc/Views/FrontOffice/Estimate.cshtml
Normal file
177
Yavsc/Views/FrontOffice/Estimate.cshtml
Normal file
|
|
@ -0,0 +1,177 @@
|
|||
@model Estimate
|
||||
|
||||
\documentclass[french,11pt]{article}
|
||||
\usepackage{babel}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[a4paper]{geometry}
|
||||
\usepackage{units}
|
||||
\usepackage{bera}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{fp}
|
||||
|
||||
\def\TVA{20} % Taux de la TVA
|
||||
|
||||
\def\TotalHT{0}
|
||||
\def\TotalTVA{0}
|
||||
|
||||
\newcommand{\AjouterService}[3]{% Arguments : Désignation, quantité, prix
|
||||
\FPround{\prix}{#3}{2}
|
||||
\FPeval{\montant}{#2 * #3}
|
||||
\FPround{\montant}{\montant}{2}
|
||||
\FPadd{\TotalHT}{\TotalHT}{\montant}
|
||||
|
||||
\eaddto\ListeProduits{#1 & \prix & #2 & \montant \cr}
|
||||
}
|
||||
|
||||
|
||||
\newcommand{\AfficheResultat}{%
|
||||
\ListeProduits
|
||||
|
||||
\FPeval{\TotalTVA}{\TotalHT * \TVA / 100}
|
||||
\FPadd{\TotalTTC}{\TotalHT}{\TotalTVA}
|
||||
\FPround{\TotalHT}{\TotalHT}{2}
|
||||
\FPround{\TotalTVA}{\TotalTVA}{2}
|
||||
\FPround{\TotalTTC}{\TotalTTC}{2}
|
||||
\global\let\TotalHT\TotalHT
|
||||
\global\let\TotalTVA\TotalTVA
|
||||
\global\let\TotalTTC\TotalTTC
|
||||
|
||||
|
||||
\cr
|
||||
\hline
|
||||
\textbf{Total} & & & \TotalHT
|
||||
}
|
||||
|
||||
\newcommand*\eaddto[2]{% version développée de \addto
|
||||
\edef\tmp{#2}%
|
||||
\expandafter\addto
|
||||
\expandafter#1%
|
||||
\expandafter{\tmp}%
|
||||
}
|
||||
|
||||
\newcommand{\ListeProduits}{}
|
||||
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%% A MODIFIER DANS LA FACTURE %%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\def\FactureNum {@Model.Id.ToString()} % Numéro de facture
|
||||
\def\FactureAcquittee {non} % Facture acquittée : oui/non
|
||||
\def\FactureLieu {@Model.Command.Performer.PostalAddress} % Lieu de l'édition de la facture
|
||||
\def\FactureObjet {Facture : @Model.Title} % Objet du document
|
||||
% Description de la facture
|
||||
\def\FactureDescr {
|
||||
@Model.Description
|
||||
}
|
||||
|
||||
% Infos Client
|
||||
\def\ClientNom{@Model.Command.Client.Name} % Nom du client
|
||||
\def\ClientAdresse{% % Adresse du client
|
||||
@if (!string.IsNullOrWhiteSpace(Model.Command.Client.PostalAddress.Address)) {
|
||||
@string.Split("\n",Model.Command.Client.PostalAddress.Address).Join("\\\\\n")
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(@Model.Command.Client.PhoneNumber)) {
|
||||
Téléphone fixe: @Model.Command.Client.PhoneNumber \\
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(eto)) {
|
||||
E-mail: @Model.Command.Client.Email }
|
||||
}
|
||||
|
||||
% Liste des produits facturés : Désignation, prix
|
||||
|
||||
@foreach (CommandLine line in Model.Command.Bill) {
|
||||
\AjouterService { @line.Article.Name - @line.Comment (Ref:YPR@line.Article.Id) } {@line.Count} {@line.UnitaryCost}
|
||||
}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\geometry{verbose,tmargin=4em,bmargin=8em,lmargin=6em,rmargin=6em}
|
||||
\setlength{\parindent}{0pt}
|
||||
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
|
||||
|
||||
\thispagestyle{fancy}
|
||||
\pagestyle{fancy}
|
||||
\setlength{\parindent}{0pt}
|
||||
|
||||
\renewcommand{\headrulewidth}{0pt}
|
||||
\cfoot{
|
||||
if (!string.IsNullOrWhiteSpace(from.Name)) { from.Name }
|
||||
if (!string.IsNullOrWhiteSpace(from.Address)) { - from.Address }
|
||||
if (!string.IsNullOrWhiteSpace(from.CityAndState)) { - from.CityAndState } \newline
|
||||
\small{
|
||||
if (!string.IsNullOrWhiteSpace(efrom)) { E-mail: efrom }
|
||||
if (!string.IsNullOrWhiteSpace(from.Mobile)) { - Téléphone mobile: from.Mobile }
|
||||
if (!string.IsNullOrWhiteSpace(from.Phone)) { - Téléphone fixe: from.Phone }
|
||||
}
|
||||
}
|
||||
|
||||
\begin{document}
|
||||
|
||||
% Logo de la société
|
||||
%\includegraphics{logo.jpg}
|
||||
|
||||
% Nom et adresse de la société
|
||||
from.Name \\
|
||||
from.Address \\
|
||||
from.ZipCode from.CityAndState\\
|
||||
|
||||
Facture n°\FactureNum
|
||||
|
||||
|
||||
{\addtolength{\leftskip}{10.5cm} %in ERT
|
||||
\textbf{\ClientNom} \\
|
||||
\ClientAdresse \\
|
||||
|
||||
} %in ERT
|
||||
|
||||
|
||||
\hspace*{10.5cm}
|
||||
\FactureLieu, le \today
|
||||
|
||||
~\\~\\
|
||||
|
||||
\textbf{Objet : \FactureObjet \\}
|
||||
|
||||
\textnormal{\FactureDescr}
|
||||
|
||||
~\\
|
||||
|
||||
\begin{center}
|
||||
\begin{tabular}{lrrr}
|
||||
\textbf{Désignation ~~~~~~} & \textbf{Prix unitaire} & \textbf{Quantité} & \textbf{Montant (EUR)} \\
|
||||
\hline
|
||||
\AfficheResultat{}
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
|
||||
\begin{flushright}
|
||||
\textit{Auto entreprise en franchise de TVA}\\
|
||||
|
||||
\end{flushright}
|
||||
~\\
|
||||
|
||||
\ifthenelse{\equal{\FactureAcquittee}{oui}}{
|
||||
Facture acquittée.
|
||||
}{
|
||||
|
||||
À régler par chèque ou par virement bancaire :
|
||||
|
||||
\begin{center}
|
||||
\begin{tabular}{|c c c c|}
|
||||
if (!string.IsNullOrWhiteSpace(from.BankCode) && !string.IsNullOrWhiteSpace(from.WicketCode)
|
||||
&& !string.IsNullOrWhiteSpace(from.AccountNumber) ) {
|
||||
\hline \textbf{Code banque} & \textbf{Code guichet} & \textbf{N° de Compte} & \textbf{Clé RIB} \\
|
||||
from.BankCode & from.WicketCode & from.AccountNumber & from.BankedKey \\
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(from.IBAN) && !string.IsNullOrWhiteSpace(from.BIC)) {
|
||||
\hline \textbf{IBAN N°} & \multicolumn{3}{|l|}{ from.IBAN } \\
|
||||
\hline \textbf{Code BIC} & \multicolumn{3}{|l|}{ from.BIC }
|
||||
} \\
|
||||
\hline
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
}
|
||||
\end{document}
|
||||
22
Yavsc/Views/FrontOffice/Index.cshtml
Normal file
22
Yavsc/Views/FrontOffice/Index.cshtml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
@model IEnumerable<YavscWeb.Models.Blog>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index des blogs";
|
||||
}
|
||||
|
||||
<h2>Index des blogs</h2>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create" asp-controller="Blog">Create New</a>
|
||||
</p>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<h1><markdown>@item.title</markdown></h1>
|
||||
<em>@item.Author?.UserName</em>
|
||||
<div markdown="@item.bcontent"></div>
|
||||
<p>
|
||||
<a asp-action="Edit" asp-controller="Blog" asp-route-id="@item.Id">Edit</a> |
|
||||
<a asp-action="Details" asp-controller="Blog" asp-route-id="@item.Id">Details</a> |
|
||||
<a asp-action="Delete" asp-controller="Blog" asp-route-id="@item.Id">Delete</a>
|
||||
</p>
|
||||
}
|
||||
95
Yavsc/Views/Home/About.cshtml
Executable file
95
Yavsc/Views/Home/About.cshtml
Executable file
|
|
@ -0,0 +1,95 @@
|
|||
@{
|
||||
ViewData["Title"] = @SR["About"]+" "+@SiteSettings.Value.Title;
|
||||
}
|
||||
<h1>@ViewData["Title"]</h1>
|
||||
<em>@SiteSettings.Value.Slogan</em>
|
||||
|
||||
|
||||
<markdown>
|
||||
|
||||
##L'objectif
|
||||
|
||||
Cette application est construite pour mettre en relation des artistes
|
||||
du domaine musical avec leur public.
|
||||
|
||||
##Le fonctionnement
|
||||
|
||||
Les utilisateurs du site sont soit artiste, soit client, soit administrateur. ils ont tous droit à leur blog.
|
||||
Pour les artistes, c'est un moyen de promouvoir leur activité.
|
||||
Ils peuvent y publier des articles, truffés de vidéos et photos.
|
||||
Pour les clients, c'est un moyen de casser la glace avec leurs idoles,
|
||||
par la description détaillées de leur centres d'intérêts.
|
||||
|
||||
L'application propulse aussi une messagerie instantanée, disponible depuis
|
||||
un navigateur Web ou depuis l'appplication mobile,
|
||||
pouvant garantir la preservation du secret sur toute information personnelle,
|
||||
du client comme du prestataire.
|
||||
|
||||
Puis viennent (ou pas) une prise commande, un payement du client,
|
||||
la prestation, une collecte du retour du client, et un paiement du prestataire de services.
|
||||
|
||||
Ni le client ni le prestataire ne sont anonymes pour l'applications,
|
||||
il sont même formellement authentifies par l'acquitement d'une première
|
||||
facturation en ligne, ou à l'occasion de la saisie de leur profile proféssionnel.
|
||||
|
||||
Durant la phase de construction d'un contrat de prestation,
|
||||
le client et l'artiste peuvent profiter d'un canal de communication privé et anonyme,
|
||||
qui est fermé à la validation définitive du dit contrat.
|
||||
|
||||
Valider un contrat, c'est:
|
||||
|
||||
* Choisir le type de contrat
|
||||
* Se mettre d'accord sur les paramètres du contrat
|
||||
* Le faire signer des deux parties
|
||||
* Mettre en œuvre d'éventuels paiement d'arrhes
|
||||
|
||||
Une fois validé, le contrat est publié à destination des deux parties. la facture est publiée à destination du client,
|
||||
qui peut l'honorer auprès du système, auquel cas ce client est marqué solvable, et le contrat est marqué approvisionné.
|
||||
|
||||
En cas de défaut d'approvisionnement, le système prendra soin de marquer le contrat comme provisoire, et de prévenir l'artiste
|
||||
d'effectuer toute prestation en relation tant le paiement associé laisse à douter.
|
||||
|
||||
Une fois sa prestation associée exécutée, les paiements relatifs sont effectués auprès de l'artiste.
|
||||
|
||||
Pour un contrat exécuté et non honoré par le client, le processus de poursuite en recouvrement est engagé, sinon, le contrat est archivé,
|
||||
des attestations de paiement sont disponible pour l'artiste et la facture est marquée payée, puis repostée au client.
|
||||
|
||||
###Pour l'artiste
|
||||
|
||||
L'artiste choisit plusieurs paramètres qui vont faire son profile :
|
||||
|
||||
* Le type d'activités qu'il veut promouvoir, le type de prestations qu'il fournit (est-ce un DJ,
|
||||
un chanteur solo, un musicien solo, un ensemble musical classique, un groupe)
|
||||
* La tarification de sa mise en contact avec un nouveau client
|
||||
(combien je reçois par demande client traitée sans lourdeur de plus d'une journée)
|
||||
* Le lieu où il exerce et, le cas échéant, sur combien de distance il pourrait se déplacer.
|
||||
* un agenda Google optionnel, à consulter pour établir sa disponibilité
|
||||
* Des paramètres supplémentaires en fonctions de son type d'activité par exemple, pour
|
||||
les ensembles, leur taille, le cas échéant, leur répertoire ou des indications sur le style de leur musique)
|
||||
|
||||
###Pour le client
|
||||
|
||||
Il choisit un lieu et une date pour déclarer un événement avenir
|
||||
(il peut bien-sûr en programmer autant qu'il le veut).
|
||||
|
||||
Il peut, parcourir les publications des artistes, et entamer,
|
||||
sur la base d'un de ses projets événementiel, la négociation d'un contrat de prestation.
|
||||
|
||||
Il a accès à la connaissance des journées connues comme libres des artistes par le système.
|
||||
|
||||
##La confidentialité
|
||||
|
||||
À aucun moment, aucune adresse postale, aucune adresse e-mail ni aucun numéro de téléphone
|
||||
ne sont transmis ni aux clients, ni aux artistes. Seul le système a accès à ces informations.
|
||||
|
||||
De plus, le droit de retrait est permanent et sa mise en oeuvre immédiate.
|
||||
Les artistes comme les clients peuvent demander leur désinscription,
|
||||
qui désactive immédiatement les publications associées à leurs informations,
|
||||
et programme la suppression complète de ces dites informations dans les quinze jours
|
||||
à compter de la demande, sauf demande contradictoire.
|
||||
L'opération est annulable, jusqu'à deux semaines après sa programmation.
|
||||
|
||||
</markdown>
|
||||
|
||||
|
||||
|
||||
13
Yavsc/Views/Home/AboutMarkdown.cshtml
Normal file
13
Yavsc/Views/Home/AboutMarkdown.cshtml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
@{
|
||||
ViewData["Title"] = @SR["About"]+" Markdown";
|
||||
}
|
||||
<h1>@ViewData["Title"]</h1>
|
||||
|
||||
<markdown>
|
||||
Quelques extension à un Markdown de base :
|
||||
|
||||
* les video et audio
|
||||
* le tag bug = Bug#542
|
||||
* le tag annonce = A#542
|
||||
|
||||
</markdown>
|
||||
50
Yavsc/Views/Home/Chat.cshtml
Normal file
50
Yavsc/Views/Home/Chat.cshtml
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
@{
|
||||
ViewBag.Title = "Chat";
|
||||
}
|
||||
<h2>Chat</h2>
|
||||
<div class="container">
|
||||
<input type="text" id="message" />
|
||||
<input type="button" id="sendmessage" value="Send" />
|
||||
<input type="hidden" id="displayname" />
|
||||
<ul id="discussion">
|
||||
</ul>
|
||||
</div>
|
||||
@section scripts {
|
||||
<!--Script references. -->
|
||||
<!--The jQuery library is required and is referenced by default in _Layout.cshtml. -->
|
||||
<!--Reference the SignalR library. -->
|
||||
<script src="~/js/jquery.signalR-2.2.0.js"></script>
|
||||
<!--Reference the autogenerated SignalR hub script. -->
|
||||
<script src="~/signalr/hubs"></script>
|
||||
<!--SignalR script to update the chat page and send messages.-->
|
||||
<script>
|
||||
$(function () {
|
||||
// Reference the auto-generated proxy for the hub.
|
||||
var chat = $.connection.chatHub;
|
||||
// Create a function that the hub can call back to display messages.
|
||||
chat.client.addMessage = function (name, message) {
|
||||
// Add the message to the page.
|
||||
$('#discussion').append('<li><strong>' + htmlEncode(name)
|
||||
+ '</strong>: ' + htmlEncode(message) + '</li>');
|
||||
};
|
||||
// Get the user name and store it to prepend to messages.
|
||||
$('#displayname').val(prompt('Enter your name:', ''));
|
||||
// Set initial focus to message input box.
|
||||
$('#message').focus();
|
||||
// Start the connection.
|
||||
$.connection.hub.start().done(function () {
|
||||
$('#sendmessage').click(function () {
|
||||
// Call the Send method on the hub.
|
||||
chat.server.send($('#displayname').val(), $('#message').val());
|
||||
// Clear text box and reset focus for next comment.
|
||||
$('#message').val('').focus();
|
||||
});
|
||||
});
|
||||
});
|
||||
// This optional function html-encodes messages for display in the page.
|
||||
function htmlEncode(value) {
|
||||
var encodedValue = $('<div />').text(value).html();
|
||||
return encodedValue;
|
||||
}
|
||||
</script>
|
||||
}
|
||||
17
Yavsc/Views/Home/Contact.cshtml
Executable file
17
Yavsc/Views/Home/Contact.cshtml
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
@{
|
||||
ViewData["Title"] = "Contact";
|
||||
}
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<h3>@ViewData["Message"]</h3>
|
||||
|
||||
<address>
|
||||
Paul Schneider<br>
|
||||
2 Boulevard Aristide Briand -
|
||||
92150 Suresnes (France)
|
||||
<abbr title="Phone">P:</abbr> +33 6 51 14 15 64
|
||||
</address>
|
||||
|
||||
<address>
|
||||
<strong>Support:</strong> <a href="mailto:contact@pschneider.fr">contact@pschneider.fr</a><br />
|
||||
<strong>Marketing:</strong> <a href="mailto:paul@pschneider.fr">paul@pschneider.fr</a>
|
||||
</address>
|
||||
71
Yavsc/Views/Home/Index.cshtml
Executable file
71
Yavsc/Views/Home/Index.cshtml
Executable file
|
|
@ -0,0 +1,71 @@
|
|||
@{
|
||||
ViewData["Title"] = "Home Page";
|
||||
}
|
||||
|
||||
<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="6000">
|
||||
<ol class="carousel-indicators">
|
||||
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
|
||||
<li data-target="#myCarousel" data-slide-to="1"></li>
|
||||
<li data-target="#myCarousel" data-slide-to="2"></li>
|
||||
<li data-target="#myCarousel" data-slide-to="3"></li>
|
||||
</ol>
|
||||
<div class="carousel-inner" role="listbox">
|
||||
<div class="item active">
|
||||
<img src="~/images/booking/groupe_s.jpg" alt="ASP.NET" class="img-responsive" />
|
||||
<div class="carousel-caption">
|
||||
<p>
|
||||
Invitez un groupe musical à animer votre événement </p>
|
||||
<p>
|
||||
<a class="btn btn-default" href="~/do/Book/IT">
|
||||
En savoir plus
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="~/images/booking/concert_s.jpg" alt="Visual Studio" class="img-responsive" />
|
||||
<div class="carousel-caption">
|
||||
<p>
|
||||
Organisez un concert. </p>
|
||||
<p>
|
||||
<a class="btn btn-default" href="~/do/Book/IT">
|
||||
En savoir plus
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="~/images/booking/dj_s.jpg" alt="Package Management" class="img-responsive" />
|
||||
<div class="carousel-caption">
|
||||
<p> Offrez-vous un anniversaire, un mariage Hip Hop </p>
|
||||
<p>
|
||||
|
||||
<a class="btn btn-default" href="~/do/Book/IT">
|
||||
En savoir plus
|
||||
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="~/images/booking/mike_s.jpg" alt="Microsoft Azure" class="img-responsive" />
|
||||
<div class="carousel-caption">
|
||||
<p>
|
||||
Invitez votre chanteur à la fête </p>
|
||||
<p>
|
||||
<a class="btn btn-default" href="~/do/Book/IT">
|
||||
En savoir plus
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
|
||||
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
|
||||
<span class="sr-only">Précédent</span>
|
||||
</a>
|
||||
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
|
||||
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
|
||||
<span class="sr-only">Suivant</span>
|
||||
</a>
|
||||
</div>
|
||||
66
Yavsc/Views/Home/TestTex.cshtml
Normal file
66
Yavsc/Views/Home/TestTex.cshtml
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
\documentclass[french,11pt]{article}
|
||||
\usepackage{babel}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[a4paper]{geometry}
|
||||
\usepackage{units}
|
||||
\usepackage{bera}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{fp}
|
||||
|
||||
\def\TVA{20} % Taux de la TVA
|
||||
|
||||
\def\TotalHT{0}
|
||||
\def\TotalTVA{0}
|
||||
|
||||
\newcommand{\AjouterService}[3]{% Arguments : Désignation, quantité, prix
|
||||
\FPround{\prix}{#3}{2}
|
||||
\FPeval{\montant}{#2 * #3}
|
||||
\FPround{\montant}{\montant}{2}
|
||||
\FPadd{\TotalHT}{\TotalHT}{\montant}
|
||||
|
||||
\eaddto\ListeProduits{#1 & \prix & #2 & \montant \cr}
|
||||
}
|
||||
|
||||
|
||||
\newcommand{\AfficheResultat}{%
|
||||
\ListeProduits
|
||||
|
||||
\FPeval{\TotalTVA}{\TotalHT * \TVA / 100}
|
||||
\FPadd{\TotalTTC}{\TotalHT}{\TotalTVA}
|
||||
\FPround{\TotalHT}{\TotalHT}{2}
|
||||
\FPround{\TotalTVA}{\TotalTVA}{2}
|
||||
\FPround{\TotalTTC}{\TotalTTC}{2}
|
||||
\global\let\TotalHT\TotalHT
|
||||
\global\let\TotalTVA\TotalTVA
|
||||
\global\let\TotalTTC\TotalTTC
|
||||
|
||||
|
||||
\cr
|
||||
\hline
|
||||
\textbf{Total} & & & \TotalHT
|
||||
}
|
||||
|
||||
\newcommand*\eaddto[2]{% version développée de \addto
|
||||
\edef\tmp{#2}%
|
||||
\expandafter\addto
|
||||
\expandafter#1%
|
||||
\expandafter{\tmp}%
|
||||
}
|
||||
|
||||
\newcommand{\ListeProduits}{}
|
||||
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%% A MODIFIER DANS LA FACTURE %%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\def\FactureNum {@ViewBag.TestString} % Numéro de facture
|
||||
|
||||
|
||||
|
||||
54
Yavsc/Views/Home/TestaPdf.cshtml
Normal file
54
Yavsc/Views/Home/TestaPdf.cshtml
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
|
||||
@using System.Reflection
|
||||
@using System.IO
|
||||
@using Microsoft.Extensions.WebEncoders
|
||||
@using System.Diagnostics
|
||||
@using System.Text
|
||||
@using YavscWeb.Formatters
|
||||
@model Estimate
|
||||
@{
|
||||
Layout = null;
|
||||
ViewBag.Pdf = "";
|
||||
ViewBag.TeX = "";
|
||||
var writer = new System.IO.StringWriter();
|
||||
var content = await Html.PartialAsync("TestTex", Model );
|
||||
content.WriteTo(writer, new TexEncoder());
|
||||
var contentStr = writer.ToString();
|
||||
string name = $"tmpestimtex-{Model.Id}";
|
||||
string fullname = new FileInfo(
|
||||
System.IO.Path.Combine(ViewBag.TempDir,name)).FullName;
|
||||
|
||||
FileInfo fi = new FileInfo(fullname + ".tex");
|
||||
FileInfo fo = new FileInfo(fullname + ".pdf");
|
||||
using (StreamWriter sw = new StreamWriter (fi.FullName))
|
||||
{
|
||||
sw.Write (contentStr);
|
||||
}
|
||||
if (!fi.Exists)
|
||||
{
|
||||
throw new Exception ("Source write failed");
|
||||
}
|
||||
using (Process p = new Process ()) {
|
||||
p.StartInfo.WorkingDirectory = ViewBag.TempDir;
|
||||
p.StartInfo = new ProcessStartInfo ();
|
||||
p.StartInfo.UseShellExecute = false;
|
||||
p.StartInfo.FileName = "/usr/bin/texi2pdf";
|
||||
p.StartInfo.Arguments = $"--batch --build-dir=. -o {fo.FullName} {fi.FullName}";
|
||||
p.Start ();
|
||||
p.WaitForExit ();
|
||||
if (p.ExitCode != 0) {
|
||||
throw new Exception ("Pdf generation failed with exit code:" + p.ExitCode);
|
||||
}
|
||||
}
|
||||
if (fo.Exists) {
|
||||
UTF8Encoding utf8 = new UTF8Encoding();
|
||||
|
||||
using (StreamReader sr = new StreamReader (fo.FullName)) {
|
||||
byte[] buffer = File.ReadAllBytes (fo.FullName);
|
||||
ViewBag.Pdf = utf8.GetString(buffer,0,buffer.Length);
|
||||
}
|
||||
fo.Delete();
|
||||
}
|
||||
fi.Delete();
|
||||
}
|
||||
@ViewBag.Pdf
|
||||
28
Yavsc/Views/Home/Todo.cshtml
Executable file
28
Yavsc/Views/Home/Todo.cshtml
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
@{
|
||||
ViewData["Title"] = @SR["Todo (first)"];
|
||||
}
|
||||
<h1>@ViewData["Title"]</h1>
|
||||
<em>BookAStar, Just book a star!</em>
|
||||
|
||||
|
||||
<markdown>
|
||||
|
||||
1. Prise de commande
|
||||
2. Messagerie instantanée
|
||||
3. Production de l'estimation et de la facture
|
||||
4. Paiement de la facture
|
||||
|
||||
</markdown>
|
||||
|
||||
|
||||
@{
|
||||
ViewData["Title"] = @SR["TODO"];
|
||||
}
|
||||
<h1>@ViewData["Title"]</h1>
|
||||
<em>Faster, stronger, shorter</em>
|
||||
|
||||
|
||||
<markdown>
|
||||
|
||||
</markdown>
|
||||
|
||||
27
Yavsc/Views/Manage/AddPhoneNumber.cshtml
Executable file
27
Yavsc/Views/Manage/AddPhoneNumber.cshtml
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
@model AddPhoneNumberViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Add Phone Number";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
<form asp-controller="Manage" asp-action="AddPhoneNumber" method="post" class="form-horizontal" role="form">
|
||||
<h4>Add a phone number.</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="PhoneNumber" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="PhoneNumber" class="form-control" />
|
||||
<span asp-validation-for="PhoneNumber" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">Send verification code</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
23
Yavsc/Views/Manage/CHUN.cshtml
Normal file
23
Yavsc/Views/Manage/CHUN.cshtml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
@model ChangeUserNameViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Change user name";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
|
||||
<form asp-controller="Manage" asp-action="CHUN" method="post" class="form-horizontal" role="form">
|
||||
<h4>Change user name form</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="NewUserName" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="NewUserName" class="form-control" />
|
||||
<span asp-validation-for="NewUserName" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
42
Yavsc/Views/Manage/ChangePassword.cshtml
Executable file
42
Yavsc/Views/Manage/ChangePassword.cshtml
Executable file
|
|
@ -0,0 +1,42 @@
|
|||
@model ChangePasswordViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Change Password";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
|
||||
<form asp-controller="Manage" asp-action="ChangePassword" method="post" class="form-horizontal" role="form">
|
||||
<h4>Change Password Form</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="OldPassword" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="OldPassword" class="form-control" />
|
||||
<span asp-validation-for="OldPassword" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="NewPassword" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="NewPassword" class="form-control" />
|
||||
<span asp-validation-for="NewPassword" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ConfirmPassword" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ConfirmPassword" class="form-control" />
|
||||
<span asp-validation-for="ConfirmPassword" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">Change password</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
23
Yavsc/Views/Manage/ChangeUserName.cshtml
Executable file
23
Yavsc/Views/Manage/ChangeUserName.cshtml
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
@model ChangeUserNameViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Change user name";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
|
||||
<form asp-controller="Manage" asp-action="ChangeUserName" method="post" class="form-horizontal" role="form">
|
||||
<h4>Change user name form</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="NewUserName" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="NewUserName" class="form-control" />
|
||||
<span asp-validation-for="NewUserName" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
15
Yavsc/Views/Manage/Credits.cshtml
Executable file
15
Yavsc/Views/Manage/Credits.cshtml
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
@{
|
||||
ViewData["Title"] = @SR["Credits"];
|
||||
}
|
||||
<h1>@ViewData["Title"]</h1>
|
||||
<em>Your credits</em>
|
||||
|
||||
<p>
|
||||
<img src="https://www.paypal.com/fr_XC/i/btn/btn_xpressCheckout.gif" align="left" style="margin-right:7px;" />
|
||||
</p>
|
||||
<markdown>
|
||||
|
||||
</markdown>
|
||||
|
||||
|
||||
|
||||
80
Yavsc/Views/Manage/Index.cshtml
Executable file
80
Yavsc/Views/Manage/Index.cshtml
Executable file
|
|
@ -0,0 +1,80 @@
|
|||
@model IndexViewModel
|
||||
@{
|
||||
ViewData["Title"] = @SR["Manage your account"];
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"]</h2>
|
||||
<p class="text-success">@ViewData["StatusMessage"]</p>
|
||||
<div>
|
||||
<h4>@SR["Change your account settings"]</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>@SR["UserName"]:</dt>
|
||||
|
||||
<dd>
|
||||
@Model.UserName
|
||||
[<a asp-controller="Manage"
|
||||
asp-action="CHUN">@SR["Change"]</a>]
|
||||
</dd>
|
||||
<dt>@SR["Password"]:</dt>
|
||||
<dd>[@if (Model.HasPassword)
|
||||
{<a asp-controller="Manage"
|
||||
asp-action="ChangePassword">@SR["Change"]</a>}
|
||||
else
|
||||
{<a asp-controller="Manage"
|
||||
asp-action="SetPassword">@SR["Create"]</a>}]</dd>
|
||||
<dt>@SR["External Logins"]:</dt>
|
||||
<dd>
|
||||
@Model.Logins.Count [<a asp-controller="Manage" asp-action="ManageLogins">@SR["Manage"]</a>]
|
||||
</dd>
|
||||
|
||||
<dt>@SR["Activity"]:</dt>
|
||||
<dd>@Model.Activity?.Name
|
||||
[<a asp-controller="Manage" asp-action="SetActivity"
|
||||
>@SR[@Model.Activity==null?"Set":"Modify settings"]</a>]
|
||||
</dd>
|
||||
|
||||
<dt>@SR["YourPosts"]:</dt>
|
||||
<dd>@Model.PostsCounter
|
||||
[<a asp-controller="Blogspot" asp-action="UserPosts"
|
||||
asp-route-id="@Model.UserName">@SR["YourPosts"]</a>]
|
||||
</dd>
|
||||
|
||||
<dt>@SR["TwoFactorAuthentication"]:</dt>
|
||||
<dd>
|
||||
@if (Model.TwoFactor)
|
||||
{
|
||||
using (Html.BeginForm("DisableTwoFactorAuthentication", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<text>@SR["Enabled"]
|
||||
<input type="submit" value="[@SR["Disable"]]" class="btn btn-link" />
|
||||
</text>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
using (Html.BeginForm("EnableTwoFactorAuthentication", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<text>@SR["Disabled"]
|
||||
<input type="submit" value="[@SR["Enable"]]" class="btn btn-link" />
|
||||
</text>
|
||||
}
|
||||
}
|
||||
</dd>
|
||||
<dt>@SR["Calendar"]</dt>
|
||||
<dd>
|
||||
@SR[Model.HasDedicatedCalendar?"Yes":"No"]
|
||||
[<a asp-action="SetGoogleCalendar">@SR["Select a Google calendar"]</a>]
|
||||
</dd>
|
||||
<dt>Credits:</dt>
|
||||
<dd>
|
||||
@(Model.Balance?.Credits ?? 0) €
|
||||
[<a asp-action="Credits">@SR["Manage"]</a>]
|
||||
</dd>
|
||||
</dl>
|
||||
<h4>
|
||||
<a asp-controller="Account" asp-action="Delete" >@SR["Unregister"]</a>
|
||||
</h4>
|
||||
</div>
|
||||
54
Yavsc/Views/Manage/ManageLogins.cshtml
Executable file
54
Yavsc/Views/Manage/ManageLogins.cshtml
Executable file
|
|
@ -0,0 +1,54 @@
|
|||
@model ManageLoginsViewModel
|
||||
@using Microsoft.AspNet.Http.Authentication
|
||||
@{
|
||||
ViewData["Title"] = "Manage your external logins";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
|
||||
<p class="text-success">@ViewData["StatusMessage"]</p>
|
||||
@if (Model.CurrentLogins.Count > 0)
|
||||
{
|
||||
<h4>Registered Logins</h4>
|
||||
<table class="table">
|
||||
<tbody>
|
||||
@foreach (var account in Model.CurrentLogins)
|
||||
{
|
||||
<tr>
|
||||
<td>@account.LoginProvider</td>
|
||||
<td>
|
||||
@if ((bool)ViewData["ShowRemoveButton"])
|
||||
{
|
||||
<form asp-controller="Manage" asp-action="RemoveLogin" method="post" class="form-horizontal" role="form">
|
||||
<div>
|
||||
<input asp-for="@account.LoginProvider" type="hidden" />
|
||||
<input asp-for="@account.ProviderKey" type="hidden" />
|
||||
<input type="submit" class="btn btn-default" value="Remove" title="Remove this @account.LoginProvider login from your account" />
|
||||
</div>
|
||||
</form>
|
||||
}
|
||||
else
|
||||
{
|
||||
@:
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
@if (Model.OtherLogins.Count > 0)
|
||||
{
|
||||
<h4>Add another service to log in.</h4>
|
||||
<hr />
|
||||
<form asp-controller="Manage" asp-action="LinkLogin" method="post" class="form-horizontal" role="form">
|
||||
<div id="socialLoginList">
|
||||
<p>
|
||||
@foreach (var provider in Model.OtherLogins)
|
||||
{
|
||||
<button type="submit" class="btn btn-default" name="provider" value="@provider.AuthenticationScheme" title="Log in using your @provider.DisplayName account">@provider.AuthenticationScheme</button>
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
}
|
||||
167
Yavsc/Views/Manage/SetActivity.cshtml
Normal file
167
Yavsc/Views/Manage/SetActivity.cshtml
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
@model PerformerProfile
|
||||
@{
|
||||
ViewData["Title"] = "Setup your performer profile";
|
||||
}
|
||||
|
||||
@section header{
|
||||
<script src="~/js/jquery-ui.js"></script>
|
||||
<script src="~/lib/jquery-validation/jquery.validate.js"></script>
|
||||
<script src="~/lib/jquery-validation/additional-methods.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
|
||||
<script src="~/js/validator.js"></script>
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=@ViewBag.GoogleSettings.BrowserApiKey"></script>
|
||||
<script src="~/js/google.geocode.js"></script>
|
||||
<style>
|
||||
#map {
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
@section scripts{
|
||||
<script>
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$('#Location_Address').geocode( { submit: 'btngeocode' ,
|
||||
inputLatitude: 'Location_Longitude',
|
||||
inputLongitude: 'Location_Latitude',
|
||||
combo: 'dropdownItems1',
|
||||
onValidated: function (e) {
|
||||
if (e.success) {
|
||||
var firstres = e.results[0];
|
||||
console.log(firstres);
|
||||
console.log(firstres.geometry);
|
||||
$('#AddressError').html("");
|
||||
}
|
||||
else {
|
||||
if (e.status=="ZERO_RESULTS") {
|
||||
$('#AddressError').html("aucun résultat");
|
||||
}
|
||||
else $('#AddressError').html(e.status);
|
||||
}
|
||||
} } );
|
||||
|
||||
|
||||
$.validator.addMethod("geocode", function(value, element) {
|
||||
console.log("here"); return $(element).geocodeAddress();});
|
||||
$("#FrmSetAct").validator({options: {
|
||||
errors: {
|
||||
match: 'Non conforme.',
|
||||
minlength: 'Pas assez long.',
|
||||
geocode: 'Adresse non reconnue par Google.'
|
||||
}
|
||||
}})
|
||||
});
|
||||
</script>
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
|
||||
@{ await Html.RenderPartialAsync("_PerformerPartial", Model) ; }
|
||||
|
||||
<form id="FrmSetAct" asp-controller="Manage" asp-action="SetActivity" method="post" class="form-horizontal" role="form">
|
||||
<h4>Choose below your main activity:</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ActivityCode" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<select asp-for="ActivityCode" asp-items=@ViewBag.Activities class="form-control" >
|
||||
</select>
|
||||
<span asp-validation-for="ActivityCode" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="AcceptNotifications" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="AcceptNotifications" class="form-control" />
|
||||
<span asp-validation-for="AcceptNotifications" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
<label asp-for="AcceptPublicContact" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="AcceptPublicContact" class="form-control" />
|
||||
|
||||
<span asp-validation-for="AcceptPublicContact" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
<label asp-for="AcceptGeoLocalisation" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="AcceptGeoLocalisation" class="form-control" />
|
||||
|
||||
<span asp-validation-for="AcceptGeoLocalisation" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
<label asp-for="WebSite" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="WebSite" class="form-control" />
|
||||
|
||||
<span asp-validation-for="WebSite" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
<label asp-for="MinDailyCost" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="MinDailyCost" class="form-control" />
|
||||
|
||||
<span asp-validation-for="MinDailyCost" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
<label asp-for="MaxDailyCost" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="MaxDailyCost" class="form-control" />
|
||||
|
||||
<span asp-validation-for="MaxDailyCost" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
<label asp-for="Active" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Active" class="form-control" />
|
||||
|
||||
<span asp-validation-for="Active" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
<label asp-for="SIREN" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="SIREN" class="form-control" />
|
||||
|
||||
<span asp-validation-for="SIREN" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
<label asp-for="OrganisationAddress.Address" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="OrganisationAddress.Address" asp-items=@ViewBag.Activities class="form-control" type="text" />
|
||||
|
||||
<span asp-validation-for="OrganisationAddress.Address" class="text-danger"></span>
|
||||
<div id="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
@Html.Hidden("OrganisationAddress.Latitude")
|
||||
@Html.Hidden("OrganisationAddress.Longitude")
|
||||
@Html.Hidden("PerfomerId")
|
||||
<button type="submit" class="btn btn-default">Save these settings</button>
|
||||
|
||||
</form>
|
||||
|
||||
<form asp-controller="Manage" asp-action="UnsetActivity" method="post" class="form-horizontal" role="form">
|
||||
@Html.Hidden("PerfomerId")
|
||||
<button type="submit" class="btn btn-default">Remove my professional profile</button>
|
||||
</form>
|
||||
29
Yavsc/Views/Manage/SetGoogleCalendar.cshtml
Normal file
29
Yavsc/Views/Manage/SetGoogleCalendar.cshtml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
@model SetGoogleCalendarViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Setup Google calendar access";
|
||||
}
|
||||
<form asp-action="SetGoogleCalendar">
|
||||
@{ var entryNum=0; }
|
||||
@foreach (var calendar in ViewBag.Calendars.items)
|
||||
{
|
||||
entryNum++;
|
||||
@if (calendar.accessRole=="owner") {
|
||||
<input type="radio" name="GoogleCalendarId" value="@calendar.id" id="cal@entryNum">
|
||||
<label for="cal@entryNum">
|
||||
<span style="background-color: @calendar.backgroundColor; foreground-color: @calendar.foregroundColor;">
|
||||
@calendar.summary </span>
|
||||
<i>"@calendar.description"</i>
|
||||
</label>
|
||||
|
||||
}
|
||||
}
|
||||
<input type="radio" name="GoogleCalendarId" id="cal0">
|
||||
<label for="cal0">
|
||||
@SR["No calendar setup"]
|
||||
<i>"@SR["Do not use any Google calendar to determine my availability"]"</i>
|
||||
</label>
|
||||
@Html.Hidden("ReturnUrl")
|
||||
<input type="submit"/>
|
||||
</form>
|
||||
|
||||
38
Yavsc/Views/Manage/SetPassword.cshtml
Executable file
38
Yavsc/Views/Manage/SetPassword.cshtml
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
@model SetPasswordViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Set Password";
|
||||
}
|
||||
|
||||
<p class="text-info">
|
||||
You do not have a local username/password for this site. Add a local
|
||||
account so you can log in without an external login.
|
||||
</p>
|
||||
|
||||
<form asp-controller="Manage" asp-action="SetPassword" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal" role="form">
|
||||
<h4>Set your password</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="NewPassword" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="NewPassword" class="form-control" />
|
||||
<span asp-validation-for="NewPassword" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ConfirmPassword" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ConfirmPassword" class="form-control" />
|
||||
<span asp-validation-for="ConfirmPassword" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">Set password</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
30
Yavsc/Views/Manage/VerifyPhoneNumber.cshtml
Executable file
30
Yavsc/Views/Manage/VerifyPhoneNumber.cshtml
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
@model VerifyPhoneNumberViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Verify Phone Number";
|
||||
}
|
||||
|
||||
<h2>@ViewData["Title"].</h2>
|
||||
|
||||
<form asp-controller="Manage" asp-action="VerifyPhoneNumber" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal" role="form">
|
||||
<input asp-for="PhoneNumber" type="hidden" />
|
||||
<h4>Add a phone number.</h4>
|
||||
<h5>@ViewData["Status"]</h5>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Code" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Code" class="form-control" />
|
||||
<span asp-validation-for="Code" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button type="submit" class="btn btn-default">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
22
Yavsc/Views/Shared/Authorize.cshtml
Normal file
22
Yavsc/Views/Shared/Authorize.cshtml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
@using AspNet.Security.OpenIdConnect.Extensions
|
||||
@using Microsoft.IdentityModel.Protocols.OpenIdConnect
|
||||
@using Mvc.Server.Models
|
||||
|
||||
@model Tuple<OpenIdConnectMessage, Application>
|
||||
|
||||
<div class="jumbotron">
|
||||
<h1>Authorization</h1>
|
||||
|
||||
<p class="lead text-left">Do you wanna grant <strong>@Model.Item2.DisplayName</strong> an access to your resources? (scopes requested: @Model.Item1.Scope)</p>
|
||||
|
||||
<form enctype="application/x-www-form-urlencoded" method="post">
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
@foreach (var parameter in Model.Item1.Parameters) {
|
||||
<input type="hidden" name="@parameter.Key" value="@parameter.Value" />
|
||||
}
|
||||
|
||||
<input formaction="/connect/authorize/accept" class="btn btn-lg btn-success" name="Authorize" type="submit" value="Yeah, sure" />
|
||||
<input formaction="/connect/authorize/deny" class="btn btn-lg btn-danger" name="Deny" type="submit" value="Hell, no" />
|
||||
</form>
|
||||
</div>
|
||||
12
Yavsc/Views/Shared/Error.cshtml
Executable file
12
Yavsc/Views/Shared/Error.cshtml
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
@model Exception
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Oops!";
|
||||
}
|
||||
<h1 class="text-danger">Oops! an error occurs</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
@if (Model != null)
|
||||
{
|
||||
|
||||
@Html.ValueFor(model => model.Message)
|
||||
}
|
||||
19
Yavsc/Views/Shared/Logout.cshtml
Normal file
19
Yavsc/Views/Shared/Logout.cshtml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<div class="jumbotron">
|
||||
<h1>Log out</h1>
|
||||
<p class="lead text-left">Are you sure you want to sign out?</p>
|
||||
|
||||
@if (Model.Item2 != null && Model.Item2.Identity != null) {
|
||||
<p class="lead text-left">Connected user: @Model.Item2.Identity.Name</p>
|
||||
}
|
||||
|
||||
<form action="/connect/logout" enctype="application/x-www-form-urlencoded" method="post">
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
@* Flow the logout request *@
|
||||
@foreach (var parameter in Model.Item1.Parameters) {
|
||||
<input type="hidden" name="@parameter.Key" value="@parameter.Value" />
|
||||
}
|
||||
|
||||
<input class="btn btn-lg btn-success" name="Authorize" type="submit" value="Yeah, sure" />
|
||||
</form>
|
||||
</div>
|
||||
12
Yavsc/Views/Shared/OidcError.cshtml
Normal file
12
Yavsc/Views/Shared/OidcError.cshtml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
@using Microsoft.IdentityModel.Protocols.OpenIdConnect
|
||||
@model OpenIdConnectMessage
|
||||
|
||||
<div class="jumbotron">
|
||||
<h1>An OpenID Connect error has occurred</h1>
|
||||
<p class="lead text-left">
|
||||
<strong>@Model.Error</strong>
|
||||
@if (!string.IsNullOrEmpty(Model.ErrorDescription)) {
|
||||
<small>@Model.ErrorDescription</small>
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
17
Yavsc/Views/Shared/SignIn.cshtml
Normal file
17
Yavsc/Views/Shared/SignIn.cshtml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
@using Microsoft.AspNet.Http.Authentication
|
||||
@model IEnumerable<AuthenticationDescription>
|
||||
|
||||
<div class="jumbotron">
|
||||
<h1>Authentication</h1>
|
||||
<p class="lead text-left">Sign in using one of these external providers:</p>
|
||||
|
||||
@foreach (var description in Model) {
|
||||
<form action="/signin" method="post">
|
||||
<input type="hidden" name="Provider" value="@description.AuthenticationScheme" />
|
||||
<input type="hidden" name="ReturnUrl" value="@ViewBag.ReturnUrl" />
|
||||
|
||||
<button class="btn btn-lg btn-success" type="submit">Connect using @description.DisplayName</button>
|
||||
</form>
|
||||
}
|
||||
</div>
|
||||
10
Yavsc/Views/Shared/Status.cshtml
Normal file
10
Yavsc/Views/Shared/Status.cshtml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
@{
|
||||
ViewBag.Title = "Oops!";
|
||||
}
|
||||
<h2 class="text-danger">Your request cannot be served</h2>
|
||||
|
||||
<code>
|
||||
@ViewBag.StatusCode
|
||||
</code>
|
||||
|
||||
85
Yavsc/Views/Shared/_DropFiles.cshtml
Normal file
85
Yavsc/Views/Shared/_DropFiles.cshtml
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
@section header{
|
||||
<style>
|
||||
.box__dragndrop,
|
||||
.box__uploading,
|
||||
.box__success,
|
||||
.box__error {
|
||||
display: none;
|
||||
}
|
||||
.box.has-advanced-upload {
|
||||
background-color: white;
|
||||
outline: 2px dashed black;
|
||||
outline-offset: -10px;
|
||||
}
|
||||
.box.has-advanced-upload .box__dragndrop {
|
||||
display: inline;
|
||||
}
|
||||
.box.is-dragover {
|
||||
background-color: grey;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="~/lib/dropzone/basic.min.css" />
|
||||
<link rel="stylesheet" href="~/lib/dropzone/dropzone.min.css" />
|
||||
<script src="~/lib/dropzone/dropzone.min.js"> </script>
|
||||
<script src="~/lib/dropzone/dropzone-amd-module.min.js"> </script>
|
||||
}
|
||||
|
||||
@section scripts{
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
var isAdvancedUpload = function() {
|
||||
var div = document.createElement('div');
|
||||
return (('draggable' in div) || ('ondragstart' in div && 'ondrop' in div)) && 'FormData' in window && 'FileReader' in window;
|
||||
}();
|
||||
|
||||
var $form = $('.box');
|
||||
|
||||
if (isAdvancedUpload) {
|
||||
$form.addClass('has-advanced-upload');
|
||||
}
|
||||
if (isAdvancedUpload) {
|
||||
|
||||
var droppedFiles = false;
|
||||
|
||||
$form.on('drag dragstart dragend dragover dragenter dragleave drop', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
})
|
||||
.on('dragover dragenter', function() {
|
||||
$form.addClass('is-dragover');
|
||||
})
|
||||
.on('dragleave dragend drop', function() {
|
||||
$form.removeClass('is-dragover');
|
||||
})
|
||||
.on('drop', function(e) {
|
||||
droppedFiles = e.originalEvent.dataTransfer.files;
|
||||
});
|
||||
|
||||
}
|
||||
$form.on('submit', function(e) {
|
||||
if ($form.hasClass('is-uploading')) return false;
|
||||
|
||||
$form.addClass('is-uploading').removeClass('is-error');
|
||||
|
||||
if (isAdvancedUpload) {
|
||||
// ajax for modern browsers
|
||||
} else {
|
||||
// ajax for legacy browsers
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
}
|
||||
|
||||
<form class="box" method="post" action="~/UserFiles/Create" enctype="multipart/form-data">
|
||||
<div class="box__input">
|
||||
<input class="box__file" type="file" name="files[]" id="file" data-multiple-caption="{count} files selected" multiple />
|
||||
<label for="file"><strong>Choose a file</strong><span class="box__dragndrop"> or drag it here</span>.</label>
|
||||
<button class="box__button" type="submit">Upload</button>
|
||||
</div>
|
||||
<div class="box__uploading">Uploading…</div>
|
||||
<div class="box__success">Done!</div>
|
||||
<div class="box__error">Error! <span></span>.</div>
|
||||
</form>
|
||||
64
Yavsc/Views/Shared/_Layout.cshtml
Executable file
64
Yavsc/Views/Shared/_Layout.cshtml
Executable file
|
|
@ -0,0 +1,64 @@
|
|||
<!doctype html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no" />
|
||||
<title>@ViewData["Title"] - @SiteSettings.Value.Title</title>
|
||||
<environment names="Development">
|
||||
<link rel="stylesheet" href="~/css/bootstrap.css" />
|
||||
<link rel="stylesheet" href="~/css/site.css" />
|
||||
</environment>
|
||||
<environment names="Staging,Production,yavsc,yavscpre,booking,lua">
|
||||
<link rel="stylesheet" href="~/css/bootstrap.min.css" asp-append-version="true"/>
|
||||
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
|
||||
</environment>
|
||||
<environment names="Development">
|
||||
<script src="~/js/jquery.js"></script>
|
||||
<script src="~/js/bootstrap.js"></script>
|
||||
<script src="~/js/site.js"></script>
|
||||
</environment>
|
||||
<environment names="Staging,Production,yavsc,yavscpre,booking,lua">
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.1.4.min.js"
|
||||
asp-fallback-src="~/bower_components/jquery/dist/jquery.min.js"
|
||||
asp-fallback-test="window.jQuery">
|
||||
</script>
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.5/bootstrap.min.js"
|
||||
asp-fallback-src="~/bower_components/bootstrap/dist/js/bootstrap.min.js"
|
||||
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal">
|
||||
</script>
|
||||
<script src="~/js/site.min.js" asp-append-version="true"></script>
|
||||
</environment>
|
||||
@RenderSection("header", required: false)
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a asp-controller="Home" asp-action="Index" class="navbar-brand">@SiteSettings.Value.Title</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a asp-controller="Home" asp-action="Index">@SR["Home"]</a></li>
|
||||
<li><a asp-controller="Home" asp-action="About">@SR["About"] @SiteSettings.Value.Title</a> </li>
|
||||
<li><a asp-controller="Home" asp-action="Contact">@SR["Contact"]</a></li>
|
||||
</ul>
|
||||
@await Html.PartialAsync("_LoginPartial")
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<main class="container body-content" role="main">
|
||||
@RenderBody()
|
||||
</main>
|
||||
<hr />
|
||||
<footer>
|
||||
<p>Yavsc - Copyright © 2016 Paul Schneider</p>
|
||||
</footer>
|
||||
@RenderSection("scripts", required: false)
|
||||
</body>
|
||||
</html>
|
||||
25
Yavsc/Views/Shared/_LoginPartial.cshtml
Executable file
25
Yavsc/Views/Shared/_LoginPartial.cshtml
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
@using System.Security.Claims
|
||||
|
||||
@if (User.IsSignedIn())
|
||||
{
|
||||
<form asp-controller="Account" asp-action="LogOff" method="post" id="logoutForm" class="navbar-right">
|
||||
<language-layout>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a asp-controller="Manage" asp-action="Index" title="Manage">@SR["Hello"] @User.GetUserName()!</a>
|
||||
</li>
|
||||
<li>
|
||||
<button type="submit" class="btn btn-link navbar-btn navbar-link">@SR["Logout"]</button>
|
||||
</li>
|
||||
</ul>
|
||||
</language-layout>
|
||||
</form>
|
||||
}
|
||||
else
|
||||
{ <language-layout>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a asp-controller="Account" asp-action="Register">@SR["Register"]</a></li>
|
||||
<li><a asp-controller="Account" asp-action="Login">@SR["Login"]</a></li>
|
||||
</ul>
|
||||
</language-layout>
|
||||
}
|
||||
33
Yavsc/Views/Shared/_PerformerPartial.cshtml
Normal file
33
Yavsc/Views/Shared/_PerformerPartial.cshtml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
@model YavscWeb.Models.PerformerProfile
|
||||
|
||||
<div class="performer @(Model.Active?"active":"inactive")">
|
||||
@Model.Performer?.UserName (rating: @Model.Rate%)
|
||||
<ul>
|
||||
@if (Model.MinDailyCost != null) {
|
||||
<li>@SR["MinDailyCost"]: @Model.MinDailyCost€</li>
|
||||
}
|
||||
@if (Model.MinDailyCost != null) {
|
||||
<li>@SR["MaxDailyCost"]: @Model.MaxDailyCost€</li>
|
||||
}
|
||||
@if (Model.WebSite!=null) {
|
||||
<li>@SR["WebSite"]: @Model.WebSite</li>
|
||||
}
|
||||
@if (Model.DoesBlog) {
|
||||
<li> <a asp-controller="Blogspot" asp-action="UserPosts"
|
||||
asp-route-id="@Model.Performer.UserName">@SR["His blog"]</a>
|
||||
</li>
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(
|
||||
Model.Performer?.DedicatedGoogleCalendar))
|
||||
{
|
||||
<li> @SR["Exposes his Google calendar!"]
|
||||
</li>
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(
|
||||
Model.Performer?.GoogleRegId))
|
||||
{
|
||||
<li> @SR["Uses the mobile application, and receives push notifications"]
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
16
Yavsc/Views/Shared/_ValidationScriptsPartial.cshtml
Executable file
16
Yavsc/Views/Shared/_ValidationScriptsPartial.cshtml
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
<environment names="Development">
|
||||
<script src="~/lib/jquery-validation/jquery.validate.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
|
||||
</environment>
|
||||
<script src="~/js/jquery-ui.js" ></script>
|
||||
<script src="~/lib/jquery-validation/additional-methods.js" charset="UTF-8"></script>
|
||||
<environment names="Staging,Production,yavsc,yavscpre,booking,lua">
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.14.0/jquery.validate.min.js"
|
||||
asp-fallback-src="~/lib/jquery-validation/jquery.validate.min.js"
|
||||
asp-fallback-test="window.jQuery && window.jQuery.validator">
|
||||
</script>
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/mvc/5.2.3/jquery.validate.unobtrusive.min.js"
|
||||
asp-fallback-src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"
|
||||
asp-fallback-test="window.jQuery && window.jQuery.validator && window.jQuery.validator.unobtrusive">
|
||||
</script>
|
||||
</environment>
|
||||
22
Yavsc/Views/_ViewImports.cshtml
Executable file
22
Yavsc/Views/_ViewImports.cshtml
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
@using YavscWeb
|
||||
@using YavscWeb.Models
|
||||
@using YavscWeb.Models.Google
|
||||
@using YavscWeb.Models.Booking
|
||||
@using YavscWeb.ViewModels.Account
|
||||
@using YavscWeb.ViewModels.Manage
|
||||
@using YavscWeb.ViewModels.Calendar;
|
||||
@using Microsoft.AspNet.Identity
|
||||
@using Microsoft.AspNet.Mvc;
|
||||
@using Microsoft.Extensions.Localization;
|
||||
@using Microsoft.AspNet.Mvc.Localization;
|
||||
@using Microsoft.AspNet.Authorization;
|
||||
@using Microsoft.Extensions.OptionsModel;
|
||||
@using System.Web.Optimization;
|
||||
|
||||
@inject IViewLocalizer LocString
|
||||
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
|
||||
@addTagHelper "*, yavsc"
|
||||
@inject IStringLocalizer<YavscWeb.Resources.YavscLoc> SR
|
||||
@inject IAuthorizationService AuthorizationService
|
||||
@inject IOptions<GoogleAuthSettings> GoogleSettings
|
||||
@inject IOptions<SiteSettings> SiteSettings
|
||||
3
Yavsc/Views/_ViewStart.cshtml
Executable file
3
Yavsc/Views/_ViewStart.cshtml
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue