Merge pull request #10436 from prssanna/notifications-email
fix: include docname in notification email
This commit is contained in:
commit
ff9e973ec8
2 changed files with 9 additions and 8 deletions
|
|
@ -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():
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue