equal
deleted
inserted
replaced
90 |
90 |
91 def subject(self): |
91 def subject(self): |
92 return self._cw._('[%s supervision] changes summary') % self._cw.vreg.config.appid |
92 return self._cw._('[%s supervision] changes summary') % self._cw.vreg.config.appid |
93 |
93 |
94 def call(self, changes): |
94 def call(self, changes): |
95 user = self._cw.actual_session().user |
95 user = self._cw.user |
96 self.w(self._cw._('user %s has made the following change(s):\n\n') |
96 self.w(self._cw._('user %s has made the following change(s):\n\n') |
97 % user.login) |
97 % user.login) |
98 for event, changedescr in filter_changes(changes): |
98 for event, changedescr in filter_changes(changes): |
99 self.w(u'* ') |
99 self.w(u'* ') |
100 getattr(self, event)(changedescr) |
100 getattr(self, event)(changedescr) |
127 self.w(_(' from state %(fromstate)s to state %(tostate)s\n' % |
127 self.w(_(' from state %(fromstate)s to state %(tostate)s\n' % |
128 {'fromstate': _(fromstate.name), 'tostate': _(tostate.name)})) |
128 {'fromstate': _(fromstate.name), 'tostate': _(tostate.name)})) |
129 self.w(u' %s' % entity.absolute_url()) |
129 self.w(u' %s' % entity.absolute_url()) |
130 |
130 |
131 def _relation_context(self, changedescr): |
131 def _relation_context(self, changedescr): |
132 _ = self._cw._ |
132 session = self._cw |
133 session = self._cw.actual_session() |
133 _ = session._cw._ |
134 def describe(eid): |
134 def describe(eid): |
135 try: |
135 try: |
136 return _(session.describe(eid)[0]).lower() |
136 return _(session.describe(eid)[0]).lower() |
137 except UnknownEid: |
137 except UnknownEid: |
138 # may occurs when an entity has been deleted from an external |
138 # may occurs when an entity has been deleted from an external |