Skip to content

Commit

Permalink
Added dummy account homepage and pay in page (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyHWChung authored and jackie1988 committed Feb 21, 2019
1 parent a82fd1c commit 03efd9d
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* 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.helptosavetestadminfrontend.controllers

import com.google.inject.{Inject, Singleton}
import play.api.i18n.{I18nSupport, MessagesApi}
import play.api.mvc.{Action, AnyContent}
import uk.gov.hmrc.helptosavetestadminfrontend.config.AppConfig
import uk.gov.hmrc.play.bootstrap.controller.FrontendController
import uk.gov.hmrc.helptosavetestadminfrontend.views

@Singleton
class DummyPagesController @Inject() (implicit val messagesApi: MessagesApi, appConfig: AppConfig) extends FrontendController with I18nSupport {

def accountHomepage: Action[AnyContent] = Action { implicit request
Ok(views.html.account_homepage())
}


def payIn: Action[AnyContent] = Action { implicit request
Ok(views.html.pay_in())
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@*
* 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.helptosavetestadminfrontend.config.AppConfig

@()(implicit request: Request[_], messages: Messages, appConfig: AppConfig)

@main_template(title = "Account Homepage", bodyClasses = None) {
<h1>Account Homepage</h1>
<p>This is a dummy page</p>

<img class="img-thumbnail" src="https://cataas.com/cat/cute" alt="cool picture">

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@*
* 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.helptosavetestadminfrontend.config.AppConfig

@()(implicit request: Request[_], messages: Messages, appConfig: AppConfig)

@main_template(title = "Pay In", bodyClasses = None) {
<h1>Pay In</h1>
<p>This is a dummy page</p>

<img class="img-thumbnail" src="https://cataas.com/cat/cute" alt="cool picture">

}
3 changes: 3 additions & 0 deletions conf/app.routes
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# microservice specific routes

GET / @uk.gov.hmrc.helptosavetestadminfrontend.controllers.HelpToSaveApiController.availableFunctions()
-> /dummy-pages dummyPages.Routes

POST /delete-emails @uk.gov.hmrc.helptosavetestadminfrontend.controllers.VerifiedEmailsController.deleteVerifiedEmails

Expand All @@ -27,3 +28,5 @@ GET /get-account-page @uk.gov.hmrc.helptosavetestadminfrontend.
GET /account @uk.gov.hmrc.helptosavetestadminfrontend.controllers.HelpToSaveApiController.getAccount()

GET /curl-result @uk.gov.hmrc.helptosavetestadminfrontend.controllers.HelpToSaveApiController.getCurlRequestIsPage(id: java.util.UUID)


2 changes: 1 addition & 1 deletion conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ appName="help-to-save-test-admin-frontend"
application.router=prod.Routes

# to learn why this was included: /display/TEC/2016/03/14/Setting+Security+Headers+in+frontend+services
play.filters.headers.contentSecurityPolicy = "default-src 'self' 'unsafe-inline' localhost:9000 localhost:9032 localhost:9250 data:"
play.filters.headers.contentSecurityPolicy = "default-src 'self' 'unsafe-inline' localhost:9000 localhost:9032 localhost:9250 data:; img-src *"

# An ApplicationLoader that uses Guice to bootstrap the application.
play.application.loader = "uk.gov.hmrc.play.bootstrap.ApplicationLoader"
Expand Down
4 changes: 4 additions & 0 deletions conf/dummyPages.routes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

GET /account-homepage @uk.gov.hmrc.helptosavetestadminfrontend.controllers.DummyPagesController.accountHomepage

GET /pay-in @uk.gov.hmrc.helptosavetestadminfrontend.controllers.DummyPagesController.payIn

0 comments on commit 03efd9d

Please sign in to comment.