Because the header bar now defaults to blue instead of red, live
needs to be explicitly set to have a red header bar.
This also updates the config to staging, which used to inherit from the
preview one (and get an orange header) but now inherits from the base
config, and so needs its header colour setting explicitly as well.
branch for "has service sent anything today" was around the intial
paragraph, rather than around the "you can still send..." bit -
they should always see the first paragraph, especially the bit that
points out if they're in trial mode. They don't need to see how
many messages they have remaining today if it's the same amount as
their daily limit.
to help get rid of notification statistics tables, move over the
job page. fortunately its required data format is almost identical
to the return value of the detailed service endpoint, so little
work is required - only to add a sending column
we don't want to use the old statistics endpoints any more
also a couple of quality of life changes
* moves some logic out of the _totals.html template
* tidies up statistics_utils
When we say ‘delivery information is available for 7 days’ you have to
infer _when_ the seven days starts. When you come back to the page it
still says ‘available for 7 days’ even if you only have a day left to
download it. This is confusing.
This commit changes the text to be relative to now, eg ‘available for 7
days’, ‘available for 1 day’.
The date is counted to midnight on the seventh day, which is when the
data is actually deleted.
The previous text didn’t make it clear _what_ you were downloading as a
CSV file, you had to infer it from the context.
And the fact that it’s a CSV file is immaterial, it’s the data you care
about, not the format.
Tables with a `layout` of `fixed` determine column widths from the
width of the column headings.
We weren’t setting the width of the first column heading, so our tables
were getting out of alignment.
There’s no point in collapsing […] the email on the single template
page because it’s the only thing on the page.
Users will probably be going back and forth quite a bit to edit their
template and see the changes; they shouldn’t have to expanded it evey
time to check they’ve got the heading syntax right, for example.
Implements: https://github.com/alphagov/notifications-utils/pull/51
Copies the same regex.
Adds some CSS to display conditional placeholders differently to
normal placeholders (vertical rather that curved right-hand edge).
Currently images in our email template are hardcoded to be served from
the live domain[1].
In order for the admin app, running locally or in preview/staging, to be
able to load these images when previewing an email template, the CSP
headers need to allow this domain.
Also splits the header string up using string literal concatenation[2]
so that it’s easier to read.
1. https://notifications.service.gov.uk
2. https://docs.python.org/3/reference/lexical_analysis.html#string-literal-concatenation