files tree made better.
This commit is contained in:
parent
ffbf032480
commit
ccc91bbf19
1630 changed files with 18209 additions and 41860 deletions
33
src/Yavsc/Views/Shared/BillingLine.cshtml
Normal file
33
src/Yavsc/Views/Shared/BillingLine.cshtml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
@model CommandLine
|
||||
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Id)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Id)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Description)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Description)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Count)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Count)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.UnitaryCost)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.UnitaryCost)
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
64
src/Yavsc/Views/Shared/ColorEditor.cshtml
Normal file
64
src/Yavsc/Views/Shared/ColorEditor.cshtml
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
@model Color
|
||||
<div>
|
||||
|
||||
<div id="clrprv" style="border:solid grey 1px; width:1em; height:1em; display: inline-block; height:3em; width:5em;"></div>
|
||||
|
||||
<div style="display: inline-block; width:15em; margin:.3em;">
|
||||
<div id="sred" class="slider" style="background-color:red;"></div>
|
||||
<div id="sgreen" class="slider" style="background-color:green;"></div>
|
||||
<div id="sblue" class="slider" style="background-color:blue;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="Red" name="Red" />
|
||||
<input type="hidden" id="Green" name="Green" />
|
||||
<input type="hidden" id="Blue" name="Blue" />
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
var red = @Model.Red;
|
||||
var green = @Model.Green;
|
||||
var blue = @Model.Blue;
|
||||
|
||||
$("#sred").slider(
|
||||
{
|
||||
value: red,
|
||||
min: 0,
|
||||
max: 255,
|
||||
animate: "fast"
|
||||
});
|
||||
$("#sgreen").slider(
|
||||
{
|
||||
value: green,
|
||||
min: 0,
|
||||
max: 255,
|
||||
animate: "fast"
|
||||
});
|
||||
$("#sblue").slider(
|
||||
{
|
||||
value: blue,
|
||||
min: 0,
|
||||
max: 255,
|
||||
animate: "fast"
|
||||
});
|
||||
var updateColor = function() {
|
||||
$("#clrprv").css("background-color","rgb("+red+","+green+","+blue+")");
|
||||
$("#Red").val(red);
|
||||
$("#Green").val(green);
|
||||
$("#Blue").val(blue);
|
||||
console.log($("#Blue").val());
|
||||
};
|
||||
$("#sred").on("slide",function(event, ui){
|
||||
red=ui.value;
|
||||
updateColor();
|
||||
});
|
||||
$("#sgreen").on("slide",function(event, ui){
|
||||
green=ui.value;
|
||||
updateColor();
|
||||
});
|
||||
$("#sblue").on("slide",function(event, ui){
|
||||
blue=ui.value;
|
||||
updateColor();
|
||||
});
|
||||
updateColor();
|
||||
});
|
||||
|
||||
</script>
|
||||
5
src/Yavsc/Views/Shared/Components/Avatar/Default.cshtml
Normal file
5
src/Yavsc/Views/Shared/Components/Avatar/Default.cshtml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
@model ShortUserInfo
|
||||
<div style="display: inline-block;">
|
||||
<img src="@Model.Avatar" class="smalltofhol" />
|
||||
@Model.UserName
|
||||
</div>
|
||||
22
src/Yavsc/Views/Shared/Components/Bill/Bill_pdf.cshtml
Normal file
22
src/Yavsc/Views/Shared/Components/Bill/Bill_pdf.cshtml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
@using System.Reflection
|
||||
@using System.IO
|
||||
@using Microsoft.Extensions.WebEncoders
|
||||
@using System.Diagnostics
|
||||
@using System.Text
|
||||
@using Yavsc.Formatters
|
||||
@using Yavsc.Helpers
|
||||
@model Yavsc.ViewModels.Gen.PdfGenerationViewModel
|
||||
|
||||
@{
|
||||
Model.GenerateEstimatePdf();
|
||||
}
|
||||
@if (Model.Generated) {
|
||||
<div>
|
||||
@(Model.BaseFileName).pdf was generated
|
||||
</div>
|
||||
} else {
|
||||
<div class="error">
|
||||
@Model.GenerationErrorMessage
|
||||
<p>Something went wrong ...</p>
|
||||
</div>
|
||||
}
|
||||
228
src/Yavsc/Views/Shared/Components/Bill/Bill_tex.cshtml
Normal file
228
src/Yavsc/Views/Shared/Components/Bill/Bill_tex.cshtml
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
@using Yavsc.Helpers
|
||||
@using System.IO
|
||||
@using System.Globalization
|
||||
@model IBillable
|
||||
@{
|
||||
Layout = null;
|
||||
var pro = ViewBag.PerformerProfile;
|
||||
var from = ViewBag.Performer;
|
||||
var to = ViewBag.Client;
|
||||
var PostalAddress = ViewBag.ClientAddress;
|
||||
var proaddr = ViewBag.PerformerOrganizationAddress;
|
||||
var isestimate = !ViewBag.AsBill;
|
||||
var prosign = new FileInfo($"{ViewBag.BillsDir}/sign-{ViewBag.BillingCode}-{Model.Id}.png");
|
||||
var clisign = new FileInfo($"{ViewBag.BillsDir}/sign-{ViewBag.BillingCode}-{Model.Id}.png");
|
||||
var activity = ViewBag.ActivityLabel;
|
||||
var bill = Model.GetBillItems();
|
||||
string validationDate = null ;
|
||||
if (Model.ValidationDate.HasValue) {
|
||||
validationDate = Model.ValidationDate.Value.ToString("dddd dd MMMM yyyy", CultureInfo.CreateSpecificCulture("fr-FR"));
|
||||
}
|
||||
}
|
||||
\documentclass[french,11pt]{article}
|
||||
\usepackage{eurosym}
|
||||
\usepackage{textcomp}
|
||||
\usepackage{babel}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[a4paper]{geometry}
|
||||
\usepackage{units}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{fp}
|
||||
\usepackage[space]{grffile}
|
||||
\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 {@(ViewBag.Acquitted?"oui":"non")} % Facture acquittée : oui/non
|
||||
\def\FactureLieu {@proaddr} % Lieu de l'édition de la facture
|
||||
\def\FactureObjet {@(new HtmlString(isestimate?"Devis":"Facture")) en @TeXHelpers.ToTeX(activity)} % Objet du document
|
||||
% Description de la facture
|
||||
\def\FactureDescr {
|
||||
@TeXHelpers.ToTeX(Model.GetDescription())
|
||||
}
|
||||
|
||||
% Infos Client
|
||||
\def\ClientNom{@TeXHelpers.ToTeX(to.UserName)} % Nom du client
|
||||
|
||||
\def\ClientAdresse{
|
||||
% Adresse du client
|
||||
@PostalAddress @if (!string.IsNullOrWhiteSpace(to.PhoneNumber)) {<text>\\
|
||||
@TeXHelpers.ToTeX(to.PhoneNumber)
|
||||
</text>}\\
|
||||
E-mail: @TeXHelpers.ToTeX(to.Email)
|
||||
}
|
||||
|
||||
% Liste des produits facturés : Désignation, prix
|
||||
@foreach (var line in bill) {
|
||||
<text>\AjouterService{@TeXHelpers.ToTeXCell(line.Description)}{@line.Count}{@line.UnitaryCost.ToString("F2",CultureInfo.InvariantCulture)}
|
||||
</text>}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
|
||||
\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{ @TeXHelpers.ToTeX(from.UserName) - @ViewBag.FooterPerformerOrganizationAddress \\
|
||||
\small{ E-mail: @TeXHelpers.ToTeX(from.Email) @if (!string.IsNullOrWhiteSpace(from.PhoneNumber)) { <text> - Téléphone : @TeXHelpers.ToTeX(from.PhoneNumber) </text> }
|
||||
}
|
||||
}
|
||||
|
||||
\begin{document}
|
||||
|
||||
% Logo de la société
|
||||
@if (from.Avatar != null) {
|
||||
<text>\includegraphics[height=60pt]{@(ViewBag.AvatarsDir)/@(from.UserName).png}
|
||||
</text>
|
||||
} else {
|
||||
<text>%\includegraphics{logo.png}
|
||||
</text>
|
||||
}
|
||||
% Nom et adresse de la société
|
||||
@TeXHelpers.ToTeX(from.UserName) \\
|
||||
@proaddr
|
||||
|
||||
@(isestimate?"Devis":"Facture") n\textdegree\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 (\euro)} \\
|
||||
\hline
|
||||
\AfficheResultat{}
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
|
||||
\begin{flushright}
|
||||
\textit{Auto entreprise en franchise de TVA}\\
|
||||
|
||||
\end{flushright}
|
||||
~\\
|
||||
@if (ViewBag.AsBill) {
|
||||
if (ViewBag.Acquitted) {
|
||||
<text>
|
||||
\ifthenelse{\equal{\FactureAcquittee}{oui}}{
|
||||
Facture acquittée.
|
||||
}
|
||||
</text>
|
||||
} else {
|
||||
var bi = from.BankInfo;
|
||||
if (bi==null){
|
||||
<text>À régler sur site, en utilisant le paiment PayPal:\\
|
||||
Le relevé d'identité bancaire de ce prestaire n'est pas renseigné.
|
||||
</text>
|
||||
} else {
|
||||
<text>À régler par chèque ou par virement bancaire :
|
||||
|
||||
\begin{center}
|
||||
\begin{tabular}{|c c c c|}
|
||||
@if (!string.IsNullOrWhiteSpace(bi.BankCode) && !string.IsNullOrWhiteSpace(bi.WicketCode)
|
||||
&& !string.IsNullOrWhiteSpace(bi.AccountNumber) ) {
|
||||
<text>\hline \textbf{Code banque} & \textbf{Code guichet} & \textbf{N\textdegree de Compte} & \textbf{Clé RIB} \\
|
||||
@bi.BankCode & @bi.WicketCode & @bi.AccountNumber & @bi.BankedKey \\
|
||||
</text>
|
||||
}
|
||||
@if (!string.IsNullOrWhiteSpace(@bi.IBAN) && !string.IsNullOrWhiteSpace(@bi.BIC)) {
|
||||
<text>
|
||||
\hline \textbf{IBAN N\textdegree} & \multicolumn{3}{|l|}{ @bi.IBAN } \\
|
||||
\hline \textbf{Code BIC} & \multicolumn{3}{|l|}{ @bi.BIC }
|
||||
</text>
|
||||
} \\
|
||||
\hline
|
||||
\end{tabular}
|
||||
\end{center}</text>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@if (validationDate!=null) {
|
||||
<text>
|
||||
\begin{flushright}
|
||||
@(new TeXString(isestimate?"Devis demandé le ":"Facture suite à la demande du ")+
|
||||
TeXHelpers.ToTeX(validationDate))
|
||||
\end{flushright}
|
||||
@if (prosign.Exists) {
|
||||
<text>
|
||||
\begin{center}
|
||||
\hspace{263pt}
|
||||
\includegraphics[height=60pt]{@(ViewBag.BillsDir)/{ViewBag.BillingCode}-prosign-@(Model.Id).png}
|
||||
\end{center}
|
||||
</text>
|
||||
}
|
||||
|
||||
@if (clisign.Exists) {
|
||||
<text>
|
||||
\begin{center}
|
||||
\hspace{263pt}
|
||||
\includegraphics[height=60pt]{@(ViewBag.BillsDir)/{ViewBag.BillingCode}-clisign-@(Model.Id).png}
|
||||
\end{center}
|
||||
</text>
|
||||
}
|
||||
|
||||
</text>
|
||||
}
|
||||
\end{document}
|
||||
33
src/Yavsc/Views/Shared/Components/Bill/Default.cshtml
Normal file
33
src/Yavsc/Views/Shared/Components/Bill/Default.cshtml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
@model IBillable
|
||||
<div class="bill">
|
||||
@if (ViewBag.BillFileInfo.Exists) {
|
||||
<a class="btn btn-link" href="~/api/bill/facture-@(ViewBag.BillingCode)-@(Model.Id).pdf" >La facture au format Pdf</a>
|
||||
} else {
|
||||
<script>
|
||||
var onGenerate = function () {
|
||||
var _btn = this;
|
||||
$.post('/api/bill/genpdf/@ViewBag.BillingCode/@Model.Id')
|
||||
.done(function(data){
|
||||
var res = JSON.parse(data);
|
||||
window.location.href = '/api/bill/' + res.Generated;
|
||||
_btn.disabled = true;
|
||||
})
|
||||
.fail(function( jqXHR, textStatus, errorThrown ) {
|
||||
$('#billgenerr').html('<em>La génération a échoué</em><p>'+textStatus+'</p>')
|
||||
})
|
||||
};
|
||||
|
||||
$(document).ready(function(){$('#btnGen').on('click',onGenerate)})
|
||||
|
||||
</script>
|
||||
<div id="billgen">
|
||||
<form action= method="POST">
|
||||
<input id="btnGen" class="btn btn-default" type="button" onclick="onGenerate" value="Générer la facture au format Pdf" />
|
||||
|
||||
<div id="billgenerr" class="error">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
64
src/Yavsc/Views/Shared/Components/BlogIndex/Default.cshtml
Normal file
64
src/Yavsc/Views/Shared/Components/BlogIndex/Default.cshtml
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
@model IEnumerable<IGrouping<string,BlogPost>>
|
||||
|
||||
@if (User.IsSignedIn()) {
|
||||
|
||||
<label>
|
||||
<input type="checkbox" id="_cbv" checked/>Invisibles, posts privés</label>
|
||||
<script>
|
||||
$("#_cbv").change(function() {
|
||||
if (this.checked) {
|
||||
$("tr.hiddenpost").removeClass("hidden");
|
||||
} else {
|
||||
$("tr.hiddenpost").addClass("hidden");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
<table class="table">
|
||||
@foreach (var group in Model) {
|
||||
var title = group.Key ?? "@";
|
||||
string secondclass="";
|
||||
var first = group.First();
|
||||
string ftrclass = (first.Visible) ? "visiblepost" : "hiddenpost";
|
||||
|
||||
<tr><td colspan="3">
|
||||
<a asp-action="Title" asp-route-id="@group.Key" >@title</a></td></tr>
|
||||
@foreach (var item in group) {
|
||||
var trclass = (item.Visible)?"visiblepost":"hiddenpost";
|
||||
|
||||
<tr class="@trclass">
|
||||
<td><a asp-action="Details" asp-route-id="@item.Id" class="bloglink">
|
||||
<img src="@item.Photo" class="blogphoto"></a>
|
||||
</td>
|
||||
<td>
|
||||
<markdown>@((item.Content?.Length > 256) ? item.Content.Substring(0, 256) + " ..." : item.Content)</markdown>
|
||||
<span style="font-size:x-small;">(@item.Author.UserName </span>,
|
||||
<span style="font-size:xx-small;">
|
||||
posté le @item.DateCreated.ToString("dddd d MMM yyyy à H:mm")
|
||||
@if ((item.DateModified - item.DateCreated).Minutes > 0){
|
||||
@:- Modifié le @item.DateModified.ToString("dddd d MMM yyyy à H:mm")
|
||||
})
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<ul class="actiongroup">
|
||||
@if (await AuthorizationService.AuthorizeAsync(User, item, new ViewRequirement())) {
|
||||
<li>
|
||||
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-lg">@SR["Details"]</a>
|
||||
</li>
|
||||
}
|
||||
@if (await AuthorizationService.AuthorizeAsync(User, item, new EditRequirement())) {
|
||||
<li><a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-default">@SR["Edit"]</a>
|
||||
</li>
|
||||
<li><a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">@SR["Delete"]</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</table>
|
||||
|
||||
|
||||
23
src/Yavsc/Views/Shared/Components/Calendar/Default.cshtml
Normal file
23
src/Yavsc/Views/Shared/Components/Calendar/Default.cshtml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
@model DateTimeChooserViewModel
|
||||
@{
|
||||
var dtpid = $"dtpckr{Model.InputId}";
|
||||
var currentUICulture = System.Globalization.CultureInfo.CurrentUICulture;
|
||||
}
|
||||
|
||||
<div class='input-group date' data-provide="datepicker-inline" id="@dtpid">
|
||||
<input class="form-control " name="@Model.InputId" id="@Model.InputId" />
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$(@Html.Raw("'#"+dtpid+"'")).datetimepicker({
|
||||
locale: '@currentUICulture.Name',
|
||||
disabledDates: @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model.BusyDates)),
|
||||
maxDate: '@Model.MaxDate.ToString("MM/dd/yyyy",currentUICulture)',
|
||||
minDate: '@Model.MinDate.ToString("MM/dd/yyyy",currentUICulture)',
|
||||
format: 'MM/DD/YYYY HH:mm'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
@model CirclesViewModel
|
||||
|
||||
@foreach (var cb in ViewBag.Access) {
|
||||
<label><input type="checkbox" class="@(Model.TargetTypeName)cirle" checked="@cb.Checked" value="@cb.Text"
|
||||
data-target-id="@Model.Target.Id" data-circle-id="@cb.Value" data-targe-type="">
|
||||
@cb.Text </label>
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
@model Comment
|
||||
44
src/Yavsc/Views/Shared/Components/Directory/Default.cshtml
Normal file
44
src/Yavsc/Views/Shared/Components/Directory/Default.cshtml
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
@using Yavsc.ViewModels.UserFiles
|
||||
@model UserDirectoryInfo
|
||||
<div class="dirinfo">
|
||||
<strong>@Model.UserName / @Model.SubPath</strong>
|
||||
<div class="subdirs">
|
||||
@foreach (var subdir in Model.SubDirectories) {
|
||||
<a href="@subdir" class="subdir">@subdir.Name</a>
|
||||
}
|
||||
</div>
|
||||
<style>
|
||||
tr.fileheaders th {
|
||||
border-bottom: 1px solid #ddd;
|
||||
font-style: italic;
|
||||
}
|
||||
tr.fileinfo td {
|
||||
padding: 1em;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
tr.fileinfo:nth-child(even) {background-color: #f2f2f2}
|
||||
tr.fileinfo:hover {background-color: #f5f5f5}
|
||||
|
||||
</style>
|
||||
<table >
|
||||
<tr class="fileheaders">
|
||||
<th>Nom
|
||||
</th>
|
||||
<th>Taille
|
||||
</th>
|
||||
<th>Modification
|
||||
</th>
|
||||
</tr>
|
||||
@foreach (var fileinfo in Model.Files) {
|
||||
<tr class="fileinfo">
|
||||
<td class="filename">
|
||||
<a href="@fileinfo.FileLink(Model.UserName,Model.SubPath)">
|
||||
@fileinfo.Name
|
||||
</a></td>
|
||||
<td class="filesize">@fileinfo.Size</td>
|
||||
<td class="filemdate">@fileinfo.LastModified</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
13
src/Yavsc/Views/Shared/Components/Estimate/Default.cshtml
Normal file
13
src/Yavsc/Views/Shared/Components/Estimate/Default.cshtml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
@model Estimate
|
||||
<div class="estimate">
|
||||
|
||||
<a href="~/api/pdfbill/estimate-@(Model.Id).tex" >Export au format LaTeX</a>
|
||||
|
||||
|
||||
<form action="~/api/pdfbill/gen/@Model.Id" method="POST">
|
||||
<input type="submit" value="Générer le Pdf"/>
|
||||
</form>
|
||||
|
||||
<a href="~/api/pdfbill/get/@(Model.Id)" >Télécharger le document généré</a>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
@using System.Reflection
|
||||
@using System.IO
|
||||
@using Microsoft.Extensions.WebEncoders
|
||||
@using System.Diagnostics
|
||||
@using System.Text
|
||||
@using Yavsc.Formatters
|
||||
@using Yavsc.Helpers
|
||||
@model Yavsc.ViewModels.Gen.PdfGenerationViewModel
|
||||
|
||||
@{
|
||||
Model.GenerateEstimatePdf();
|
||||
}
|
||||
@if (Model.Generated) {
|
||||
<div>
|
||||
@(Model.BaseFileName).pdf was generated
|
||||
</div>
|
||||
} else {
|
||||
<div class="error">
|
||||
@Model.GenerationErrorMessage
|
||||
<p>Something went wrong ...</p>
|
||||
</div>
|
||||
}
|
||||
206
src/Yavsc/Views/Shared/Components/Estimate/Estimate_tex.cshtml
Normal file
206
src/Yavsc/Views/Shared/Components/Estimate/Estimate_tex.cshtml
Normal file
|
|
@ -0,0 +1,206 @@
|
|||
@using Yavsc.Helpers
|
||||
@using System.IO
|
||||
@using System.Globalization
|
||||
@model Estimate
|
||||
@{
|
||||
Layout = null;
|
||||
var pro = Model.Query.PerformerProfile;
|
||||
var from = Model.Query.PerformerProfile.Performer;
|
||||
var to = Model.Query.Client;
|
||||
var PostalAddress = to.PostalAddress?.Address.SplitAddressToTeX();
|
||||
var proaddr = Model.Query.PerformerProfile.OrganizationAddress.Address.SplitAddressToTeX();
|
||||
var proaddrm = new HtmlString(Model.Query.PerformerProfile.OrganizationAddress.Address);
|
||||
var isestimate = !ViewBag.AsBill;
|
||||
var prosign = new FileInfo($"{ViewBag.BillsDir}/estimate-prosign-{Model.Id}.png");
|
||||
|
||||
}
|
||||
\documentclass[french,11pt]{article}
|
||||
\usepackage{eurosym}
|
||||
\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 {@ViewBag.Acquitted?"oui":"non"} % Facture acquittée : oui/non
|
||||
\def\FactureLieu {@proaddrm} % Lieu de l'édition de la facture
|
||||
\def\FactureObjet {@(new HtmlString(isestimate?"Devis":"Facture")) : @TeXHelpers.ToTeX(Model.Title)} % Objet du document
|
||||
% Description de la facture
|
||||
\def\FactureDescr {
|
||||
@TeXHelpers.ToTeX(Model.Description)
|
||||
}
|
||||
|
||||
% Infos Client
|
||||
\def\ClientNom{@TeXHelpers.ToTeX(to.UserName)} % Nom du client
|
||||
|
||||
\def\ClientAdresse{
|
||||
% Adresse du client
|
||||
@PostalAddress
|
||||
@if (PostalAddress!=null) {<text>@PostalAddress</text>}
|
||||
@if (!string.IsNullOrWhiteSpace(to.PhoneNumber)) {<text>@TeXHelpers.ToTeX(to.PhoneNumber)<text>\\</text>
|
||||
</text>}
|
||||
E-mail: @TeXHelpers.ToTeX(to.Email)
|
||||
}
|
||||
|
||||
% Liste des produits facturés : Désignation, prix
|
||||
@if (Model.Bill!=null) { foreach (CommandLine line in Model.Bill) {
|
||||
<text>\AjouterService{@TeXHelpers.ToTeX(line.Description)}{@line.Count}{@line.UnitaryCost.ToString("F2",CultureInfo.InvariantCulture)}
|
||||
</text>} }
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
|
||||
\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{ @TeXHelpers.ToTeX(from.UserName) @if (proaddrm!=null) { <text> - @proaddrm </text> } \newline
|
||||
\small{ E-mail: @TeXHelpers.ToTeX(from.Email) @if (!string.IsNullOrWhiteSpace(from.PhoneNumber)) { <text> - Téléphone fixe: @TeXHelpers.ToTeX(from.PhoneNumber) </text> }
|
||||
}
|
||||
}
|
||||
|
||||
\begin{document}
|
||||
|
||||
% Logo de la société
|
||||
@if (from.Avatar != null) {
|
||||
<text>\includegraphics[height=60pt]{@(ViewBag.AvatarsDir)/@(from.UserName).png}
|
||||
</text>
|
||||
} else {
|
||||
<text>%\includegraphics{logo.png}
|
||||
</text>
|
||||
}
|
||||
% Nom et adresse de la société
|
||||
@TeXHelpers.ToTeX(from.UserName) \\
|
||||
@proaddr
|
||||
|
||||
@(isestimate?"Devis":"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 (\euro)} \\
|
||||
\hline
|
||||
\AfficheResultat{}
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
|
||||
\begin{flushright}
|
||||
\textit{Auto entreprise en franchise de TVA}\\
|
||||
|
||||
\end{flushright}
|
||||
~\\
|
||||
@if (!isestimate) {
|
||||
<text>
|
||||
\ifthenelse{\equal{\FactureAcquittee}{oui}}{
|
||||
Facture acquittée.
|
||||
}{ </text>
|
||||
|
||||
var bi = from.BankInfo;
|
||||
if (bi!=null) {
|
||||
<text>À régler par chèque ou par virement bancaire :
|
||||
|
||||
\begin{center}
|
||||
\begin{tabular}{|c c c c|}
|
||||
@if (!string.IsNullOrWhiteSpace(bi.BankCode) && !string.IsNullOrWhiteSpace(bi.WicketCode)
|
||||
&& !string.IsNullOrWhiteSpace(bi.AccountNumber) ) {
|
||||
<text>\hline \textbf{Code banque} & \textbf{Code guichet} & \textbf{N° de Compte} & \textbf{Clé RIB} \\
|
||||
@bi.BankCode & @bi.WicketCode & @bi.AccountNumber & @bi.BankedKey \\
|
||||
</text>
|
||||
}
|
||||
@if (!string.IsNullOrWhiteSpace(@bi.IBAN) && !string.IsNullOrWhiteSpace(@bi.BIC)) {
|
||||
<text>
|
||||
\hline \textbf{IBAN N°} & \multicolumn{3}{|l|}{ @bi.IBAN } \\
|
||||
\hline \textbf{Code BIC} & \multicolumn{3}{|l|}{ @bi.BIC }
|
||||
</text>
|
||||
} \\
|
||||
\hline
|
||||
\end{tabular}
|
||||
\end{center}</text>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@if (!(Model.ProviderValidationDate==null)) {
|
||||
<text>
|
||||
\begin{flushright}
|
||||
@(new HtmlString(isestimate?"Devis validé":"Facture validée")) le @TeXHelpers.ToTeX(Model.ProviderValidationDate.ToString("dddd dd MMMM yyyy"))
|
||||
\end{flushright}
|
||||
@if (prosign.Exists) {
|
||||
<text>
|
||||
\begin{center}
|
||||
\hspace{263pt}
|
||||
\includegraphics[height=60pt]{@(ViewBag.BillsDir)/estimate-prosign-@(Model.Id).png}
|
||||
\end{center}
|
||||
</text>
|
||||
}
|
||||
</text>
|
||||
}
|
||||
\end{document}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
@model NominativeServiceCommand
|
||||
@inject IOptions<PayPalSettings> PayPalSettings
|
||||
|
||||
@if (Model!=null && Model.PaymentId!=null) {
|
||||
|
||||
@if (Model.Regularisation.Executor.Id == User.GetUserId()) {
|
||||
<text>
|
||||
Votre paiment
|
||||
</text>
|
||||
} else {
|
||||
<text>
|
||||
Le paiment de @Html.DisplayFor(m=>m.Regularisation.Executor.UserName)
|
||||
</text>
|
||||
}
|
||||
<text> :
|
||||
|
||||
</text>
|
||||
<label>@Model.GetIsAcquitted()
|
||||
<input type="checkbox" checked="@Model.GetIsAcquitted()" disabled/>
|
||||
<a asp-controller="Manage" asp-action="PaymentInfo" asp-route-id="@Model.Regularisation.CreationToken">@Model.Regularisation.CreationToken</a>
|
||||
</label>
|
||||
|
||||
}
|
||||
|
||||
@if (!Model.GetIsAcquitted()) {
|
||||
<div id="paypalzone"></div>
|
||||
<script>
|
||||
var CREATE_PAYMENT_URL = '@ViewBag.CreatePaymentUrl';
|
||||
var EXECUTE_PAYMENT_URL = '@ViewBag.ExecutePaymentUrl';
|
||||
var PAYPAL_ENV = '@PayPalSettings.Value.Mode';
|
||||
var MERCH_ID = '@PayPalSettings.Value.';
|
||||
|
||||
|
||||
paypal.checkout.setup(MERCH_ID, {
|
||||
environment: PAYPAL_ENV,
|
||||
container: '#paypalzone',
|
||||
click: function () {
|
||||
paypal.checkout.initXO();
|
||||
var action = $.post(CREATE_PAYMENT_URL)
|
||||
.done(function (data) {
|
||||
paypal.checkout.startFlow(data.token)
|
||||
})
|
||||
.fail(function () {
|
||||
paypal.checkout.closeFlow()
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
}
|
||||
17
src/Yavsc/Views/Shared/Components/Tagger/Default.cshtml
Normal file
17
src/Yavsc/Views/Shared/Components/Tagger/Default.cshtml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
@using Yavsc.Interfaces;
|
||||
@using System;
|
||||
@model ITaggable<long>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<ul>
|
||||
@foreach (string tag in (string[]) ViewData["Tags"]) {
|
||||
<li>@tag</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
4
src/Yavsc/Views/Shared/DisplayTemplates/Activity.cshtml
Normal file
4
src/Yavsc/Views/Shared/DisplayTemplates/Activity.cshtml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
@model Activity
|
||||
<div class="activity">
|
||||
<b title="@Model.Description" style="cursor:alias;">@Html.DisplayFor(m=>m.Name)</b>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
@model ApplicationUser
|
||||
|
||||
<div class="userinfo">
|
||||
<h3>@Component.Invoke("Avatar", Model.Id, ".s")</h3>
|
||||
@if (Model.Posts!=null && Model.Posts.Count()>1) { <a asp-controller="Blogspot" asp-action="UserPosts"
|
||||
asp-route-id="@Model.UserName" class="btn btn-primary">@SR["index de ses articles"]</a>
|
||||
}
|
||||
</div>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
@model ApplicationUser
|
||||
|
||||
@if (Model!=null) {
|
||||
@Component.Invoke("Avatar", Model.Id, ".xs")
|
||||
}
|
||||
15
src/Yavsc/Views/Shared/DisplayTemplates/Availability.cshtml
Normal file
15
src/Yavsc/Views/Shared/DisplayTemplates/Availability.cshtml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
@model Availability
|
||||
|
||||
@if (Model==null || Model.Count <1) {
|
||||
<text>Pas de disponibilité renseignée</text>
|
||||
} else {
|
||||
<table>
|
||||
<th><td>@Html.DisplayNameFor(m=>m[0].Start)</td>
|
||||
<td>@Html.DisplayNameFor(m=>m[0].End)</td></th>
|
||||
@foreach (var dispo in Model)
|
||||
{
|
||||
<tr><td>@Html.DisplayFor(m=>dispo.Start)</td>
|
||||
<td>@Html.DisplayFor(m=>dispo.End)</td></tr>
|
||||
}
|
||||
</table>
|
||||
}
|
||||
45
src/Yavsc/Views/Shared/DisplayTemplates/BookQuery.cshtml
Normal file
45
src/Yavsc/Views/Shared/DisplayTemplates/BookQuery.cshtml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
@model RdvQuery
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
|
||||
<dt>
|
||||
@SR["EventDate"]
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.EventDate)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@SR["Client"]
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Client.UserName)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@SR["Address"]
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Location.Address)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@SR["Provider"]
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.PerformerProfile.Performer.UserName)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@SR["ValidationDate"]
|
||||
</dt>
|
||||
<dd>
|
||||
@if (Model.ValidationDate==null) {
|
||||
@SR["NonValidee"]
|
||||
}
|
||||
else {
|
||||
@Html.DisplayFor(model => model.ValidationDate)
|
||||
}
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
3
src/Yavsc/Views/Shared/DisplayTemplates/Circle.cshtml
Normal file
3
src/Yavsc/Views/Shared/DisplayTemplates/Circle.cshtml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
@model Circle
|
||||
|
||||
<span class="circle"> @Model.Name </span>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
@model CircleAuthorizationToBlogPost
|
||||
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Post)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Allowed)
|
||||
</dd>
|
||||
</dl>
|
||||
3
src/Yavsc/Views/Shared/DisplayTemplates/Color.cshtml
Normal file
3
src/Yavsc/Views/Shared/DisplayTemplates/Color.cshtml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
@model Color
|
||||
<div style="background-color:@Model.Color(); border:solid grey 1px; width:1em; height:1em; display: inline-block;"></div>
|
||||
@Model.Name
|
||||
11
src/Yavsc/Views/Shared/DisplayTemplates/Comment.cshtml
Normal file
11
src/Yavsc/Views/Shared/DisplayTemplates/Comment.cshtml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
@model Comment
|
||||
<div data-type="blogcomment" data-id="@Model.Id" data-allow-edit="@(User.GetUserId()==Model.AuthorId?"true":"false")"
|
||||
data-allow-moderate="@ViewData["moderatoFlag"]" data-date="@Html.Raw(Model.DateCreated)" data-username="@Model.Author.UserName" >
|
||||
<markdown>@Model.Content</markdown>
|
||||
<div class="subcomments">
|
||||
@if (Model.Children!=null && Model.Children.Count>0) {
|
||||
foreach (var comment in Model.Children) {
|
||||
@Html.DisplayFor(model=>comment,"Comment","Comment")
|
||||
} }
|
||||
</div>
|
||||
</div>
|
||||
31
src/Yavsc/Views/Shared/DisplayTemplates/Estimate.cshtml
Normal file
31
src/Yavsc/Views/Shared/DisplayTemplates/Estimate.cshtml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
@model Estimate
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Title)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Title)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Description)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Description)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Bill)
|
||||
</dt>
|
||||
<dd>
|
||||
@foreach (var cl in Model.Bill) {
|
||||
@await Html.PartialAsync("BillingLine", cl);
|
||||
}
|
||||
</dd>
|
||||
</dl>
|
||||
<label>Signature fournisseur :
|
||||
<img src="/api/pdfbill/prosign/@Model.Id" alt="" style="height:100px; background-color: white;">
|
||||
</label>
|
||||
|
||||
@await Component.InvokeAsync("Estimate",Model.Id)
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
@model GetExpressCheckoutDetailsResponseDetailsType
|
||||
|
||||
@Html.DisplayFor(m=>m.PayerInfo)
|
||||
@Html.DisplayFor(m=>m.InvoiceID)
|
||||
@Html.DisplayFor(m=>m.BillingAgreementAcceptedStatus)
|
||||
@Html.DisplayFor(m=>m.BillingAddress)
|
||||
|
||||
@Html.DisplayFor(m=>m.ContactPhone)
|
||||
@Html.DisplayFor(m=>m.Note)
|
||||
@Html.DisplayFor(m=>m.CheckoutStatus)
|
||||
@Html.DisplayFor(m=>m.PayPalAdjustment)
|
||||
@Html.DisplayFor(m=>m.PaymentDetails)
|
||||
@Html.DisplayFor(m=>m.UserSelectedOptions)
|
||||
@Html.DisplayFor(m=>m.IncentiveDetails)
|
||||
@if (Model.GiftReceiptEnable)
|
||||
@Html.DispayFor(m=>m.GiftMessage)
|
||||
|
||||
@Html.DispayFor(m=>m.GiftWrapName)
|
||||
@Html.DispayFor(m=>m.GiftWrapAmount)
|
||||
@Html.DispayFor(m=>m.BuyerMarketingEmail)
|
||||
@Html.DispayFor(m=>m.SurveyQuestion)
|
||||
@Html.DispayFor(m=>m.SurveyChoiceSelected)
|
||||
@Html.DispayFor(m=>m.CartChangeTolerance)
|
||||
@Html.DispayFor(m=>m.InstrumentDetails)
|
||||
34
src/Yavsc/Views/Shared/DisplayTemplates/HairCutQuery.cshtml
Normal file
34
src/Yavsc/Views/Shared/DisplayTemplates/HairCutQuery.cshtml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
@model HairCutQuery
|
||||
<dl class="dl-horizontal">
|
||||
<dt>@Html.DisplayNameFor(m=>m.Prestation)
|
||||
</dt>
|
||||
<dd>@Html.DisplayFor(m=>m.Prestation)
|
||||
</dd>
|
||||
<dt>@Html.DisplayNameFor(m=>m.PerformerProfile)
|
||||
</dt>
|
||||
<dd>@Html.DisplayFor(m=>m.PerformerProfile)
|
||||
</dd>
|
||||
<dt>@Html.DisplayNameFor(m=>m.EventDate)
|
||||
</dt>
|
||||
<dd>@Html.DisplayFor(m=>m.EventDate)
|
||||
</dd>
|
||||
<dt>@Html.DisplayNameFor(m=>m.Location)
|
||||
</dt>
|
||||
<dd>@Html.DisplayFor(m=>m.Location)
|
||||
</dd>
|
||||
<dt>@Html.DisplayNameFor(m=>m.AdditionalInfo)
|
||||
</dt>
|
||||
<dd>@Html.DisplayFor(m=>m.AdditionalInfo)
|
||||
</dd>
|
||||
<dt>@SR["La facture"]
|
||||
</dt>
|
||||
<dd>@await Component.InvokeAsync("Bill", "Brush", Model, OutputFormat.Html, true)
|
||||
</dd>
|
||||
<dt>@Html.DisplayNameFor(m=>m.Regularisation)</dt>
|
||||
<dd>
|
||||
@Component.Invoke("PayPalButton", Model, "haircut", "HairCutCommand" )
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
@model HairPrestation
|
||||
@{
|
||||
string[] HairLen = new string[] {SR["HalfLong"],SR["Long"],SR["Short"]};
|
||||
}
|
||||
<div class="prestation">
|
||||
<dl class="dl-horizontal">
|
||||
<dd>
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Gender)
|
||||
</dt>
|
||||
<dd>@SR[Model.Gender.ToString()]</dd>
|
||||
@if ((int)Model.Gender<1) {
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Length)
|
||||
</dt>
|
||||
<dd>
|
||||
@HairLen[(int)Model.Length]
|
||||
</dd>}
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Shampoo)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Shampoo)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Cut)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Cut)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Tech)
|
||||
</dt>
|
||||
<dd>
|
||||
@SR[Model.Tech.ToString()]
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Dressing)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Dressing)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Cares)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Cares)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
@model PerformerProfile
|
||||
|
||||
<div class="performer @(Model.Active?"active":"inactive")">
|
||||
@if (Model.Performer!=null) { Html.DisplayFor(m=>m.Performer); }
|
||||
@if (Model.WebSite!=null) {
|
||||
<a target="yaext" href="@Model.WebSite" class="btn btn-info">@SR["WebSite"]: @Model.WebSite</a>
|
||||
}
|
||||
|
||||
</div>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
@model Yavsc.ViewModels.FrontOffice.PerformerProfileViewModel
|
||||
|
||||
<div class="performer @(Model.Active?"active":"inactive")">
|
||||
@Html.DisplayFor(m=>m.UserName)
|
||||
@if (Model.SettingsClassName!=null)
|
||||
{ await Html.RenderPartialAsync( Model.SettingsClassName,Model.Settings); }
|
||||
|
||||
@if (Model.WebSite!=null) {
|
||||
<a target="yaext" href="@Model.WebSite" class="btn btn-info">@SR["WebSite"]: @Model.WebSite</a>
|
||||
}
|
||||
</div>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<a href="https://twitter.com/intent/tweet?screen_name=TwitterDev"
|
||||
class="twitter-mention-button" data-show-count="false">Tweet to @TwitterDev</a>
|
||||
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
@model Availability
|
||||
|
||||
12
src/Yavsc/Views/Shared/Error.cshtml
Normal file
12
src/Yavsc/Views/Shared/Error.cshtml
Normal 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)
|
||||
}
|
||||
3
src/Yavsc/Views/Shared/Forbidden.cshtml
Normal file
3
src/Yavsc/Views/Shared/Forbidden.cshtml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
@model string
|
||||
|
||||
Accès interdit : @model
|
||||
2
src/Yavsc/Views/Shared/HairTaint.cshtml
Normal file
2
src/Yavsc/Views/Shared/HairTaint.cshtml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
@model HairTaint
|
||||
@Html.DisplayFor(m=>m.Color) (@Model.Brand)
|
||||
2
src/Yavsc/Views/Shared/HourFromMinutes.cshtml
Normal file
2
src/Yavsc/Views/Shared/HourFromMinutes.cshtml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
@model int
|
||||
@((Model/60).ToString("00")):@((Model%60).ToString("00"))
|
||||
19
src/Yavsc/Views/Shared/Logout.cshtml
Normal file
19
src/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
src/Yavsc/Views/Shared/OidcError.cshtml
Normal file
12
src/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>
|
||||
18
src/Yavsc/Views/Shared/Profiles.cshtml
Normal file
18
src/Yavsc/Views/Shared/Profiles.cshtml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
@model IEnumerable<PerformerProfile>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Les profiles - " + (ViewBag.Activity?.Name ?? SR["Any"]);
|
||||
}
|
||||
<h1>@ViewData["Title"]</h1>
|
||||
<em>@ViewBag.Activity.Description</em>
|
||||
|
||||
@foreach (var profile in Model) {
|
||||
<hr/>
|
||||
@Html.DisplayFor(m=>m)
|
||||
<form action="~/Command/Create" >
|
||||
<input type="hidden" name="id" value="@profile.PerformerId" />
|
||||
<input type="hidden" name="activityCode" value="@ViewBag.Activity.Code" />
|
||||
<input type="submit" value="@SR["Proposer un rendez-vous à"] @profile.Performer.UserName"/>
|
||||
</form>
|
||||
}
|
||||
|
||||
79
src/Yavsc/Views/Shared/SignIn.cshtml
Normal file
79
src/Yavsc/Views/Shared/SignIn.cshtml
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
|
||||
@using Microsoft.AspNet.Http.Authentication
|
||||
@using Yavsc.ViewModels.Account
|
||||
@model SignInViewModel
|
||||
@{
|
||||
ViewData["Title"] = SR["Log in"];
|
||||
}
|
||||
|
||||
<div class="jumbotron">
|
||||
<h1>@ViewData["Title"]</h1>
|
||||
<hr/>
|
||||
|
||||
<h2 class="lead text-left">@SR["Use a local account to log in"]</h2>
|
||||
<form action="@Constants.LoginPath" method="post" class="form-horizontal" role="form">
|
||||
|
||||
<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-lg btn-success" name="submit.Signin">@SR["Login"]</button>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<a asp-action="Register" asp-controller="Account">@SR["Register as a new user"]?</a>
|
||||
</p>
|
||||
<p>
|
||||
<a asp-action="ForgotPassword" asp-controller="Account">@SR["Forgot your password?"]</a>
|
||||
</p>
|
||||
<input type="hidden" name="Provider" value="LOCAL" />
|
||||
<input type="hidden" name="ReturnUrl" value="@Model.ReturnUrl" />
|
||||
|
||||
@Html.AntiForgeryToken()
|
||||
</form>
|
||||
|
||||
<hr/>
|
||||
<h2 class="lead text-left">@SR["Use another service to log in"]:</h2>
|
||||
@if (Model.ExternalProviders==null || Model.ExternalProviders.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
|
||||
{
|
||||
@foreach (var description in Model.ExternalProviders) {
|
||||
<form action="@Constants.LoginPath" method="post">
|
||||
<input type="hidden" name="Provider" value="@description.AuthenticationScheme" />
|
||||
<input type="hidden" name="ReturnUrl" value="@Model.ReturnUrl" />
|
||||
<button class="btn btn-lg btn-success" type="submit" name="Submit.Login">@SR["Connect using"] @description.DisplayName</button>
|
||||
@Html.AntiForgeryToken()
|
||||
</form>
|
||||
}
|
||||
}
|
||||
|
||||
</div>
|
||||
11
src/Yavsc/Views/Shared/Status.cshtml
Normal file
11
src/Yavsc/Views/Shared/Status.cshtml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
@{
|
||||
ViewBag.Title = "Oops!";
|
||||
}
|
||||
<h1>@ViewBag.Title</h1>
|
||||
<h2 class="text-danger">Your request cannot be served</h2>
|
||||
|
||||
<code>
|
||||
@ViewBag.StatusCode
|
||||
</code>
|
||||
|
||||
|
|
@ -0,0 +1,327 @@
|
|||
@model Yavsc.Models.Haircut.BrusherProfile
|
||||
|
||||
<fieldset>
|
||||
<legend>Disponibilités</legend>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Schedule)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Schedule)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ActionDistance)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ActionDistance)
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Tarifs divers</legend>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ShampooPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ShampooPrice)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.CarePrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.CarePrice)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.FlatFeeDiscount)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.FlatFeeDiscount)
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>Tarifs balayages</legend>
|
||||
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.LongBalayagePrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.LongBalayagePrice)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.HalfBalayagePrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.HalfBalayagePrice)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ShortBalayagePrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ShortBalayagePrice)
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>Tarifs défrisage</legend>
|
||||
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.HalfDefrisPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.HalfDefrisPrice)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.LongDefrisPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.LongDefrisPrice)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ShortDefrisPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ShortDefrisPrice)
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>Tarifs mèches</legend>
|
||||
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.HalfMechPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.HalfMechPrice)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.LongMechPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.LongMechPrice)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ShortMechPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ShortMechPrice)
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Tarifs coupes</legend>
|
||||
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.WomenHalfCutPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.WomenHalfCutPrice)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.WomenLongCutPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.WomenLongCutPrice)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.WomenShortCutPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.WomenShortCutPrice)
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ManCutPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ManCutPrice)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.KidCutPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.KidCutPrice)
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Tarifs couleurs</legend>
|
||||
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.LongColorPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.LongColorPrice)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.HalfColorPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.HalfColorPrice)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ShortColorPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ShortColorPrice)
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ShortMultiColorPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ShortMultiColorPrice)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.HalfMultiColorPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.HalfMultiColorPrice)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.LongMultiColorPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.LongMultiColorPrice)
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Tarifs burshing</legend>
|
||||
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.LongBrushingPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.LongBrushingPrice)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.HalfBrushingPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.HalfBrushingPrice)
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ShortBrushingPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ShortBrushingPrice)
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Tarifs permanentes</legend>
|
||||
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.LongPermanentPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.LongPermanentPrice)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.HalfPermanentPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.HalfPermanentPrice)
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ShortPermanentPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ShortPermanentPrice)
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Tarifs mise en plis</legend>
|
||||
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.LongFoldingPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.LongFoldingPrice)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.HalfFoldingPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.HalfFoldingPrice)
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ShortFoldingPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ShortFoldingPrice)
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Spécialités homme</legend>
|
||||
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ManBrushPrice)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ManBrushPrice)
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</fieldset>
|
||||
85
src/Yavsc/Views/Shared/_DropFiles.cshtml
Normal file
85
src/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>
|
||||
6
src/Yavsc/Views/Shared/_FileListPartial.cshtml
Normal file
6
src/Yavsc/Views/Shared/_FileListPartial.cshtml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
@model IList<string>
|
||||
|
||||
@foreach (var file in Model) {
|
||||
<li>@file</li>
|
||||
}
|
||||
|
||||
144
src/Yavsc/Views/Shared/_Layout.cshtml
Normal file
144
src/Yavsc/Views/Shared/_Layout.cshtml
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
<!doctype html>
|
||||
<html lang="@System.Globalization.CultureInfo.CurrentUICulture.Name">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />
|
||||
<link rel="icon" href="@SiteSettings.Value.FavIcon" asp-append-version="true" />
|
||||
<title>@ViewData["Title"] - @SiteSettings.Value.Title</title>
|
||||
|
||||
|
||||
<environment names="Development">
|
||||
<script src="~/js/jquery-2.2.4.js" ></script>
|
||||
<script src="~/js/showdown.js"></script>
|
||||
<script src="~/js/md-helpers.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="~/css/main/bootstrap.css" />
|
||||
<script src="~/js/bootstrap.js"></script>
|
||||
<link rel="stylesheet" href="~/css/main/site.css" asp-append-version="true"/>
|
||||
<link rel="stylesheet" href="~/css/main/jquery-ui.css" asp-append-version="true"/>
|
||||
<link rel="alternate stylesheet" title="Dark" href="~/css/dark/site.css" asp-append-version="true" />
|
||||
<link rel="alternate stylesheet" title="Clear" href="~/css/clear/site.css" asp-append-version="true" />
|
||||
<script src="~/js/jquery-ui.js" asp-append-version="true"></script>
|
||||
|
||||
<script src="~/js/jquery.signalR-2.2.1.js" asp-append-version="true"></script>
|
||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||
</environment>
|
||||
|
||||
<environment names="yavsc,yavscpre,zicmoove,lua,coiffure,freefield">
|
||||
|
||||
<link rel="stylesheet" href="~/css/main/bootstrap.min.css" />
|
||||
<script src="~/js/jquery-2.2.4.min.js" ></script>
|
||||
<script src="~/js/bootstrap.min.js"></script>
|
||||
<script src="~/js/showdown.min.js"></script>
|
||||
<script src="~/js/md-helpers.min.js"></script>
|
||||
<link rel="stylesheet" href="~/css/main/site.min.css" asp-append-version="true"/>
|
||||
<link rel="stylesheet" href="~/css/main/jquery-ui.min.css" asp-append-version="true"/>
|
||||
<link rel="alternate stylesheet" title="Dark" href="~/css/dark/site.min.css" asp-append-version="true" />
|
||||
<link rel="alternate stylesheet" title="Clear" href="~/css/clear/site.min.css" asp-append-version="true" />
|
||||
|
||||
<script src="~/js/jquery-ui.min.js" asp-append-version="true"></script>
|
||||
<script src="~/js/jquery.signalR-2.2.1.min.js" asp-append-version="true"></script>
|
||||
<script src="~/js/site.min.js" asp-append-version="true"></script>
|
||||
|
||||
</environment>
|
||||
|
||||
<style>
|
||||
nav { background: url(@Startup.SiteSetup.Banner) 0% 50% no-repeat; }
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
if (typeof allowCircleToBlog !== "undefined") {
|
||||
$('input.Blogcirle[type=checkbox]').on('change', allowCircleToBlog);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@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>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a asp-controller="Home" asp-action="Index" asp-route-id="" class="navbar-brand">@SiteSettings.Value.Title</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
@RenderSection("ctxmenu", required: false)
|
||||
<li><a asp-controller="Blogspot" asp-action="Index" class="navbar-link">@SR["Blogs"]</a></li>
|
||||
<li><a asp-controller="Home" asp-action="Chat" class="navbar-link">@SR["Chat"]</a></li>
|
||||
<li><a asp-controller="Home" asp-action="Contact" class="navbar-link">@SR["Contact"]</a></li>
|
||||
<li><a asp-controller="Home" asp-action="About" class="navbar-link">@SR["About"] @SiteSettings.Value.Title</a> </li>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle navbar-link" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
<span> @System.Globalization.CultureInfo.CurrentUICulture.DisplayName </span>
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a onclick="setUiCult('fr')" style="cursor:pointer" >@SR["Français"]</a></li>
|
||||
<li><a onclick="setUiCult('en')" style="cursor:pointer">@SR["Anglais"]</a></li>
|
||||
<li><a onclick="setUiCult('pt')" style="cursor:pointer">@SR["Portugais"]</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@await Html.PartialAsync("_LoginPartial")
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@if (ViewData ["Notify"] != null) {
|
||||
foreach (Notification n in ViewData ["Notify"] as IEnumerable<Notification>) {
|
||||
<div class="alert alert-info alert-dismissable">
|
||||
<img src="~/images/Notifications/@(n.icon).png" style="max-height:3em; float: left; margin:1em;"/> <h2 markdown="@n.title"></h2>
|
||||
<a class="close" data-dismiss="alert" aria-label="close" onclick="notifClick(@n.Id)">@((n.click_action==null)?SR["Fermer"]:SR[n.click_action])</a>
|
||||
<markdown>@n.body</markdown>
|
||||
</div>}
|
||||
}
|
||||
@RenderSection("subbanner", required: false)
|
||||
<main class="container body-content" role="main">
|
||||
@RenderBody()
|
||||
</main>
|
||||
<hr />
|
||||
<footer>
|
||||
<environment names="Development">
|
||||
<p><em>Site de développement</em></p>
|
||||
</environment>
|
||||
<i>@SiteSettings.Value.Slogan</i>
|
||||
<environment names="yavsc,zicmoove,lua,coiffure,freefield">
|
||||
<script>
|
||||
window.fbAsyncInit = function() {
|
||||
FB.init({
|
||||
appId : '552433071604577',
|
||||
xfbml : true,
|
||||
version : 'v2.5'
|
||||
});
|
||||
};
|
||||
|
||||
(function(d, s, id){
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) {return;}
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = "//connect.facebook.net/fr_FR/sdk.js";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));
|
||||
</script>
|
||||
<div style="float:right;"
|
||||
data-ref="ZicMoove"
|
||||
class="fb-like"
|
||||
data-share="true"
|
||||
data-width="300"
|
||||
data-show-faces="true"
|
||||
data-colorscheme="dark">
|
||||
</div>
|
||||
</environment>
|
||||
|
||||
<p class="small">Yavsc - Copyright © 2015 - 2018 Paul Schneider</p>
|
||||
</footer>
|
||||
@RenderSection("scripts", required: false)
|
||||
</body>
|
||||
</html>
|
||||
52
src/Yavsc/Views/Shared/_LoginPartial.cshtml
Normal file
52
src/Yavsc/Views/Shared/_LoginPartial.cshtml
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
@using System.Security.Claims
|
||||
|
||||
@if (User.IsSignedIn())
|
||||
{
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a asp-controller="Manage" class="navbar-link" asp-action="Index" title="Manage">
|
||||
@Component.Invoke("Avatar", User.GetUserId(), ".xs")
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
Plateforme <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a asp-controller="Bug" asp-action="Index">Bugs</a></li>
|
||||
<li><a asp-controller="Feature" asp-action="Index">Features</a></li>
|
||||
</ul>
|
||||
@if (User.IsInRole(Constants.AdminGroupName)) {
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
Administration <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a asp-controller="Administration" asp-action="Index">Index</a></li>
|
||||
<li><a asp-controller="Activity" asp-action="Index">Activités</a></li>
|
||||
<li><a asp-controller="CommandForms" asp-action="Index">Formulaires</a></li>
|
||||
<li><a asp-controller="Notifications" asp-action="Index">Notifications</a></li>
|
||||
<li><a asp-controller="SIRENExceptions" asp-action="Index">Excéptions au numéro de SIREN</a></li>
|
||||
<li><a asp-controller="Client" asp-action="Index">Accès API</a></li>
|
||||
<li><a asp-controller="MailingTemplate" asp-action="Index">Emailing</a></li>
|
||||
</ul>
|
||||
</li>}
|
||||
|
||||
<li>
|
||||
<form asp-controller="Account" asp-action="LogOff"
|
||||
method="post" id="logoutForm">
|
||||
<button type="submit" class="btn navbar-btn" >@SR["Logout"]</button>
|
||||
<input type="hidden" name="ReturnUrl" value="/" />
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
}
|
||||
else
|
||||
{
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a class="navbar-link" asp-controller="Account" asp-action="Register" asp-route-returnurl="@Url.Action()" >@SR["Register"]</a></li>
|
||||
|
||||
<li><a class="navbar-link" asp-controller="Account" asp-action="SignIn" asp-route-returnurl="@Url.Action()" >@SR["Login"]</a></li>
|
||||
</ul>
|
||||
}
|
||||
97
src/Yavsc/Views/Shared/_MapScriptsPartial.cshtml
Normal file
97
src/Yavsc/Views/Shared/_MapScriptsPartial.cshtml
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=@Yavsc.Startup.GoogleSettings.BrowserApiKey"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
|
||||
function setCoord(config, pos)
|
||||
{
|
||||
var culture = '@System.Globalization.CultureInfo.CurrentCulture.Name';
|
||||
var lat = new Number(pos.lat);
|
||||
var lng = new Number(pos.lng);
|
||||
$('#'+config.latId).val(lat.toLocaleString(culture));
|
||||
$('#'+config.lonId).val(lng.toLocaleString(culture));
|
||||
}
|
||||
function chooseLoc(config, sender, loc) {
|
||||
if (sender === 'user') $('#'+config.addrId).val(loc.formatted_address);
|
||||
var pos = loc.geometry.location;
|
||||
var mapid = '#'+config.addrId;
|
||||
var gmap = config.gmap;
|
||||
gmap.setCenter(pos);
|
||||
setCoord(config, pos);
|
||||
var marker = new google.maps.Marker({
|
||||
map: gmap,
|
||||
draggable: true,
|
||||
animation: google.maps.Animation.DROP,
|
||||
position: pos
|
||||
});
|
||||
google.maps.event.addListener(marker, 'dragend', function() {
|
||||
var pos = marker.getPosition();
|
||||
setCoord(config, { lat: pos.lat(), lng: pos.lng() });
|
||||
});
|
||||
$('#'+config.addrId).valid();
|
||||
$('#'+config.valId).empty();
|
||||
return true;
|
||||
}
|
||||
|
||||
function setupInputAddress (mapDiv)
|
||||
{
|
||||
var config = {
|
||||
mapId: $(mapDiv).attr('id'),
|
||||
addrId: $(mapDiv).data('addr'),
|
||||
lonId: $(mapDiv).data('lon'),
|
||||
latId: $(mapDiv).data('lat'),
|
||||
valId: $(mapDiv).data('val'),
|
||||
locComboId: $(mapDiv).data('loccombo')
|
||||
};
|
||||
|
||||
var input = '#'+config.addrId;
|
||||
$(input).data("val-required", '@SR["SpecifyPlace"]') ;
|
||||
$(input).data("val-remote", '@SR[ "GoogleDidntGeoLocalized"]') ;
|
||||
$(input).rules("add",
|
||||
{
|
||||
remote: {
|
||||
url: 'https://maps.googleapis.com/maps/api/geocode/json',
|
||||
type: 'get',
|
||||
data: {
|
||||
key: '@Startup.GoogleSettings.BrowserApiKey',
|
||||
sensor: false,
|
||||
address: function () { return $('#'+config.addrId).val() }
|
||||
},
|
||||
dataType: 'json',
|
||||
dataFilter: function(datastr,type) {
|
||||
$('#'+config.locComboId).html("");
|
||||
var data = JSON.parse(datastr);
|
||||
data.results.forEach(function(element) {
|
||||
if (element.formatted_address !== $('#'+config.addrId).val()) {
|
||||
$('<li style="pointer:cursor;">'+element.formatted_address+'</li>')
|
||||
.data("geoloc",element)
|
||||
.click(function() { chooseLoc(config, 'user', $(this).data("geoloc")) })
|
||||
.appendTo($('#'+config.locComboId));}
|
||||
});
|
||||
if ((data.status === 'OK') && (data.results.length == 1))
|
||||
{
|
||||
chooseLoc(config, 'google', data.results[0]);
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
error: function(xhr, textStatus, errorThrown)
|
||||
{
|
||||
console.log('ajax loading error ... '+textStatus+' ... '+ errorThrown);
|
||||
return false
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var gmap = new google.maps.Map(document.getElementById(config.mapId), {
|
||||
zoom: 8
|
||||
});
|
||||
config.gmap = gmap;
|
||||
}
|
||||
$("div.map").each(function(indexMap){
|
||||
setupInputAddress(this)
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
16
src/Yavsc/Views/Shared/_ValidationScriptsPartial.cshtml
Normal file
16
src/Yavsc/Views/Shared/_ValidationScriptsPartial.cshtml
Normal 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>
|
||||
<environment names="yavsc,yavscpre,zicmoove,lua,coiffure">
|
||||
<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>
|
||||
<script src="~/lib/jquery-validation/additional-methods.js" charset="UTF-8"></script>
|
||||
<script src="~/js/input-lib.js"></script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue