From 1e6d354343ecff777c6c66b2c30e0496f1887d77 Mon Sep 17 00:00:00 2001 From: franc Date: Mon, 5 May 2025 12:32:32 +0200 Subject: [PATCH] Remove js an placed to site.js --- .../Views/Shared/_GetInstructions.cshtml | 118 ++++-------------- .../Views/Shared/_IngredientsPartial.cshtml | 35 ++++++ 2 files changed, 56 insertions(+), 97 deletions(-) create mode 100644 Francesco.Recipes.World/Views/Shared/_IngredientsPartial.cshtml diff --git a/Francesco.Recipes.World/Views/Shared/_GetInstructions.cshtml b/Francesco.Recipes.World/Views/Shared/_GetInstructions.cshtml index 0c8a725..aa05493 100644 --- a/Francesco.Recipes.World/Views/Shared/_GetInstructions.cshtml +++ b/Francesco.Recipes.World/Views/Shared/_GetInstructions.cshtml @@ -5,114 +5,38 @@ {
- - - + @if (Model.Instructions[i].MediaFiles != null && Model.Instructions[i].MediaFiles.Any()) + { + var mediaFile = Model.Instructions[i].MediaFiles.First(); + if (mediaFile.Data != null) + { +
+ Instruction Media +
+ } + } + + + +
- - + +
} + + + @section Scripts { } diff --git a/Francesco.Recipes.World/Views/Shared/_IngredientsPartial.cshtml b/Francesco.Recipes.World/Views/Shared/_IngredientsPartial.cshtml new file mode 100644 index 0000000..98670c5 --- /dev/null +++ b/Francesco.Recipes.World/Views/Shared/_IngredientsPartial.cshtml @@ -0,0 +1,35 @@ +@model Francesco.Recipes.World.Models.IngredientViewModel +@Html.AntiForgeryToken() +
+ @for (int i = 0; i < Model.Ingredients.Count; i++) + { +
+
+ + + + +
+
+ } +
+ + + +@section Scripts { + +}