From f50fc603d5861a70d4fd868dad307b6a058a4203 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Mon, 8 Jul 2013 18:16:17 +0200 Subject: [PATCH 1/1] =?utf8?q?=E2=80=94=20Huge=20Plinn=20Folder=20utilis?= =?utf8?q?=C3=A9=20pour=20le=20dossier=20de=20base=20des=20membres.=20?= =?utf8?q?=E2=80=94=20fix=20cr=C3=A9ation=20de=20la=20page=20d'accueil.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- MembershipTool.py | 2 +- profiles/photo/various.py | 24 ++++++++++++---------- skins/generic/default_home_page_content.pt | 5 ----- 3 files changed, 14 insertions(+), 17 deletions(-) delete mode 100644 skins/generic/default_home_page_content.pt diff --git a/MembershipTool.py b/MembershipTool.py index 0d7624e..166d42a 100755 --- a/MembershipTool.py +++ b/MembershipTool.py @@ -74,7 +74,7 @@ class MembershipTool( BaseTool ): security.declareProtected(ListPortalMembers, 'getMemberById') - memberareaPortalType = 'Folder' + memberareaPortalType = 'Huge Plinn Folder' # security.declareProtected(SetOwnPassword, 'setPassword') diff --git a/profiles/photo/various.py b/profiles/photo/various.py index e3dcb65..836f47d 100644 --- a/profiles/photo/various.py +++ b/profiles/photo/various.py @@ -10,11 +10,8 @@ from Products.CMFCore.utils import getToolByName from Products.CMFCore.exceptions import BadRequest from Products.Plinn.exceptions import WorkflowException -# TODO : CMF-2.1 compat -#from Products.PlacelessTranslationService.MessageID import MessageIDFactory -#_ = MessageIDFactory('plinn') -translate = lambda msg : msg -#--- +from Products.Plinn.utils import translate as i18ntranslate +translate = lambda msg : i18ntranslate(msg, context) # constructs misc objects @@ -60,14 +57,19 @@ def doActionForOrSkip(*args, **kw) : except WorkflowException : pass # home page -# constructOrSkip( 'Document', site, 'index_html' -# , title = translate('Home') -# , text_format='html' -# , text=site.default_home_page_content()) -# doActionForOrSkip(site.index_html, 'direct_publish') +text=[] +text.append('

%s

' % translate('Welcome to Plinn!')) +text.append('

%s

' % translate('This is the default home page.')) +text.append('

%s

' % translate('To change the content just select "Edit" in the Tab bar on the top.')) +text = '\n'.join(text) +constructOrSkip( 'Document', site, 'index_html' + , title = translate('Home') + , text_format='html' + , text=text) +doActionForOrSkip(site.index_html, 'direct_publish') # default folders -constructOrSkip('Plinn Folder', site, 'Members', title = translate('Members')) +constructOrSkip('Huge Plinn Folder', site, 'Members', title = translate('Members')) #constructOrSkip('Plinn Folder', site, 'global_settings', title = translate('Portlets')) if not hasattr(site, 'global_settings') : site.manage_addProduct['OFSP'].manage_addFolder('global_settings') diff --git a/skins/generic/default_home_page_content.pt b/skins/generic/default_home_page_content.pt deleted file mode 100644 index 7fe48dc..0000000 --- a/skins/generic/default_home_page_content.pt +++ /dev/null @@ -1,5 +0,0 @@ -
-

Welcome to Plinn!

-

This is the default home page.

-

To change the content just select "Edit" in the Tab bar on the top.

-
-- 2.20.1