Skip to content

Commit

Permalink
Merge pull request #4079 from nationalarchives/TDRD-352-and-356-and-3…
Browse files Browse the repository at this point in the history
…11-html-changes

TDRD-352, TDRD-356 and TDRD-311: html changes
  • Loading branch information
MarkKingsbury authored Aug 14, 2024
2 parents 9f7ece3 + aef370c commit f31654a
Show file tree
Hide file tree
Showing 40 changed files with 179 additions and 206 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ development environment for the other TDR services.
aws ssm get-parameter --name "/intg/keycloak/client/secret" --with-decryption
```
- Copy the `Value` from the object returned
- get arn for the slack notifications SNS topic for integration (find in AWS console)
- In IntelliJ, create a new sbt run configuration:
- Set the Tasks parameter to `run`
- Configure the environment variables:
- AUTH_SECRET=\<the secret for the Keycloak client that you copied above\>
- NOTIFICATION_SNS_TOPIC_ARN=\<the arn for sns topic for slack notifications you obtained above>
- Follow the Static Assets steps below to build the CSS and JS
- Run the project from IntelliJ
- Visit `http://localhost:9000`
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/UploadController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ class UploadController @Inject() (
reference <- consignmentService.getConsignmentRef(consignmentId, request.token.bearerAccessToken)
} yield {
val uploadStatus: Option[String] = consignmentStatusService.getStatusValues(consignmentStatuses, UploadType).values.headOption.flatten
val pageHeadingUpload = "Upload judgment"
val pageHeadingUploading = "Uploading judgment"
val pageHeadingUpload = "Upload document"
val pageHeadingUploading = "Uploading document"

uploadStatus match {
case Some(InProgressValue.value) | Some(CompletedWithIssuesValue.value) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
@main("Results of CSV Checks", name = name) {
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
@progressIndicator(Messages("draftMetadataChecksResults.progress"))
<h1 class="govuk-heading-l">
Results of your metadata checks
</h1>
Expand Down
9 changes: 2 additions & 7 deletions app/views/fileChecksProgressAlreadyConfirmed.scala.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
@import java.util.UUID
@import viewsapi.FrontEndInfo
@import views.html.partials.{frontEndInputs, progressIndicator, transferReference}
@import views.html.partials.{frontEndInputs, transferReference}

@(consignmentId: UUID, consignmentRef: String, frontEndInfo: FrontEndInfo, name: String, isJudgmentUser: Boolean)(implicit messages: Messages, request: RequestHeader)
@title = @{if(isJudgmentUser){"Checking your upload"} else {"Checking your records"}}
@title = @{if(isJudgmentUser){"Checking your document"} else {"Checking your records"}}
@main(title, name = name, isJudgmentUser = isJudgmentUser) {
@defining(play.core.PlayVersion.current) { version =>
<div class="govuk-grid-row file-check-progress">
<div class="govuk-grid-column-two-thirds">
@if(isJudgmentUser) {
@progressIndicator(Messages("judgmentCheckingRecords.progress"), isJudgmentUser)
} else {
@progressIndicator(Messages("checkingRecords.progress"), isJudgmentUser)
}
@frontEndInputs(frontEndInfo)
<h1 class="govuk-heading-l">@title</h1>
<input id="consignmentId" type="hidden" value="@consignmentId">
Expand Down
7 changes: 1 addition & 6 deletions app/views/fileChecksResultsFailed.scala.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
@import views.html.partials.{progressIndicator, fileCheckErrorMessage, transferReference}
@import views.html.partials.{fileCheckErrorMessage, transferReference}

@(name: String, title: String, consignmentRef: String, isJudgmentUser: Boolean, fileStatuses: List[String] = Nil)(implicit request: RequestHeader, messages: Messages)

@main(title, name = name, isJudgmentUser = isJudgmentUser) {
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
@if(isJudgmentUser) {
@progressIndicator(Messages("judgmentCheckingRecords.progress"), isJudgmentUser)
} else {
@progressIndicator(Messages("checkingRecords.progress"), isJudgmentUser)
}
<h1 class="govuk-heading-l">@title</h1>

<div class="govuk-error-summary" aria-labelledby="error-summary-title"
Expand Down
39 changes: 21 additions & 18 deletions app/views/judgment/judgmentBeforeUploading.scala.html
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
@import views.html.partials.{progressIndicator, transferReference}
@import views.html.partials.transferReference

@import java.util.UUID

@import views.html.partials.backLink
@(consignmentId: UUID, consignmentRef: String, name: String)(implicit request: RequestHeader, messages: Messages)
@main("Check your file before uploading", name = name, isJudgmentUser = true) {
@main("Before you upload a document", name = name, isJudgmentUser = true, backLink = Some(backLink(routes.HomepageController.homepage().url, "Back"))) {
@defining(play.core.PlayVersion.current) { version =>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
@progressIndicator(Messages("beforeUploading.progress"), isJudgmentUser = true)
<h1 class="govuk-heading-l">Check your file before uploading</h1>
<p class="govuk-body">Your upload must contain the following information:</p>
<ul class="govuk-list">
<h1 class="govuk-heading-l">Before you upload a document</h1>
<h2 class="govuk-heading-m">What your document must contain</h2>
<p class="govuk-body">We can only accept a single document in Microsoft Word (docx) format. It must contain the following information:</p>
<ul class="govuk-list govuk-list--number">
<li>neutral citation</li>
<li>name(s) of judge(s)</li>
<li>name(s) of parties</li>
<li>court and judgment date</li>
</ul>
<h2 class="govuk-heading-m">Do you need to contact us about this transfer?</h2>
<p class="govuk-body">
Send an email to <a class="govuk-link" href="mailto:@Messages("nationalArchives.judgmentsEmail")?subject=Ref: @consignmentRef">@Messages("nationalArchives.judgmentsEmail")</a>
with <strong>Ref: @consignmentRef</strong> as the subject line if you need to:
</p>
<ul class="govuk-list govuk-list--bullet govuk-list--spaced">
<li>Attach and send supplementary material for this judgment.</li>
<li>Flag when your judgment is a new version; quote the details of the original document being replaced.</li>
<li>Flag when your judgment is subject to an anonymisation order.</li>
</ul>

<h2 class="govuk-heading-m">How to format your document</h2>
<p class="govuk-body">After you submit a Microsoft Word document we convert the content into a web page and PDF. To ensure the information is converted correctly, we ask you to follow some formatting guidelines and rules in the original document.</p>
<p class="govuk-body govuk-!-margin-bottom-6">Read our <a target="_blank" class="govuk-link" href="https://nationalarchives.github.io/ds-caselaw-judiciary-guidance/">guidance on formatting your document</a>.</p>
<details class="govuk-details govuk-!-margin-bottom-4">
<summary class="govuk-details__summary">
<span class="govuk-details__summary-text">
How will my document look once it's published?
</span>
</summary>
<div class="govuk-details__text">
<p class="govuk-body">The web page view may look slightly different to the original document but will contain the same information. This is to make sure the document meets basic web accessibility standards.</p>
<p class="govuk-body">The PDF will be as close a copy of the original document as possible.</p>
</div>
</details>
<div class="govuk-button-group">
<a href="@routes.UploadController.judgmentUploadPage(consignmentId)" role="button" draggable="false" class="govuk-button" data-module="govuk-button">Continue</a>
<a class="govuk-link" href="@routes.HomepageController.homepage()">Cancel</a>
</div>
</div>
@transferReference(consignmentRef, isJudgmentUser = true)
Expand Down
23 changes: 19 additions & 4 deletions app/views/judgment/judgmentComplete.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,37 @@ <h1 class="govuk-panel__title">
</h1>
<div class="govuk-panel__body govuk-!-font-size-27">
<div class="transfer-complete">
<p>Your file has now been transferred</p>
<p>to The National Archives.</p>
<p>Your file has now been transferred to The National Archives.</p>
</div>
</div>
<div class="govuk-panel__body govuk-!-font-size-27 govuk-!-margin-top-5">
Transfer Reference: <span class="govuk-!-font-weight-bold">@reference</span>
</div>
</div>

<h2 class="govuk-heading-m govuk-!-margin-top-2">What happens next</h2>
<h2 class="govuk-heading-m">What happens next</h2>

<p class="govuk-body">You will be notified by email once the judgment has been received and published.</p>
<p class="govuk-body">Your transfer will now be reviewed by the editorial team.</p>
<p class="govuk-body">You will be notified by email once the judgment has been reviewed and published.</p>
<p class="govuk-body">Do not delete the original file you uploaded until you have been notified.</p>


@feedbackSurvey("https://www.smartsurvey.co.uk/s/5YDPSA/")

<h2 class="govuk-heading-m">If this is an update to an existing judgment or decision</h2>
<p class="govuk-body">
If this transfer was an update or revision, email <a href="mailto:@Messages("nationalArchives.judgmentsEmail")">@Messages("nationalArchives.judgmentsEmail")</a> and include the following:
</p>
<ul class="govuk-list govuk-list--number">
<li>the neutral citation</li>
<li>the transfer reference: <strong>@reference</strong></li>
<li>tell us if this transfer was a revision or update</li>
<li>provide a short description of what has changed</li>
</ul>

<h2 class="govuk-heading-m">Contact the publishing editors</h2>
<p class="govuk-body"><a href="mailto:@Messages("nationalArchives.judgmentsEmail")">@Messages("nationalArchives.judgmentsEmail")</a></p>

@returnToHomepage()
</div>

Expand Down
20 changes: 11 additions & 9 deletions app/views/judgment/judgmentFileChecksProgress.scala.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
@import java.util.UUID
@import helper._
@import viewsapi.FrontEndInfo
@import views.html.partials.{frontEndInputs, progressIndicator, transferReference}
@import views.html.partials.{frontEndInputs, transferReference}
@import views.html.helper.form
@(consignmentId: UUID, consignmentRef: String, frontEndInfo: FrontEndInfo, name: String)(implicit messages: Messages, request: RequestHeader)

@main("Checking your upload", name = name, isJudgmentUser = true) {
@main("Checking your document", name = name, isJudgmentUser = true) {
@defining(play.core.PlayVersion.current) { version =>
<div class="govuk-grid-row file-check-progress">
@CSRF.formField
<div class="govuk-grid-column-two-thirds">

@progressIndicator(Messages("judgmentCheckingRecords.progress"), isJudgmentUser=true)
@frontEndInputs(frontEndInfo)
<h1 class="govuk-heading-l">Checking your upload</h1>
<h1 class="govuk-heading-l">Checking your document</h1>
<input id="consignmentId" type="hidden" value="@consignmentId">
<p class="govuk-body">Your judgment is being checked for errors.
This may take a few minutes. Once your judgment has been checked, you will be redirected automatically.
</p>

<p class="govuk-body">The following checks are now being performed:</p>
<ul class="govuk-list govuk-list--bullet">
<li>Document file format</li>
<li>Anti-virus scanning</li>
<li>Validating file integrity</li>
</ul>
<p class="govuk-body">This may take a few minutes. If your document has an unusually large number of pages or images it may take longer.</p>
<p class="govuk-body">Once your document has been checked, you will be redirected automatically.</p>
<!-- Form to redirect user once file checks have completed. It sends consignmentId to record results' placeholder page -->
@form(routes.FileChecksResultsController.judgmentFileCheckResultsPage(consignmentId), Symbol("id") -> "file-checks-form") { }
</div>
Expand Down
32 changes: 18 additions & 14 deletions app/views/judgment/judgmentHomepage.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,32 @@
@main(title, name = name, isJudgmentUser = true) {
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-l">@title</h1>
<h1 class="govuk-heading-xl">@title</h1>

<h2 class="govuk-heading-m govuk-!-margin-top-7">Before you start</h2>

<p class="govuk-body">
You must upload your judgment as a Microsoft Word (.docx) document. Any other formats will not be accepted.
</p>

<h2 class="govuk-heading-m govuk-!-margin-top-2">Upload your judgment to start a new transfer</h2>
<p class="govuk-body">You can use this service to:</p>
<ul class="govuk-list govuk-list--bullet">
<li>transfer judgments and decisions</li>
<li>transfer an amendment to an existing judgment or decision</li>
</ul>

@form(routes.HomepageController.judgmentHomepageSubmit(), (Symbol("novalidate"), "")) {
@CSRF.formField
<div class="govuk-button-group">
<button data-prevent-double-click="true" class="govuk-button" type="submit" data-module="govuk-button"
role="button">
Start transfer
</button>
</div>
<button data-prevent-double-click="true" class="govuk-button govuk-!-margin-bottom-8" type="submit" data-module="govuk-button"
role="button">
Start your transfer
</button>
@if(!blockViewTransfers) {
@viewTransfersBtn()
}
}

<h2 class="govuk-heading-m">If this is an update to an existing judgment or decision</h2>
<p class="govuk-body">You can use this service to transfer an update or revision to a previously transferred document.</p>
<p class="govuk-body">Transfer the document in the same way as any judgement or decision, by clicking "Start your transfer" above.</p>
<p class="govuk-body">Once you have successfully completed the transfer you will need to email us. More information will be provided after the transfer.</p>
<h2 class="govuk-heading-m">Contact the publishing editors</h2>
<p class="govuk-body"><a href="mailto:@Messages("nationalArchives.judgmentsEmail")">@Messages("nationalArchives.judgmentsEmail")</a></p>

</div>
</div>
}
Expand Down
11 changes: 4 additions & 7 deletions app/views/judgment/judgmentUpload.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@

@(consignmentId: UUID, consignmentRef: String, pageHeading1stHalf: String, pageHeading2ndHalf: String, frontEndInfo: FrontEndInfo, name: String)(implicit request: RequestHeader, messages: Messages)

@main(pageHeading1stHalf, name = name, isJudgmentUser = true) {
@main(pageHeading1stHalf, name = name, isJudgmentUser = true, backLink = Some(backLink(routes.BeforeUploadingController.beforeUploading(consignmentId).url, "Back"))) {
<noscript>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
@progressIndicator(Messages("judgmentUpload.progress"), isJudgmentUser=true)
<h1 class="govuk-heading-l">@pageHeading1stHalf</h1>
@noScriptMessage()
</div>
Expand All @@ -18,13 +17,12 @@ <h1 class="govuk-heading-l">@pageHeading1stHalf</h1>
<div id="file-upload" class="govuk-grid-row" hidden>
@CSRF.formField
<div class="govuk-grid-column-two-thirds">
@progressIndicator(Messages("judgmentUpload.progress"), isJudgmentUser=true)
@frontEndInputs(frontEndInfo)

<h1 class="govuk-heading-l">@pageHeading1stHalf</h1>
<p class="govuk-body">You may now upload the judgment you wish to transfer. You can only upload one file.</p>
<p class="govuk-body">You may now select and upload the judgment or decision. You can only upload one file.</p>
<div class="govuk-inset-text">
We only accept Microsoft Word files (.docx).
We only accept Microsoft Word files ending in .docx.
</div>
<div id="upload-error" class="govuk-error-summary upload-error" hidden aria-labelledby="error-summary-title"
role="alert" tabindex="-1" data-module="govuk-error-summary">
Expand Down Expand Up @@ -94,7 +92,6 @@ <h2 class="govuk-error-summary__title" id="error-summary-title">
</div>
<div id="upload-progress" class="govuk-grid-row" hidden>
<div class="govuk-grid-column-two-thirds" role="status" aria-live="assertive">
@progressIndicator(Messages("judgmentUpload.progress"), isJudgmentUser=true)
<h1 class="govuk-heading-l">@pageHeading2ndHalf</h1>
<div id="upload-progress-error" hidden>
<div class="govuk-error-summary upload-error" aria-labelledby="progress-error-summary-title"
Expand All @@ -115,7 +112,7 @@ <h2 class="govuk-error-summary__title" id="progress-error-summary-title">
</div>
@loggedOutErrorMessage("upload-progress")
<div id="progress-bar-and-message">
<p class="govuk-body">Do not close your browser window while your file is being uploaded. This could take a few minutes.</p>
<p class="govuk-body">Do not close your browser window while your file is being uploaded. This may take a few minutes.</p>
<div>
<span id="upload-status-screen-reader">
<span id="upload-records-progress-label" class="govuk-label progress-label">
Expand Down
2 changes: 1 addition & 1 deletion app/views/partials/downloadMetadataLink.scala.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import java.util.UUID
@(consignmentId: UUID, linkLabel: String = "Download metadata")
<a class="govuk-button govuk-button--secondary govuk-!-margin-bottom-8 download-metadata" href="/consignment/@consignmentId/additional-metadata/download-metadata/csv">
<a class="govuk-button govuk-button--secondary govuk-!-margin-bottom-8 download-metadata" href="/consignment/@consignmentId/additional-metadata/download-metadata/csv">
<span aria-hidden="true" class="tna-button-icon">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 23 23">
<path fill="#020202" d="m11.5 16.75-6.563-6.563 1.838-1.903 3.412 3.413V1h2.626v10.697l3.412-3.413 1.837 1.903L11.5 16.75ZM3.625 22c-.722 0-1.34-.257-1.853-.77A2.533 2.533 0 0 1 1 19.375v-3.938h2.625v3.938h15.75v-3.938H22v3.938c0 .722-.257 1.34-.77 1.855a2.522 2.522 0 0 1-1.855.77H3.625Z"></path>
Expand Down
6 changes: 0 additions & 6 deletions app/views/partials/progressIndicator.scala.html

This file was deleted.

2 changes: 0 additions & 2 deletions app/views/partials/transferAgreementHeader.scala.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
@* helper package contains inputRadioGroup therefore exclude from imports to prevent ambiguous import with view of the same name *@
@import scala.language.postfixOps
@import views.html.partials.progressIndicator

@(additionalHeaderText: String="")(implicit request: RequestHeader, messages: Messages)
@progressIndicator(Messages("transferAgreement.progress"))

<h1 class="govuk-heading-l govuk-!-margin-bottom-3">Transfer agreement@additionalHeaderText</h1>
Loading

0 comments on commit f31654a

Please sign in to comment.