From f0a9fa4ed6a0ce307aa274e4badd7db22f0d06e3 Mon Sep 17 00:00:00 2001 From: Dan <daniel2.lorych@live.uwe.ac.uk> Date: Tue, 3 May 2022 10:20:46 +0100 Subject: [PATCH] Add button to view more details on a panel --- Helios/Controllers/ConfiguratorController.cs | 7 +++++++ Helios/Views/Configurator/ConfiguratorResult.cshtml | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Helios/Controllers/ConfiguratorController.cs b/Helios/Controllers/ConfiguratorController.cs index 0fcb1b0..11e2a4e 100644 --- a/Helios/Controllers/ConfiguratorController.cs +++ b/Helios/Controllers/ConfiguratorController.cs @@ -31,6 +31,13 @@ namespace Helios.Controllers return View(model); } + public ActionResult PanelBreakdown(PanelPerformance panel) + { + Console.WriteLine("Hello!"); + + return View(); + } + } } diff --git a/Helios/Views/Configurator/ConfiguratorResult.cshtml b/Helios/Views/Configurator/ConfiguratorResult.cshtml index b0b8de4..81f48cf 100644 --- a/Helios/Views/Configurator/ConfiguratorResult.cshtml +++ b/Helios/Views/Configurator/ConfiguratorResult.cshtml @@ -41,6 +41,8 @@ <th> @Html.DisplayNameFor(panelResult => panelResult.RoofResults[0].Panels[0].WithinBudget) </th> + <th> + </th> </tr> @foreach (var panel in roofResult.Panels) @@ -67,8 +69,11 @@ <td> @panel.WithinBudget </td> + <td> + @Html.ActionLink("Details", "PanelBreakdown", "Configurator", panel, null) + </td> </tr> - } + } </table> </div> -- GitLab