Link each row in the spreadsheet

We’ve heard from some users, especially those sending letters, that
they’d like to check that a spreadsheet they’ve uploaded has populated
the template correctly.

My reckon is that seeing just one row of the spreadsheet populate the
template isn’t enough to give people confidence that everything’s
working properly.

This commit adds links to all but the currently-previewed row. Clicking
that link will populate the preview with values from that row. These
pages already exist; they were created in this PR:
https://github.com/alphagov/notifications-admin/pull/1696
This commit is contained in:
Chris Hill-Scott
2018-01-15 11:25:11 +00:00
parent b5c114b66e
commit ba0a010d64
3 changed files with 22 additions and 5 deletions

View File

@@ -553,7 +553,8 @@ def _check_messages(service_id, template_type, upload_id, preview_row, letters_a
template.template_type == 'letter',
not request.args.get('from_test'),
)),
required_recipient_columns=OrderedSet(recipients.recipient_column_headers) - optional_address_columns
required_recipient_columns=OrderedSet(recipients.recipient_column_headers) - optional_address_columns,
preview_row=preview_row,
)