File tree Expand file tree Collapse file tree 2 files changed +10
-11
lines changed
LearningHub.Nhs.WebUI/Views Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 77
88 var queryParams = QueryHelpers .ParseQuery (Context .Request .QueryString .ToString ());
99 var hasSearchTerm = queryParams .ContainsKey (" term" );
10- var searchTerm = hasSearchTerm ? queryParams [" term" ].ToString () : null ;
10+ var searchTerm = hasSearchTerm ? queryParams [" term" ].ToString (). Trim () : null ;
1111 string cardStyle = " card-provider-details--blank" ;
1212 var pageSize = this .ViewBag .PageSize ;
1313}
2222 var parms = new Dictionary <string , string > { { " term" , searchTerm } };
2323 <vc:back-link asp-controller =" Catalogue" asp-action =" GetAllCatalogue" link-text =" Back to A-Z of catalogues" />
2424 }
25- <h1 class =" nhsuk-u-margin-bottom-5" >
26- @( hasSearchTerm ? $" Search results for { searchTerm } " : " All catalogues " )
27- </h1 >
25+ <h1 class =" nhsuk-u-margin-bottom-5" >
26+ Search results @( ! string . IsNullOrEmpty ( searchTerm ) ? " for " + searchTerm : string . Empty )
27+ </h1 >
2828
2929 <div class =" nhsuk-grid-row" >
3030 <div id =" searchTab" class =" search-page" >
139139 {
140140 <div class =" nhsuk-grid-row" >
141141 <div class =" nhsuk-grid-column-full" >
142- <h2 class =" nhsuk-heading-l" >No results found for @ searchTerm</h2>
142+ <h2 class =" nhsuk-heading-l" >No results found @( ! string . IsNullOrEmpty ( searchTerm ) ? " for " + searchTerm : string . Empty ) </h2 >
143143 <p >You could try : </p >
144144 <ul class =" nhsuk-list nhsuk-list--bullet" >
145145 <li >checking your spelling </li >
Original file line number Diff line number Diff line change 1010
1111<div class =" search-page" >
1212 <div class =" nhsuk-width-container app-width-container" >
13-
14- <h1 class =" nhsuk-u-margin-top-5 nhsuk-u-margin-bottom-6" >
15- Search results for @Model.SearchString
16- </h1 >
17-
13+ <h1 class =" nhsuk-u-margin-top-5 nhsuk-u-margin-bottom-6" >
14+ Search results @( ! string .IsNullOrEmpty (Model .SearchString ) ? " for " + Model .SearchString : string .Empty )
15+ </h1 >
16+
1817 <div class =" nhsuk-grid-row" >
1918 <div class =" nhsuk-grid-column-two-thirds" >
2019 @await Html.PartialAsync("_SearchBar", @Model.SearchString)
4847 {
4948 <div class =" nhsuk-grid-row" >
5049 <div class =" nhsuk-grid-column-full" >
51- <h2 class =" nhsuk-heading-l" >No results found for @ Model.SearchString</h2>
50+ <h2 class =" nhsuk-heading-l" >No results found @( ! string . IsNullOrEmpty ( Model . SearchString ) ? " for " + Model .SearchString : string . Empty ) </h2 >
5251 <p >You could try : </p >
5352 <ul class =" nhsuk-list nhsuk-list--bullet" >
5453 <li >checking your spelling </li >
You can’t perform that action at this time.
0 commit comments