From 46a4e1c6124ad3a12a03d9e5082bce3017ba945e Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 19 Feb 2020 08:20:38 +0000 Subject: [PATCH] Add a macro for generating current service links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a convenient way of being able to link into pages of the the app from guidance. It handles the case where the current service is not known, either because the user hasn’t chosen one, or because they’re not signed in. This commit also cleans up some unused Jinja imports. --- .../components/current-service-link.html | 7 ++++ .../guidance/branding-and-customisation.html | 33 +++++++++---------- .../guidance/create-and-send-messages.html | 11 +++---- .../guidance/edit-and-format-messages.html | 9 +++-- .../views/guidance/send-files-by-email.html | 7 ++-- .../views/guidance/upload-a-letter.html | 15 ++++----- 6 files changed, 41 insertions(+), 41 deletions(-) create mode 100644 app/templates/components/current-service-link.html diff --git a/app/templates/components/current-service-link.html b/app/templates/components/current-service-link.html new file mode 100644 index 000000000..807ba8ac4 --- /dev/null +++ b/app/templates/components/current-service-link.html @@ -0,0 +1,7 @@ +{% macro current_service_link(endpoint, link_text) %} + {% if current_service %} + {{ link_text }} + {% else %} + {{ link_text|capitalize }} + {% endif %} +{% endmacro %} diff --git a/app/templates/views/guidance/branding-and-customisation.html b/app/templates/views/guidance/branding-and-customisation.html index 18bb83068..cc68bcb75 100644 --- a/app/templates/views/guidance/branding-and-customisation.html +++ b/app/templates/views/guidance/branding-and-customisation.html @@ -1,6 +1,5 @@ {% extends "content_template.html" %} -{% from "components/table.html" import mapping_table, row, text_field, edit_field, field with context %} -{% from "components/sub-navigation.html" import sub_navigation %} +{% from "components/current-service-link.html" import current_service_link %} {% block per_page_title %} Branding and customisation @@ -9,59 +8,59 @@ {% block content_column_content %}

Branding and customisation

- +

This page explains how to:

- + - +

Change your email branding

The default branding for email templates is the GOV.UK logo.

- +

To change your email branding:

    -
  1. Go to the Email settings section of the Settings page.
  2. +
  3. Go to the Email settings section of the {{ current_service_link('main.service_settings', 'settings') }} page.
  4. Select Change on the Email branding row.

Add a reply-to email address

- +

You can choose the email address that your users reply to. You must add at least one reply-to address for your service before you can request to go live.

To add a reply-to email address:

    -
  1. Go to the Email settings section of the Settings page.
  2. +
  3. Go to the Email settings section of the {{ current_service_link('main.service_settings', 'settings') }} page.
  4. Select Manage on the Reply-to email addresses row.
  5. Select Add reply-to address.
- +

Change the text message sender

- +

The text message sender tells your users who the message is from.

To change the text message sender from the default of ‘GOVUK’:

- +
    -
  1. Go to the Text message settings section of the Settings page.
  2. +
  3. Go to the Text message settings section of the {{ current_service_link('main.service_settings', 'settings') }} page.
  4. Select Manage on the Text message senders row.
  5. Select Change or Add text message sender.

Change your letter branding

- +

Letter templates do not have default branding.

- +

To add a logo to your letters:

- +
    -
  1. Go to the Letter settings section of the Settings page.
  2. +
  3. Go to the Letter settings section of the {{ current_service_link('main.service_settings', 'settings') }} page.
  4. Select Change on the Letter branding row.
diff --git a/app/templates/views/guidance/create-and-send-messages.html b/app/templates/views/guidance/create-and-send-messages.html index 09b8334ba..fa905b33d 100644 --- a/app/templates/views/guidance/create-and-send-messages.html +++ b/app/templates/views/guidance/create-and-send-messages.html @@ -1,6 +1,5 @@ {% extends "content_template.html" %} -{% from "components/table.html" import mapping_table, row, text_field, edit_field, field with context %} -{% from "components/sub-navigation.html" import sub_navigation %} +{% from "components/current-service-link.html" import current_service_link %} {% block per_page_title %} Send messages @@ -9,15 +8,15 @@ {% block content_column_content %}

Send messages

- +

Create an account to see a short tutorial explaining how to create and send messages.

- +

Bulk sending

To send a batch of messages at once:

    -
  1. Go to the Templates page and choose an existing template.
  2. +
  3. Go to the {{ current_service_link('main.choose_template', 'templates') }} page and choose an existing template.
  4. Select Send.
  5. If you’re sending emails, select Upload a list of email addresses. If you’re sending text messages, select Upload a list of phone numbers. If you’re sending letters, select Upload a list of addresses.
  6. - + {% endblock %} diff --git a/app/templates/views/guidance/edit-and-format-messages.html b/app/templates/views/guidance/edit-and-format-messages.html index 6e80f3dee..a80655a81 100644 --- a/app/templates/views/guidance/edit-and-format-messages.html +++ b/app/templates/views/guidance/edit-and-format-messages.html @@ -1,6 +1,5 @@ {% extends "content_template.html" %} -{% from "components/table.html" import mapping_table, row, text_field, edit_field, field with context %} -{% from "components/sub-navigation.html" import sub_navigation %} +{% from "components/current-service-link.html" import current_service_link %} {% block per_page_title %} Edit and format messages @@ -23,7 +22,7 @@

    You can see a list of formatting instructions on the edit template page:

      -
    1. Go to the Templates page.
    2. +
    3. Go to the {{ current_service_link('main.choose_template', 'templates') }} page.
    4. Add a new template or choose an existing template and select Edit.
    @@ -62,7 +61,7 @@

    To add a placeholder to the template:

      -
    1. Go to the Templates page.
    2. +
    3. Go to the {{ current_service_link('main.choose_template', 'templates') }} page.
    4. Add a new template or choose an existing template and select Edit.
    5. Add a placeholder using double brackets. For example: Hello ((first name)), your reference is ((ref number)).
    6. Select Save.
    7. @@ -82,7 +81,7 @@

      To add optional content to your emails and text messages:

        -
      1. Go to the Templates page.
      2. +
      3. Go to the {{ current_service_link('main.choose_template', 'templates') }} page.
      4. Add a new template or choose an existing template and select Edit.
      5. Use double brackets and ?? to define optional content. For example, if you only want to show something to people who are under 18: ((under18??Please get your application signed by a parent or guardian.))
      6. Select Save.
      7. diff --git a/app/templates/views/guidance/send-files-by-email.html b/app/templates/views/guidance/send-files-by-email.html index 329eb24b9..331039a2e 100644 --- a/app/templates/views/guidance/send-files-by-email.html +++ b/app/templates/views/guidance/send-files-by-email.html @@ -1,6 +1,4 @@ {% extends "content_template.html" %} -{% from "components/table.html" import mapping_table, row, text_field, edit_field, field with context %} -{% from "components/sub-navigation.html" import sub_navigation %} {% block per_page_title %} Send files by email @@ -9,10 +7,9 @@ {% block content_column_content %}

        Send files by email

        - +

        Contact us if you want to send files by email.

        Then follow the instructions to send a file by email in our API documentation.

        - + {% endblock %} - diff --git a/app/templates/views/guidance/upload-a-letter.html b/app/templates/views/guidance/upload-a-letter.html index 2fbbec5d2..42f33d765 100644 --- a/app/templates/views/guidance/upload-a-letter.html +++ b/app/templates/views/guidance/upload-a-letter.html @@ -1,6 +1,5 @@ {% extends "content_template.html" %} -{% from "components/table.html" import mapping_table, row, text_field, edit_field, field with context %} -{% from "components/sub-navigation.html" import sub_navigation %} +{% from "components/current-service-link.html" import current_service_link %} {% block per_page_title %} Upload a letter @@ -9,13 +8,13 @@ {% block content_column_content %}

        Upload a letter

        - +

        You can upload and send your own letters instead of creating a reusable letter template.

        - +

        To upload and send a letter from a PDF file:

        - +
          -
        1. Go to the Uploads page.
        2. +
        3. Go to the {{ current_service_link('main.uploads', 'uploads') }} page.
        4. Select Upload a letter.
        5. Select Choose file.
        @@ -30,9 +29,9 @@
      8. 10 pages or less
      9. smaller than 2MB
      10. - +

        The content of your letter must appear inside the printable area.

        - +

        To help you set up your letter, you can download our: