appy.bin: backup.py: added field 'To' to mails sent by the backup procedure (so it not less directly considered as junk mail); bugfix in job.py used with Appy > 0.8; appy.gen: optimized performance (methods defined in 'show' attrs were called twice on edit.pt and view.pt); appy.gen: added String.richText allowing to have ckeditor with more text-formatting icons; added ckeditor 'show source' button by default (impossible to live without that); appy.gen: solved security-related problems; appy.gen.mail: allowto send mail as authenticated user; appy.gen: bugfixes in pages when rendered by IE.
This commit is contained in:
parent
459a714b76
commit
6245023365
21 changed files with 233 additions and 148 deletions
|
@ -30,16 +30,23 @@ class ToolWrapper(AbstractWrapper):
|
|||
return NOT_UNO_ENABLED_PYTHON % value
|
||||
return True
|
||||
|
||||
def isManager(self):
|
||||
'''Some pages on the tool can only be accessed by God.'''
|
||||
if self.user.has_role('Manager'): return 'view'
|
||||
|
||||
podOutputFormats = ('odt', 'pdf', 'doc', 'rtf')
|
||||
def getPodOutputFormats(self):
|
||||
'''Gets the available output formats for POD documents.'''
|
||||
return [(of, self.translate(of)) for of in self.podOutputFormats]
|
||||
|
||||
def getInitiator(self):
|
||||
def getInitiator(self, field=False):
|
||||
'''Retrieves the object that triggered the creation of the object
|
||||
being currently created (if any).'''
|
||||
being currently created (if any), or the name of the field in this
|
||||
object if p_field is given.'''
|
||||
nav = self.o.REQUEST.get('nav', '')
|
||||
if nav: return self.getObject(nav.split('.')[1])
|
||||
if not nav or not nav.startswith('ref.'): return
|
||||
if not field: return self.getObject(nav.split('.')[1])
|
||||
return nav.split('.')[2].split(':')[0]
|
||||
|
||||
def getObject(self, uid):
|
||||
'''Allow to retrieve an object from its unique identifier p_uid.'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue