Commit Graph

67 Commits

Author SHA1 Message Date
Tom Byers
c1b8fb7531 Replace all visually-hidden classes
These have been replaced:

https://design-system.service.gov.uk/get-started/updating-your-code/#helper-class-names
2019-11-27 14:15:32 +00:00
Tom Byers
e09d510ab8 Revert "Replace govuk template with govuk frontend components - rewrite" 2019-11-26 12:14:09 +00:00
Tom Byers
2bd7ce8cf6 Replace all visually-hidden classes
These have been replaced:

https://design-system.service.gov.uk/get-started/updating-your-code/#helper-class-names
2019-11-25 11:43:30 +00:00
Tom Byers
e02f94f238 Revert "Replace govuk template with govuk frontend components" 2019-11-25 10:37:35 +00:00
Tom Byers
c3b2d3c521 Replace all visually-hidden classes
These have been replaced:

https://design-system.service.gov.uk/get-started/updating-your-code/#helper-class-names
2019-11-22 17:45:45 +00:00
Chris Hill-Scott
772066164c Only print the id attribute if it’s a string
If it’s something weird like an instance of a Python object let’s ignore
it (else we get invalid HTML like
`id='<notifications_utils.columns.Cell object at 0x1126f4e80>'`).
2019-06-17 17:09:45 +01:00
Chris Hill-Scott
3c6598cbc2 Only link to message status if message has failed
This retores the behaviour to as it was before
https://github.com/alphagov/notifications-admin/pull/2962
which inadvertently started linking to the guidance for messages that
were delivered or in sending.
2019-05-13 13:29:47 +01:00
Katie Smith
f3f8f4085f Fix broken links
There were still a few links pointing to `/features/using-notify`
2019-05-10 09:05:07 +01:00
Chris Hill-Scott
0512f40ad3 Fix misleading class name
Not sure where this came from, but visually our tables have always
aligned text to the left by default.
2019-04-29 16:36:47 +01:00
Chris Hill-Scott
da19c0b4ad Remove bullets from lists in tables
I think this is something we inherited from the Digital Marketplace
code. We only use this for organisation settings are the moment, but
the list markers are redundant because each item will never wrap onto a
new line; it will truncate instead. Still keeps a little sliver of
spacing just so it doesn’t look like a paragraph.
2019-04-24 16:11:32 +01:00
Chris Hill-Scott
feabcbc7bf Fix display of perm. failure on notifications page
It had too much whitespace because it was accidentally being given the
wrong class.

This commit undoes the change that caused it (which was while working on
letters) and beefs up our tests for email and text messages (so if this
happened again the tests would catch it).
2019-01-15 13:51:32 +00:00
Chris Hill-Scott
5c4ff09d48 Treat permanent failure for letters the same as cancelled 2019-01-14 10:16:01 +00:00
Chris Hill-Scott
989875294b Make technical failure letters show up on the activity page 2019-01-11 16:55:37 +00:00
Katie Smith
bb7e9726d3 Stop showing validation-failed letters as cancelled in table
Changed the table for displaying all notifications to show letters which
have the status of 'validation-failed' as 'Validation failed' instead of
'Cancelled'.

The individual notification page for a letter which has failed
validation has not been changed since this already has a description
(letter has content outside the printable area).
2019-01-09 13:10:36 +00:00
Katie Smith
429a23934d Display cancelled letters show as failed
In the long term, we don't want to show cancelled letters. But for now,
this changes cancelled letters to display in the same way that letters
with a status of permanent-failure, since we are currently giving
letters that we want to cancel the status of permanent failure.
2018-12-05 11:03:59 +00:00
Katie Smith
3431996860 Add required argument to function 2018-10-30 07:56:27 +00:00
Chris Hill-Scott
f1a9761ea1 Show letters that fail validation as cancelled
At the moment we show precompiled letters that have failed the
validation as having been sent. This is confusing.

We should communicate it as having been cancelled (rather than failed),
with the implication being that Notify has come along and cancelled the
letter before printing it. I think this is conceptually what makes the
most sense.

From the user’s point of view any letters that show up as cancelled
probably need to be fixed and resent, so it makes sense to group them
with the same name.
2018-10-29 12:13:33 +00:00
Chris Hill-Scott
c01d761a3c Show if a letter has been cancelled
At the moment we are manually cancelling letters for people when they
ask us to. Once’s we’ve done this there is no indication that it’s
happened except for the date going red on the list of letters.

This commit adds some error messaging and styling to show when a letter
is cancelled.

Letting people cancel their own letters will be a future enhancement.
2018-10-29 11:51:41 +00:00
Chris Hill-Scott
0d0d95a75a Format ‘pending’ messages the same as ‘sending’
For reasons I don’t understand some of our text messages get marked as `pending`. Since we don’t account for this in the front end they don’t get displayed quite right (the vertical position of the text is too high). This commit adds the pending `state` to the `if` statement so the text is properly aligned.
2018-10-11 11:08:32 +01:00
Chris Hill-Scott
a35ce8eb89 Add Jinja macro for a row on the settings page
Often we show/hide these rows based on what permissions a service has.
This commits refactors that check into a reusable macro, rather than
having to write the same `if` statements all the time.
2018-07-10 11:44:40 +01:00
Katie Smith
0633af4e4a Truncate contact link text on settings page
The contact link on the settings page should be truncated instead of the
text being wrapped and overflowing on to multiple lines. This adds in an
option to the text_field macro to truncate long text fields. This
setting has been used to truncate the API callback URLs too on the
services/<service_id>/api/callbacks page.
2018-06-12 10:21:24 +01:00
Katie Smith
4db75f6a58 Display the two new virus states for letters
Precompiled letters can now have two additional states:
* pending-virus-check
* virus-scan-failed

Both new states should show in the notifications dashboard, and
virus-scan-failed should appear as an error state, with a descriptive
message. You should not be able to preview a letter in one of the two
new states, so the preview link has been removed for precompiled letters
in these states.
2018-03-20 14:54:29 +00:00
Chris Hill-Scott
548ece6c22 Merge pull request #1925 from alphagov/refactored-csv-processing
Bring in refactored CSV processing
2018-03-09 15:16:37 +00:00
Chris Hill-Scott
7609ad3f8c Filter empty items out of lists
The email template does this already when formatting the body of the
message. But the spreadsheet preview doesn’t, which means you get lists
like:
- thing
- thing
- None

This commit fixes that.

This was a pre-existing bug, but gonna roll it in with this PR.
2018-03-09 15:13:21 +00:00
Chris Hill-Scott
d90cdc1f81 Don’t change colour of sent date for letters
For text messages/emails it makes sense for ‘sending’ to be gray and
‘delivered’ to be black. But since we don’t show sending/delivered for
letters it doesn’t make sense for the text to change colour.
2018-03-06 13:51:50 +00:00
Leo Hemsted
7f268c0ab3 don't allow us to create permissions decorator without permissions
ie: not for an organisation, and not for a service
2018-03-06 13:08:07 +00:00
Leo Hemsted
3afc193624 remove any_ from has_permissions
we branch on any_ to either say "require ALL these permissions" or
"require ANY of these permissions". But we only ever call the decorator
with one permission, or with any_=True, so it's unnecessary
2018-03-06 13:08:07 +00:00
Leo Hemsted
4a08cf81e7 remove admin_override from all has_permissions usage
as previously pointed out, it's not used anywhere.
2018-03-06 13:08:07 +00:00
chrisw
5d26d4457f manage api keys permission should be able to see senders 2018-02-08 11:25:49 +00:00
chrisw
82302626ad Include letters on monthly messages sent 2018-01-30 12:08:46 +00:00
Chris Hill-Scott
8cc8a0bf05 Change None to Not set
‘None’ is a bit Pythony. ‘Not set’ is a bit more human.
2017-10-23 17:45:43 +01:00
Chris Hill-Scott
521b5b6cf1 Add ‘optional text’ macro
This pattern of value or grey text saying `None` is common enough in our
app that we should codify it into a pattern. Which this commit does.
2017-10-23 17:45:43 +01:00
chrisw
43395bc9d9 Added letters info to service / admin dashboard & activity page 2017-10-03 10:28:34 +01:00
chrisw
f012ec57c0 Allow user to add multiple reply-to addresses 2017-09-25 17:05:41 +01:00
Chris Hill-Scott
202c9aea62 Hide status for individual letters
The status for each letter in a job will be the same for every single
letter (at least until we start dealing with returns).

It’s redundant to show this information over and over again. This commit
removes it.
2017-07-18 10:37:54 +01:00
Chris Hill-Scott
9f20ea4b7e Revert "Merge pull request #1336 from alphagov/revert-show-notifications"
This reverts commit 7e354ff341, reversing
changes made to 6f3bcff32f.
2017-06-30 14:01:18 +01:00
Chris Hill-Scott
b450a349a3 Revert "Merge pull request #1328 from alphagov/notification-page-reworked"
This reverts commit 1797162248, reversing
changes made to 95b4d9eb31.
2017-06-23 15:56:25 +01:00
Chris Hill-Scott
b8cc0de44e Use file list pattern for notifications
Most of our tables are now lists which have:
- a thing you click on
- some secondary info about that thing underneath
- some extra numbers/status on the right hand side

Since these are so similar, they should share the same pattern, which
this commit does (using the `file-list` pattern).

Visually this means:
- the secondary text on the inbox becomes grey not black, for
  consistency
- the status bit of the notifications tables bottom align like the
  status of messages in the inbox

These both seem like OK changes to make for the sake of consistency.
2017-06-21 17:57:20 +01:00
Chris Hill-Scott
f150e2be12 Refactor on/off table fields into component
There’s a lot of repeated code in our Jinja templates for the settings
page.

We already have a `boolean_field` component, but it’s not used anywhere
(it was just lifted from Digital Marketplace).

So this commit changes the `boolean_field` component to be useful for
our on/off use case, and wires it into the settings page.
2017-06-07 15:07:20 +01:00
Chris Hill-Scott
ad5fc9a583 Put error flag on whole row
We’ve seen people miss errors if they’re in the right-hand columns of
the spreadsheet because people’s eyes scan down the left edge of the
table.
2017-05-23 14:33:22 +01:00
Chris Hill-Scott
ec33f843ef Use small font sizes in tables by default
GOV.UK Elements changed tables to be a larger font size here:
https://github.com/alphagov/govuk_elements/pull/185

This is good in principle (and a lot of our tables are 19px already).
However, the ones that aren’t are still 16px because there’s a lot of
info to fit on the page (eg when previewing someone’s CSV file).
2017-04-10 14:54:28 +01:00
Chris Hill-Scott
b0a995beb2 Handle lists as CSV field values
Brings in:
- [ ] https://github.com/alphagov/notifications-utils/pull/128

This means that `RecipientCSV` will sometimes return the value of a cell
in a spreadsheet as a `list`, not a `string`. So we need to handle that,
rather than putting a Python representation (`['one', 'two', 'three']`)
on the page.

This commit handles it by putting a bulleted list on the page instead.

This breaks our model of showing the spreadsheet as it appears in Excel
or whatever, because we’re showing the aggregation of the columns into a
list. However:
- this is the easier thing to do for now
- it might actually be more usable because it keeps the table narrower
2017-04-04 09:35:15 +01:00
Chris Hill-Scott
2f68dc613c Put template IDs back on the dashboard
Removed as part of refactoring the code to generate the graphs of
template usage on the dashboard:
4a226a7a29 (diff-cf78cb5c29a2d3c4d45b61d8617824b7L29)

Didn’t realise that they were used by the functional tests.

This commit puts them back while keeping the code reuse.
2017-03-20 12:27:37 +00:00
Chris Hill-Scott
4a226a7a29 Show template usage broken down by month
This follows on from:
- https://github.com/alphagov/notifications-admin/pull/1094
- https://github.com/alphagov/notifications-admin/pull/1109

It depends on:
- [ ] https://github.com/alphagov/notifications-api/pull/829

A year is too long. Month-by-month is a better timeframe for making
decisions or seeing patterns in your usage.
2017-03-16 14:04:37 +00:00
Chris Hill-Scott
416bb4d934 Revert "Add extra text to label rows for screenreaders"
This reverts commit 549695de4e.

This was not the correct solution to the problem identified.
2017-02-23 16:03:50 +00:00
Chris Hill-Scott
2ecfc2bb80 Fix invalid nesting of HTML elements
In HTML you generally can’t nest an inline level element inside a block
level one, if you want your HTML to validate.

There were a couple of places where we were using a `<span>` as a
containing element:
- inside every table cell (think we inherited this from Digital
  Marketplace)
- in the ‘pill’ navigation component for the selected tab

This meant that when we put components like big number inside these,
the resulting HTML was invalid, because big number is built with a bunch
of `<div>`s, which are block level.

This commit removes the use of a `<span>` tag in these places, and
replaces it with a `<div>`. Nesting block level elements in fine in
HTML.
2017-02-14 15:19:08 +00:00
Chris Hill-Scott
549695de4e Add extra text to label rows for screenreaders
This is mainly for the ‘check’ page where we show users the contents of
their spreadsheet.

> The structure of the table means that the first cell is treated as a
> column header, so moving through columns in row 2 for example
> associates the data 2 with 1 (column header) - this has no logical
> meaning
2017-02-14 11:51:38 +00:00
Imdad Ahad
eaa246bd26 Use SASS var for border colour and correct closing tbody tag 2016-11-14 16:00:45 +00:00
Imdad Ahad
7e269a454a Show more granular email & sms counts on platform admin page 2016-11-14 14:46:26 +00:00
Chris Hill-Scott
e9d230b9a4 Always show created time for sending state
When a notification is in `created` or `sending` the thing you care
about is how long it’s been sitting there.
2016-09-13 10:37:38 +01:00