Minor changes and bugfixes.

This commit is contained in:
Gaetan Delannay 2012-04-19 09:20:15 +02:00
parent abdd0ee52d
commit af351f87d3
3 changed files with 7 additions and 4 deletions

View file

@ -2731,7 +2731,8 @@ class WorkflowAnonymous:
'''One-state workflow allowing anyone to consult and Manager to edit.'''
mgr = 'Manager'
o = 'Owner'
active = State({r:(mgr, 'Anonymous'), w:(mgr,o), d:(mgr,o)}, initial=True)
active = State({r:(mgr, 'Anonymous', 'Authenticated'), w:(mgr,o),d:(mgr,o)},
initial=True)
WorkflowAnonymous.__instance__ = WorkflowAnonymous()
class WorkflowAuthenticated:

View file

@ -1334,6 +1334,7 @@ class BaseMixin:
def getUserLanguage(self):
'''Gets the language (code) of the current user.'''
if not hasattr(self, 'REQUEST'): return 'en'
# Try first the "LANGUAGE" key from the request
res = self.REQUEST.get('LANGUAGE', None)
if res: return res
@ -1427,8 +1428,8 @@ class BaseMixin:
def download(self, name=None):
'''Downloads the content of the file that is in the File field whose
name is in the request. This name can also represent an attribute
storing an image within a rich text field. If p_name is not given, it is retrieved
from the request.'''
storing an image within a rich text field. If p_name is not given, it
is retrieved from the request.'''
name = self.REQUEST.get('name')
if not name: return
if '_img_' not in name:

View file

@ -2,7 +2,8 @@ body { font: 75% Helvetica,Arial,sans-serif; background-color: #EAEAEA;
margin-top: 18px}
pre { font: 100% Helvetica,Arial,sans-serif; margin: 0}
h1 { font-size: 11pt; margin:0;}
h2 { font-size: 10pt; margin:0; font-style: italic; font-weight: normal;}
h2 { font-size: 10pt; margin:0; font-style: italic; font-weight: normal;
background-color: #d7dee4}
h3 { font-size: 9pt; margin:0; font-weight: bold;}
a { text-decoration: none; color: #503737;}
a:visited { color: #503737;}