From 2bab7daa6fee58ac958b15c9b98284b2e2614725 Mon Sep 17 00:00:00 2001 From: Tim Cowlishaw Date: Thu, 15 Sep 2022 16:47:01 +0200 Subject: [PATCH 1/3] Redesign download links to give XML less prominence Many judges and clerks were confused by the 'download as XML' button, unsure what it was for, and doubly confused by the results of clicking it. Given it's probably a fairly niche use case, this probably suggests it had undue prominence in the previous design. This is a proposal for a new design that moves the download links to the bottom of the page in a new 'download options' section, following Matt's design for the judgment summary page as much as posisble, and providing some contextual information for users to understand what the given download options are, and who they might be useful for. Given that downloading the judgement as a PDF is a very common use case, I've maintained the button for this at the top of the page, along with a subtle signposting link for other download options, which points to an anchor tag in the download options section in the footer. --- .../_judgment_text_download_options.scss | 38 +++++ .../sass/includes/_judgment_text_toolbar.scss | 40 +++++- ds_judgements_public_ui/sass/main.scss | 1 + .../judgment_text_download_options.html | 26 ++++ .../includes/judgment_text_toolbar.html | 12 +- .../templates/layout_judgment_html.html | 1 + locale/en_GB/LC_MESSAGES/django.po | 135 +++++++++++------- 7 files changed, 188 insertions(+), 65 deletions(-) create mode 100644 ds_judgements_public_ui/sass/includes/_judgment_text_download_options.scss create mode 100644 ds_judgements_public_ui/templates/includes/judgment_text_download_options.html diff --git a/ds_judgements_public_ui/sass/includes/_judgment_text_download_options.scss b/ds_judgements_public_ui/sass/includes/_judgment_text_download_options.scss new file mode 100644 index 000000000..e70917d89 --- /dev/null +++ b/ds_judgements_public_ui/sass/includes/_judgment_text_download_options.scss @@ -0,0 +1,38 @@ +.judgment-download-options { + max-width: 90%; + margin: 0 auto calc($spacer__unit*3) auto; + + @media (min-width: $grid__breakpoint-medium) { + max-width: 46rem; + } + + &__header { + border-bottom: 4px solid $color__yellow; + padding-bottom: calc($spacer__unit * 0.5); + margin-bottom: calc($spacer__unit * 2); + display: inline-block; + } + + &__options-list { + display: flex; + flex-direction: column; + gap: $spacer__unit; + + @media (min-width: $grid__breakpoint-medium) { + flex-direction: row; + } + } + + &__download-option { + border: 1px solid $color__yellow; + padding: $spacer__unit; + } + + h3 { + margin-top: 0; + } + + p { + margin-bottom: 0; + } +} diff --git a/ds_judgements_public_ui/sass/includes/_judgment_text_toolbar.scss b/ds_judgements_public_ui/sass/includes/_judgment_text_toolbar.scss index afecd78f7..7f457551e 100644 --- a/ds_judgements_public_ui/sass/includes/_judgment_text_toolbar.scss +++ b/ds_judgements_public_ui/sass/includes/_judgment_text_toolbar.scss @@ -12,11 +12,7 @@ display: inline-block; text-decoration: none; outline-offset: 3px; - margin: 0 $spacer__unit $spacer__unit 0; - - @media (min-width: $grid__breakpoint-small) { - margin-bottom: 0; - } + margin: 0; } &__return-link { @@ -33,6 +29,7 @@ &__download { display: inline-block; + } &__container { @@ -41,12 +38,13 @@ > div { @media (max-width: $grid__breakpoint-small) { text-align: center; + display: block; padding: 0.25rem $spacer__unit; } } @media (min-width: $grid__breakpoint-small) { - text-align: center; + text-align: right; } @media (min-width: $grid__breakpoint-medium) { @@ -58,3 +56,33 @@ } } } + +.judgment-download { + + &__option--pdf { + padding-left: 0 !important; + padding-right: 0 !important; + margin: 0 !important; + width: 100%; + text-align: center; + } + + &__download-options { + color: $color__dark-grey; + font-size: 0.7rem; + font-style: italic; + margin: calc($spacer__unit * 0.5) 0 0 0; + + a { + background-color: transparent; + color: $color__aqua-blue; + padding: 0; + display: inline; + text-decoration: underline; + + &:hover { + text-decoration: none; + } + } + } +} diff --git a/ds_judgements_public_ui/sass/main.scss b/ds_judgements_public_ui/sass/main.scss index 273456386..be78906e0 100644 --- a/ds_judgements_public_ui/sass/main.scss +++ b/ds_judgements_public_ui/sass/main.scss @@ -20,6 +20,7 @@ @import "includes/judgment_text_toolbar"; @import "includes/judgment_text_source"; @import "includes/judgment_text_service_introduction"; +@import "includes/judgment_text_download_options"; @import "includes/standard_text_template"; @import "includes/how_can_this_service_be_improved"; @import "includes/back_to_top_link"; diff --git a/ds_judgements_public_ui/templates/includes/judgment_text_download_options.html b/ds_judgements_public_ui/templates/includes/judgment_text_download_options.html new file mode 100644 index 000000000..64ac56014 --- /dev/null +++ b/ds_judgements_public_ui/templates/includes/judgment_text_download_options.html @@ -0,0 +1,26 @@ +{% load i18n %} +
+

{% translate "judgment.downloadoptions.title" %}

+
+
+

+ + {% translate "judgment.downloadoptions.pdf.cta" %}{{context.pdf_size}} + +

+

+ {% translate "judgment.downloadoptions.pdf.description" %} +

+
+
+

+ + {% translate "judgment.downloadoptions.xml.cta" %} + +

+

+ {% translate "judgment.downloadoptions.xml.description" %} +

+
+
+
diff --git a/ds_judgements_public_ui/templates/includes/judgment_text_toolbar.html b/ds_judgements_public_ui/templates/includes/judgment_text_toolbar.html index 609cf1c33..d72a92c88 100644 --- a/ds_judgements_public_ui/templates/includes/judgment_text_toolbar.html +++ b/ds_judgements_public_ui/templates/includes/judgment_text_toolbar.html @@ -1,14 +1,16 @@ {% load i18n %}
- +
+ {% endif %} +
diff --git a/ds_judgements_public_ui/templates/layout_judgment_html.html b/ds_judgements_public_ui/templates/layout_judgment_html.html index 54fed0b15..289923e08 100644 --- a/ds_judgements_public_ui/templates/layout_judgment_html.html +++ b/ds_judgements_public_ui/templates/layout_judgment_html.html @@ -40,6 +40,7 @@ {% endblock %} Back to top +{% include 'includes/judgment_text_download_options.html' %} {% include 'includes/footer.html' %} diff --git a/locale/en_GB/LC_MESSAGES/django.po b/locale/en_GB/LC_MESSAGES/django.po index 7288dda3a..c64d857ac 100644 --- a/locale/en_GB/LC_MESSAGES/django.po +++ b/locale/en_GB/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-21 10:44+0100\n" +"POT-Creation-Date: 2022-09-15 14:26+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,24 +18,25 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ds_judgements_public_ui/templates/base.html:9 +#: ds_judgements_public_ui/templates/base.html:36 +#: ds_judgements_public_ui/templates/layout_judgment_html.html:29 +msgid "skiplink" +msgstr "Skip to Main Content" + #: ds_judgements_public_ui/templates/includes/breadcrumbs.html:7 #: ds_judgements_public_ui/templates/judgment/results.html:5 #: ds_judgements_public_ui/templates/layout_judgment_html.html:11 -#: ds_judgements_public_ui/templates/pages/accessibility_statement.html:5 -#: ds_judgements_public_ui/templates/pages/home.html:14 -#: ds_judgements_public_ui/templates/pages/how_to_use_this_service.html:5 -#: ds_judgements_public_ui/templates/pages/terms_of_use.html:5 -#: ds_judgements_public_ui/templates/pages/transactional_licence.html:5 -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:5 +#: ds_judgements_public_ui/templates/pages/accessibility_statement.html:8 +#: ds_judgements_public_ui/templates/pages/home.html:9 +#: ds_judgements_public_ui/templates/pages/home.html:21 +#: ds_judgements_public_ui/templates/pages/how_to_use_this_service.html:8 +#: ds_judgements_public_ui/templates/pages/open_justice_licence.html:8 +#: ds_judgements_public_ui/templates/pages/terms_of_use.html:8 +#: ds_judgements_public_ui/templates/pages/transactional_licence.html:8 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:9 msgid "common.findcaselaw" msgstr "Find case law" -#: ds_judgements_public_ui/templates/base.html:29 -#: ds_judgements_public_ui/templates/layout_judgment_html.html:29 -msgid "skiplink" -msgstr "Skip to Main Content" - #: ds_judgements_public_ui/templates/includes/footer.html:7 msgid "footer.websites" msgstr "Websites" @@ -73,7 +74,8 @@ msgid "howtousethisservice.titleshort" msgstr "How to use this service" #: ds_judgements_public_ui/templates/includes/footer.html:18 -#: ds_judgements_public_ui/templates/pages/accessibility_statement.html:9 +#: ds_judgements_public_ui/templates/pages/accessibility_statement.html:8 +#: ds_judgements_public_ui/templates/pages/accessibility_statement.html:12 msgid "accessibilitystatement.title" msgstr "Accessibility statement" @@ -90,7 +92,8 @@ msgid "footer.legal" msgstr "Legal" #: ds_judgements_public_ui/templates/includes/footer.html:25 -#: ds_judgements_public_ui/templates/pages/terms_of_use.html:9 +#: ds_judgements_public_ui/templates/pages/terms_of_use.html:8 +#: ds_judgements_public_ui/templates/pages/terms_of_use.html:12 msgid "terms.title" msgstr "Terms of use" @@ -116,7 +119,7 @@ msgstr "How can this service be improved?" #: ds_judgements_public_ui/templates/includes/how_can_this_service_be_improved.html:5 #: ds_judgements_public_ui/templates/includes/phase_banner.html:8 -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:52 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:56 msgid "survey.link" msgstr "https://corexmsnp4n42lf2kht3.qualtrics.com/jfe/form/SV_0lyyYAzfv9bGcyW" @@ -124,6 +127,26 @@ msgstr "https://corexmsnp4n42lf2kht3.qualtrics.com/jfe/form/SV_0lyyYAzfv9bGcyW" msgid "survey.link.text" msgstr "Fill out our short survey" +#: ds_judgements_public_ui/templates/includes/judgment_text_download_options.html:3 +msgid "judgment.downloadoptions.title" +msgstr "Download options" + +#: ds_judgements_public_ui/templates/includes/judgment_text_download_options.html:8 +msgid "judgment.downloadoptions.pdf.cta" +msgstr "Download this judgment as a PDF" + +#: ds_judgements_public_ui/templates/includes/judgment_text_download_options.html:12 +msgid "judgment.downloadoptions.pdf.description" +msgstr "The original format of the judgment as handed down by the court, for printing and downloading." + +#: ds_judgements_public_ui/templates/includes/judgment_text_download_options.html:18 +msgid "judgment.downloadoptions.xml.cta" +msgstr "Download this judgment as XML" + +#: ds_judgements_public_ui/templates/includes/judgment_text_download_options.html:22 +msgid "judgment.downloadoptions.xml.description" +msgstr "The judgment in machine-readable LegalXML format for developers, data scientists and researchers." + #: ds_judgements_public_ui/templates/includes/judgment_text_source.html:4 msgid "judgment.source_by" msgstr "This judgment has been provided to The National Archives by " @@ -132,18 +155,18 @@ msgstr "This judgment has been provided to The National Archives by " msgid "judgment.bailii" msgstr "The British and Irish Legal Information Institute" -#: ds_judgements_public_ui/templates/includes/judgment_text_toolbar.html:6 +#: ds_judgements_public_ui/templates/includes/judgment_text_toolbar.html:7 msgid "judgment.back" msgstr "Back to search results" -#: ds_judgements_public_ui/templates/includes/judgment_text_toolbar.html:10 -msgid "judgment.downloadasxml" -msgstr "Download as XML" - -#: ds_judgements_public_ui/templates/includes/judgment_text_toolbar.html:11 +#: ds_judgements_public_ui/templates/includes/judgment_text_toolbar.html:12 msgid "judgment.downloadaspdf" msgstr "Download as PDF" +#: ds_judgements_public_ui/templates/includes/judgment_text_toolbar.html:13 +msgid "judgment.downloadoptions.shortcutlink" +msgstr "(Are you looking for more download options?)" + #: ds_judgements_public_ui/templates/includes/recent_judgments.html:21 #: ds_judgements_public_ui/templates/includes/results_list.html:23 msgid "judgments.date" @@ -168,30 +191,31 @@ msgstr "Order by date" #: ds_judgements_public_ui/templates/judgment/results.html:5 #: ds_judgements_public_ui/templates/judgment/results.html:9 -#: judgments/views.py:213 +#: judgments/views.py:233 msgid "results.search.title" msgstr "Search results" -#: ds_judgements_public_ui/templates/pages/home.html:16 +#: ds_judgements_public_ui/templates/pages/home.html:23 msgid "home.useservice" msgstr "" "Use this service to find, view and download judgments and tribunal decisions" -#: ds_judgements_public_ui/templates/pages/how_to_use_this_service.html:5 +#: ds_judgements_public_ui/templates/pages/how_to_use_this_service.html:8 +#: ds_judgements_public_ui/templates/pages/how_to_use_this_service.html:12 msgid "howtousethisservice.title" msgstr "How to use the Find Case Law service" -#: ds_judgements_public_ui/templates/pages/how_to_use_this_service.html:148 +#: ds_judgements_public_ui/templates/pages/how_to_use_this_service.html:152 msgid "courtstructure.link" msgstr "" "https://www.judiciary.uk/about-the-judiciary/the-justice-system/court-" "structure" -#: ds_judgements_public_ui/templates/pages/how_to_use_this_service.html:197 -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:376 -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:414 -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:423 -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:426 +#: ds_judgements_public_ui/templates/pages/how_to_use_this_service.html:201 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:330 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:368 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:377 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:380 msgid "caselaw.email" msgstr "caselaw@nationalarchives.gov.uk" @@ -210,11 +234,12 @@ msgstr "" "Improve your search results by removing filters, double-checking your " "spelling, using fewer keywords or searching for something less specific." -#: ds_judgements_public_ui/templates/pages/open_justice_licence.html:5 +#: ds_judgements_public_ui/templates/pages/open_justice_licence.html:8 +#: ds_judgements_public_ui/templates/pages/open_justice_licence.html:12 msgid "openjusticelicence.title" msgstr "Open Justice Licence" -#: ds_judgements_public_ui/templates/pages/open_justice_licence.html:143 +#: ds_judgements_public_ui/templates/pages/open_justice_licence.html:149 msgid "licensingframework.link" msgstr "" "https://www.nationalarchives.gov.uk/information-management/re-using-public-" @@ -229,89 +254,91 @@ msgstr "Search" msgid "commom.findcaselaw" msgstr "Find case law" -#: ds_judgements_public_ui/templates/pages/terms_of_use.html:24 +#: ds_judgements_public_ui/templates/pages/terms_of_use.html:27 msgid "caselaw.url" msgstr "https://caselaw.nationalarchives.gov.uk" -#: ds_judgements_public_ui/templates/pages/terms_of_use.html:36 +#: ds_judgements_public_ui/templates/pages/terms_of_use.html:39 msgid "webmaster.email" msgstr "webmaster@nationalarchives.gov.uk" -#: ds_judgements_public_ui/templates/pages/terms_of_use.html:72 +#: ds_judgements_public_ui/templates/pages/terms_of_use.html:75 msgid "robots.link" msgstr "https://caselaw.nationalarchives.gov.uk/robots.txt" -#: ds_judgements_public_ui/templates/pages/terms_of_use.html:95 +#: ds_judgements_public_ui/templates/pages/terms_of_use.html:98 msgid "bailii.link" msgstr "www.bailii.org" -#: ds_judgements_public_ui/templates/pages/transactional_licence.html:9 +#: ds_judgements_public_ui/templates/pages/transactional_licence.html:8 +#: ds_judgements_public_ui/templates/pages/transactional_licence.html:12 msgid "transactionallicenceform.title" msgstr "Application to re-use Court Judgments and Tribunal Decisions" -#: ds_judgements_public_ui/templates/pages/transactional_licence.html:25 +#: ds_judgements_public_ui/templates/pages/transactional_licence.html:28 msgid "caselawlicence.email" msgstr "CaseLawLicence@nationalarchives.gov.uk" -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:5 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:9 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:13 msgid "whattoexpect.title" msgstr "What to expect from this new service" -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:55 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:58 msgid "publicrecordsact.link" msgstr "https://www.legislation.gov.uk/ukpga/Eliz2/6-7/51/contents" -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:59 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:60 msgid "firstschedule.link" msgstr "" "https://www.legislation.gov.uk/ukpga/Eliz2/6-7/51/schedule/FIRST/" "crossheading/records-of-courts-and-tribunals" -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:62 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:63 msgid "sectionthree.link" msgstr "https://www.legislation.gov.uk/ukpga/Eliz2/6-7/51/section/3" -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:63 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:64 msgid "sectiontwofourh.link" msgstr "https://www.legislation.gov.uk/ukpga/Eliz2/6-7/51/section/2/4/h" -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:67 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:68 msgid "sectiontwothree.link" msgstr "https://www.legislation.gov.uk/ukpga/Eliz2/6-7/51/section/2/3" -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:70 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:71 msgid "sectionfivethree.link" msgstr "https://www.legislation.gov.uk/ukpga/Eliz2/6-7/51/section/5/3" -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:202 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:157 msgid "legaldocml.link" msgstr "https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=legaldocml" -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:242 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:197 msgid "openapi.link" msgstr "https://github.com/nationalarchives/ds-caselaw-public-access-service/" -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:245 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:200 msgid "atom.link" msgstr "https://caselaw.nationalarchives.gov.uk/atom.xml" -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:333 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:287 msgid "fivesafes.link" msgstr "https://en.wikipedia.org/wiki/Five_safes" -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:342 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:296 msgid "reuse.link" msgstr "https://www.legislation.gov.uk/uksi/2015/1415/contents" -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:345 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:299 msgid "sectioneight.link" msgstr "https://www.legislation.gov.uk/uksi/2015/1415/regulation/8" -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:348 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:302 msgid "sectionthirteen.link" msgstr "https://www.legislation.gov.uk/uksi/2015/1415/regulation/13" -#: ds_judgements_public_ui/templates/pages/what_to_expect.html:365 +#: ds_judgements_public_ui/templates/pages/what_to_expect.html:319 msgid "complaint.link" msgstr "" "https://www.nationalarchives.gov.uk/information-management/re-using-public-" From 61274e549d8e21a3665145a7eab7539ded531907 Mon Sep 17 00:00:00 2001 From: Tim Cowlishaw Date: Thu, 15 Sep 2022 17:21:24 +0200 Subject: [PATCH 2/3] LegalDocXML not LegalXML --- locale/en_GB/LC_MESSAGES/django.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/en_GB/LC_MESSAGES/django.po b/locale/en_GB/LC_MESSAGES/django.po index c64d857ac..e90911701 100644 --- a/locale/en_GB/LC_MESSAGES/django.po +++ b/locale/en_GB/LC_MESSAGES/django.po @@ -145,7 +145,7 @@ msgstr "Download this judgment as XML" #: ds_judgements_public_ui/templates/includes/judgment_text_download_options.html:22 msgid "judgment.downloadoptions.xml.description" -msgstr "The judgment in machine-readable LegalXML format for developers, data scientists and researchers." +msgstr "The judgment in machine-readable LegalDocXML format for developers, data scientists and researchers." #: ds_judgements_public_ui/templates/includes/judgment_text_source.html:4 msgid "judgment.source_by" From 3e803fe1bb48798a86cfa08d5ac40402457d0249 Mon Sep 17 00:00:00 2001 From: Tim Cowlishaw Date: Fri, 16 Sep 2022 08:19:06 +0200 Subject: [PATCH 3/3] LegalDocXml -> LegalDocML --- locale/en_GB/LC_MESSAGES/django.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/en_GB/LC_MESSAGES/django.po b/locale/en_GB/LC_MESSAGES/django.po index e90911701..0ac94609a 100644 --- a/locale/en_GB/LC_MESSAGES/django.po +++ b/locale/en_GB/LC_MESSAGES/django.po @@ -145,7 +145,7 @@ msgstr "Download this judgment as XML" #: ds_judgements_public_ui/templates/includes/judgment_text_download_options.html:22 msgid "judgment.downloadoptions.xml.description" -msgstr "The judgment in machine-readable LegalDocXML format for developers, data scientists and researchers." +msgstr "The judgment in machine-readable LegalDocML format for developers, data scientists and researchers." #: ds_judgements_public_ui/templates/includes/judgment_text_source.html:4 msgid "judgment.source_by"