backoffice: add a link to the originating mail (#8446)
This commit is contained in:
parent
ffd3200c06
commit
4f421ba215
|
@ -416,6 +416,7 @@ def test_backoffice_submission_context(pub):
|
|||
|
||||
number31.submission_context = {
|
||||
'channel': 'mail',
|
||||
'mail_url': 'http://www.example.com/test.pdf',
|
||||
'thumbnail_url': 'http://www.example.com/thumbnail.png',
|
||||
'user_id': user.id,
|
||||
'comments': 'test_backoffice_submission_context',
|
||||
|
@ -425,6 +426,7 @@ def test_backoffice_submission_context(pub):
|
|||
resp = resp.click(href='%s/' % number31.id)
|
||||
assert 'Channel' in resp.body
|
||||
assert 'http://www.example.com/thumbnail.png' in resp.body
|
||||
assert 'http://www.example.com/test.pdf' in resp.body
|
||||
assert 'Associated User' in resp.body
|
||||
assert 'test_backoffice_submission_context' in resp.body
|
||||
|
||||
|
|
|
@ -1219,6 +1219,9 @@ class FormBackOfficeStatusPage(FormStatusPage):
|
|||
if extra_context.get('thumbnail_url'):
|
||||
r += htmltext('<p class="thumbnail"><img src="%s" alt=""/></p>'
|
||||
) % extra_context.get('thumbnail_url')
|
||||
if extra_context.get('mail_url'):
|
||||
r += htmltext('<p><a href="%s">%s</a></p>') % (
|
||||
extra_context.get('mail_url'), _('Open'))
|
||||
if extra_context.get('user_id'):
|
||||
r += htmltext('<h3>%s</h3>') % _('Associated User')
|
||||
r += htmltext('<p>%s</p>') % get_publisher().user_class.get(
|
||||
|
|
Loading…
Reference in New Issue