diff --git a/LearningHub.Nhs.WebUI/Views/Catalogue/AllCatalogueSearch.cshtml b/LearningHub.Nhs.WebUI/Views/Catalogue/AllCatalogueSearch.cshtml index be167f34f..dab2977f4 100644 --- a/LearningHub.Nhs.WebUI/Views/Catalogue/AllCatalogueSearch.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Catalogue/AllCatalogueSearch.cshtml @@ -7,7 +7,7 @@ var queryParams = QueryHelpers.ParseQuery(Context.Request.QueryString.ToString()); var hasSearchTerm = queryParams.ContainsKey("term"); - var searchTerm = hasSearchTerm ? queryParams["term"].ToString() : null; + var searchTerm = hasSearchTerm ? queryParams["term"].ToString().Trim() : null; string cardStyle = "card-provider-details--blank"; var pageSize = this.ViewBag.PageSize; } @@ -22,9 +22,9 @@ var parms = new Dictionary { { "term", searchTerm } }; } -

- @(hasSearchTerm ? $"Search results for {searchTerm}" : "All catalogues") -

+

+ Search results @(!string.IsNullOrEmpty(searchTerm) ? "for " + searchTerm : string.Empty) +

@@ -139,7 +139,7 @@ {
-

No results found for @searchTerm

+

No results found @(!string.IsNullOrEmpty(searchTerm) ? "for " + searchTerm : string.Empty)

You could try:

  • checking your spelling
  • diff --git a/LearningHub.Nhs.WebUI/Views/Search/Index.cshtml b/LearningHub.Nhs.WebUI/Views/Search/Index.cshtml index 1d113e79c..f740f04cf 100644 --- a/LearningHub.Nhs.WebUI/Views/Search/Index.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Search/Index.cshtml @@ -10,11 +10,10 @@
    - -

    - Search results for @Model.SearchString -

    - +

    + Search results @(!string.IsNullOrEmpty(Model.SearchString) ? "for " + Model.SearchString : string.Empty) +

    +
    @await Html.PartialAsync("_SearchBar", @Model.SearchString) @@ -48,7 +47,7 @@ {
    -

    No results found for @Model.SearchString

    +

    No results found @(!string.IsNullOrEmpty(Model.SearchString) ? "for " + Model.SearchString : string.Empty)

    You could try:

    • checking your spelling