Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions LearningHub.Nhs.WebUI/Views/Home/Dashboard.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
<div class="nhsuk-bg-white">
<div class="text-center">
<picture>
<source media="(min-width: 1441px)" srcset="images\dashboard\hero\LH-dashboard-banner_2400x320.jpg" />
<source media="(min-width: 991px)" srcset="images\dashboard\hero\LH-dashboard-banner_1500x320.jpg" />
<source media="(min-width: 769px)" srcset="images\dashboard\hero\LH-dashboard-banner_990x320.jpg" />
<source media="(min-width: 641px)" srcset="images\dashboard\hero\LH-dashboard-banner_770x320.jpg" />
<img src="images\dashboard\hero\LH-dashboard-banner_640x320.jpg" class="hero-image" alt="" />
<source media="(min-width: 1441px)" srcset="~/images/dashboard/hero/LH-dashboard-banner_2400x320.jpg" />
<source media="(min-width: 991px)" srcset="~/images/dashboard/hero/LH-dashboard-banner_1500x320.jpg" />
<source media="(min-width: 769px)" srcset="~/images/dashboard/hero/LH-dashboard-banner_990x320.jpg" />
<source media="(min-width: 641px)" srcset="~/images/dashboard/hero/LH-dashboard-banner_770x320.jpg" />
<img src="~/images/dashboard/hero/LH-dashboard-banner_640x320.jpg" class="hero-image" alt="" />
</picture>
</div>

Expand Down
2 changes: 1 addition & 1 deletion LearningHub.Nhs.WebUI/Views/Shared/_FooterPartial.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<li class="nhsuk-footer__list-item"><a class="nhsuk-footer__list-item-link" href="/Home/Accessibility">Accessibility statement</a></li>
}
</ul>
<p class="nhsuk-footer__copyright">&copy; NHS England @DateTime.Now.Year</p>
<p class="nhsuk-footer__copyright">&copy; NHS England</p>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,37 @@
-- 22-06-2023 RS Switched order of joins to ensure catalogue node is always returned first.
-- 24-08-2023 RS Proper fix for ordering issue - STRING_SPLIT doesn't return substrings in order.
-- 08-09-2023 RS A further fix for ordering issue that works on SQL Server 2019 (for developer installs).
-- 17-12-2025 SA TD-6520 - Refractored the SP to fix the DTU spike.
-------------------------------------------------------------------------------
CREATE PROCEDURE [hierarchy].[GetNodePathNodes]
(
@NodePathId INT
@NodePathId INT
)

AS

BEGIN
SET NOCOUNT ON;

SELECT
CAST(value AS INT) AS NodeId,
COALESCE(fnv.Name, cnv.Name) AS Name
FROM hierarchy.NodePath np
CROSS APPLY hub.fn_Split(NodePath, '\') as ss
INNER JOIN hierarchy.NodeVersion nv ON nv.NodeId = ss.value
LEFT JOIN hierarchy.CatalogueNodeVersion cnv ON cnv.NodeVersionId = nv.Id
LEFT JOIN hierarchy.FolderNodeVersion fnv ON fnv.NodeVersionId = nv.Id
WHERE np.Id = @NodePathId
ORDER BY ss.idx

-- If NodePath is NVARCHAR, keep types consistent to avoid implicit conversions
;WITH PathParts AS
(
SELECT
ordinal,
TRY_CAST(s.value AS int) AS NodeIdInt
FROM hierarchy.NodePath AS np
CROSS APPLY STRING_SPLIT(np.NodePath, N'\', 1) AS s -- 1 = ordinal
WHERE np.Id = @NodePathId
)
SELECT
pp.NodeIdInt AS NodeId,
COALESCE(fnv.Name, cnv.Name) AS Name
FROM PathParts AS pp
JOIN hierarchy.NodeVersion AS nv
ON nv.NodeId = pp.NodeIdInt
LEFT JOIN hierarchy.CatalogueNodeVersion AS cnv
ON cnv.NodeVersionId = nv.Id
LEFT JOIN hierarchy.FolderNodeVersion AS fnv
ON fnv.NodeVersionId = nv.Id
WHERE pp.NodeIdInt IS NOT NULL
ORDER BY pp.ordinal
OPTION (RECOMPILE); -- helps if @NodePathId cardinality varies a lot
END
Loading