From: Benoît Pin Date: Mon, 1 Nov 2010 18:29:31 +0000 (+0100) Subject: Merge des modifications du svn de Plinn r1524:1547. X-Git-Url: https://scm.cri.mines-paristech.fr/git/Plinn.git/commitdiff_plain/b3b52f5b0ad754fd9036f816d0ab8e98a5373f40?ds=sidebyside;hp=40acf3027cd594e48486729285eb7a34379078f9 Merge des modifications du svn de Plinn r1524:1547. Ajout d'un profil de configuration dédié pour la photo. --- diff --git a/File.py b/File.py index 11bdafa..c0e37c7 100755 --- a/File.py +++ b/File.py @@ -21,7 +21,7 @@ File. If exists, portal_transforms is called to extract text content, and publish attachments. -$Id: File.py 1261 2008-01-07 01:34:23Z pin $ +$Id: File.py 1549 2010-02-04 13:04:22Z pin $ $URL: http://svn.cri.ensmp.fr/svn/Plinn/branches/CMF-2.1/File.py $ """ @@ -33,6 +33,7 @@ from zope.component.factory import Factory from Products.CMFDefault.File import File as BaseFile from Products.CMFCore.permissions import View, ModifyPortalContent from Products.CMFCore.utils import getToolByName +from swfheader import parse as parseswf class File(BaseFile) : """ file class with portal_transforms support """ @@ -60,6 +61,32 @@ class File(BaseFile) : raise AttributeError, name + def manage_upload(self,file='',REQUEST=None): + ret = super(File, self).manage_upload(file=file, REQUEST=REQUEST) + + orig_name = OFS.Image.cookId('', '', file)[0] + if orig_name : + self.orig_name = orig_name + + print self.absolute_url(), self.Format() + if self.Format() == 'application/x-shockwave-flash' : + if file : + try : + swfmetadata = parseswf(file) + except IOError : + swfmetadata = {'width':600, 'height':600} + + for name in ('width', 'height') : + value = swfmetadata[name] + if self.hasProperty(name) : + self._updateProperty(name, value) + else : + self.manage_addProperty(name, value, 'int') + self.reindexObject() + return ret + + + security.declareProtected(ModifyPortalContent, 'edit') def edit(self, precondition='', file=''): orig_name = OFS.Image.cookId('', '', file)[0] diff --git a/Folder.py b/Folder.py index 9cd4d8b..9b3b155 100644 --- a/Folder.py +++ b/Folder.py @@ -19,13 +19,14 @@ ####################################################################################### """ Plinn portal folder implementation -$Id: Folder.py 1459 2009-02-02 00:57:24Z pin $ +$Id: Folder.py 1539 2009-10-30 13:48:34Z pin $ $URL: http://svn.cri.ensmp.fr/svn/Plinn/branches/CMF-2.1/Folder.py $ """ from OFS.CopySupport import CopyError, eNoData, _cb_decode, eInvalid, eNotFound,\ eNotSupported, sanity_check, cookie_path from App.Dialogs import MessageDialog +from zExceptions import BadRequest import sys import warnings from cgi import escape @@ -42,7 +43,9 @@ from zope.component.factory import Factory from Acquisition import aq_base, aq_inner, aq_parent from types import StringType -from Products.CMFCore.permissions import ListFolderContents, View, ManageProperties, AddPortalFolders, AddPortalContent, ManagePortal +from Products.CMFCore.permissions import ListFolderContents, View, ViewManagementScreens,\ + ManageProperties, AddPortalFolders, AddPortalContent,\ + ManagePortal, ModifyPortalContent from permissions import DeletePortalContents, DeleteObjects, DeleteOwnedObjects, SetLocalRoles, CheckMemberPermission from Products.CMFCore.utils import _checkPermission, getToolByName from Products.CMFCore.CMFCatalogAware import CMFCatalogAware @@ -53,6 +56,7 @@ from zope.interface import implements from Products.CMFCore.interfaces import IContentish from utils import _checkMemberPermission +from utils import Message as _ from Globals import InitializeClass from AccessControl import ClassSecurityInfo @@ -105,7 +109,7 @@ class PlinnFolder(CMFCatalogAware, PortalFolder, DefaultDublinCoreImpl) : security.declareProtected(DeletePortalContents, 'manage_delObjects') def manage_delObjects(self, ids=[], REQUEST=None): - """Delete a subordinate object. + """Delete subordinate objects. A member can delete his owned contents (if he has the 'Delete Portal Contents' permission) without 'Delete objects' permission in this folder. Return skipped object ids. @@ -133,7 +137,38 @@ class PlinnFolder(CMFCatalogAware, PortalFolder, DefaultDublinCoreImpl) : manage_tabs_message='Object(s) deleted.', update_menu=1) return notOwned - + + + security.declareProtected(AddPortalContent, 'manage_renameObjects') + def manage_renameObjects(self, ids=[], new_ids=[], REQUEST=None) : + """ Rename subordinate objects + A member can rename his owned contents if he has the 'Modify Portal Content' permission. + Returns skippend object ids. + """ + if len(ids) != len(new_ids): + raise BadRequest(_('Please rename each listed object.')) + + if _checkPermission(ViewManagementScreens, self) : # std zope perm + return super(PlinnFolder, self).manage_renameObjects(ids, new_ids, REQUEST) + + mtool = getToolByName(self, 'portal_membership') + authMember = mtool.getAuthenticatedMember() + skiped = [] + for id, new_id in zip(ids, new_ids) : + if id == new_id : continue + + ob = self._getOb(id) + if authMember.allowed(ob, object_roles=['Owner'] ) and \ + _checkPermission(ModifyPortalContent, ob) : + self.manage_renameObject(id, new_id) + else : + skiped.append(id) + + if REQUEST is not None : + return self.manage_main(self, REQUEST, update_menu=1) + + return skiped + security.declareProtected(ListFolderContents, 'listFolderContents') def listFolderContents( self, contentFilter=None ): diff --git a/MembershipTool.py b/MembershipTool.py index 3e45cb8..29960e7 100755 --- a/MembershipTool.py +++ b/MembershipTool.py @@ -19,7 +19,7 @@ ####################################################################################### """ Plinn portal_membership -$Id: MembershipTool.py 1524 2009-07-02 14:47:53Z pin $ +$Id: MembershipTool.py 1547 2010-01-05 16:24:22Z pin $ $URL: http://svn.cri.ensmp.fr/svn/Plinn/branches/CMF-2.1/MembershipTool.py $ """ @@ -390,31 +390,39 @@ class MembershipTool( BaseTool ): f.setTitle(memberFullName) info._finishConstruction(f) - def _(message, context, expand=()) : - trmessage = decode(translate(message, context), context) - expand = tuple([decode(e, context) for e in expand]) - return (trmessage % expand).encode('utf-8') - - # Create Member's home page. - addDocument( f - , 'index_html' - , title = _("%s's Home", self, (memberFullName,)) - , description = _("%s's front page", self, (memberFullName,)) - , text_format = "html" - , text = self.default_member_content(memberFullName=memberFullName).encode('utf-8') - ) - - # Grant Ownership and Owner role to Member - f.index_html.changeOwnership(user) - f.index_html.__ac_local_roles__ = None - f.index_html.manage_setLocalRoles(member_id, ['Owner']) - - f.index_html._setPortalTypeName( 'Document' ) - - # Overcome an apparent catalog bug. - f.index_html.reindexObject() - wftool = getToolByName( f, 'portal_workflow' ) - wftool.notifyCreated( f.index_html ) + # Create Member's initial content. + if hasattr(self, 'createMemberContent') : + self.createMemberContent(member=user, + member_id=member_id, + member_folder=f) + else : + def _(message, context, expand=()) : + trmessage = decode(translate(message, context), context) + expand = tuple([decode(e, context) for e in expand]) + return (trmessage % expand).encode('utf-8') + + # Create Member's home page. + addDocument( f + , 'index_html' + , title = _("%s's Home", self, (memberFullName,)) + , description = _("%s's front page", self, (memberFullName,)) + , text_format = "html" + , text = self.default_member_content(memberFullName=memberFullName).encode('utf-8') + ) + + # Grant Ownership and Owner role to Member + f.index_html.changeOwnership(user) + f.index_html.__ac_local_roles__ = None + f.index_html.manage_setLocalRoles(member_id, ['Owner']) + + f.index_html._setPortalTypeName( 'Document' ) + + # Overcome an apparent catalog bug. + f.index_html.reindexObject() + wftool = getToolByName( f, 'portal_workflow' ) + wftool.notifyCreated( f.index_html ) + + return f security.declareProtected(ListPortalMembers, 'looseSearchMembers') diff --git a/graphics/plinn.psd b/graphics/plinn.psd index b3a9cf3..fd637a8 100644 Binary files a/graphics/plinn.psd and b/graphics/plinn.psd differ diff --git a/locales/en/LC_MESSAGES/plinn.mo b/locales/en/LC_MESSAGES/plinn.mo new file mode 100644 index 0000000..021fbfd Binary files /dev/null and b/locales/en/LC_MESSAGES/plinn.mo differ diff --git a/locales/fr/LC_MESSAGES/plinn.mo b/locales/fr/LC_MESSAGES/plinn.mo index e9d6f58..6b71650 100644 Binary files a/locales/fr/LC_MESSAGES/plinn.mo and b/locales/fr/LC_MESSAGES/plinn.mo differ diff --git a/locales/fr/LC_MESSAGES/plinn.po b/locales/fr/LC_MESSAGES/plinn.po index 91520a8..3b25aee 100755 --- a/locales/fr/LC_MESSAGES/plinn.po +++ b/locales/fr/LC_MESSAGES/plinn.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: Plinn 2.0\n" -"POT-Creation-Date: $Date: Mon Jun 29 11:38:05 2009 $\n" -"PO-Revision-Date: 2009-06-29 11:41+0200\n" +"POT-Creation-Date: $Date: Fri Oct 30 14:42:26 2009 $\n" +"PO-Revision-Date: 2009-10-30 14:43+0100\n" "Last-Translator: Benoît PIN\n" "Language-Team: CRI http://cri.ensmp.fr\n" "MIME-Version: 1.0\n" @@ -19,6 +19,10 @@ msgstr "" msgid "Object deleted" msgstr "Objet supprimé" +#: Folder.py:149 +msgid "Please rename each listed object." +msgstr "Veuillez renommer tous les éléments listés." + #. Default: "" #: MembershipTool.py:401 msgid "%s's Home" @@ -71,7 +75,8 @@ msgid "" "the community.\n" msgstr "" "\n" -"Vous venez d'être inscrit en tant que membre du portail « %(portal_title)s », ce qui vous permet de participer à la rédaction des contenus.\n" +"Vous venez d'être inscrit en tant que membre du portail « %(portal_title)s », " +"ce qui vous permet de participer à la rédaction des contenus.\n" #: profiles/default/workflows/member_workflow/scripts/sendNotificationEmail.py:43 msgid "" @@ -148,15 +153,15 @@ msgstr "Modifié" msgid "Preview:" msgstr "Aperçu :" -#: skins/content/dateCriterionResolvedDescription.py:17 +#: skins/content/dateCriterionResolvedDescription.py:15 msgid "search from the beginning of the world until %s" msgstr "recherche depuis la nuit des temps jusqu'au %s" -#: skins/content/dateCriterionResolvedDescription.py:19 +#: skins/content/dateCriterionResolvedDescription.py:17 msgid "search from %s and the end of the world" msgstr "recherche depuis le %s jusqu'à la fin du monde" -#: skins/content/dateCriterionResolvedDescription.py:21 +#: skins/content/dateCriterionResolvedDescription.py:19 msgid "search between %s and %s" msgstr "recherche entre le %s et le %s" @@ -167,7 +172,7 @@ msgstr "Type" #: skins/content/folder_notifications_template.pt:23 #: skins/content/topic_edit_template.pt:26 #: skins/custom_content/event_edit_template.pt:135 -#: skins/generic/search_results_template.pt:86 +#: skins/generic/search_results_template.pt:87 msgid "Save" msgstr "Enregistrer" @@ -221,7 +226,7 @@ msgstr "Ajouter" msgid "%(type)s restored." msgstr "%(type)s restauré." -#: skins/control/save_search_as_topic.py:17 +#: skins/control/save_search_as_topic.py:20 msgid "Topic added." msgstr "Thème ajouté." @@ -361,15 +366,15 @@ msgstr "Tri normal" msgid "Reversed sort" msgstr "Tri inversé" -#: skins/custom_content/topic_view.pt:42 +#: skins/custom_content/topic_view.pt:50 msgid "No result" msgstr "Pas de résultat" -#: skins/custom_content/topic_view.pt:46 +#: skins/custom_content/topic_view.pt:54 msgid "Subtopics" msgstr "Sous-thèmes" -#: skins/custom_content/topic_view.pt:49 +#: skins/custom_content/topic_view.pt:57 msgid "Topic" msgstr "Thème" @@ -401,6 +406,30 @@ msgstr "%d élément déplacé en bas.%d éléments déplacés en bas." msgid "%d item moved down.%d items moved down." msgstr "%d élément déplacé vers le bas.%d éléments déplacés vers le bas." +#: skins/custom_control/folder_rename_control.py:13 +msgid "Item renamed." +msgstr "Élément renommé." + +#: skins/custom_control/folder_rename_control.py:15 +msgid "Items renamed." +msgstr "Éléments renommés." + +#: skins/custom_control/folder_rename_control.py:18 +msgid "This item has not been renamed: \"%s\"" +msgstr "Cet élément n'a pas été renommé : \"%s\"" + +#: skins/custom_control/folder_rename_control.py:21 +msgid "These items have not been renamed: %s" +msgstr "Ces éléments n'ont pas été renommés : %s" + +#: skins/custom_control/folder_rename_control.py:24 +msgid "Rename failed." +msgstr "Renommage échoué." + +#: skins/custom_control/folder_rename_control.py:26 +msgid "Nothing to change." +msgstr "Aucun changement." + #: skins/custom_control/folder_top_control.py:17 msgid "%d item moved to top.%d items moved to top." msgstr "%d élément déplacé en haut.%d éléments déplacés en haut." @@ -1020,7 +1049,7 @@ msgstr "Inscrire" msgid "Review members registration" msgstr "Modérer l'inscription des membres" -#: skins/generic/recent_news.pt:21 +#: skins/generic/recent_news.pt:21 skins/generic/widgets.pt:123 msgid "News" msgstr "Actualités" @@ -1096,7 +1125,7 @@ msgstr "révision actuelle" msgid "next revision →" msgstr "révision suivante →" -#: skins/generic/search.py:82 skins/generic/search.py:86 +#: skins/generic/search.py:109 skins/generic/search.py:113 msgid "ascending sort" msgstr "tri croissant" @@ -1128,15 +1157,15 @@ msgstr "Dernière modification" msgid "(No title)" msgstr "(Sans titre)" -#: skins/generic/search_results_template.pt:82 +#: skins/generic/search_results_template.pt:83 msgid "Save this search as topic" msgstr "Enregistrer cette recherche dans un thème" -#: skins/generic/search_results_template.pt:83 +#: skins/generic/search_results_template.pt:84 msgid "Title:" msgstr "Titre :" -#: skins/generic/search_results_template.pt:88 +#: skins/generic/search_results_template.pt:89 msgid "There are no items matching your specified criteria." msgstr "Aucun élément ne correspond aux critères de recherche." @@ -1192,6 +1221,10 @@ msgstr "(pas de commentaire)" msgid "(no email sent)" msgstr "(pas d'e-mail envoyé)" +#: skins/generic/widgets.pt:128 +msgid "News Item" +msgstr "Actualité" + #: skins/generic/widgets.pt:32 skins/generic/widgets.pt:33 msgid "Edit metadata" msgstr "Éditer les métadonnées" @@ -1739,9 +1772,6 @@ msgstr "jamais" msgid "New layer" msgstr "Nouveau calque" -msgid "News Item" -msgstr "Actualité" - msgid "No document" msgstr "Pas de document" @@ -2045,8 +2075,8 @@ msgid "" "is less than 5 days old'." msgstr "" "Interface de recherche d'intervalle de date, permettant d'effectuer des " -"recherches du type : « rechercher les éléments pour lesquels la date de " -"mise en ligne n'excède pas 5 jours. »" +"recherches du type : « rechercher les éléments pour lesquels la date de mise " +"en ligne n'excède pas 5 jours. »" msgid "Represent a criterion which is a list of values (for an 'OR' search)." msgstr "Recherche par liste de valeurs (pour une recherche booléenne)." diff --git a/locales/plinn-manual.pot b/locales/plinn-manual.pot index d3f8d68..dad2ec4 100644 --- a/locales/plinn-manual.pot +++ b/locales/plinn-manual.pot @@ -522,9 +522,6 @@ msgstr "" msgid "New layer" msgstr "" -msgid "News Item" -msgstr "" - msgid "No document" msgstr "" diff --git a/locales/plinn.pot b/locales/plinn.pot index 75ab20f..845156d 100644 --- a/locales/plinn.pot +++ b/locales/plinn.pot @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Plinn 2\n" -"POT-Creation-Date: $Date: Mon Jun 29 11:38:05 2009 $\n" +"POT-Creation-Date: $Date: Fri Oct 30 14:42:26 2009 $\n" "Language-Team: Benoît Pin \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -20,6 +20,10 @@ msgstr "" msgid "Object deleted" msgstr "" +#: Folder.py:149 +msgid "Please rename each listed object." +msgstr "" + #: MembershipTool.py:401 #. Default: "" msgid "%s's Home" @@ -155,15 +159,15 @@ msgstr "" msgid "Preview:" msgstr "" -#: skins/content/dateCriterionResolvedDescription.py:17 +#: skins/content/dateCriterionResolvedDescription.py:15 msgid "search from the beginning of the world until %s" msgstr "" -#: skins/content/dateCriterionResolvedDescription.py:19 +#: skins/content/dateCriterionResolvedDescription.py:17 msgid "search from %s and the end of the world" msgstr "" -#: skins/content/dateCriterionResolvedDescription.py:21 +#: skins/content/dateCriterionResolvedDescription.py:19 msgid "search between %s and %s" msgstr "" @@ -174,7 +178,7 @@ msgstr "" #: skins/content/folder_notifications_template.pt:23 #: skins/content/topic_edit_template.pt:26 #: skins/custom_content/event_edit_template.pt:135 -#: skins/generic/search_results_template.pt:86 +#: skins/generic/search_results_template.pt:87 msgid "Save" msgstr "" @@ -230,7 +234,7 @@ msgstr "" msgid "%(type)s restored." msgstr "" -#: skins/control/save_search_as_topic.py:17 +#: skins/control/save_search_as_topic.py:20 msgid "Topic added." msgstr "" @@ -369,15 +373,15 @@ msgstr "" msgid "Reversed sort" msgstr "" -#: skins/custom_content/topic_view.pt:42 +#: skins/custom_content/topic_view.pt:50 msgid "No result" msgstr "" -#: skins/custom_content/topic_view.pt:46 +#: skins/custom_content/topic_view.pt:54 msgid "Subtopics" msgstr "" -#: skins/custom_content/topic_view.pt:49 +#: skins/custom_content/topic_view.pt:57 msgid "Topic" msgstr "" @@ -410,6 +414,30 @@ msgstr "" msgid "%d item moved down.%d items moved down." msgstr "" +#: skins/custom_control/folder_rename_control.py:13 +msgid "Item renamed." +msgstr "" + +#: skins/custom_control/folder_rename_control.py:15 +msgid "Items renamed." +msgstr "" + +#: skins/custom_control/folder_rename_control.py:18 +msgid "This item has not been renamed: \"%s\"" +msgstr "" + +#: skins/custom_control/folder_rename_control.py:21 +msgid "These items have not been renamed: %s" +msgstr "" + +#: skins/custom_control/folder_rename_control.py:24 +msgid "Rename failed." +msgstr "" + +#: skins/custom_control/folder_rename_control.py:26 +msgid "Nothing to change." +msgstr "" + #: skins/custom_control/folder_top_control.py:17 msgid "%d item moved to top.%d items moved to top." msgstr "" @@ -1021,6 +1049,7 @@ msgid "Review members registration" msgstr "" #: skins/generic/recent_news.pt:21 +#: skins/generic/widgets.pt:123 msgid "News" msgstr "" @@ -1091,8 +1120,8 @@ msgstr "" msgid "next revision \342\206\222" msgstr "" -#: skins/generic/search.py:82 -#: skins/generic/search.py:86 +#: skins/generic/search.py:109 +#: skins/generic/search.py:113 msgid "ascending sort" msgstr "" @@ -1124,15 +1153,15 @@ msgstr "" msgid "(No title)" msgstr "" -#: skins/generic/search_results_template.pt:82 +#: skins/generic/search_results_template.pt:83 msgid "Save this search as topic" msgstr "" -#: skins/generic/search_results_template.pt:83 +#: skins/generic/search_results_template.pt:84 msgid "Title:" msgstr "" -#: skins/generic/search_results_template.pt:88 +#: skins/generic/search_results_template.pt:89 msgid "There are no items matching your specified criteria." msgstr "" @@ -1188,6 +1217,10 @@ msgstr "" msgid "(no email sent)" msgstr "" +#: skins/generic/widgets.pt:128 +msgid "News Item" +msgstr "" + #: skins/generic/widgets.pt:32 #: skins/generic/widgets.pt:33 msgid "Edit metadata" @@ -1733,9 +1766,6 @@ msgstr "" msgid "New layer" msgstr "" -msgid "News Item" -msgstr "" - msgid "No document" msgstr "" diff --git a/profiles.zcml b/profiles.zcml index 3c6d24c..e72a243 100644 --- a/profiles.zcml +++ b/profiles.zcml @@ -10,4 +10,10 @@ for="Products.CMFCore.interfaces.ISiteRoot" /> + diff --git a/profiles/photo/actions.xml b/profiles/photo/actions.xml new file mode 100644 index 0000000..3a1458c --- /dev/null +++ b/profiles/photo/actions.xml @@ -0,0 +1,386 @@ + + + + + + + + + + My selection + + string:${portal_url}/selection_view + + + + True + + + My cart + + string:${portal_url}/my_cart + + + + + + True + + + Login + + string:${portal_url}/login_form + + not: member + + + + True + + + My albums + + string:${portal_url}/member_albums + + member + + + + True + + + My orders + + string:${portal_url}/my_orders + + member + + + + True + + + My stuff + + string:${portal/portal_membership/getHomeUrl}/folder_contents + + python: member and portal.portal_membership.getHomeFolder() + + + + True + + + Add to favorites + + string:${object_url}/addtoFavorites + + portal/portal_membership/getHomeFolder + + + + False + + + My favorites + + string:${portal/portal_membership/getHomeUrl}/Favorites/folder_contents + + python: member and hasattr(portal.portal_membership.getHomeFolder(), "Favorites") + + + + False + + + My lightboxes + + string:${object_url}/visionneuses + + + + + + False + + + Preferences + + string:${portal_url}/personalize_form + + member + + + + True + + + Log out + + string:${portal_url}/logout?noajax=1 + + member + + + + True + + + Logged in + + string:${portal_url}/homepage_dispatcher + + + + + + False + + + Join + + string:${portal_url}/customer_join_form + + not: member + + + + True + + + + + + List + + string:${folder_url}/folder_contents + + python:member and folder is not object and object.portal_type !='Event' + + + + True + + + + + + Manage Boxes + + string:${portal_url}/manage_boxes?noajax=1 + + + + + + False + + + Send an email + + string:${object_url}/send_email_form + + member + + + + True + + + Undo + + string:${portal_url}/undo_form + + member + + + + True + + + Configure Portal + + string:${portal_url}/reconfig_form + + + + + + True + + + Directory + + string:${portal_url}/groups_members + + + + + + True + + + + + + Images + + string:${portal_url}/Images + + + + + + True + + + Boutique + + string:${portal_url}/Boutique + + + + + + True + + + Services + + string:${portal_url}/services + + + + + + True + + + Photographes + + string:${portal_url}/photographes + + + + + + True + + + + + + Credits + + string:${portal_url}/credits + + + + + + False + + + À propos + realis + string:${portal_url}/about + + + + + + True + + + Contact + + string:${portal_url}/contact + + + + + + True + + + + + + Add comment... + + string:${object_url}/discussion_reply_form + + python: object is not None and object.meta_type != 'Discussion Item' and portal.portal_discussion.isDiscussionAllowedFor(object) + + + + True + + + + + + Syndicate + + string:${folder_url}/synPropertiesForm + + python: folder is object and portal.portal_syndication.isSiteSyndicationAllowed() + + + + True + + + Calendar View + + string:${folder_url}/calendar_view + + python:member and folder is object and object.portal_type in ['Plinn Folder', 'Portfolio'] + + + + True + + + + + + Join + + string:${portal_url}/customer_join_form + + not: member + + + + True + + + Login + + string:${portal_url}/customer_login_form + + not: member + + + + True + + + diff --git a/profiles/photo/cachingpolicymgr.xml b/profiles/photo/cachingpolicymgr.xml new file mode 100644 index 0000000..098e911 --- /dev/null +++ b/profiles/photo/cachingpolicymgr.xml @@ -0,0 +1,21 @@ + + + + + + diff --git a/profiles/photo/catalog.xml b/profiles/photo/catalog.xml new file mode 100644 index 0000000..5ffb030 --- /dev/null +++ b/profiles/photo/catalog.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + True + + + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + + + True + + + True + + + True + + + + + + + + + + + + + + + + + + + + + + + + True + + + + + + + + + + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/componentregistry.xml b/profiles/photo/componentregistry.xml new file mode 100644 index 0000000..8cf408a --- /dev/null +++ b/profiles/photo/componentregistry.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/contenttyperegistry.xml b/profiles/photo/contenttyperegistry.xml new file mode 100644 index 0000000..3cc2552 --- /dev/null +++ b/profiles/photo/contenttyperegistry.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/cookieauth.xml b/profiles/photo/cookieauth.xml new file mode 100644 index 0000000..6c64558 --- /dev/null +++ b/profiles/photo/cookieauth.xml @@ -0,0 +1,13 @@ + + + __ac + __ac_name + __ac_password + __ac_persistent + login_form + logged_out + + False + private + True + diff --git a/profiles/photo/export_steps.xml b/profiles/photo/export_steps.xml new file mode 100644 index 0000000..98969f3 --- /dev/null +++ b/profiles/photo/export_steps.xml @@ -0,0 +1,138 @@ + + + + + + Export actions tool's action providers and their actions. + + + + + + + Export caching policy manager's policies. + + + + + + + Export catalog tool's sub-objects, indexes and columns. + + + + + + + Export local component registry configuration. + + + + + + + Export content type registry's predicates / bindings. + + + + + + + Export cookie crumbler settings + + + + + + + Export the mailhost's settings and properties + + + + + + + Export site properties. + + + + + + + Export custom roles and non-default role-permission mappings. + + + + + + + Export skins tool's filesystem directory views and skin path definitions. + + + + + + + Export current contents of import step registry and export step registry. + + + + + + + Export required / forbidden tools. + + + + + + + Export types tool's type information objects. + + + + + + + Export various plinn settings as python script. + + + + + + + Export workflow tool's workflow definitions and supporting scripts. + + + + diff --git a/profiles/photo/import_steps.xml b/profiles/photo/import_steps.xml new file mode 100644 index 0000000..94b2d6b --- /dev/null +++ b/profiles/photo/import_steps.xml @@ -0,0 +1,186 @@ + + + + + + + + + Import actions tool's action providers and their actions. + + + + + + + + + + Import caching policy manager's policies. + + + + + + + + + + Import catalog tool's sub-objects, indexes and columns. + + + + + + + + Import local component registry configuration. + + + + + + + + + + Import content type registry's predicates and bindings. + + + + + + + + + + Import cookie crumbler settings + + + + + + + + + + + + + Import mailhost settings + + + + + + + Import site properties. + + + + + + + Import custom roles and non-default role-permission mappings. + + + + + + + + + + Import skins tool's filesystem directory views and skin path definitions. + + + + + + + Create required tools, replacing any of the wrong class, and remove + forbidden ones. + + + + + + + + + + Import types tool's type information objects. + + + + + + + + + + + + Import various settings for CMF Calendar. + + + + + + + + + + + + + + + Import various settings from Plinn products. + + + + + + + + + + Import workflow tool's workflow definitions and supporting scripts. + + + + diff --git a/profiles/photo/mailhost.xml b/profiles/photo/mailhost.xml new file mode 100644 index 0000000..b00cae5 --- /dev/null +++ b/profiles/photo/mailhost.xml @@ -0,0 +1,3 @@ + + diff --git a/profiles/photo/properties.xml b/profiles/photo/properties.xml new file mode 100644 index 0000000..87304e5 --- /dev/null +++ b/profiles/photo/properties.xml @@ -0,0 +1,42 @@ + + + photo + Plinn photo website + postmaster@localhost + + 192 + 192 + + + + + + True + fr + False + 222 + Untitled- + utf-8 + utf-8 + + + + + + + + + + + + + 2 + + #484848 + 25 + 100 + 25 + diff --git a/profiles/photo/rolemap.xml b/profiles/photo/rolemap.xml new file mode 100644 index 0000000..fa7767b --- /dev/null +++ b/profiles/photo/rolemap.xml @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/skins.xml b/profiles/photo/skins.xml new file mode 100644 index 0000000..1ca266e --- /dev/null +++ b/profiles/photo/skins.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/skins/custom.xml b/profiles/photo/skins/custom.xml new file mode 100644 index 0000000..07d15fd --- /dev/null +++ b/profiles/photo/skins/custom.xml @@ -0,0 +1,4 @@ + + + + diff --git a/profiles/photo/toolset.xml b/profiles/photo/toolset.xml new file mode 100644 index 0000000..1320220 --- /dev/null +++ b/profiles/photo/toolset.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/types.xml b/profiles/photo/types.xml new file mode 100644 index 0000000..d15d20c --- /dev/null +++ b/profiles/photo/types.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/types/CMF_Site.xml b/profiles/photo/types/CMF_Site.xml new file mode 100644 index 0000000..4838f6d --- /dev/null +++ b/profiles/photo/types/CMF_Site.xml @@ -0,0 +1,51 @@ + + + + Portal portal_type + string:${portal_url}/plinn_icon.gif + + + + + + + False + True + + + + + + + + + + + + + False + + + + + + + + + + + + + + + + diff --git a/profiles/photo/types/Calendar.xml b/profiles/photo/types/Calendar.xml new file mode 100644 index 0000000..94f37c9 --- /dev/null +++ b/profiles/photo/types/Calendar.xml @@ -0,0 +1,42 @@ + + + Agenda + Calendar contains events. + string:${portal_url}/calendar_icon.gif + Plinn Calendar + Plinn + manage_addPlinnFolder + + + object/view + True + True + + + + False + + + + + + + + + + + + + + + + diff --git a/profiles/photo/types/Discussion_Item.xml b/profiles/photo/types/Discussion_Item.xml new file mode 100644 index 0000000..57b3007 --- /dev/null +++ b/profiles/photo/types/Discussion_Item.xml @@ -0,0 +1,36 @@ + + + Discussion Item + Discussion Items are documents which reply to other content. + They should *not* be addable through the standard 'folder_factories' interface. + string:${portal_url}/discussionitem_icon.gif + Discussion Item + + + + + + True + True + + False + + + + + + + + + + + + diff --git a/profiles/photo/types/Document.xml b/profiles/photo/types/Document.xml new file mode 100644 index 0000000..dedc32f --- /dev/null +++ b/profiles/photo/types/Document.xml @@ -0,0 +1,42 @@ + + + Document + Contain text that can be formatted using 'Structured Text.' It may also contain HTML, or "plain" text. + string:${portal_url}/text.gif + Document + CMFDefault + addDocument + + + object/edit + True + True + + False + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/types/Event.xml b/profiles/photo/types/Event.xml new file mode 100644 index 0000000..293f8be --- /dev/null +++ b/profiles/photo/types/Event.xml @@ -0,0 +1,46 @@ + + + Event + Events are objects for use in Calendar topical queries on the catalog. + string:${portal_url}/event_icon.gif + CMF Event + CMFCalendar + addEvent + + + object/edit + True + True + + False + + + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/types/Favorite.xml b/profiles/photo/types/Favorite.xml new file mode 100644 index 0000000..f93a817 --- /dev/null +++ b/profiles/photo/types/Favorite.xml @@ -0,0 +1,29 @@ + + + Favorite + Link to an intra-portal resource. + string:${portal_url}/link_icon.gif + Favorite + CMFDefault + addFavorite + + + object/edit + True + True + + False + + + + + + + + + diff --git a/profiles/photo/types/File.xml b/profiles/photo/types/File.xml new file mode 100644 index 0000000..1cc4cec --- /dev/null +++ b/profiles/photo/types/File.xml @@ -0,0 +1,51 @@ + + + File + Contain arbitrary downloadable files. + string:${portal_url}/application.png + Plinn File + Plinn + addFile + + + object/edit + True + True + + False + + + + + + + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/types/File_Slot.xml b/profiles/photo/types/File_Slot.xml new file mode 100644 index 0000000..f5800c4 --- /dev/null +++ b/profiles/photo/types/File_Slot.xml @@ -0,0 +1,29 @@ + + + File Slot + File Slot for Mosaic Document + string:${portal_url}/mosaic_tool/bin_icon.gif + File Slot + MosaicDocument + addFileSlot + + + view + True + True + + False + + + + + + + + + diff --git a/profiles/photo/types/Huge_Plinn_Folder.xml b/profiles/photo/types/Huge_Plinn_Folder.xml new file mode 100644 index 0000000..49c99af --- /dev/null +++ b/profiles/photo/types/Huge_Plinn_Folder.xml @@ -0,0 +1,58 @@ + + + Huge Folder + Container to put content in categories. + string:${portal_url}/folder_icon.gif + Huge Plinn Folder + + plinn.folder.huge + + + object/folderContents + True + True + + + + + + + + + + + + + + False + + + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/types/Image_Slot.xml b/profiles/photo/types/Image_Slot.xml new file mode 100644 index 0000000..13a4af6 --- /dev/null +++ b/profiles/photo/types/Image_Slot.xml @@ -0,0 +1,29 @@ + + + Image Slot + Image Slot for Mosaic Document + string:${portal_url}/mosaic_tool/photo_icon.gif + Image Slot + MosaicDocument + addImageSlot + + + view + True + True + + False + + + + + + + + + diff --git a/profiles/photo/types/Lightbox.xml b/profiles/photo/types/Lightbox.xml new file mode 100644 index 0000000..def8f7e --- /dev/null +++ b/profiles/photo/types/Lightbox.xml @@ -0,0 +1,24 @@ + + + Lightbox + lightbox holds references to photos + string:${portal_url}/lightbox_icon.png + Lightbox + + portfolio.lightbox + + + object/view + True + True + + False + + + + + + diff --git a/profiles/photo/types/Link.xml b/profiles/photo/types/Link.xml new file mode 100644 index 0000000..0172f76 --- /dev/null +++ b/profiles/photo/types/Link.xml @@ -0,0 +1,41 @@ + + + Link + Annotated URL. + string:${portal_url}/link_icon.gif + Link + CMFDefault + addLink + + + object/edit + True + True + + False + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/types/List_Slot.xml b/profiles/photo/types/List_Slot.xml new file mode 100644 index 0000000..1da28ad --- /dev/null +++ b/profiles/photo/types/List_Slot.xml @@ -0,0 +1,29 @@ + + + List Slot + List Slot for Mosaic Document + string:${portal_url}/mosaic_tool/str_icon.gif + List Slot + MosaicDocument + addStringSlot + + + view + True + True + + False + + + + + + + + + diff --git a/profiles/photo/types/Mosaic_Document.xml b/profiles/photo/types/Mosaic_Document.xml new file mode 100644 index 0000000..23bc637 --- /dev/null +++ b/profiles/photo/types/Mosaic_Document.xml @@ -0,0 +1,41 @@ + + + Mosaic Document + + string:${portal_url}/mosaic_icon.gif + Mosaic Document + MosaicDocument + addMosaicDocument + + + object/edit + True + False + + False + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/types/News_Item.xml b/profiles/photo/types/News_Item.xml new file mode 100644 index 0000000..68f1717 --- /dev/null +++ b/profiles/photo/types/News_Item.xml @@ -0,0 +1,43 @@ + + + News Item + Short text article with a title and an optional lead-in. + string:${portal_url}/newsitem_icon.gif + News Item + CMFDefault + addNewsItem + + + object/edit + True + True + + False + + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/types/Order.xml b/profiles/photo/types/Order.xml new file mode 100644 index 0000000..c5c021d --- /dev/null +++ b/profiles/photo/types/Order.xml @@ -0,0 +1,23 @@ + + + Order + + string:${portal_url}/text.gif + Print order + + photoprint.order + + + object/edit + True + True + + False + + + + + diff --git a/profiles/photo/types/Order_Folder.xml b/profiles/photo/types/Order_Folder.xml new file mode 100644 index 0000000..4378dbb --- /dev/null +++ b/profiles/photo/types/Order_Folder.xml @@ -0,0 +1,48 @@ + + + Order Folder + + string:${portal_url}/folder_icon.gif + Huge Plinn Folder + + plinn.folder.huge + + + object/folderContents + True + True + + + + + False + + + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/types/Photo.xml b/profiles/photo/types/Photo.xml new file mode 100644 index 0000000..9ab28d1 --- /dev/null +++ b/profiles/photo/types/Photo.xml @@ -0,0 +1,41 @@ + + + Photo + Photo + string:${portal_url}/photo_icon.gif + Photo + + portfolio.photo + + + object/edit + True + True + + False + + + + + + + + + + + + + + + + diff --git a/profiles/photo/types/Plinn_Document.xml b/profiles/photo/types/Plinn_Document.xml new file mode 100644 index 0000000..ff2f692 --- /dev/null +++ b/profiles/photo/types/Plinn_Document.xml @@ -0,0 +1,43 @@ + + + Plinn Document + Plinn Documents contain text and images that can be layout with WYSIWYG and drag&drop editor. + string:${portal_url}/plinn_doc.gif + Plinn Document + + plinndocument + + + object/edit + True + True + + False + + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/types/Plinn_Folder.xml b/profiles/photo/types/Plinn_Folder.xml new file mode 100644 index 0000000..41663ff --- /dev/null +++ b/profiles/photo/types/Plinn_Folder.xml @@ -0,0 +1,60 @@ + + + Folder + Container to put content in categories. + string:${portal_url}/folder_icon.gif + Plinn Folder + + plinn.folder.normal + + + object/folderContents + True + True + + + + + + + + + + + False + + + + + + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/types/Portfolio.xml b/profiles/photo/types/Portfolio.xml new file mode 100644 index 0000000..15fee88 --- /dev/null +++ b/profiles/photo/types/Portfolio.xml @@ -0,0 +1,81 @@ + + + Collection + Folder for photo storage + string:${portal_url}/portfolio_icon.gif + Portfolio + + portfolio.portfolio + + + object/import + True + True + + + + + False + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/types/Spacer_Slot.xml b/profiles/photo/types/Spacer_Slot.xml new file mode 100644 index 0000000..f34dccb --- /dev/null +++ b/profiles/photo/types/Spacer_Slot.xml @@ -0,0 +1,29 @@ + + + Spacer Slot + Spacer Slot for Mosaic Document + string:${portal_url}/mosaic_tool/spacer_icon.gif + Spacer Slot + MosaicDocument + addSpacerSlot + + + view + True + True + + False + + + + + + + + + diff --git a/profiles/photo/types/String_Slot.xml b/profiles/photo/types/String_Slot.xml new file mode 100644 index 0000000..428e4f9 --- /dev/null +++ b/profiles/photo/types/String_Slot.xml @@ -0,0 +1,29 @@ + + + String Slot + String Slot for Mosaic Document + string:${portal_url}/mosaic_tool/str_icon.gif + String Slot + MosaicDocument + addStringSlot + + + view + True + True + + False + + + + + + + + + diff --git a/profiles/photo/types/Text_Slot.xml b/profiles/photo/types/Text_Slot.xml new file mode 100644 index 0000000..b15e189 --- /dev/null +++ b/profiles/photo/types/Text_Slot.xml @@ -0,0 +1,29 @@ + + + Text Slot + Text Slot for Mosaic Document + string:${portal_url}/mosaic_tool/txt_icon.gif + Text Slot + MosaicDocument + addStringSlot + + + view + True + True + + False + + + + + + + + + diff --git a/profiles/photo/types/Topic.xml b/profiles/photo/types/Topic.xml new file mode 100644 index 0000000..8c62c8d --- /dev/null +++ b/profiles/photo/types/Topic.xml @@ -0,0 +1,53 @@ + + + + Topics are canned queries for organizing content with up to date queries into the catalog. + string:${portal_url}/topic_icon.gif + Plinn Topic + + plinn.topic + + + object/edit + True + True + + + + False + + + + + + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/typestool.xml b/profiles/photo/typestool.xml new file mode 100644 index 0000000..dcedfbf --- /dev/null +++ b/profiles/photo/typestool.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/various.py b/profiles/photo/various.py new file mode 100644 index 0000000..2932d81 --- /dev/null +++ b/profiles/photo/various.py @@ -0,0 +1,112 @@ +## Script (Python) "various.py" +##bind container=container +##bind context=context +##bind namespace= +##bind script=script +##bind subpath=traverse_subpath +##parameters=site +##title=Import various Plinn setting +## +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 +#--- + + +# constructs misc objects +# (productName, factory, id) +misc=(('StandardCacheManagers', 'manage_addAcceleratedHTTPCacheManager', 'HTTPCache'), + ('StandardCacheManagers', 'manage_addRAMCacheManager', 'rcm'), + ('GroupUserFolder', 'manage_addGroupUserFolder', 'acl_users')) + + +dispatcher = site.manage_addProduct +for m in misc : + try : getattr(dispatcher[m[0]], m[1])(m[2]) + except : pass + +if site.acl_users.Users.acl_users.encrypt_passwords : + site.acl_users.Users.acl_users.manage_setUserFolderProperties(encrypt_passwords=False) + + +# configure mosaicTool +blockTypes = ('Action Box Block', 'Container Block', 'File Block', 'Image Block', 'Mosaic Document', + 'Section Block', 'Spacer Block', 'Text Block', 'Tree Box Block') + +mostool = getToolByName(site, 'mosaic_tool') +addBI = mostool.manage_addProduct['MosaicDocument'].addMosaicBlockInformation +for bt in blockTypes : + try : addBI(blockType=bt) + except BadRequest : pass + +# contents +ttool = getToolByName(site, 'portal_types') +wtool = getToolByName(site, 'portal_workflow') + +def constructOrSkip(*args, **kw) : + try : ttool.constructContent(*args, **kw) + except BadRequest : pass + +def addBlockOrSkip(container, *args, **kw) : + try : container.addBlock(*args, **kw) + except BadRequest : pass + +def doActionForOrSkip(*args, **kw) : + try : wtool.doActionFor(*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') + +# default folders +constructOrSkip('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') +if not site.global_settings.hasProperty('noIndex'): + site.global_settings.manage_addProperty('noIndex', True, 'boolean') + +# left boxes +constructOrSkip('Mosaic Document', site.global_settings, 'left_boxes', title=translate('Left boxes')) +lb = site.global_settings.left_boxes +addBlockOrSkip(lb, 'Tree Box Block', 0, id='nav_tree') +lb.nav_tree.saveBlock(filteredMetaTypes={'text' : ['Plinn Folder', 'Portfolio', 'Topic']}) +doActionForOrSkip(lb, 'direct_publish') + +# right boxes +constructOrSkip('Mosaic Document', site.global_settings, 'right_boxes', title=translate('Right boxes')) +rb = site.global_settings.right_boxes +addBlockOrSkip(rb, 'Action Box Block', 0, id='global_actions') +rb.global_actions.saveBlock(boxTitle={'text' : translate('Global actions')}, categories={'text' : ['global']}) +addBlockOrSkip(rb, 'Action Box Block', 0, id='workflow_actions') +#rb.workflow_actions.saveBlock(boxTitle={'text' : translate('Workflow')}, categories={'text' : ['workflow']}) +#doActionForOrSkip(rb, 'direct_publish') + +# tools settings +mtool = getToolByName(site, 'portal_membership') +mtool.setMemberAreaPortalType('Plinn Folder') + +gtool = getToolByName(site, 'portal_groups') +gtool.setGroupWorkspaceContainerType('Plinn Folder') +gtool.setGroupWorkspaceType('Plinn Folder') + +caltool = getToolByName(site, 'portal_calendar') +caltool.configureTool(['created', 'modified', 'DateTimeOriginal'], [9, 18]) + +# Caches +HTTPCache = site.HTTPCache +HTTPCache.manage_editProps(title='Accelerated HTTP Cache', + settings={'anonymous_only' : False, 'interval' : 3600,'notify_urls' : []}) + +gtool = getToolByName(site, 'portal_groups') +gtool.ZCacheable_setManagerId('rcm') + +return 'Various Plinn settings imported' \ No newline at end of file diff --git a/profiles/photo/workflows.xml b/profiles/photo/workflows.xml new file mode 100644 index 0000000..cf8ec47 --- /dev/null +++ b/profiles/photo/workflows.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/profiles/photo/workflows/default_workflow/definition.xml b/profiles/photo/workflows/default_workflow/definition.xml new file mode 100644 index 0000000..a8373a3 --- /dev/null +++ b/profiles/photo/workflows/default_workflow/definition.xml @@ -0,0 +1,256 @@ + + + + Access contents information + Change portal events + Change portal topics + Delete Owned Objects + Manage properties + Modify portal content + View + + + + + + Manager + + + Manager + Reviewer + + + Manager + Reviewer + + + Manager + + + Manager + Reviewer + + + Manager + Reviewer + + + Contributor + Manager + Owner + Reader + Reviewer + + + + + + + Contributor + Manager + Owner + + + Contributor + Manager + Owner + + + Contributor + Manager + Owner + + + Manager + Owner + + + Contributor + Manager + Owner + + + Contributor + Manager + Owner + + + Contributor + Manager + Owner + Reader + + + + + + + Manager + + + Manager + + + Manager + + + Manager + + + Manager + + + Manager + + + Anonymous + Manager + + + + Reviewer can directly publish content if he have de Owner role (not necessarily ownership) + Publish + + Review portal content + python:user.allowed(here, ['Owner']) + + + + Publish + + Review portal content + + + + Reject + + Review portal content + + + + Retract + + Request review + python:not(here.portal_membership.checkPermission('Review portal content', here)) + + + + Submit + + Request review + + + + Reviewer tasks + Pending (%(count)d) + + here/havePendingContents + + + + + The last transition + + + transition/getId|nothing + + + + + + The ID of the user who performed the last transition + + + user/getId + + + + + + Comments about the last transition + + + python:state_change.kwargs.get('comment', '') + + + + + + + + python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', []) + + + + + + Provides access to workflow history + + + state_change/getHistory + + + Request review + Review portal content + + + + Time of the last transition + + + state_change/getDateTime + + + + + + + + + diff --git a/skins/control/getRecipients.py b/skins/control/getRecipients.py index 7977f15..d225f32 100644 --- a/skins/control/getRecipients.py +++ b/skins/control/getRecipients.py @@ -12,7 +12,7 @@ for role in roles : for member in object.getAllMembersInRole(role) : if (member.id not in recipientIds) and member.getProperty('email') : membersInRole.append(member) - recipientIds.append(member.id) + recipientIds.append(member.getId()) if membersInRole : rolesAndMembers.append( (role, membersInRole) ) diff --git a/skins/control/send_email.py b/skins/control/send_email.py index 35b3d82..93c573f 100644 --- a/skins/control/send_email.py +++ b/skins/control/send_email.py @@ -38,8 +38,6 @@ def encodeAdr(member) : sender = mtool.getAuthenticatedMember() sender = encodeAdr(sender) -if other_adr : - recipients['to'].extend(other_adr) recipientsFormated = {'to':'', 'cc':'', 'bcc':''} for field, b in recipients.items() : @@ -47,6 +45,13 @@ for field, b in recipients.items() : formated = filter(None, formated) formated = ', '.join(formated) recipientsFormated[field] = formated + +if other_adr : + recipients['to'].extend(other_adr) + formated = ', '.join(other_adr) + to = ', '.join([recipientsFormated['to'], formated]) + to = to.strip(', ') + recipientsFormated['to'] = to recipientsHeader = [] for field in ['to', 'cc', 'bcc'] : @@ -68,7 +73,6 @@ MailHost.send( message.encode('utf-8') ) if wfid is not None : wtool = portal.portal_workflow email_sent = reduce(lambda a, b : a+b, recipients.values()) - email_sent.extend(other_adr) wtool.doActionFor(context, 'send_email', wf_id=wfid, email_sent=email_sent, comment=text_body) diff --git a/skins/custom_control/folder_rename_control.py b/skins/custom_control/folder_rename_control.py new file mode 100755 index 0000000..4fc1163 --- /dev/null +++ b/skins/custom_control/folder_rename_control.py @@ -0,0 +1,26 @@ +##parameters=ids, new_ids, **kw +##title=Rename objects in a folder +## +from Products.CMFDefault.exceptions import CopyError +from Products.Plinn.utils import translate +_ = lambda msg : translate(msg, context) + +if not ids == new_ids: + try: + skiped = context.manage_renameObjects(ids, new_ids) + if not skiped : + if len(ids) == 1: + return context.setStatus(True, _(u'Item renamed.')) + else: + return context.setStatus(True, _(u'Items renamed.')) + else : + if len(skiped) == 1 : + return context.setStatus(True, _( u'This item has not been renamed: "%s"') % ids[0] ) + else : + return context.setStatus(True + , _( u'These items have not been renamed: %s') % \ + ', '.join(['"%s"' % id for id in ids]) ) + except CopyError: + return context.setStatus(False, _(u'Rename failed.')) +else: + return context.setStatus(False, _(u'Nothing to change.')) diff --git a/skins/custom_generic/expanded_title.py b/skins/custom_generic/expanded_title.py index 8fce45f..7c8301d 100644 --- a/skins/custom_generic/expanded_title.py +++ b/skins/custom_generic/expanded_title.py @@ -3,7 +3,7 @@ ##title=Build title which includes site title ## site_title = context.portal_url.getPortalObject().title_or_id() -page_title = context.title_or_id() +page_title = context.Title() or context.getId() if page_title != site_title: page_title = site_title + ": " + page_title diff --git a/skins/generic/batch_macros.pt b/skins/generic/batch_macros.pt index f5dedc1..78fd9f7 100644 --- a/skins/generic/batch_macros.pt +++ b/skins/generic/batch_macros.pt @@ -8,12 +8,12 @@
- You are here: ID / + You are here: ID /
diff --git a/skins/generic/plinn_style.css.dtml b/skins/generic/plinn_style.css.dtml index 91ffb14..efa3f70 100644 --- a/skins/generic/plinn_style.css.dtml +++ b/skins/generic/plinn_style.css.dtml @@ -103,22 +103,19 @@ table.assign_global_roles { color : &dtml-specialLinkHoverColor;; } -.config .tabs a { - color : &dtml-tabsFontColor;; - text-decoration: none } - +.config .tabs a, +.config .tabs a:link, +.config .tabs a:visited, .config .tabs a:active { - color: &dtml-tabsFontColor;; } + color : &dtml-tabsFontColor;; + text-decoration: none -.config .tabs a:hover { - color: #59c } - -.config .tabs a:link { - color: &dtml-tabsFontColor;; } - -.config .tabs a:visited { - color: &dtml-tabsFontColor;; } +} +.config .tabs a:hover { + color: #59c +} + .config .tabs td { padding-right: 5px; padding-left: 5px; @@ -136,9 +133,13 @@ table.assign_global_roles { border: solid 1px #669; } -.config .tabs td.selected a { +.config .tabs td.selected a, +.config .tabs td.selected a:link, +.config .tabs td.selected a:visited, +.config .tabs td.selected a:active { color: #000; - font-weight: bold } + font-weight: bold +} .twins_list { vertical-align: middle } diff --git a/skins/generic/send_email_form.pt b/skins/generic/send_email_form.pt index 4e52520..baa0b3f 100644 --- a/skins/generic/send_email_form.pt +++ b/skins/generic/send_email_form.pt @@ -40,9 +40,9 @@
@@ -73,7 +73,7 @@

(not required)