Skip to content

Commit

Permalink
New displayBannerOSH boolean to bring in OSH banner (#576)
Browse files Browse the repository at this point in the history
* Solution.

* bringing in new displayBannerOSH boolean to display OSH banner

---------

Co-authored-by: Andrew <[email protected]>
  • Loading branch information
jacksgannon and AndyLearmouth-TDS authored Jan 24, 2025
1 parent 4a44774 commit e7b3e32
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/controllers/CiapiController/CiapiController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class CiapiController @Inject()(appConfig: AppConfig,
def onlineServicesHelpdesk: Action[AnyContent] = Action.async { implicit request =>
if (config.showOSHCUI) {
auditHelper.audit(DAv3AuditModel("onlineServicesHelpdesk"))
Future.successful(Ok(askHMRCOnlineCIAPIView()))
Future.successful(Ok(askHMRCOnlineCIAPIView(displayBannerOSH = true)))
} else {
Future.successful(NotFound)
}
Expand Down
4 changes: 2 additions & 2 deletions app/views/CIAPIViews/AskHMRCOnlineCIAPIView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

@this(main_template: MainTemplateCUI, appConfig: AppConfig)

@(displayBanner: Boolean = false)(implicit request: Request[_], messages: play.api.i18n.Messages)
@(displayBanner: Boolean = false, displayBannerOSH: Boolean = false)(implicit request: Request[_], messages: play.api.i18n.Messages)

@main_template(title = messages("ciapi.page.title"), displayBanner = displayBanner) {
@main_template(title = messages("ciapi.page.title"), displayBanner = displayBanner, displayBannerOSH = displayBannerOSH) {
<div class="cui-wrapper">
<div id="cui-messaging-container">
<div id="nuanMessagingFrame">
Expand Down
6 changes: 5 additions & 1 deletion app/views/templates/GovukWrapperCUI.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
mainContent: Html = HtmlFormat.empty,
scriptElem: Option[Html] = None,
navTitle: Option[String] = None,
displayBanner: Boolean = false
displayBanner: Boolean = false,
displayBannerOSH: Boolean = false
)(implicit request: Request[_], messages: play.api.i18n.Messages)

@content = {
Expand All @@ -74,6 +75,9 @@
@if(displayBanner) {
@govukNotificationBanner(NotificationBanner(titleId = Some("individualBanner"), title = Text(messages("individualNotification.banner.title")), content = HtmlContent(messages("individualNotification.banner.p"))))
}
@if(displayBannerOSH) {
@govukNotificationBanner(NotificationBanner(titleId = Some("oshBanner"), title = Text(messages("oshNotification.banner.title")), content = HtmlContent(messages("oshNotification.banner.p"))))
}
}

@wrappedContent = {
Expand Down
5 changes: 3 additions & 2 deletions app/views/templates/MainTemplateCUI.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
webChatClient: WebChatClient
)

@(title: String, sidebar: Option[Html] = None, displayBanner: Boolean = false)(mainContent: Html)(implicit request : Request[_], messages: Messages)
@(title: String, sidebar: Option[Html] = None, displayBanner: Boolean = false, displayBannerOSH: Boolean = false)(mainContent: Html)(implicit request : Request[_], messages: Messages)

@sidebarContent = {
@if(sidebar.isDefined) {
Expand Down Expand Up @@ -52,5 +52,6 @@
sidebar = sidebarContent,
mainContent = mainContent,
scriptElem = Some(scriptElem),
displayBanner = displayBanner
displayBanner = displayBanner,
displayBannerOSH = displayBannerOSH
)
5 changes: 5 additions & 0 deletions conf/messages
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ individualNotification.banner.p = <p id= "individualBanner" class="govuk-notific
globalNotification.banner.title = Important
globalNotification.banner.p = <p id= "globalBanner" class="govuk-notification-banner__heading">Phone lines are unavailable due to a technical issue we’re working to resolve. You can still use the online services as normal.</p>

#OSH Notification Banner
oshNotification.banner.title = Important
oshNotification.banner.p = <p id= "oshBanner" class="govuk-notification-banner__heading">This service is for technical queries with your online account. If your question is about completing Self Assessment, call 0300 200 3310.</p>


#Service Unavailable Page
service.unavailable.title = Sorry, this webchat is unavailable
service.unavailable.p1 = We are hoping to provide this webchat from October 2022.
Expand Down

0 comments on commit e7b3e32

Please sign in to comment.