equal
deleted
inserted
replaced
24 """this component is responsible to find recipients of a notification |
24 """this component is responsible to find recipients of a notification |
25 |
25 |
26 by default user's with their email set are notified if any, else the default |
26 by default user's with their email set are notified if any, else the default |
27 email addresses specified in the configuration are used |
27 email addresses specified in the configuration are used |
28 """ |
28 """ |
29 id = 'recipients_finder' |
29 __regid__ = 'recipients_finder' |
30 __select__ = yes() |
30 __select__ = yes() |
31 user_rql = ('Any X,E,A WHERE X is CWUser, X in_state S, S name "activated",' |
31 user_rql = ('Any X,E,A WHERE X is CWUser, X in_state S, S name "activated",' |
32 'X primary_email E, E address A') |
32 'X primary_email E, E address A') |
33 |
33 |
34 def recipients(self): |
34 def recipients(self): |
57 SendMailOp(self.req, recipients=recipients, msg=msg) |
57 SendMailOp(self.req, recipients=recipients, msg=msg) |
58 send = send_on_commit |
58 send = send_on_commit |
59 |
59 |
60 |
60 |
61 class StatusChangeMixIn(object): |
61 class StatusChangeMixIn(object): |
62 id = 'notif_status_change' |
62 __regid__ = 'notif_status_change' |
63 msgid_timestamp = True |
63 msgid_timestamp = True |
64 message = _('status changed') |
64 message = _('status changed') |
65 content = _(""" |
65 content = _(""" |
66 %(user)s changed status from <%(previous_state)s> to <%(current_state)s> for entity |
66 %(user)s changed status from <%(previous_state)s> to <%(current_state)s> for entity |
67 '%(title)s' |
67 '%(title)s' |
87 * set id and __select__ attributes to match desired events and entity types |
87 * set id and __select__ attributes to match desired events and entity types |
88 * set a content attribute to define the content of the email (unless you |
88 * set a content attribute to define the content of the email (unless you |
89 override call) |
89 override call) |
90 """ |
90 """ |
91 __abstract__ = True |
91 __abstract__ = True |
92 id = 'notif_after_add_entity' |
92 __regid__ = 'notif_after_add_entity' |
93 msgid_timestamp = False |
93 msgid_timestamp = False |
94 message = _('new') |
94 message = _('new') |
95 content = """ |
95 content = """ |
96 %(title)s |
96 %(title)s |
97 |
97 |