From f6ff2c90dd9e18dfdfbab0053149d07c8f361017 Mon Sep 17 00:00:00 2001
From: ChristopherJamesMorris <hello@christopherjmorris.com>
Date: Fri, 18 Mar 2022 11:21:21 +0000
Subject: [PATCH] #227 Additional support for the user when navigating around
 the page content.

---
 .../Pages/Private/Search.cshtml                            | 7 +++++++
 .../Pages/Private/SearchDetail.cshtml                      | 1 +
 .../Pages/Private/SearchInput.cshtml                       | 2 +-
 .../Pages/Private/SearchNav.cshtml                         | 5 +++++
 .../Pages/Private/SearchResultsSummary.cshtml              | 3 ++-
 .../Pages/Shared/_Layout.cshtml                            | 1 +
 6 files changed, 17 insertions(+), 2 deletions(-)
 create mode 100644 source/gpconnect-appointment-checker/Pages/Private/SearchNav.cshtml

diff --git a/source/gpconnect-appointment-checker/Pages/Private/Search.cshtml b/source/gpconnect-appointment-checker/Pages/Private/Search.cshtml
index 8d1323db..741ea610 100644
--- a/source/gpconnect-appointment-checker/Pages/Private/Search.cshtml
+++ b/source/gpconnect-appointment-checker/Pages/Private/Search.cshtml
@@ -29,6 +29,7 @@
                 </div>
                 <partial name="SearchResultsSummary" />
 
+                <partial name="SearchNav" />
             }
         }
     }
@@ -49,7 +50,13 @@
             }
 
             <partial name="SearchResults" />
+
+            <partial name="SearchNav" />
+
             <partial name="SearchStats" />
+
+
+
         }
         else
         {
diff --git a/source/gpconnect-appointment-checker/Pages/Private/SearchDetail.cshtml b/source/gpconnect-appointment-checker/Pages/Private/SearchDetail.cshtml
index 685c0177..dba293cb 100644
--- a/source/gpconnect-appointment-checker/Pages/Private/SearchDetail.cshtml
+++ b/source/gpconnect-appointment-checker/Pages/Private/SearchDetail.cshtml
@@ -7,4 +7,5 @@
     <a class="nhsuk-button" href="/Search?SearchGroupId=@Model.SearchGroupId&Handler=SearchByGroup#@Model.SearchResultId">@SearchConstants.BACKTORESULTSSUMMARYLABEL</a>
     <partial name="SearchDetailResults" />
     <partial name="SearchDetailStats" />
+    <partial name="SearchNav" />
 </form>
\ No newline at end of file
diff --git a/source/gpconnect-appointment-checker/Pages/Private/SearchInput.cshtml b/source/gpconnect-appointment-checker/Pages/Private/SearchInput.cshtml
index 67c0153b..76599ca0 100644
--- a/source/gpconnect-appointment-checker/Pages/Private/SearchInput.cshtml
+++ b/source/gpconnect-appointment-checker/Pages/Private/SearchInput.cshtml
@@ -3,7 +3,7 @@
 
 
 <div class="nhsuk-grid-row">
-    <div class="nhsuk-grid-column-full">
+    <div class="nhsuk-grid-column-full">        
         <partial name="SearchProviderSection" />
         <partial name="SearchConsumerSection" />
 
diff --git a/source/gpconnect-appointment-checker/Pages/Private/SearchNav.cshtml b/source/gpconnect-appointment-checker/Pages/Private/SearchNav.cshtml
new file mode 100644
index 00000000..e57a45c0
--- /dev/null
+++ b/source/gpconnect-appointment-checker/Pages/Private/SearchNav.cshtml
@@ -0,0 +1,5 @@
+<div class="nhsuk-back-link">
+    <a class="nhsuk-back-link__link" href="#top">
+        Back to top
+    </a>
+</div>
\ No newline at end of file
diff --git a/source/gpconnect-appointment-checker/Pages/Private/SearchResultsSummary.cshtml b/source/gpconnect-appointment-checker/Pages/Private/SearchResultsSummary.cshtml
index 4465ac85..fcea0e27 100644
--- a/source/gpconnect-appointment-checker/Pages/Private/SearchResultsSummary.cshtml
+++ b/source/gpconnect-appointment-checker/Pages/Private/SearchResultsSummary.cshtml
@@ -6,6 +6,7 @@
 {
     <div class="nhsuk-grid-row">
         <div class="nhsuk-grid-column-full">
+            <a id="@searchResult.SearchResultId"></a>
             <dl class="nhsuk-summary-list nhsuk-summary-list--no-border @searchResult.DisplayClass">
                 <div class="nhsuk-summary-list__row">
                     <dt class="nhsuk-summary-list__key">@SearchConstants.SEARCHRESULTSSEARCHATTEXT</dt>
@@ -53,7 +54,7 @@
                     <dd class="nhsuk-summary-list__actions">
                         @if (searchResult.DetailsEnabled)
                         {
-                            <a id="@searchResult.SearchResultId" class="nhsuk-button" href="/SearchDetail/@searchResult.SearchResultId">@SearchConstants.SEARCHDETAILSBUTTONTEXT</a>
+                            <a class="nhsuk-button" href="/SearchDetail/@searchResult.SearchResultId">@SearchConstants.SEARCHDETAILSBUTTONTEXT</a>
                         }
                         else
                         {
diff --git a/source/gpconnect-appointment-checker/Pages/Shared/_Layout.cshtml b/source/gpconnect-appointment-checker/Pages/Shared/_Layout.cshtml
index 6d5550ff..5ec4a045 100644
--- a/source/gpconnect-appointment-checker/Pages/Shared/_Layout.cshtml
+++ b/source/gpconnect-appointment-checker/Pages/Shared/_Layout.cshtml
@@ -24,6 +24,7 @@
     </script>
 
     <header class="nhsuk-header" role="banner">
+        <a id="top"></a>
         <partial name="_CookieConsentPartial" />
         <div class="nhsuk-width-container nhsuk-header__container">
             <div class="nhsuk-header__logo">