Add multiple ‘edit’ links for letter templates

Letter templates have (or will have) multiple different editable
regions. I think that the most intuitive way for this to work is to have
- an edit link for each of these areas
- positioned next to the thing to be edited

Again, this isn’t fully hooked up, but since no-one is using letters
live yet this is a good way of getting research feedback and pointing
towards where we want the feature to go.

Uses percentages for the positioning so that the alignment is maintained
on mobile.
This commit is contained in:
Chris Hill-Scott
2017-03-13 10:55:15 +00:00
parent e391c7092a
commit dfcfe6a91e
8 changed files with 75 additions and 24 deletions

View File

@@ -564,10 +564,11 @@ def test_should_show_page_for_a_deleted_template(
assert response.status_code == 200
content = response.get_data(as_text=True)
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
assert url_for("main.edit_service_template", service_id=fake_uuid, template_id=fake_uuid) not in content
assert url_for("main.send_from_api", service_id=fake_uuid, template_id=fake_uuid) not in content
assert url_for("main.send_test", service_id=fake_uuid, template_id=fake_uuid) not in content
assert "This template was deleted<br/>1 January 2016" in content
assert page.select('p.hint')[0].text.strip() == 'This template was deleted today at 3:00pm.'
mock_get_deleted_template.assert_called_with(service_id, template_id)