Changeset 8758
- Timestamp:
- 19 Jun 2012, 07:47:21 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/objecthistory.py
r8234 r8758 64 64 user = get_current_principal() 65 65 if user is None: 66 user = 'system'66 usertitle = 'system' 67 67 elif user.id == 'zope.anybody': 68 user = 'Anonymous'68 usertitle = 'Anonymous' 69 69 else: 70 user = user.title 70 usertitle = getattr(user, 'public_name', None) 71 if not usertitle: 72 usertitle = user.title 71 73 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 72 74 by = translate(_('by'),'waeup.kofa',target_language=portal_language) 73 75 msg = translate(msg,'waeup.kofa',target_language=portal_language) 74 msg = u'%s - %s %s %s' % (timestamp, msg, by, user )76 msg = u'%s - %s %s %s' % (timestamp, msg, by, usertitle) 75 77 msgs.append(msg) 76 78 self._annotations[self.history_key] = msgs -
main/waeup.kofa/trunk/src/waeup/kofa/payments/payment.py
r8703 r8758 88 88 usertitle = 'system' 89 89 else: 90 usertitle = user.title 90 usertitle = getattr(user, 'public_name', None) 91 if not usertitle: 92 usertitle = user.title 91 93 r_desc = _('Payment approved by ${a}', mapping = {'a': usertitle}) 92 94 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r8732 r8758 900 900 self.assertTrue('Student has been cleared' in self.browser.contents) 901 901 self.assertTrue('cleared' in self.browser.contents) 902 self.browser.open(self.history_path) 903 self.assertTrue('Cleared by Carlo Pitter' in self.browser.contents) 904 # Hide real name. 905 self.app['users']['mrclear'].public_name = 'My Public Name' 906 self.browser.open(self.clearance_path) 902 907 self.browser.getLink("Reject clearance").click() 903 908 self.assertTrue('Clearance has been annulled' in self.browser.contents) … … 907 912 '/contactstudent?subject=%s' % urlmessage) 908 913 self.assertTrue('clearance started' in self.browser.contents) 914 self.browser.open(self.history_path) 915 self.assertTrue("Reset to 'clearance' by My Public Name" in 916 self.browser.contents) 909 917 IWorkflowInfo(self.student).fireTransition('request_clearance') 910 918 self.browser.open(self.clearance_path)
Note: See TracChangeset for help on using the changeset viewer.