FIX: fixed missing name of acceptor in email messages about accepted
mails.
This commit is contained in:
@@ -90,15 +90,15 @@ class EventUpdatedMail(AbstractEventMail):
|
||||
_subject = u'Veranstaltung geändert'
|
||||
_template_name = 'dav_events/emails/event_updated.txt'
|
||||
|
||||
def __init__(self, diff=None, editor=None, *args, **kwargs):
|
||||
self._diff = diff
|
||||
def __init__(self, editor=None, diff=None, *args, **kwargs):
|
||||
self._editor = editor
|
||||
self._diff = diff
|
||||
super(EventUpdatedMail, self).__init__(*args, **kwargs)
|
||||
|
||||
def _get_context_data(self, extra_context=None):
|
||||
context = super(EventUpdatedMail, self)._get_context_data(extra_context=extra_context)
|
||||
context['editor'] = self._editor
|
||||
context['diff'] = self._diff
|
||||
context['editor'] = self._editor.get_full_name()
|
||||
return context
|
||||
|
||||
|
||||
@@ -125,17 +125,28 @@ class EventAcceptedMail(AbstractEventMail):
|
||||
_subject = u'Veranstaltung freigegeben'
|
||||
_template_name = 'dav_events/emails/event_accepted.txt'
|
||||
|
||||
def __init__(self, editor=None, *args, **kwargs):
|
||||
self._editor = editor
|
||||
super(EventAcceptedMail, self).__init__(*args, **kwargs)
|
||||
|
||||
def _get_context_data(self, extra_context=None):
|
||||
context = super(EventAcceptedMail, self)._get_context_data(extra_context=extra_context)
|
||||
context['editor'] = self._editor
|
||||
return context
|
||||
|
||||
|
||||
class EventToPublishMail(AbstractEventMail):
|
||||
_subject = u'Veranstaltung veröffentlichen'
|
||||
_template_name = 'dav_events/emails/event_to_publish.txt'
|
||||
|
||||
def __init__(self, confirm_publication_action=None, *args, **kwargs):
|
||||
def __init__(self, editor=None, confirm_publication_action=None, *args, **kwargs):
|
||||
self._editor = editor
|
||||
self._confirm_publication_action = confirm_publication_action
|
||||
super(EventToPublishMail, self).__init__(*args, **kwargs)
|
||||
|
||||
def _get_context_data(self, extra_context=None):
|
||||
context = super(EventToPublishMail, self)._get_context_data(extra_context=extra_context)
|
||||
context['editor'] = self._editor
|
||||
context['confirm_publication_url'] = self._confirm_publication_action.get_absolute_url()
|
||||
return context
|
||||
|
||||
|
||||
Reference in New Issue
Block a user