-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BDOG-3276: refactors search by path to use route model
- Loading branch information
Showing
18 changed files
with
132 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 0 additions & 64 deletions
64
app/uk/gov/hmrc/cataloguefrontend/connector/SearchByUrlConnector.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,12 +15,13 @@ | |
*@ | ||
|
||
@import uk.gov.hmrc.cataloguefrontend.{routes => appRoutes} | ||
@import uk.gov.hmrc.cataloguefrontend.service.SearchByUrlService.FrontendRoutes | ||
@import uk.gov.hmrc.cataloguefrontend.connector.RouteConfigurationConnector.Route | ||
|
||
@this() | ||
|
||
|
||
@(form : Form[?], | ||
searchResults : Seq[FrontendRoutes] | ||
searchResults : Seq[Route] | ||
)(implicit | ||
request : RequestHeader | ||
) | ||
|
@@ -82,20 +83,18 @@ <h1 id="search-service-header" class="page-heading mt-4">Search for a service by | |
</thead> | ||
<tbody class="list"> | ||
@for(result <- searchResults) { | ||
@for(route <- result.routes) { | ||
<tr> | ||
<td> | ||
<a id="link-to-@{result.service.asString}" href="@appRoutes.CatalogueController.service(result.service)">@result.service.asString</a> | ||
</td> | ||
<td> | ||
@if(route.isRegex) { | ||
@route.frontendPath | ||
} else { | ||
<a href="https://[email protected]" target="_blank" rel="noreferrer noopener">@route.frontendPath <span class="glyphicon glyphicon-new-window"/></a> | ||
} | ||
</td> | ||
</tr> | ||
} | ||
<tr> | ||
<td> | ||
<a id="link-to-@{result.serviceName.asString}" href="@appRoutes.CatalogueController.service(result.serviceName)">@{result.serviceName.asString}</a> | ||
</td> | ||
<td> | ||
@if(result.isRegex) { | ||
@result.path | ||
} else { | ||
<a href="https://[email protected]" target="_blank" rel="noreferrer noopener">@result.path <span class="glyphicon glyphicon-new-window"/></a> | ||
} | ||
</td> | ||
</tr> | ||
} | ||
</tbody> | ||
</table> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.