From 006ffc5ba31e684574dd77035ccf4435cd7fbd1e Mon Sep 17 00:00:00 2001 From: Francesco Lorenzo D'Amico Date: Mon, 2 Jun 2025 12:35:04 +0200 Subject: [PATCH] Use exportet js functions --- .../Views/Shared/_GetInstructions.cshtml | 8 +- .../Views/Shared/_IngredientsPartial.cshtml | 6 +- .../Views/ShoppingList/Details.cshtml | 370 ++++-------------- 3 files changed, 80 insertions(+), 304 deletions(-) diff --git a/Francesco.Recipes.World/Views/Shared/_GetInstructions.cshtml b/Francesco.Recipes.World/Views/Shared/_GetInstructions.cshtml index 206818b..ca395d8 100644 --- a/Francesco.Recipes.World/Views/Shared/_GetInstructions.cshtml +++ b/Francesco.Recipes.World/Views/Shared/_GetInstructions.cshtml @@ -19,11 +19,11 @@ - +
- - + +
} @@ -32,7 +32,7 @@ - + diff --git a/Francesco.Recipes.World/Views/Shared/_IngredientsPartial.cshtml b/Francesco.Recipes.World/Views/Shared/_IngredientsPartial.cshtml index ee780e2..b465acd 100644 --- a/Francesco.Recipes.World/Views/Shared/_IngredientsPartial.cshtml +++ b/Francesco.Recipes.World/Views/Shared/_IngredientsPartial.cshtml @@ -20,12 +20,14 @@ } } - + + } - + + diff --git a/Francesco.Recipes.World/Views/ShoppingList/Details.cshtml b/Francesco.Recipes.World/Views/ShoppingList/Details.cshtml index 4833282..a816f60 100644 --- a/Francesco.Recipes.World/Views/ShoppingList/Details.cshtml +++ b/Francesco.Recipes.World/Views/ShoppingList/Details.cshtml @@ -24,309 +24,83 @@ }
-
-

Einkaufsliste Details

-
- Anzahl Rezepte: @Model.RecipeCount -
-
+
+

Einkaufsliste Details

+
+ Anzahl Rezepte: @Model.RecipeCount +
+
-
- -
- @foreach (var recipe in Model.RecipesInAnyShoppingList) - { - var mediaFile = recipe.MediaFiles?.FirstOrDefault(); - var imageData = mediaFile?.Data; - var mimeType = mediaFile?.MimeType; - var ingredientCount = recipe.RecipeIngredients?.Count() ?? 0; +
+ +
+ @foreach (var recipe in Model.RecipesInAnyShoppingList) + { + var mediaFile = recipe.MediaFiles?.FirstOrDefault(); + var imageData = mediaFile?.Data; + var mimeType = mediaFile?.MimeType; + var ingredientCount = recipe.RecipeIngredients?.Count() ?? 0; -
-
-
- -
-
- @if (imageData != null && mimeType != null) - { - @recipe.Name - } - else - { -
- -
- } -
-
-
@recipe.Name
-
-
-
- } -
- -
- -
-
-
-

Zutaten

-
-
-
    -
    - -
    -
    -
    -
    +
    +
    +
    + +
    +
    + @if (imageData != null && mimeType != null) + { + @recipe.Name + } + else + { +
    + +
    + } +
    +
    +
    @recipe.Name
    +
    +
    +
    + } +
    + +
    + +
    +
    +
    +

    Zutaten

    +
    +
    +
      +
      + +
      +
      +
      +
      + @section Scripts { @Html.AntiForgeryToken() -} \ No newline at end of file + +}