From dd5af711a4f9bcc3a16ac8c0dd0eb1ddd8d689e1 Mon Sep 17 00:00:00 2001 From: Ian McShane Date: Mon, 7 Jan 2019 15:53:47 +0000 Subject: [PATCH 1/4] wip: initial work to have a search by url page --- .../SearchByUrlController.scala | 67 +++++++++++++++++++ .../connector/SearchByUrlConnector.scala | 49 ++++++++++++++ .../service/SearchByUrlService.scala | 40 +++++++++++ app/views/SearchByUrlPage.scala.html | 49 ++++++++++++++ conf/app.routes | 2 + conf/application.conf | 5 ++ 6 files changed, 212 insertions(+) create mode 100644 app/uk/gov/hmrc/cataloguefrontend/SearchByUrlController.scala create mode 100644 app/uk/gov/hmrc/cataloguefrontend/connector/SearchByUrlConnector.scala create mode 100644 app/uk/gov/hmrc/cataloguefrontend/service/SearchByUrlService.scala create mode 100644 app/views/SearchByUrlPage.scala.html diff --git a/app/uk/gov/hmrc/cataloguefrontend/SearchByUrlController.scala b/app/uk/gov/hmrc/cataloguefrontend/SearchByUrlController.scala new file mode 100644 index 000000000..a4a413e88 --- /dev/null +++ b/app/uk/gov/hmrc/cataloguefrontend/SearchByUrlController.scala @@ -0,0 +1,67 @@ +/* + * Copyright 2019 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package uk.gov.hmrc.cataloguefrontend + +import javax.inject.{Inject, Singleton} +import play.api.data.Form +import play.api.data.Forms.{mapping, optional, text} +import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} +import uk.gov.hmrc.play.bootstrap.controller.FrontendController +import views.html.{SearchByUrlPage, error_404_template} +import scala.concurrent.ExecutionContext.Implicits.global +import scala.concurrent.Future +import uk.gov.hmrc.cataloguefrontend.service.SearchByUrlService + +@Singleton +class SearchByUrlController @Inject()( + mcc: MessagesControllerComponents, + searchByUrlService: SearchByUrlService, + searchByUrlPage: SearchByUrlPage +) extends FrontendController(mcc) { + + def search(): Action[AnyContent] = Action.async { implicit request => + UrlSearchFilter.form + .bindFromRequest() + .fold( + formWithErrors => Future.successful(Ok(searchByUrlPage(formWithErrors, Nil))), + query => { + for { + searchResult <- searchByUrlService.search(query.name) + } yield searchResult match { + case Nil => NotFound(error_404_template()) + case _ => + Ok(searchByUrlPage( + UrlSearchFilter.form.bindFromRequest(), + searchResult)) + } + } + ) + } + + case class UrlSearchFilter(name: Option[String] = None) { + def isEmpty: Boolean = name.isEmpty + } + + object UrlSearchFilter { + lazy val form = Form( + mapping( + "name" -> optional(text).transform[Option[String]](x => if (x.exists(_.trim.isEmpty)) None else x, identity) + )(UrlSearchFilter.apply)(UrlSearchFilter.unapply) + ) + } + +} diff --git a/app/uk/gov/hmrc/cataloguefrontend/connector/SearchByUrlConnector.scala b/app/uk/gov/hmrc/cataloguefrontend/connector/SearchByUrlConnector.scala new file mode 100644 index 000000000..35ee98571 --- /dev/null +++ b/app/uk/gov/hmrc/cataloguefrontend/connector/SearchByUrlConnector.scala @@ -0,0 +1,49 @@ +/* + * Copyright 2019 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package uk.gov.hmrc.cataloguefrontend.connector + +import javax.inject.{Inject, Singleton} +import play.api.Logger +import play.api.libs.json.{Json, Reads} +import uk.gov.hmrc.cataloguefrontend.service.SearchByUrlService.{SearchResults, ServiceUrl} +import uk.gov.hmrc.http.HeaderCarrier +import uk.gov.hmrc.play.bootstrap.config.ServicesConfig +import uk.gov.hmrc.play.bootstrap.http.HttpClient + +import scala.concurrent.ExecutionContext.Implicits.global +import scala.concurrent.Future +import scala.util.control.NonFatal + +@Singleton +class SearchByUrlConnector @Inject()( + http: HttpClient, + servicesConfig: ServicesConfig + ) { + + private val url: String = s"${servicesConfig.baseUrl("service-configs")}/frontend-route" + + implicit val serviceUrlReads: Reads[ServiceUrl] = Json.reads[ServiceUrl] + + def search(term: String)(implicit hc: HeaderCarrier): Future[SearchResults] = + http + .GET[SearchResults](s"$url", Seq("term" -> term)) + .recover { + case NonFatal(ex) => + Logger.error(s"An error occurred when connecting to $url: ${ex.getMessage}", ex) + Seq.empty + } +} diff --git a/app/uk/gov/hmrc/cataloguefrontend/service/SearchByUrlService.scala b/app/uk/gov/hmrc/cataloguefrontend/service/SearchByUrlService.scala new file mode 100644 index 000000000..f2ef6e92b --- /dev/null +++ b/app/uk/gov/hmrc/cataloguefrontend/service/SearchByUrlService.scala @@ -0,0 +1,40 @@ +/* + * Copyright 2019 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package uk.gov.hmrc.cataloguefrontend.service + +import javax.inject._ +import uk.gov.hmrc.cataloguefrontend.connector.SearchByUrlConnector +import uk.gov.hmrc.http.HeaderCarrier +import scala.concurrent.Future + +@Singleton +class SearchByUrlService @Inject()(searchByUrlConnector: SearchByUrlConnector) { + import SearchByUrlService._ + + def search(term: Option[String])(implicit hc: HeaderCarrier): Future[SearchResults] = + if(term.isDefined) + Future.successful(Seq(ServiceUrl("catalogue-frontend", "/catalog", "http://github"))) + //searchByUrlConnector.search(term.get) + else + Future.successful(Nil) +} + +object SearchByUrlService { + type SearchResults = Seq[ServiceUrl] + + case class ServiceUrl(serviceName: String, frontendPath: String, ruleConfigurationUrl: String) +} diff --git a/app/views/SearchByUrlPage.scala.html b/app/views/SearchByUrlPage.scala.html new file mode 100644 index 000000000..257ffcf92 --- /dev/null +++ b/app/views/SearchByUrlPage.scala.html @@ -0,0 +1,49 @@ +@* + * Copyright 2019 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *@ + +@import uk.gov.hmrc.cataloguefrontend.ViewMessages +@import uk.gov.hmrc.cataloguefrontend.service.SearchByUrlService.{SearchResults, ServiceUrl} + +@this(viewMessages: ViewMessages) +@(form: Form[_], searchResults: SearchResults)(implicit request: Request[_]) + +@standard_layout("Search", "search") { +
+

Search

+
+
+
+
+
+ +
+
+ +
+
+
+ + + + + + + + Search Results: @searchResults.nonEmpty + +
+
+} diff --git a/conf/app.routes b/conf/app.routes index ae6c99af4..5f3d303a3 100644 --- a/conf/app.routes +++ b/conf/app.routes @@ -29,3 +29,5 @@ GET /dependencyReport uk.gov.hmrc.cataloguefro GET /sign-in @uk.gov.hmrc.cataloguefrontend.AuthController.showSignInPage POST /sign-in @uk.gov.hmrc.cataloguefrontend.AuthController.submit GET /sign-out @uk.gov.hmrc.cataloguefrontend.AuthController.signOut + +GET /search uk.gov.hmrc.cataloguefrontend.SearchByUrlController.search diff --git a/conf/application.conf b/conf/application.conf index 82b3e67f9..b97a1df7e 100644 --- a/conf/application.conf +++ b/conf/application.conf @@ -105,6 +105,11 @@ controllers { needsAuditing = false } + uk.gov.hmrc.cataloguefrontend.SearchByUrlController = { + needsAuth = false + needsLogging = false + needsAuditing = false + } } From 17d445d6a54c500feaaa7d653e667dd420b3df67 Mon Sep 17 00:00:00 2001 From: Ian McShane Date: Mon, 14 Jan 2019 16:59:11 +0000 Subject: [PATCH 2/4] feature: Search for services by URL. --- .../SearchByUrlController.scala | 19 ++-- .../connector/SearchByUrlConnector.scala | 11 +-- .../service/RouteRulesService.scala | 5 +- .../service/SearchByUrlService.scala | 63 ++++++++++++-- app/views/SearchByUrlPage.scala.html | 87 ++++++++++++++----- app/views/repository_list.scala.html | 3 - conf/app.routes | 3 +- 7 files changed, 143 insertions(+), 48 deletions(-) diff --git a/app/uk/gov/hmrc/cataloguefrontend/SearchByUrlController.scala b/app/uk/gov/hmrc/cataloguefrontend/SearchByUrlController.scala index a4a413e88..144079ddd 100644 --- a/app/uk/gov/hmrc/cataloguefrontend/SearchByUrlController.scala +++ b/app/uk/gov/hmrc/cataloguefrontend/SearchByUrlController.scala @@ -20,8 +20,10 @@ import javax.inject.{Inject, Singleton} import play.api.data.Form import play.api.data.Forms.{mapping, optional, text} import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} +import uk.gov.hmrc.cataloguefrontend.connector.RepoType import uk.gov.hmrc.play.bootstrap.controller.FrontendController -import views.html.{SearchByUrlPage, error_404_template} +import views.html.SearchByUrlPage + import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import uk.gov.hmrc.cataloguefrontend.service.SearchByUrlService @@ -33,20 +35,26 @@ class SearchByUrlController @Inject()( searchByUrlPage: SearchByUrlPage ) extends FrontendController(mcc) { - def search(): Action[AnyContent] = Action.async { implicit request => + private val serviceNameToUrl = routes.CatalogueController.service _ + + def searchLanding: Action[AnyContent] = Action.async { implicit request => + Future.successful(Ok(searchByUrlPage(UrlSearchFilter.form, Nil, serviceNameToUrl))) + } + + def searchUrl = Action.async { implicit request => UrlSearchFilter.form .bindFromRequest() .fold( - formWithErrors => Future.successful(Ok(searchByUrlPage(formWithErrors, Nil))), + formWithErrors => Future.successful(Ok(searchByUrlPage(formWithErrors, Nil, serviceNameToUrl))), query => { for { searchResult <- searchByUrlService.search(query.name) } yield searchResult match { - case Nil => NotFound(error_404_template()) case _ => Ok(searchByUrlPage( UrlSearchFilter.form.bindFromRequest(), - searchResult)) + searchResult, + serviceNameToUrl)) } } ) @@ -63,5 +71,4 @@ class SearchByUrlController @Inject()( )(UrlSearchFilter.apply)(UrlSearchFilter.unapply) ) } - } diff --git a/app/uk/gov/hmrc/cataloguefrontend/connector/SearchByUrlConnector.scala b/app/uk/gov/hmrc/cataloguefrontend/connector/SearchByUrlConnector.scala index 35ee98571..e28699db8 100644 --- a/app/uk/gov/hmrc/cataloguefrontend/connector/SearchByUrlConnector.scala +++ b/app/uk/gov/hmrc/cataloguefrontend/connector/SearchByUrlConnector.scala @@ -19,7 +19,7 @@ package uk.gov.hmrc.cataloguefrontend.connector import javax.inject.{Inject, Singleton} import play.api.Logger import play.api.libs.json.{Json, Reads} -import uk.gov.hmrc.cataloguefrontend.service.SearchByUrlService.{SearchResults, ServiceUrl} +import uk.gov.hmrc.cataloguefrontend.service.SearchByUrlService.{FrontendRoute, FrontendRoutes} import uk.gov.hmrc.http.HeaderCarrier import uk.gov.hmrc.play.bootstrap.config.ServicesConfig import uk.gov.hmrc.play.bootstrap.http.HttpClient @@ -34,13 +34,14 @@ class SearchByUrlConnector @Inject()( servicesConfig: ServicesConfig ) { - private val url: String = s"${servicesConfig.baseUrl("service-configs")}/frontend-route" + private val url: String = s"${servicesConfig.baseUrl("service-configs")}/frontend-route/search" - implicit val serviceUrlReads: Reads[ServiceUrl] = Json.reads[ServiceUrl] + implicit val frontendRouteReads: Reads[FrontendRoute] = Json.using[Json.WithDefaultValues].reads[FrontendRoute] + implicit val frontendRoutesReads: Reads[FrontendRoutes] = Json.reads[FrontendRoutes] - def search(term: String)(implicit hc: HeaderCarrier): Future[SearchResults] = + def search(term: String)(implicit hc: HeaderCarrier): Future[Seq[FrontendRoutes]] = http - .GET[SearchResults](s"$url", Seq("term" -> term)) + .GET[Seq[FrontendRoutes]](s"$url", Seq("frontendPath" -> term)) .recover { case NonFatal(ex) => Logger.error(s"An error occurred when connecting to $url: ${ex.getMessage}", ex) diff --git a/app/uk/gov/hmrc/cataloguefrontend/service/RouteRulesService.scala b/app/uk/gov/hmrc/cataloguefrontend/service/RouteRulesService.scala index 6557c8993..2f89751f9 100644 --- a/app/uk/gov/hmrc/cataloguefrontend/service/RouteRulesService.scala +++ b/app/uk/gov/hmrc/cataloguefrontend/service/RouteRulesService.scala @@ -20,16 +20,17 @@ import javax.inject.{Inject, Singleton} import uk.gov.hmrc.cataloguefrontend.connector.RouteRulesConnector import uk.gov.hmrc.http.HeaderCarrier import scala.concurrent.ExecutionContext.Implicits.global +import scala.concurrent.Future class RouteRulesService @Inject()(routeRulesConnector: RouteRulesConnector) { import RouteRulesService._ - def serviceRoutes(serviceName: String)(implicit hc: HeaderCarrier) = + def serviceRoutes(serviceName: String)(implicit hc: HeaderCarrier): Future[ServiceRoutes] = routeRulesConnector.serviceRoutes(serviceName).map(environmentRoutes => ServiceRoutes(environmentRoutes) ) - def serviceUrl(serviceName: String, environment: String = "production")(implicit hc: HeaderCarrier) = + def serviceUrl(serviceName: String, environment: String = "production")(implicit hc: HeaderCarrier): Future[Option[EnvironmentRoute]] = routeRulesConnector.serviceRoutes(serviceName).map(environmentRoutes => { environmentRoutes .find(environmentRoute => environmentRoute.environment == environment) diff --git a/app/uk/gov/hmrc/cataloguefrontend/service/SearchByUrlService.scala b/app/uk/gov/hmrc/cataloguefrontend/service/SearchByUrlService.scala index f2ef6e92b..f627b5892 100644 --- a/app/uk/gov/hmrc/cataloguefrontend/service/SearchByUrlService.scala +++ b/app/uk/gov/hmrc/cataloguefrontend/service/SearchByUrlService.scala @@ -16,25 +16,72 @@ package uk.gov.hmrc.cataloguefrontend.service +import java.net.{URI, URISyntaxException} import javax.inject._ import uk.gov.hmrc.cataloguefrontend.connector.SearchByUrlConnector import uk.gov.hmrc.http.HeaderCarrier +import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future @Singleton class SearchByUrlService @Inject()(searchByUrlConnector: SearchByUrlConnector) { + import SearchByUrlService._ - def search(term: Option[String])(implicit hc: HeaderCarrier): Future[SearchResults] = - if(term.isDefined) - Future.successful(Seq(ServiceUrl("catalogue-frontend", "/catalog", "http://github"))) - //searchByUrlConnector.search(term.get) - else + def search(term: Option[String], environment: String = "production")(implicit hc: HeaderCarrier): Future[Seq[FrontendRoutes]] = + if (isValidSearchTerm(term)) { + searchByUrlConnector + .search(takeUrlPath(term.get)) + .map(results => results.filter(frontendRoute => frontendRoute.environment == environment)) + } + else { Future.successful(Nil) + } + + private def isValidSearchTerm(term: Option[String]): Boolean = { + if (term.isEmpty || term.getOrElse("").trim.isEmpty || term.getOrElse("").trim == "/") + return false + + try { + val url = new URI(term.get) + + Option(url.getPath).getOrElse("").nonEmpty && + (!Option(url.getPath).getOrElse("").contains("tax.service.gov.uk") || + Option(url.getHost).getOrElse("").isEmpty && + Option(url.getPath).getOrElse("").contains("tax.service.gov.uk") && + url.getPath.substring(url.getPath.indexOf(".gov.uk") + 7).trim.nonEmpty) + } catch { + case e: URISyntaxException => false + } + } + + private def takeUrlPath(term: String): String = { + val url = new URI(term) + + if (Option(url.getHost).getOrElse("").trim.nonEmpty) + return url.getPath.trim + + if (Option(url.getHost).getOrElse("").trim.isEmpty && + Option(url.getPath).getOrElse("").contains("tax.service.gov.uk")) + return url.getPath.substring(url.getPath.indexOf(".gov.uk") + 7).trim + + url.getPath.trim + + /* + **test cases** + tax.service.gov.uk + https://www.tax.service.gov.uk/business-account/a/b/c/s + www.tax.service.gov.uk/business-account/a/b/c/s + tax.service.gov.uk/business-account/a/b/c/s + /business-account/a/b/c/s + business-account/a/b/c/s + / + \ + */ + } } object SearchByUrlService { - type SearchResults = Seq[ServiceUrl] - - case class ServiceUrl(serviceName: String, frontendPath: String, ruleConfigurationUrl: String) + case class FrontendRoute(frontendPath: String, backendPath :String, ruleConfigurationUrl: String = "", isRegex: Boolean = false) + case class FrontendRoutes(service: String, environment: String, routes: Seq[FrontendRoute]) } diff --git a/app/views/SearchByUrlPage.scala.html b/app/views/SearchByUrlPage.scala.html index 257ffcf92..386edcde3 100644 --- a/app/views/SearchByUrlPage.scala.html +++ b/app/views/SearchByUrlPage.scala.html @@ -14,36 +14,77 @@ * limitations under the License. *@ +@import views.html.helper.CSRF +@import play.api.mvc.Call @import uk.gov.hmrc.cataloguefrontend.ViewMessages -@import uk.gov.hmrc.cataloguefrontend.service.SearchByUrlService.{SearchResults, ServiceUrl} +@import uk.gov.hmrc.cataloguefrontend.service.SearchByUrlService.FrontendRoutes @this(viewMessages: ViewMessages) -@(form: Form[_], searchResults: SearchResults)(implicit request: Request[_]) +@(form: Form[_], + searchResults: Seq[FrontendRoutes], + serviceNameToUrl: String => Call)(implicit request: Request[_]) -@standard_layout("Search", "search") { +@standard_layout("Service Search", "search") {
-

Search

+

Service Search

-
-
-
- -
-
- +
+

How to find a service

+
+

Use this page to search for a service on the tax platform. Enter the URL into the box below and click on the service name to find out more about it.

+
+

Addresses beginning with the following are not tax platform services:

+
    +
  • https://www.access.tax.service.gov.uk/
  • +
  • https://www.gov.uk/
  • +
- - - - - - - - - Search Results: @searchResults.nonEmpty - -
+
+
+
+
+ @{ + play.filters.csrf.CSRF.getToken(request).map { token => CSRF.formField(request) } + } +
+
+
+
+
+
+ @if(searchResults.nonEmpty) { + + + + + + + @for(result <- searchResults) { + @for(route <- result.routes) { + + + + + } + } + +
ServiceURL
@result.service + + @if(route.isRegex) { + @route.frontendPath + } else { + @route.frontendPath + } +
+ } + @if(searchResults.isEmpty && form("name").value.nonEmpty) { +

This search did not return any results.

+ } +
+
-} +} \ No newline at end of file diff --git a/app/views/repository_list.scala.html b/app/views/repository_list.scala.html index 28730672f..8a9ceee6f 100644 --- a/app/views/repository_list.scala.html +++ b/app/views/repository_list.scala.html @@ -57,9 +57,6 @@

@pageTitle

} - - -
} diff --git a/conf/app.routes b/conf/app.routes index 5f3d303a3..b4b0245b8 100644 --- a/conf/app.routes +++ b/conf/app.routes @@ -30,4 +30,5 @@ GET /sign-in @uk.gov.hmrc.cataloguefr POST /sign-in @uk.gov.hmrc.cataloguefrontend.AuthController.submit GET /sign-out @uk.gov.hmrc.cataloguefrontend.AuthController.signOut -GET /search uk.gov.hmrc.cataloguefrontend.SearchByUrlController.search +GET /search uk.gov.hmrc.cataloguefrontend.SearchByUrlController.searchLanding +POST /search uk.gov.hmrc.cataloguefrontend.SearchByUrlController.searchUrl From 86a5ba7fd81ee4484bbe6c312d84e105a548eb19 Mon Sep 17 00:00:00 2001 From: Ian McShane Date: Tue, 15 Jan 2019 09:10:43 +0000 Subject: [PATCH 3/4] fix: remove comments --- .../service/SearchByUrlService.scala | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/app/uk/gov/hmrc/cataloguefrontend/service/SearchByUrlService.scala b/app/uk/gov/hmrc/cataloguefrontend/service/SearchByUrlService.scala index f627b5892..60b38c511 100644 --- a/app/uk/gov/hmrc/cataloguefrontend/service/SearchByUrlService.scala +++ b/app/uk/gov/hmrc/cataloguefrontend/service/SearchByUrlService.scala @@ -66,18 +66,6 @@ class SearchByUrlService @Inject()(searchByUrlConnector: SearchByUrlConnector) { return url.getPath.substring(url.getPath.indexOf(".gov.uk") + 7).trim url.getPath.trim - - /* - **test cases** - tax.service.gov.uk - https://www.tax.service.gov.uk/business-account/a/b/c/s - www.tax.service.gov.uk/business-account/a/b/c/s - tax.service.gov.uk/business-account/a/b/c/s - /business-account/a/b/c/s - business-account/a/b/c/s - / - \ - */ } } From c03f0b32e8a18c9921e63177033f7d5647317285 Mon Sep 17 00:00:00 2001 From: Ian McShane Date: Tue, 15 Jan 2019 14:39:17 +0000 Subject: [PATCH 4/4] feature: Added tags for acceptance testing. --- app/views/SearchByUrlPage.scala.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/SearchByUrlPage.scala.html b/app/views/SearchByUrlPage.scala.html index 386edcde3..bf9e19a15 100644 --- a/app/views/SearchByUrlPage.scala.html +++ b/app/views/SearchByUrlPage.scala.html @@ -26,13 +26,13 @@ @standard_layout("Service Search", "search") {
-

Service Search

+

Service Search

-

How to find a service

+

How to find a service

-

Use this page to search for a service on the tax platform. Enter the URL into the box below and click on the service name to find out more about it.

+

Use this page to search for a service on the tax platform. Enter the URL into the box below and click on the service name to find out more about it.

Addresses beginning with the following are not tax platform services:

    @@ -50,12 +50,12 @@

    Ho }
    -
    -
    +
    +
    @if(searchResults.nonEmpty) { - +
    @@ -82,7 +82,7 @@

    Ho

    Service URL
    } @if(searchResults.isEmpty && form("name").value.nonEmpty) { -

    This search did not return any results.

    +

    This search did not return any results.

    }