From: Benoît Pin Date: Mon, 8 Jul 2013 16:16:17 +0000 (+0200) Subject: — Huge Plinn Folder utilisé pour le dossier de base des membres. X-Git-Url: https://svn.cri.ensmp.fr/git/Plinn.git/commitdiff_plain/f50fc603d5861a70d4fd868dad307b6a058a4203 — Huge Plinn Folder utilisé pour le dossier de base des membres. — fix création de la page d'accueil. --- 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.

-