From a7a5650046bafee19014290182cb2a5331b605db Mon Sep 17 00:00:00 2001 From: franc Date: Mon, 5 May 2025 12:30:53 +0200 Subject: [PATCH] Make a completly new Create view with some css style, that contains all PartialViews --- .../Views/Recipe/Create.cshtml | 220 ++++++++++++++---- 1 file changed, 175 insertions(+), 45 deletions(-) diff --git a/Francesco.Recipes.World/Views/Recipe/Create.cshtml b/Francesco.Recipes.World/Views/Recipe/Create.cshtml index e8c3769..5e3f77a 100644 --- a/Francesco.Recipes.World/Views/Recipe/Create.cshtml +++ b/Francesco.Recipes.World/Views/Recipe/Create.cshtml @@ -1,58 +1,188 @@ -@model Francesco.Recipes.World.Models.BackendModels.Recipe.Recipe +@model Francesco.Recipes.World.Models.CreateRecipeViewModel @using Francesco.Recipes.World.Models.BackendModels.Recipe +@using Francesco.Recipes.World.Models @{ - ViewData["Title"] = "Create Recipe"; + ViewData["Title"] = "Erstelle Rezept"; } -

Create Recipe

+

Erstelle Rezept

-
-
- - - + +
+

Allgemein

+
+ + + +
+
+ + + +
+
+ + + +
+
+
+ + + +
+
+ +
+
+ +
+ h +
+
+
+ +
+ min +
+
+
+
+
+ +
+
+ +
+ h +
+
+
+ +
+ min +
+
+
+
+
-
- - - + +
+

Zutaten

+ @await Html.PartialAsync("_IngredientsPartial", Model.IngredientViewModel ?? new IngredientViewModel +{ + RecipeId = Model.CategoryId, // Setzt die richtige ID für das globale Script + Ingredients = new List(), + Units = ViewBag.Units ?? new List() +})
-
- - - + +
+

Anweisungen

+ @await Html.PartialAsync("_GetInstructions", Model.InstructionViewModel ?? new InstructionViewModel +{ + RecipeId = Model.CategoryId, + Instructions = new List() +})
-
- - - + +
+

Bild/Video

+
+ + +
+
+ + +
-
- - - + +
+ + Abbrechen
-
- - - -
-
- - -
- -@section Scripts { - @{ - await Html.RenderPartialAsync("_ValidationScriptsPartial"); - } -} + + +@section Scripts { + + + @await Html.PartialAsync("_ValidationScriptsPartial") + +}