From 49ea760c2cdc7edf99770734322960bf2d2e6263 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Sat, 8 Apr 2017 17:51:31 +0200 Subject: [PATCH] [MEF] --- Yavsc/Models/Haircut/HairCutQuery.cs | 6 +- .../HairCutCommand/CommandConfirmation.cshtml | 65 +++-- Yavsc/Views/HairCutCommand/HairCut.cshtml | 2 +- Yavsc/Views/HairCutCommand/Index.cshtml | 1 + .../DisplayTemplates/HairCutQuery.cshtml | 6 +- Yavsc/wwwroot/css/main/site.css | 7 +- Yavsc/wwwroot/images/dollars.svg | 242 ++++++++++++++++++ 7 files changed, 295 insertions(+), 34 deletions(-) create mode 100644 Yavsc/wwwroot/images/dollars.svg diff --git a/Yavsc/Models/Haircut/HairCutQuery.cs b/Yavsc/Models/Haircut/HairCutQuery.cs index e796c738..6881290f 100644 --- a/Yavsc/Models/Haircut/HairCutQuery.cs +++ b/Yavsc/Models/Haircut/HairCutQuery.cs @@ -20,11 +20,12 @@ namespace Yavsc.Models.Haircut [ForeignKey("LocationId")] [Display(Name="Lieu du rendez-vous")] - + [DisplayFormat(ConvertEmptyStringToNull = true, NullDisplayText = "[Pas de lieu spécifié]")] public virtual Location Location { get; set; } [Display(Name="Date et heure")] - public DateTime? EventDate + [DisplayFormat(NullDisplayText = "[Pas de date ni heure]",ApplyFormatInEditMode=true, DataFormatString = "{0:d}")] + public DateTime? EventDate { get; set; @@ -39,6 +40,7 @@ namespace Yavsc.Models.Haircut [Display(Name="Informations complémentaires"), StringLengthAttribute(512)] + [DisplayFormat(ConvertEmptyStringToNull = true, NullDisplayText = "[pas d'informations complémentaires]")] public string AdditionalInfo { get; set; } } } diff --git a/Yavsc/Views/HairCutCommand/CommandConfirmation.cshtml b/Yavsc/Views/HairCutCommand/CommandConfirmation.cshtml index 002d6c29..8759748a 100644 --- a/Yavsc/Views/HairCutCommand/CommandConfirmation.cshtml +++ b/Yavsc/Views/HairCutCommand/CommandConfirmation.cshtml @@ -6,7 +6,7 @@

@SR["Your book query"]


-
+
Votre star de la coiffure
@@ -22,42 +22,42 @@
@Html.DisplayNameFor(m=>m.AdditionalInfo)
-
@Html.DisplayFor(m=>m.AdditionalInfo) +
+ @if (string.IsNullOrWhiteSpace(Model.AdditionalInfo)) + { + Aucune information complémentaire n'a + été saisie. + } + @Html.DisplayFor(m=>m.AdditionalInfo)
-
-

- Addition minimale + +

Addition minimale (Compter des frais supplémentaires en cas de longs déplacements, ou des majorations en cas de weekend et jour férie) - @ViewBag.Addition

- -
  • - @Model.AdditionalInfo - -
  • -
  • - @if (Model.EventDate == null) { +
  • +
    @ViewBag.Addition +
    +
    Date de la prestation
    +
    @if (Model.EventDate == null) {

    Pas de date convenue ...

    } else { @Html.DisplayFor(m => m.EventDate) - } - -
  • - - @if (Model.Location == null) { + }
  • +
    @Html.DisplayNameFor(m => m.Location) +
    +
    @if (Model.Location == null) {

    Pas de lieu convenu ...

    } else { - @Html.DisplayFor(m => m.Location) - + @Html.DisplayFor(m => m.Location) } - - - - @if (ViewBag.GooglePayload !=null) +
    +
    Motification +
    +
    @if (ViewBag.GooglePayload !=null) { @if (ViewBag.GooglePayload.success>0) {

    @SR["GCM Notifications sent"]

    @@ -68,10 +68,23 @@
    @SR["GCM Notification sending failed"]
    } else { -
    @SR["E-mail sent"]
    +
    @SR["E-mail sent"]
    } } - } + } else {
    @SR["E-mail sent"]
    } +
    +
    + + + + + + + + + + +
    diff --git a/Yavsc/Views/HairCutCommand/HairCut.cshtml b/Yavsc/Views/HairCutCommand/HairCut.cshtml index e8f9192a..e4d1026f 100644 --- a/Yavsc/Views/HairCutCommand/HairCut.cshtml +++ b/Yavsc/Views/HairCutCommand/HairCut.cshtml @@ -226,7 +226,7 @@ - Total : + Total : diff --git a/Yavsc/Views/HairCutCommand/Index.cshtml b/Yavsc/Views/HairCutCommand/Index.cshtml index 89ef41df..cc6e105f 100644 --- a/Yavsc/Views/HairCutCommand/Index.cshtml +++ b/Yavsc/Views/HairCutCommand/Index.cshtml @@ -45,6 +45,7 @@ Details + Annuler cette commande } diff --git a/Yavsc/Views/Shared/DisplayTemplates/HairCutQuery.cshtml b/Yavsc/Views/Shared/DisplayTemplates/HairCutQuery.cshtml index e76daacf..169e950f 100644 --- a/Yavsc/Views/Shared/DisplayTemplates/HairCutQuery.cshtml +++ b/Yavsc/Views/Shared/DisplayTemplates/HairCutQuery.cshtml @@ -1,6 +1,6 @@ @model HairCutQuery -
    +
    @Html.DisplayNameFor(m=>m.Prestation)
    @Html.DisplayFor(m=>m.Prestation) @@ -17,6 +17,10 @@
    @Html.DisplayFor(m=>m.Location)
    +
    @Html.DisplayNameFor(m=>m.AdditionalInfo) +
    +
    @Html.DisplayFor(m=>m.AdditionalInfo) +
    diff --git a/Yavsc/wwwroot/css/main/site.css b/Yavsc/wwwroot/css/main/site.css index 214c7b7d..005416d2 100644 --- a/Yavsc/wwwroot/css/main/site.css +++ b/Yavsc/wwwroot/css/main/site.css @@ -260,7 +260,6 @@ footer { float: left; margin: 1em; } - - - - +.dl-horizontal dd { + margin-left: 20%; +} diff --git a/Yavsc/wwwroot/images/dollars.svg b/Yavsc/wwwroot/images/dollars.svg new file mode 100644 index 00000000..3fc7a5d8 --- /dev/null +++ b/Yavsc/wwwroot/images/dollars.svg @@ -0,0 +1,242 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Openclipart + + + + 2010-09-02T22:22:46 + Four dollars + https://openclipart.org/detail/83443/dollars-by-jhnri4 + + + jhnri4 + + + + + 4 + cost + currency + dollars + drawing + euro + four + green + how i did it + inkscape + money + price + + + + + + + + + + +