Merge pull request #10436 from prssanna/notifications-email

fix: include docname in notification email
This commit is contained in:
mergify[bot] 2020-06-19 05:12:08 +00:00 committed by GitHub
commit ff9e973ec8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View file

@ -100,14 +100,16 @@ def send_notification_email(doc):
)
def get_email_header(doc):
return {
docname = doc.document_name
header_map = {
'Default': _('New Notification'),
'Mention': _('New Mention'),
'Assignment': _('Assignment Update'),
'Share': _('New Document Shared'),
'Energy Point': _('Energy Point Update'),
}[doc.type or 'Default']
'Mention': _('New Mention on {0}').format(docname),
'Assignment': _('Assignment Update on {0}').format(docname),
'Share': _('New Document Shared {0}').format(docname),
'Energy Point': _('Energy Point Update on {0}').format(docname),
}
return header_map[doc.type or 'Default']
@frappe.whitelist()
def mark_all_as_read():

View file

@ -8,6 +8,5 @@
</blockquote>
{% endif %}
<div class="more-info">
<a href="{{ doc_link }}">{{ _("Login and view in Browser") }}</a>
<a href="{{ doc_link }}">{{ _("Open Document") }}</a>
</div>