Merge des modifications du svn de Plinn r1524:1547.
authorBenoît Pin <benoit.pin@gmail.com>
Mon, 1 Nov 2010 18:29:31 +0000 (19:29 +0100)
committerBenoît Pin <benoit.pin@gmail.com>
Mon, 1 Nov 2010 18:29:31 +0000 (19:29 +0100)
Ajout d'un profil de configuration dédié pour la photo.

81 files changed:
File.py
Folder.py
MembershipTool.py
graphics/plinn.psd
locales/en/LC_MESSAGES/plinn.mo [new file with mode: 0644]
locales/fr/LC_MESSAGES/plinn.mo
locales/fr/LC_MESSAGES/plinn.po
locales/plinn-manual.pot
locales/plinn.pot
profiles.zcml
profiles/photo/actions.xml [new file with mode: 0644]
profiles/photo/cachingpolicymgr.xml [new file with mode: 0644]
profiles/photo/catalog.xml [new file with mode: 0644]
profiles/photo/componentregistry.xml [new file with mode: 0644]
profiles/photo/contenttyperegistry.xml [new file with mode: 0644]
profiles/photo/cookieauth.xml [new file with mode: 0644]
profiles/photo/export_steps.xml [new file with mode: 0644]
profiles/photo/import_steps.xml [new file with mode: 0644]
profiles/photo/mailhost.xml [new file with mode: 0644]
profiles/photo/properties.xml [new file with mode: 0644]
profiles/photo/rolemap.xml [new file with mode: 0644]
profiles/photo/skins.xml [new file with mode: 0644]
profiles/photo/skins/custom.xml [new file with mode: 0644]
profiles/photo/toolset.xml [new file with mode: 0644]
profiles/photo/types.xml [new file with mode: 0644]
profiles/photo/types/CMF_Site.xml [new file with mode: 0644]
profiles/photo/types/Calendar.xml [new file with mode: 0644]
profiles/photo/types/Discussion_Item.xml [new file with mode: 0644]
profiles/photo/types/Document.xml [new file with mode: 0644]
profiles/photo/types/Event.xml [new file with mode: 0644]
profiles/photo/types/Favorite.xml [new file with mode: 0644]
profiles/photo/types/File.xml [new file with mode: 0644]
profiles/photo/types/File_Slot.xml [new file with mode: 0644]
profiles/photo/types/Huge_Plinn_Folder.xml [new file with mode: 0644]
profiles/photo/types/Image_Slot.xml [new file with mode: 0644]
profiles/photo/types/Lightbox.xml [new file with mode: 0644]
profiles/photo/types/Link.xml [new file with mode: 0644]
profiles/photo/types/List_Slot.xml [new file with mode: 0644]
profiles/photo/types/Mosaic_Document.xml [new file with mode: 0644]
profiles/photo/types/News_Item.xml [new file with mode: 0644]
profiles/photo/types/Order.xml [new file with mode: 0644]
profiles/photo/types/Order_Folder.xml [new file with mode: 0644]
profiles/photo/types/Photo.xml [new file with mode: 0644]
profiles/photo/types/Plinn_Document.xml [new file with mode: 0644]
profiles/photo/types/Plinn_Folder.xml [new file with mode: 0644]
profiles/photo/types/Portfolio.xml [new file with mode: 0644]
profiles/photo/types/Spacer_Slot.xml [new file with mode: 0644]
profiles/photo/types/String_Slot.xml [new file with mode: 0644]
profiles/photo/types/Text_Slot.xml [new file with mode: 0644]
profiles/photo/types/Topic.xml [new file with mode: 0644]
profiles/photo/typestool.xml [new file with mode: 0644]
profiles/photo/various.py [new file with mode: 0644]
profiles/photo/workflows.xml [new file with mode: 0644]
profiles/photo/workflows/default_workflow/definition.xml [new file with mode: 0644]
profiles/photo/workflows/default_workflow/scripts/sendNotificationEmail.py [new file with mode: 0644]
profiles/photo/workflows/folder_workflow/definition.xml [new file with mode: 0644]
profiles/photo/workflows/folder_workflow/scripts/sendNotificationEmail.py [new file with mode: 0644]
profiles/photo/workflows/member_workflow/definition.xml [new file with mode: 0644]
profiles/photo/workflows/member_workflow/scripts/after_reject.py [new file with mode: 0644]
profiles/photo/workflows/member_workflow/scripts/before_register.py [new file with mode: 0644]
profiles/photo/workflows/member_workflow/scripts/sendNotificationEmail.py [new file with mode: 0644]
profiles/photo/workflows/order_workflow/definition.xml [new file with mode: 0644]
profiles/photo/workflows/order_workflow/scripts/relistCopies.py [new file with mode: 0755]
profiles/photo/workflows/order_workflow/scripts/sendNotificationEmail.py [new file with mode: 0755]
profiles/photo/workflows/portfolio_workflow/definition.xml [new file with mode: 0644]
profiles/photo/workflows/portfolio_workflow/scripts/sendNotificationEmail.py [new file with mode: 0644]
skins/ajax_scripts/javascript_events_api.js
skins/ajax_scripts/palette.js
skins/ajax_scripts/swfobject.js [new file with mode: 0644]
skins/ajax_scripts/widget_form_manager.js
skins/content/file_view.py [new file with mode: 0755]
skins/content/file_view_template.pt [moved from skins/custom_content/file_view.pt with 100% similarity]
skins/content/flash_view_template.pt [new file with mode: 0644]
skins/control/getRecipients.py
skins/control/send_email.py
skins/custom_control/folder_rename_control.py [new file with mode: 0755]
skins/custom_generic/expanded_title.py
skins/generic/batch_macros.pt
skins/generic/main_template_macros.pt
skins/generic/plinn_style.css.dtml
skins/generic/send_email_form.pt

diff --git a/File.py b/File.py
index 11bdafa..c0e37c7 100755 (executable)
--- 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]
index 9cd4d8b..9b3b155 100644 (file)
--- a/Folder.py
+++ b/Folder.py
 #######################################################################################
 """ 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 ):
index 3e45cb8..29960e7 100755 (executable)
@@ -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')
index b3a9cf3..fd637a8 100644 (file)
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 (file)
index 0000000..021fbfd
Binary files /dev/null and b/locales/en/LC_MESSAGES/plinn.mo differ
index e9d6f58..6b71650 100644 (file)
Binary files a/locales/fr/LC_MESSAGES/plinn.mo and b/locales/fr/LC_MESSAGES/plinn.mo differ
index 91520a8..3b25aee 100755 (executable)
@@ -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)."
index d3f8d68..dad2ec4 100644 (file)
@@ -522,9 +522,6 @@ msgstr ""
 msgid "New layer"
 msgstr ""
 
-msgid "News Item"
-msgstr ""
-
 msgid "No document"
 msgstr ""
 
index 75ab20f..845156d 100644 (file)
@@ -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 <benoit.pin@ensmp.fr>\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 ""
 
index 3c6d24c..e72a243 100644 (file)
       for="Products.CMFCore.interfaces.ISiteRoot"
       />
 
+  <genericsetup:registerProfile
+      name="photo"
+      title="Plinn photo site"
+      description="Profile for a photo based Plinn site."
+      for="Products.CMFCore.interfaces.ISiteRoot"
+      />
 </configure>
diff --git a/profiles/photo/actions.xml b/profiles/photo/actions.xml
new file mode 100644 (file)
index 0000000..3a1458c
--- /dev/null
@@ -0,0 +1,386 @@
+<?xml version="1.0"?>
+<object name="portal_actions" meta_type="CMF Actions Tool"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <action-provider name="portal_types"/>
+ <action-provider name="portal_workflow"/>
+ <action-provider name="portal_actions"/>
+ <action-provider name="portal_calendar"/>
+ <object name="user" meta_type="CMF Action Category">
+  <property name="title"></property>
+  <object name="selection" meta_type="CMF Action" i18n:domain="portfolio">
+   <property name="title" i18n:translate="">My selection</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${portal_url}/selection_view</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr"></property>
+   <property name="permissions"/>
+   <property name="visible">True</property>
+  </object>
+  <object name="panier" meta_type="CMF Action" i18n:domain="portfolio">
+   <property name="title" i18n:translate="">My cart</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${portal_url}/my_cart</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr"></property>
+   <property name="permissions">
+    <element value="View"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+  <object name="login" meta_type="CMF Action" i18n:domain="cmf_default">
+   <property name="title" i18n:translate="">Login</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${portal_url}/login_form</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr">not: member</property>
+   <property name="permissions">
+    <element value="View"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+  <object name="my_albums" meta_type="CMF Action" i18n:domain="portfolio">
+   <property name="title" i18n:translate="">My albums</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${portal_url}/member_albums</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr">member</property>
+   <property name="permissions">
+    <element value="View"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+  <object name="my_orders" meta_type="CMF Action" i18n:domain="photoprint">
+   <property name="title" i18n:translate="">My orders</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${portal_url}/my_orders</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr">member</property>
+   <property name="permissions">
+    <element value="View"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+  <object name="mystuff" meta_type="CMF Action" i18n:domain="cmf_default">
+   <property name="title" i18n:translate="">My stuff</property>
+   <property name="description" i18n:translate=""></property>
+   <property
+      name="url_expr">string:${portal/portal_membership/getHomeUrl}/folder_contents</property>
+   <property name="icon_expr"></property>
+   <property
+      name="available_expr">python: member and portal.portal_membership.getHomeFolder()</property>
+   <property name="permissions">
+    <element value="View"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+  <object name="addFavorite" meta_type="CMF Action" i18n:domain="cmf_default">
+   <property name="title" i18n:translate="">Add to favorites</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${object_url}/addtoFavorites</property>
+   <property name="icon_expr"></property>
+   <property
+      name="available_expr">portal/portal_membership/getHomeFolder</property>
+   <property name="permissions">
+    <element value="View"/>
+   </property>
+   <property name="visible">False</property>
+  </object>
+  <object name="favorites" meta_type="CMF Action" i18n:domain="cmf_default">
+   <property name="title" i18n:translate="">My favorites</property>
+   <property name="description" i18n:translate=""></property>
+   <property
+      name="url_expr">string:${portal/portal_membership/getHomeUrl}/Favorites/folder_contents</property>
+   <property name="icon_expr"></property>
+   <property
+      name="available_expr">python: member and hasattr(portal.portal_membership.getHomeFolder(), "Favorites")</property>
+   <property name="permissions">
+    <element value="View"/>
+   </property>
+   <property name="visible">False</property>
+  </object>
+  <object name="visionneuses" meta_type="CMF Action" i18n:domain="portfolio">
+   <property name="title" i18n:translate="">My lightboxes</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${object_url}/visionneuses</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr"></property>
+   <property name="permissions">
+    <element value="View"/>
+   </property>
+   <property name="visible">False</property>
+  </object>
+  <object name="preferences" meta_type="CMF Action" i18n:domain="cmf_default">
+   <property name="title" i18n:translate="">Preferences</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${portal_url}/personalize_form</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr">member</property>
+   <property name="permissions">
+    <element value="View"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+  <object name="logout" meta_type="CMF Action" i18n:domain="cmf_default">
+   <property name="title" i18n:translate="">Log out</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${portal_url}/logout?noajax=1</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr">member</property>
+   <property name="permissions">
+    <element value="View"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+  <object name="logged_in" meta_type="CMF Action" i18n:domain="cmf_default">
+   <property name="title" i18n:translate="">Logged in</property>
+   <property name="description" i18n:translate=""></property>
+   <property
+      name="url_expr">string:${portal_url}/homepage_dispatcher</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr"></property>
+   <property name="permissions">
+    <element value="View"/>
+   </property>
+   <property name="visible">False</property>
+  </object>
+  <object name="join" meta_type="CMF Action" i18n:domain="cmf_default">
+   <property name="title" i18n:translate="">Join</property>
+   <property name="description" i18n:translate=""></property>
+   <property
+      name="url_expr">string:${portal_url}/customer_join_form</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr">not: member</property>
+   <property name="permissions">
+    <element value="Add portal member"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+ </object>
+ <object name="folder" meta_type="CMF Action Category">
+  <property name="title"></property>
+  <object name="folderContents" meta_type="CMF Action" i18n:domain="plinn">
+   <property name="title" i18n:translate="">List</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${folder_url}/folder_contents</property>
+   <property name="icon_expr"></property>
+   <property
+      name="available_expr">python:member and folder is not object and object.portal_type !='Event'</property>
+   <property name="permissions">
+    <element value="List folder contents"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+ </object>
+ <object name="global" meta_type="CMF Action Category">
+  <property name="title"></property>
+  <object name="manage_boxes" meta_type="CMF Action" i18n:domain="plinn">
+   <property name="title" i18n:translate="">Manage Boxes</property>
+   <property name="description" i18n:translate=""></property>
+   <property
+      name="url_expr">string:${portal_url}/manage_boxes?noajax=1</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr"></property>
+   <property name="permissions">
+    <element value="Manage portal"/>
+   </property>
+   <property name="visible">False</property>
+  </object>
+  <object name="send_email" meta_type="CMF Action" i18n:domain="plinn">
+   <property name="title" i18n:translate="">Send an email</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${object_url}/send_email_form</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr">member</property>
+   <property name="permissions">
+    <element value="Manage portal"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+  <object name="undo" meta_type="CMF Action" i18n:domain="cmf_default">
+   <property name="title" i18n:translate="">Undo</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${portal_url}/undo_form</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr">member</property>
+   <property name="permissions">
+    <element value="Manage portal"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+  <object name="configPortal" meta_type="CMF Action" i18n:domain="plinn">
+   <property name="title" i18n:translate="">Configure Portal</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${portal_url}/reconfig_form</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr"></property>
+   <property name="permissions">
+    <element value="Manage portal"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+  <object name="manage_direcories" meta_type="CMF Action" i18n:domain="plinn">
+   <property name="title" i18n:translate="">Directory</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${portal_url}/groups_members</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr"></property>
+   <property name="permissions">
+    <element value="Manage Groups"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+ </object>
+ <object name="site_menu" meta_type="CMF Action Category">
+  <property name="title"></property>
+  <object name="images" meta_type="CMF Action" i18n:domain="realis">
+   <property name="title" i18n:translate="">Images</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${portal_url}/Images</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr"></property>
+   <property name="permissions">
+    <element value="View"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+  <object name="boutique" meta_type="CMF Action" i18n:domain="realis">
+   <property name="title" i18n:translate="">Boutique</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${portal_url}/Boutique</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr"></property>
+   <property name="permissions">
+    <element value="View"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+  <object name="services" meta_type="CMF Action" i18n:domain="realis">
+   <property name="title" i18n:translate="">Services</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${portal_url}/services</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr"></property>
+   <property name="permissions">
+    <element value="View"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+  <object name="photographes" meta_type="CMF Action" i18n:domain="realis">
+   <property name="title" i18n:translate="">Photographes</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${portal_url}/photographes</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr"></property>
+   <property name="permissions">
+    <element value="View"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+ </object>
+ <object name="site_related" meta_type="CMF Action Category">
+  <property name="title"></property>
+  <object name="credits" meta_type="CMF Action" i18n:domain="realis">
+   <property name="title" i18n:translate="">Credits</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${portal_url}/credits</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr"></property>
+   <property name="permissions">
+    <element value="View"/>
+   </property>
+   <property name="visible">False</property>
+  </object>
+  <object name="about" meta_type="CMF Action">
+   <property name="title">À propos</property>
+   <property name="description">realis</property>
+   <property name="url_expr">string:${portal_url}/about</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr"></property>
+   <property name="permissions">
+    <element value="View"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+  <object name="contact" meta_type="CMF Action" i18n:domain="realis">
+   <property name="title" i18n:translate="">Contact</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${portal_url}/contact</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr"></property>
+   <property name="permissions">
+    <element value="View"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+ </object>
+ <object name="discussion" meta_type="CMF Action Category">
+  <property name="title"></property>
+  <object name="reply" meta_type="CMF Action" i18n:domain="plinn">
+   <property name="title" i18n:translate="">Add comment...</property>
+   <property name="description" i18n:translate=""></property>
+   <property
+      name="url_expr">string:${object_url}/discussion_reply_form</property>
+   <property name="icon_expr"></property>
+   <property
+      name="available_expr">python: object is not None and object.meta_type != 'Discussion Item' and portal.portal_discussion.isDiscussionAllowedFor(object)</property>
+   <property name="permissions">
+    <element value="Reply to item"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+ </object>
+ <object name="object" meta_type="CMF Action Category">
+  <property name="title"></property>
+  <object name="noajax" meta_type="CMF Action" i18n:domain="cmf_default">
+   <property name="title" i18n:translate="">Syndicate</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${folder_url}/synPropertiesForm</property>
+   <property name="icon_expr"></property>
+   <property
+      name="available_expr">python: folder is object and portal.portal_syndication.isSiteSyndicationAllowed()</property>
+   <property name="permissions">
+    <element value="Manage properties"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+  <object name="calendar_view" meta_type="CMF Action" i18n:domain="plinn">
+   <property name="title" i18n:translate="">Calendar View</property>
+   <property name="description" i18n:translate=""></property>
+   <property name="url_expr">string:${folder_url}/calendar_view</property>
+   <property name="icon_expr"></property>
+   <property
+      name="available_expr">python:member and folder is object and object.portal_type in ['Plinn Folder', 'Portfolio']</property>
+   <property name="permissions">
+    <element value="List folder contents"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+ </object>
+ <object name="customer" meta_type="CMF Action Category">
+  <property name="title"></property>
+  <object name="join" meta_type="CMF Action" i18n:domain="realis">
+   <property name="title" i18n:translate="">Join</property>
+   <property name="description" i18n:translate=""></property>
+   <property
+      name="url_expr">string:${portal_url}/customer_join_form</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr">not: member</property>
+   <property name="permissions">
+    <element value="Add portal member"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+  <object name="login" meta_type="CMF Action" i18n:domain="realis">
+   <property name="title" i18n:translate="">Login</property>
+   <property name="description" i18n:translate=""></property>
+   <property
+      name="url_expr">string:${portal_url}/customer_login_form</property>
+   <property name="icon_expr"></property>
+   <property name="available_expr">not: member</property>
+   <property name="permissions">
+    <element value="View"/>
+   </property>
+   <property name="visible">True</property>
+  </object>
+ </object>
+</object>
diff --git a/profiles/photo/cachingpolicymgr.xml b/profiles/photo/cachingpolicymgr.xml
new file mode 100644 (file)
index 0000000..098e911
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<object name="caching_policy_manager" meta_type="CMF Caching Policy Manager">
+ <caching-policy name="ie_ajax" enable_304s="False" etag_func=""
+    last_modified="True" max_age_secs="0" mtime_func="object/modified"
+    must_revalidate="True" no_cache="True" no_store="True"
+    no_transform="False"
+    predicate="python:request['HTTP_USER_AGENT'].lower().find('msie') != -1 and request.get('ajax')"
+    private="False" proxy_revalidate="False" public="False" vary=""/>
+ <caching-policy name="ie_use_macro" enable_304s="False" etag_func=""
+    last_modified="True" max_age_secs="0" mtime_func="object/modified"
+    must_revalidate="True" no_cache="True" no_store="True"
+    no_transform="False"
+    predicate="python:request['HTTP_USER_AGENT'].lower().find('msie') != -1 and view == 'use_macro'"
+    private="False" proxy_revalidate="False" public="False" vary=""/>
+ <caching-policy name="ie_plinnDocumentXMLBody" enable_304s="False"
+    etag_func="" last_modified="True" max_age_secs="0"
+    mtime_func="object/modified" must_revalidate="True" no_cache="True"
+    no_store="True" no_transform="False"
+    predicate="python:request['HTTP_USER_AGENT'].lower().find('msie') != -1 and view == 'XMLBody'"
+    private="False" proxy_revalidate="False" public="False" vary=""/>
+</object>
diff --git a/profiles/photo/catalog.xml b/profiles/photo/catalog.xml
new file mode 100644 (file)
index 0000000..5ffb030
--- /dev/null
@@ -0,0 +1,126 @@
+<?xml version="1.0"?>
+<object name="portal_catalog" meta_type="CMF Catalog">
+ <property name="title"></property>
+ <object name="htmltext_lexicon" meta_type="ZCTextIndex Lexicon">
+  <element name="UTF-8 HTML Aware splitter with accents removal"
+     group="Word Splitter"/>
+  <element name="Case Normalizer" group="Case Normalizer"/>
+ </object>
+ <object name="plaintext_lexicon" meta_type="ZCTextIndex Lexicon">
+  <element name="UTF-8 Whitespace splitter with accents removal"
+     group="Word Splitter"/>
+  <element name="Case Normalizer" group="Case Normalizer"/>
+ </object>
+ <index name="Creator" meta_type="FieldIndex">
+  <indexed_attr value="Creator"/>
+ </index>
+ <index name="Date" meta_type="DateIndex">
+  <property name="index_naive_time_as_local">True</property>
+ </index>
+ <index name="DateTimeOriginal" meta_type="DateIndex">
+  <property name="index_naive_time_as_local">True</property>
+ </index>
+ <index name="Description" meta_type="ZCTextIndex">
+  <indexed_attr value="Description"/>
+  <extra name="index_type" value="Okapi BM25 Rank"/>
+  <extra name="lexicon_id" value="plaintext_lexicon"/>
+ </index>
+ <index name="SearchableText" meta_type="ZCTextIndex">
+  <indexed_attr value="SearchableText"/>
+  <extra name="index_type" value="Okapi BM25 Rank"/>
+  <extra name="lexicon_id" value="htmltext_lexicon"/>
+ </index>
+ <index name="Subject" meta_type="KeywordIndex">
+  <indexed_attr value="Subject"/>
+ </index>
+ <index name="Title" meta_type="ZCTextIndex">
+  <indexed_attr value="Title"/>
+  <extra name="index_type" value="Okapi BM25 Rank"/>
+  <extra name="lexicon_id" value="plaintext_lexicon"/>
+ </index>
+ <index name="Type" meta_type="FieldIndex">
+  <indexed_attr value="Type"/>
+ </index>
+ <index name="allowedRolesAndUsers" meta_type="KeywordIndex">
+  <indexed_attr value="allowedRolesAndUsers"/>
+ </index>
+ <index name="cmf_uid" meta_type="FieldIndex">
+  <indexed_attr value="cmf_uid"/>
+ </index>
+ <index name="created" meta_type="DateIndex">
+  <property name="index_naive_time_as_local">True</property>
+ </index>
+ <index name="effective" meta_type="DateIndex">
+  <property name="index_naive_time_as_local">True</property>
+ </index>
+ <index name="end" meta_type="DateIndex">
+  <property name="index_naive_time_as_local">True</property>
+ </index>
+ <index name="expires" meta_type="DateIndex">
+  <property name="index_naive_time_as_local">True</property>
+ </index>
+ <index name="getId" meta_type="FieldIndex">
+  <indexed_attr value="getId"/>
+ </index>
+ <index name="getMemberFullName" meta_type="FieldIndex">
+  <indexed_attr value="getMemberFullName"/>
+ </index>
+ <index name="getMemberSortableFormat" meta_type="FieldIndex">
+  <indexed_attr value="getMemberSortableFormat"/>
+ </index>
+ <index name="hiddenForAnonymous" meta_type="FieldIndex">
+  <indexed_attr value="hiddenForAnonymous"/>
+ </index>
+ <index name="in_reply_to" meta_type="FieldIndex">
+  <indexed_attr value="in_reply_to"/>
+ </index>
+ <index name="listCreators" meta_type="KeywordIndex">
+  <indexed_attr value="listCreators"/>
+ </index>
+ <index name="meta_type" meta_type="FieldIndex">
+  <indexed_attr value="meta_type"/>
+ </index>
+ <index name="modified" meta_type="DateIndex">
+  <property name="index_naive_time_as_local">True</property>
+ </index>
+ <index name="path" meta_type="ExtendedPathIndex"/>
+ <index name="portal_type" meta_type="FieldIndex">
+  <indexed_attr value="portal_type"/>
+ </index>
+ <index name="review_state" meta_type="FieldIndex">
+  <indexed_attr value="review_state"/>
+ </index>
+ <index name="start" meta_type="DateIndex">
+  <property name="index_naive_time_as_local">True</property>
+ </index>
+ <index name="tiles_available" meta_type="FieldIndex">
+  <indexed_attr value="tiles_available"/>
+ </index>
+ <column value="CreationDate"/>
+ <column value="Creator"/>
+ <column value="Date"/>
+ <column value="Description"/>
+ <column value="EffectiveDate"/>
+ <column value="ExpirationDate"/>
+ <column value="ModificationDate"/>
+ <column value="Subject"/>
+ <column value="Title"/>
+ <column value="Type"/>
+ <column value="cmf_uid"/>
+ <column value="created"/>
+ <column value="effective"/>
+ <column value="end"/>
+ <column value="expires"/>
+ <column value="getIcon"/>
+ <column value="getId"/>
+ <column value="getMemberFullName"/>
+ <column value="getMemberSortableFormat"/>
+ <column value="getThumbnailSize"/>
+ <column value="hiddenForAnonymous"/>
+ <column value="listCreators"/>
+ <column value="modified"/>
+ <column value="portal_type"/>
+ <column value="position"/>
+ <column value="review_state"/>
+ <column value="start"/>
+</object>
diff --git a/profiles/photo/componentregistry.xml b/profiles/photo/componentregistry.xml
new file mode 100644 (file)
index 0000000..8cf408a
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<componentregistry>
+ <adapters/>
+ <utilities>
+  <utility interface="Products.CMFCore.interfaces.IDiscussionTool"
+     object="portal_discussion"/>
+  <utility interface="Products.CMFCore.interfaces.IMetadataTool"
+     object="portal_metadata"/>
+  <utility interface="Products.CMFCore.interfaces.IPropertiesTool"
+     object="portal_properties"/>
+  <utility interface="Products.CMFCore.interfaces.ISiteRoot" object=""/>
+  <utility interface="Products.CMFCore.interfaces.ISyndicationTool"
+     object="portal_syndication"/>
+  <utility interface="Products.CMFCore.interfaces.IUndoTool"
+     object="portal_undo"/>
+  <utility interface="Products.GenericSetup.interfaces.ISetupTool"
+     object="portal_setup"/>
+  <utility interface="Products.MailHost.interfaces.IMailHost"
+     object="MailHost"/>
+  <utility
+     interface="Products.CMFUid.interfaces.IUniqueIdGenerator"
+     object="portal_uidgenerator"/>
+  <utility
+     interface="Products.CMFUid.interfaces.IUniqueIdAnnotationManagement"
+     object="portal_uidannotation"/>
+  <utility
+     interface="Products.CMFUid.interfaces.IUniqueIdHandler"
+     object="portal_uidhandler"/>
+  <utility interface="Products.CMFCore.interfaces.ICatalogTool"
+     object="portal_catalog"/>
+ </utilities>
+</componentregistry>
diff --git a/profiles/photo/contenttyperegistry.xml b/profiles/photo/contenttyperegistry.xml
new file mode 100644 (file)
index 0000000..3cc2552
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<object name="content_type_registry" meta_type="Content Type Registry">
+ <predicate name="link" content_type_name="Link" predicate_type="extension">
+  <argument value="url,link"/>
+ </predicate>
+ <predicate name="news" content_type_name="News Item"
+    predicate_type="extension">
+  <argument value="news"/>
+ </predicate>
+ <predicate name="document" content_type_name="Document"
+    predicate_type="major_minor">
+  <argument value="text"/>
+  <argument value=""/>
+ </predicate>
+ <predicate name="photo" content_type_name="Photo"
+    predicate_type="major_minor">
+  <argument value="image"/>
+  <argument value=""/>
+ </predicate>
+ <predicate name="photo_extensions" content_type_name="Photo"
+    predicate_type="extension">
+  <argument value="jpg,jpeg,JPG,JPEG"/>
+ </predicate>
+ <predicate name="file" content_type_name="File" predicate_type="major_minor">
+  <argument value="application"/>
+  <argument value=""/>
+ </predicate>
+</object>
diff --git a/profiles/photo/cookieauth.xml b/profiles/photo/cookieauth.xml
new file mode 100644 (file)
index 0000000..6c64558
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<object name="cookie_authentication" meta_type="Cookie Crumbler">
+ <property name="auth_cookie">__ac</property>
+ <property name="name_cookie">__ac_name</property>
+ <property name="pw_cookie">__ac_password</property>
+ <property name="persist_cookie">__ac_persistent</property>
+ <property name="auto_login_page">login_form</property>
+ <property name="logout_page">logged_out</property>
+ <property name="unauth_page"></property>
+ <property name="local_cookie_path">False</property>
+ <property name="cache_header_value">private</property>
+ <property name="log_username">True</property>
+</object>
diff --git a/profiles/photo/export_steps.xml b/profiles/photo/export_steps.xml
new file mode 100644 (file)
index 0000000..98969f3
--- /dev/null
@@ -0,0 +1,138 @@
+<?xml version="1.0"?>
+<export-steps>
+ <export-step id="actions"
+              handler="Products.CMFCore.exportimport.actions.exportActionProviders"
+              title="Action Providers">
+  
+  
+  Export actions tool's action providers and their actions.
+ </export-step>
+ <export-step id="caching_policy_mgr"
+              handler="Products.CMFCore.exportimport.cachingpolicymgr.exportCachingPolicyManager"
+              title="Caching Policies">
+  
+  
+  Export caching policy manager's policies.
+ </export-step>
+ <export-step id="catalog"
+              handler="Products.CMFCore.exportimport.catalog.exportCatalogTool"
+              title="Catalog Tool">
+  
+  
+  Export catalog tool's sub-objects, indexes and columns.
+ </export-step>
+ <export-step id="componentregistry"
+              handler="Products.GenericSetup.components.exportComponentRegistry"
+              title="Local Component Registry">
+  
+  
+    Export local component registry configuration.
+ </export-step>
+ <export-step id="content_type_registry"
+              handler="Products.CMFCore.exportimport.contenttyperegistry.exportContentTypeRegistry"
+              title="Content Type Registry">
+  
+  
+  Export content type registry's predicates / bindings.
+ </export-step>
+ <export-step id="cookieauth"
+              handler="Products.CMFCore.exportimport.cookieauth.exportCookieCrumbler"
+              title="Cookie Authentication">
+  
+  
+  Export cookie crumbler settings
+ </export-step>
+ <export-step id="mailhost"
+              handler="Products.CMFCore.exportimport.mailhost.exportMailHost"
+              title="MailHost">
+  
+  
+  Export the mailhost's settings and properties
+ </export-step>
+ <export-step id="properties"
+              handler="Products.CMFCore.exportimport.properties.exportSiteProperties"
+              title="Site Properties">
+  
+  
+  Export site properties.
+ </export-step>
+ <export-step id="rolemap"
+              handler="Products.GenericSetup.rolemap.exportRolemap"
+              title="Role / Permission Map">
+  
+  
+  Export custom roles and non-default role-permission mappings.
+ </export-step>
+ <export-step id="skins"
+              handler="Products.CMFCore.exportimport.skins.exportSkinsTool"
+              title="Skins Tool">
+  
+  
+  Export skins tool's filesystem directory views and skin path definitions.
+ </export-step>
+ <export-step id="step_registries"
+              handler="Products.GenericSetup.tool.exportStepRegistries"
+              title="Step Registries">
+  
+  
+  Export current contents of import step registry and export step registry.
+ </export-step>
+ <export-step id="toolset"
+              handler="Products.GenericSetup.tool.exportToolset"
+              title="Required Tools">
+  
+  
+  Export required / forbidden tools.
+ </export-step>
+ <export-step id="typeinfo"
+              handler="Products.CMFCore.exportimport.typeinfo.exportTypesTool"
+              title="Types Tool">
+  
+  
+  Export types tool's type information objects.
+ </export-step>
+ <export-step id="various-plinn-settings"
+              handler="Products.Plinn.setuphandlers.exportVarious"
+              title="Various Plinn settings">
+  
+  
+  Export various plinn settings as python script.
+ </export-step>
+ <export-step id="workflows"
+              handler="Products.CMFCore.exportimport.workflow.exportWorkflowTool"
+              title="Workflow Tool">
+  
+  
+  Export workflow tool's workflow definitions and supporting scripts.
+ </export-step>
+</export-steps>
diff --git a/profiles/photo/import_steps.xml b/profiles/photo/import_steps.xml
new file mode 100644 (file)
index 0000000..94b2d6b
--- /dev/null
@@ -0,0 +1,186 @@
+<?xml version="1.0"?>
+<import-steps>
+ <import-step id="actions" version="20071112-01"
+              handler="Products.CMFCore.exportimport.actions.importActionProviders"
+              title="Action Providers">
+  <dependency step="toolset"/>
+  
+  
+  
+  
+  Import actions tool's action providers and their actions.
+ </import-step>
+ <import-step id="caching_policy_mgr" version="20051011-01"
+              handler="Products.CMFCore.exportimport.cachingpolicymgr.importCachingPolicyManager"
+              title="Caching Policies">
+  <dependency step="toolset"/>
+  
+  
+  
+  
+  Import caching policy manager's policies.
+ </import-step>
+ <import-step id="catalog" version="20071112-01"
+              handler="Products.CMFCore.exportimport.catalog.importCatalogTool"
+              title="Catalog Tool">
+  <dependency step="toolset"/>
+  
+  
+  
+  
+  Import catalog tool's sub-objects, indexes and columns.
+ </import-step>
+ <import-step id="componentregistry" version="20061025-01"
+              handler="Products.GenericSetup.components.importComponentRegistry"
+              title="Local Component Registry">
+  
+  
+  
+  Import local component registry configuration.
+ </import-step>
+ <import-step id="content_type_registry"
+              version="20071112-01"
+              handler="Products.CMFCore.exportimport.contenttyperegistry.importContentTypeRegistry"
+              title="Content Type Registry">
+  <dependency step="componentregistry"/>
+  
+  
+  
+  
+  Import content type registry's predicates and bindings.
+ </import-step>
+ <import-step id="cookie_authentication"
+              version="20071112-01"
+              handler="Products.CMFCore.exportimport.cookieauth.importCookieCrumbler"
+              title="Cookie Authentication">
+  <dependency step="toolset"/>
+  
+  
+  
+  
+  Import cookie crumbler settings
+ </import-step>
+ <import-step id="mailhost" version="20071112-01"
+              handler="Products.CMFCore.exportimport.mailhost.importMailHost"
+              title="MailHost">
+  <dependency step="componentregistry"/>
+  <dependency step="toolset"/>
+  
+  
+  
+  
+  
+  
+  Import mailhost settings
+ </import-step>
+ <import-step id="properties" version="20071112-01"
+              handler="Products.CMFCore.exportimport.properties.importSiteProperties"
+              title="Site Properties">
+  
+  
+  Import site properties.
+ </import-step>
+ <import-step id="rolemap" version="20071112-01"
+              handler="Products.GenericSetup.rolemap.importRolemap"
+              title="Role / Permission Map">
+  
+  
+  Import custom roles and non-default role-permission mappings.
+ </import-step>
+ <import-step id="skins" version="20071112-01"
+              handler="Products.CMFCore.exportimport.skins.importSkinsTool"
+              title="Skins Tool">
+  <dependency step="componentregistry"/>
+  
+  
+  
+  
+  Import skins tool's filesystem directory views and skin path definitions.
+ </import-step>
+ <import-step id="toolset" version="20071112-01"
+              handler="Products.GenericSetup.tool.importToolset"
+              title="Required tools">
+  
+  
+  Create required tools, replacing any of the wrong class, and remove
+  forbidden ones.
+ </import-step>
+ <import-step id="typeinfo" version="20071112-01"
+              handler="Products.CMFCore.exportimport.typeinfo.importTypesTool"
+              title="Types Tool">
+  <dependency step="toolset"/>
+  
+  
+  
+  
+  Import types tool's type information objects.
+ </import-step>
+ <import-step id="various-calendar" version="20050316-01"
+              handler="Products.CMFCalendar.setuphandlers.importVarious"
+              title="Various Calendar Settings">
+  <dependency step="componentregistry"/>
+  <dependency step="toolset"/>
+  
+  
+  
+  
+  
+  Import various settings for CMF Calendar.
+  
+ </import-step>
+ <import-step id="various-plinn-settings"
+              version="20060112-01"
+              handler="Products.Plinn.setuphandlers.importVarious"
+              title="Various Plinn settings">
+  <dependency step="skins"/>
+  <dependency step="toolset"/>
+  <dependency step="typeinfo"/>
+  <dependency step="workflow"/>
+  
+  
+  
+  
+  
+  
+  Import various settings from Plinn products.
+  
+ </import-step>
+ <import-step id="workflow" version="20071112-01"
+              handler="Products.CMFCore.exportimport.workflow.importWorkflowTool"
+              title="Workflow Tool">
+  <dependency step="toolset"/>
+  
+  
+  
+  
+  Import workflow tool's workflow definitions and supporting scripts.
+ </import-step>
+</import-steps>
diff --git a/profiles/photo/mailhost.xml b/profiles/photo/mailhost.xml
new file mode 100644 (file)
index 0000000..b00cae5
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<object name="MailHost" meta_type="Mail Host" smtp_host="localhost"
+   smtp_port="25" smtp_pwd="" smtp_uid=""/>
diff --git a/profiles/photo/properties.xml b/profiles/photo/properties.xml
new file mode 100644 (file)
index 0000000..87304e5
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<site>
+ <property name="title">photo</property>
+ <property
+    name="description">Plinn photo website</property>
+ <property name="email_from_address"
+    type="string">postmaster@localhost</property>
+ <property name="email_from_name" type="string"></property>
+ <property name="thumb_height" type="int">192</property>
+ <property name="thumb_width" type="int">192</property>
+ <property name="available_editors" type="lines">
+  <element value="None"/>
+  <element value="Epoz"/>
+  <element value="FCK"/>
+ </property>
+ <property name="enable_permalink" type="boolean">True</property>
+ <property name="default_language" type="string">fr</property>
+ <property name="validate_email" type="boolean">False</property>
+ <property name="slide_size" type="int">222</property>
+ <property name="untitled_content_form" type="string">Untitled-</property>
+ <property name="default_charset" type="string">utf-8</property>
+ <property name="management_page_charset" type="string">utf-8</property>
+ <property name="unused_topic_fields" type="lines">
+  <element value="getMemberFullName"/>
+  <element value="getMemberSortableFormat"/>
+  <element value="Type"/>
+  <element value="meta_type"/>
+  <element value="in_reply_to"/>
+  <element value="Date"/>
+  <element value="end"/>
+  <element value="start"/>
+ </property>
+ <property name="keywords" type="lines">
+ </property>
+ <property name="ajax_config" type="int">2</property>
+ <property name="copyright_notice"
+    type="string"></property>
+ <property name="tiles_background_color" type="string">#484848</property>
+ <property name="tiles_min_zoom" type="int">25</property>
+ <property name="tiles_max_zoom" type="int">100</property>
+ <property name="tiles_step_zoom" type="int">25</property>
+</site>
diff --git a/profiles/photo/rolemap.xml b/profiles/photo/rolemap.xml
new file mode 100644 (file)
index 0000000..fa7767b
--- /dev/null
@@ -0,0 +1,149 @@
+<?xml version="1.0"?>
+<rolemap>
+  <roles>
+    <role name="Anonymous"/>
+    <role name="Authenticated"/>
+    <role name="Contributor"/>
+    <role name="Downloader"/>
+    <role name="Manager"/>
+    <role name="Member"/>
+    <role name="Owner"/>
+    <role name="Reader"/>
+    <role name="Reviewer"/>
+    <role name="UserManager"/>
+  </roles>
+  <permissions>
+    <permission name="Add Groups" acquire="True">
+      <role name="UserManager"/>
+    </permission>
+    <permission name="Add Lightbox" acquire="True">
+      <role name="Owner"/>
+    </permission>
+    <permission name="Add portal content" acquire="True">
+      <role name="Contributor"/>
+      <role name="Manager"/>
+      <role name="Owner"/>
+    </permission>
+    <permission name="Add portal events" acquire="True">
+      <role name="Contributor"/>
+      <role name="Owner"/>
+    </permission>
+    <permission name="Add portal folders" acquire="True">
+      <role name="Contributor"/>
+      <role name="Manager"/>
+      <role name="Owner"/>
+    </permission>
+    <permission name="Add portal member" acquire="False">
+      <role name="Manager"/>
+      <role name="UserManager"/>
+    </permission>
+    <permission name="Change Images and Files"
+                acquire="True">
+      <role name="Contributor"/>
+      <role name="Owner"/>
+    </permission>
+    <permission name="Check Member Permission"
+                acquire="True">
+      <role name="UserManager"/>
+    </permission>
+    <permission name="Delete Groups" acquire="True">
+      <role name="UserManager"/>
+    </permission>
+    <permission name="Delete Portal Contents" acquire="True">
+      <role name="Member"/>
+    </permission>
+    <permission name="Delete objects" acquire="True">
+      <role name="Manager"/>
+      <role name="Owner"/>
+    </permission>
+    <permission name="FTP access" acquire="True">
+      <role name="Manager"/>
+      <role name="Owner"/>
+    </permission>
+    <permission name="List folder contents" acquire="True">
+      <role name="Anonymous"/>
+      <role name="Contributor"/>
+      <role name="Downloader"/>
+      <role name="Reader"/>
+    </permission>
+    <permission name="List portal members" acquire="True">
+      <role name="Manager"/>
+      <role name="Member"/>
+    </permission>
+    <permission name="List undoable changes" acquire="True">
+      <role name="Manager"/>
+      <role name="Member"/>
+    </permission>
+    <permission name="Manage Groups" acquire="True">
+      <role name="UserManager"/>
+    </permission>
+    <permission name="Manage properties" acquire="True">
+      <role name="Manager"/>
+      <role name="Owner"/>
+    </permission>
+    <permission name="Modify portal content" acquire="True">
+      <role name="Contributor"/>
+      <role name="Owner"/>
+    </permission>
+    <permission name="Remove member" acquire="True">
+      <role name="UserManager"/>
+    </permission>
+    <permission name="Reply to item" acquire="True">
+      <role name="Manager"/>
+      <role name="Member"/>
+    </permission>
+    <permission name="Review portal content" acquire="True">
+      <role name="Manager"/>
+      <role name="Reviewer"/>
+    </permission>
+    <permission name="Set Local Roles" acquire="True">
+      <role name="Manager"/>
+    </permission>
+    <permission name="Set Member Password" acquire="True">
+      <role name="UserManager"/>
+    </permission>
+    <permission name="Set Member Properties" acquire="True">
+      <role name="UserManager"/>
+    </permission>
+    <permission name="Set own password" acquire="True">
+      <role name="Manager"/>
+      <role name="Member"/>
+    </permission>
+    <permission name="Set own properties" acquire="True">
+      <role name="Manager"/>
+      <role name="Member"/>
+    </permission>
+    <permission name="Undo changes" acquire="True">
+      <role name="Manager"/>
+      <role name="Owner"/>
+    </permission>
+    <permission name="Use Factories" acquire="True">
+      <role name="Manager"/>
+    </permission>
+    <permission name="Use mailhost services" acquire="True">
+      <role name="Manager"/>
+      <role name="Member"/>
+    </permission>
+    <permission name="View" acquire="True">
+      <role name="Contributor"/>
+      <role name="Downloader"/>
+      <role name="Owner"/>
+      <role name="Reader"/>
+    </permission>
+    <permission name="View Groups" acquire="True">
+      <role name="Member"/>
+    </permission>
+    <permission name="View management screens"
+                acquire="True">
+      <role name="Manager"/>
+      <role name="Owner"/>
+    </permission>
+    <permission name="View raw image" acquire="True">
+      <role name="Downloader"/>
+    </permission>
+    <permission name="WebDAV access" acquire="False">
+      <role name="Downloader"/>
+      <role name="Manager"/>
+    </permission>
+  </permissions>
+</rolemap>
diff --git a/profiles/photo/skins.xml b/profiles/photo/skins.xml
new file mode 100644 (file)
index 0000000..1ca266e
--- /dev/null
@@ -0,0 +1,93 @@
+<?xml version="1.0"?>
+<object name="portal_skins" meta_type="CMF Skins Tool" allow_any="False"
+   cookie_persistence="False" default_skin="Realis"
+   request_varname="portal_skin">
+ <object name="Images" meta_type="Filesystem Directory View"
+    directory="Products.CMFDefault:skins/Images"/>
+ <object name="custom" meta_type="Folder"/>
+ <object name="custom_content" meta_type="Filesystem Directory View"
+    directory="Products.Plinn:skins/custom_content"/>
+ <object name="custom_control" meta_type="Filesystem Directory View"
+    directory="Products.Plinn:skins/custom_control"/>
+ <object name="custom_generic" meta_type="Filesystem Directory View"
+    directory="Products.Plinn:skins/custom_generic"/>
+ <object name="cyberplus" meta_type="Filesystem Directory View"
+    directory="Products.cyberplus:skins"/>
+ <object name="epoz_core" meta_type="Filesystem Directory View"
+    directory="Products.Epoz:epoz/epoz_core"/>
+ <object name="epoz_i18n" meta_type="Filesystem Directory View"
+    directory="Products.Epoz:epoz/epoz_i18n"/>
+ <object name="epoz_images" meta_type="Filesystem Directory View"
+    directory="Products.Epoz:epoz/epoz_images"/>
+ <object name="fckeditor" meta_type="Filesystem Directory View"
+    directory="Products.FCKEditor:skins"/>
+ <object name="jscalendar" meta_type="Filesystem Directory View"
+    directory="Products.Plinn:skins/jscalendar"/>
+ <object name="mimetypes_icons" meta_type="Filesystem Directory View"
+    directory="Products.MimetypesRegistry:skins/mimetypes_icons"/>
+ <object name="mosaic_blocks" meta_type="Filesystem Directory View"
+    directory="Products.MosaicDocument:default_blocks"/>
+ <object name="mosaic_document" meta_type="Filesystem Directory View"
+    directory="Products.MosaicDocument:skins"/>
+ <object name="mosaic_slots" meta_type="Filesystem Directory View"
+    directory="Products.MosaicDocument:default_slots"/>
+ <object name="photoprint" meta_type="Filesystem Directory View"
+    directory="Products.photoprint:skins"/>
+ <object name="plinn_ajax" meta_type="Filesystem Directory View"
+    directory="Products.Plinn:skins/ajax_scripts"/>
+ <object name="plinn_content" meta_type="Filesystem Directory View"
+    directory="Products.Plinn:skins/content"/>
+ <object name="plinn_control" meta_type="Filesystem Directory View"
+    directory="Products.Plinn:skins/control"/>
+ <object name="plinn_document" meta_type="Filesystem Directory View"
+    directory="Products.PlinnDocument:skins"/>
+ <object name="plinn_generic" meta_type="Filesystem Directory View"
+    directory="Products.Plinn:skins/generic"/>
+ <object name="plinn_images" meta_type="Filesystem Directory View"
+    directory="Products.Plinn:skins/images"/>
+ <object name="portfolio" meta_type="Filesystem Directory View"
+    directory="Products.Portfolio:skins"/>
+ <object name="realis" meta_type="Filesystem Directory View"
+    directory="Products.realis:skins"/>
+ <object name="zpt_calendar" meta_type="Filesystem Directory View"
+    directory="Products.CMFCalendar:skins/zpt_calendar"/>
+ <object name="zpt_content" meta_type="Filesystem Directory View"
+    directory="Products.CMFDefault:skins/zpt_content"/>
+ <object name="zpt_control" meta_type="Filesystem Directory View"
+    directory="Products.CMFDefault:skins/zpt_control"/>
+ <object name="zpt_generic" meta_type="Filesystem Directory View"
+    directory="Products.CMFDefault:skins/zpt_generic"/>
+ <object name="zpt_topic" meta_type="Filesystem Directory View"
+    directory="Products.CMFTopic:skins/zpt_topic"/>
+ <skin-path name="Realis">
+  <layer name="custom"/>
+  <layer name="realis"/>
+  <layer name="photoprint"/>
+  <layer name="plinn_content"/>
+  <layer name="plinn_control"/>
+  <layer name="plinn_generic"/>
+  <layer name="plinn_ajax"/>
+  <layer name="plinn_images"/>
+  <layer name="custom_content"/>
+  <layer name="custom_control"/>
+  <layer name="custom_generic"/>
+  <layer name="portfolio"/>
+  <layer name="cyberplus"/>
+  <layer name="jscalendar"/>
+  <layer name="plinn_document"/>
+  <layer name="epoz_core"/>
+  <layer name="epoz_i18n"/>
+  <layer name="epoz_images"/>
+  <layer name="fckeditor"/>
+  <layer name="mosaic_document"/>
+  <layer name="mosaic_blocks"/>
+  <layer name="mosaic_slots"/>
+  <layer name="mimetypes_icons"/>
+  <layer name="zpt_topic"/>
+  <layer name="zpt_calendar"/>
+  <layer name="zpt_content"/>
+  <layer name="zpt_generic"/>
+  <layer name="zpt_control"/>
+  <layer name="Images"/>
+ </skin-path>
+</object>
diff --git a/profiles/photo/skins/custom.xml b/profiles/photo/skins/custom.xml
new file mode 100644 (file)
index 0000000..07d15fd
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<object name="custom" meta_type="Folder">
+ <property name="title"></property>
+</object>
diff --git a/profiles/photo/toolset.xml b/profiles/photo/toolset.xml
new file mode 100644 (file)
index 0000000..1320220
--- /dev/null
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<tool-setup>
+ <required tool_id="MailHost"
+           class="Products.MailHost.MailHost.MailHost"/>
+ <required tool_id="caching_policy_manager"
+           class="Products.CMFCore.CachingPolicyManager.CachingPolicyManager"/>
+ <required tool_id="content_type_registry"
+           class="Products.CMFCore.ContentTypeRegistry.ContentTypeRegistry"/>
+ <required tool_id="cookie_authentication"
+           class="Products.CMFCore.CookieCrumbler.CookieCrumbler"/>
+ <required tool_id="mimetypes_registry"
+           class="Products.MimetypesRegistry.MimeTypesRegistry.MimeTypesRegistry"/>
+ <required tool_id="mosaic_tool"
+           class="Products.MosaicDocument.MosaicTool.MosaicTool"/>
+ <required tool_id="portal_actions"
+           class="Products.CMFCore.ActionsTool.ActionsTool"/>
+ <required tool_id="portal_attachment"
+           class="Products.Plinn.AttachmentTool.AttachmentTool"/>
+ <required tool_id="portal_calendar"
+           class="Products.Plinn.CalendarTool.CalendarTool"/>
+ <required tool_id="portal_catalog"
+           class="Products.CMFCore.CatalogTool.CatalogTool"/>
+ <required tool_id="portal_discussion"
+           class="Products.CMFDefault.DiscussionTool.DiscussionTool"/>
+ <required tool_id="portal_groupdata"
+           class="Products.Plinn.GroupDataTool.GroupDataTool"/>
+ <required tool_id="portal_groups"
+           class="Products.Plinn.GroupsTool.GroupsTool"/>
+ <required tool_id="portal_image_manipulation"
+           class="Products.Portfolio.ImageManipulationTool.ImageManipulationTool"/>
+ <required tool_id="portal_memberdata"
+           class="Products.Plinn.MemberDataTool.MemberDataTool"/>
+ <required tool_id="portal_membership"
+           class="Products.Plinn.MembershipTool.MembershipTool"/>
+ <required tool_id="portal_metadata"
+           class="Products.CMFDefault.MetadataTool.MetadataTool"/>
+ <required tool_id="portal_photo_print"
+           class="Products.photoprint.tool.PhotoPrintTool"/>
+ <required tool_id="portal_properties"
+           class="Products.CMFDefault.PropertiesTool.PropertiesTool"/>
+ <required tool_id="portal_registration"
+           class="Products.Plinn.RegistrationTool.RegistrationTool"/>
+ <required tool_id="portal_skins"
+           class="Products.CMFCore.SkinsTool.SkinsTool"/>
+ <required tool_id="portal_syndication"
+           class="Products.CMFDefault.SyndicationTool.SyndicationTool"/>
+ <required tool_id="portal_transforms"
+           class="Products.PortalTransforms.TransformEngine.TransformTool"/>
+ <required tool_id="portal_types"
+           class="Products.CMFCore.TypesTool.TypesTool"/>
+ <required tool_id="portal_uidannotation"
+           class="Products.CMFUid.UniqueIdAnnotationTool.UniqueIdAnnotationTool"/>
+ <required tool_id="portal_uidgenerator"
+           class="Products.CMFUid.UniqueIdGeneratorTool.UniqueIdGeneratorTool"/>
+ <required tool_id="portal_uidhandler"
+           class="Products.CMFUid.UniqueIdHandlerTool.UniqueIdHandlerTool"/>
+ <required tool_id="portal_undo"
+           class="Products.CMFCore.UndoTool.UndoTool"/>
+ <required tool_id="portal_url"
+           class="Products.CMFCore.URLTool.URLTool"/>
+ <required tool_id="portal_workflow"
+           class="Products.CMFCore.WorkflowTool.WorkflowTool"/>
+</tool-setup>
diff --git a/profiles/photo/types.xml b/profiles/photo/types.xml
new file mode 100644 (file)
index 0000000..d15d20c
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<object name="portal_types" meta_type="CMF Types Tool">
+ <property name="title"></property>
+ <object name="CMF Site" meta_type="Factory-based Type Information"/>
+ <object name="Calendar" meta_type="Factory-based Type Information"/>
+ <object name="Discussion Item" meta_type="Factory-based Type Information"/>
+ <object name="Document" meta_type="Factory-based Type Information"/>
+ <object name="Event" meta_type="Factory-based Type Information"/>
+ <object name="Favorite" meta_type="Factory-based Type Information"/>
+ <object name="File" meta_type="Factory-based Type Information"/>
+ <object name="File Slot" meta_type="Factory-based Type Information"/>
+ <object name="Huge Plinn Folder" meta_type="Factory-based Type Information"/>
+ <object name="Image Slot" meta_type="Factory-based Type Information"/>
+ <object name="Lightbox" meta_type="Factory-based Type Information"/>
+ <object name="Link" meta_type="Factory-based Type Information"/>
+ <object name="List Slot" meta_type="Factory-based Type Information"/>
+ <object name="Mosaic Document" meta_type="Factory-based Type Information"/>
+ <object name="News Item" meta_type="Factory-based Type Information"/>
+ <object name="Order" meta_type="Factory-based Type Information"/>
+ <object name="Order Folder" meta_type="Factory-based Type Information"/>
+ <object name="Photo" meta_type="Factory-based Type Information"/>
+ <object name="Plinn Document" meta_type="Factory-based Type Information"/>
+ <object name="Plinn Folder" meta_type="Factory-based Type Information"/>
+ <object name="Portfolio" meta_type="Factory-based Type Information"/>
+ <object name="Spacer Slot" meta_type="Factory-based Type Information"/>
+ <object name="String Slot" meta_type="Factory-based Type Information"/>
+ <object name="Text Slot" meta_type="Factory-based Type Information"/>
+ <object name="Topic" meta_type="Factory-based Type Information"/>
+</object>
diff --git a/profiles/photo/types/CMF_Site.xml b/profiles/photo/types/CMF_Site.xml
new file mode 100644 (file)
index 0000000..4838f6d
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<object name="CMF Site" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title"></property>
+ <property name="description">Portal portal_type</property>
+ <property name="icon_expr">string:${portal_url}/plinn_icon.gif</property>
+ <property name="content_meta_type"></property>
+ <property name="product"></property>
+ <property name="factory"></property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view"></property>
+ <property name="global_allow">False</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="Calendar"/>
+  <element value="Document"/>
+  <element value="File"/>
+  <element value="Huge Plinn Folder"/>
+  <element value="News Item"/>
+  <element value="Order Folder"/>
+  <element value="Plinn Document"/>
+  <element value="Plinn Folder"/>
+  <element value="Portfolio"/>
+  <element value="Topic"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="index_html"/>
+ <alias from="mkdir" to="createPlinnFolder"/>
+ <alias from="view" to="index_html"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:${object_url}/index_html"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="List" action_id="folderContents" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_contents" visible="True">
+  <permission value="List folder contents"/>
+ </action>
+ <action title="New..." action_id="new" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_factories" visible="False">
+  <permission value="Add portal content"/>
+ </action>
+ <action title="Rename items" action_id="rename_items" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_rename_form" visible="False">
+  <permission value="Add portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/Calendar.xml b/profiles/photo/types/Calendar.xml
new file mode 100644 (file)
index 0000000..94f37c9
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<object name="Calendar" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Agenda</property>
+ <property name="description">Calendar contains events.</property>
+ <property name="icon_expr">string:${portal_url}/calendar_icon.gif</property>
+ <property name="content_meta_type">Plinn Calendar</property>
+ <property name="product">Plinn</property>
+ <property name="factory">manage_addPlinnFolder</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">object/view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="Event"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="cal_calendar_view"/>
+ <alias from="view" to="cal_calendar_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/cal_calendar_view" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_edit_form" visible="False">
+  <permission value="Manage properties"/>
+ </action>
+ <action title="Share" action_id="localroles" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_localrole_form" visible="True">
+  <permission value="Manage properties"/>
+ </action>
+ <action title="Status history" action_id="history" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/content_status_history" visible="True">
+  <permission value="Request review"/>
+  <permission value="Review portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/Discussion_Item.xml b/profiles/photo/types/Discussion_Item.xml
new file mode 100644 (file)
index 0000000..57b3007
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<object name="Discussion Item" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Discussion Item</property>
+ <property
+    name="description">Discussion Items are documents which reply to other content.
+  They should *not* be addable through the standard 'folder_factories' interface.</property>
+ <property name="icon_expr">string:${portal_url}/discussionitem_icon.gif</property>
+ <property name="content_meta_type">Discussion Item</property>
+ <property name="product"></property>
+ <property name="factory"></property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view"></property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="discussionitem_view"/>
+ <alias from="view" to="discussionitem_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/discussionitem_view" visible="False">
+  <permission value="View"/>
+ </action>
+ <action title="Reply..." action_id="reply" category="discussion"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/discussion_reply_form" visible="True">
+  <permission value="Reply to item"/>
+ </action>
+ <action title="Delete" action_id="del" category="discussion"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/discussionItemDelete" visible="True">
+  <permission value="Manage portal"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/Document.xml b/profiles/photo/types/Document.xml
new file mode 100644 (file)
index 0000000..dedc32f
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<object name="Document" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Document</property>
+ <property
+    name="description">Contain text that can be formatted using 'Structured Text.' It may also contain HTML, or "plain" text.</property>
+ <property name="icon_expr">string:${portal_url}/text.gif</property>
+ <property name="content_meta_type">Document</property>
+ <property name="product">CMFDefault</property>
+ <property name="factory">addDocument</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">object/edit</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="document_view"/>
+ <alias from="gethtml" to="source_html"/>
+ <alias from="info" to="content_info"/>
+ <alias from="view" to="document_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:${object_url}/document_view"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/document_edit_form" visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Share" action_id="localroles" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_localrole_form" visible="True">
+  <permission value="Set Local Roles"/>
+ </action>
+ <action title="History" action_id="changes" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/changes_history" visible="True">
+  <permission value="View History"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/Event.xml b/profiles/photo/types/Event.xml
new file mode 100644 (file)
index 0000000..293f8be
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<object name="Event" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Event</property>
+ <property
+    name="description">Events are objects for use in Calendar topical queries on the catalog.</property>
+ <property name="icon_expr">string:${portal_url}/event_icon.gif</property>
+ <property name="content_meta_type">CMF Event</property>
+ <property name="product">CMFCalendar</property>
+ <property name="factory">addEvent</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">object/edit</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="event_view"/>
+ <alias from="view" to="event_view"/>
+ <action title="Agenda" action_id="calendar_view" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${folder_url}" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:${object_url}/event_view"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/event_edit_form" visible="True">
+  <permission value="Change portal events"/>
+ </action>
+ <action title="Share" action_id="localroles" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_localrole_form" visible="True">
+  <permission value="Set Local Roles"/>
+ </action>
+ <action title="Status history" action_id="history" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/content_status_history" visible="True">
+  <permission value="Request review"/>
+  <permission value="Review portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/Favorite.xml b/profiles/photo/types/Favorite.xml
new file mode 100644 (file)
index 0000000..f93a817
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<object name="Favorite" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Favorite</property>
+ <property name="description">Link to an intra-portal resource.</property>
+ <property name="icon_expr">string:${portal_url}/link_icon.gif</property>
+ <property name="content_meta_type">Favorite</property>
+ <property name="product">CMFDefault</property>
+ <property name="factory">addFavorite</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">object/edit</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="favorite_view"/>
+ <alias from="view" to="favorite_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:${object_url}/favorite_view"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:${object_url}/link_edit_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/File.xml b/profiles/photo/types/File.xml
new file mode 100644 (file)
index 0000000..1cc4cec
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<object name="File" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">File</property>
+ <property name="description">Contain arbitrary downloadable files.</property>
+ <property name="icon_expr">string:${portal_url}/application.png</property>
+ <property name="content_meta_type">Plinn File</property>
+ <property name="product">Plinn</property>
+ <property name="factory">addFile</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">object/edit</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="index_html"/>
+ <alias from="info" to="file_info"/>
+ <alias from="view" to="file_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:${object_url}/file_view"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Web preview" action_id="preview" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/preview" visible="False">
+  <permission value="View"/>
+ </action>
+ <action title="Download" action_id="download" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}" visible="False">
+  <permission value="View"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:${object_url}/file_edit_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Share" action_id="localroles" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_localrole_form" visible="True">
+  <permission value="Set Local Roles"/>
+ </action>
+ <action title="Status history" action_id="history" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/content_status_history" visible="True">
+  <permission value="Request review"/>
+  <permission value="Review portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/File_Slot.xml b/profiles/photo/types/File_Slot.xml
new file mode 100644 (file)
index 0000000..f5800c4
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<object name="File Slot" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">File Slot</property>
+ <property name="description">File Slot for Mosaic Document</property>
+ <property name="icon_expr">string:${portal_url}/mosaic_tool/bin_icon.gif</property>
+ <property name="content_meta_type">File Slot</property>
+ <property name="product">MosaicDocument</property>
+ <property name="factory">addFileSlot</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="slot_file_view"/>
+ <alias from="view" to="slot_file_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:slot_file_view"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:slot_file_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/Huge_Plinn_Folder.xml b/profiles/photo/types/Huge_Plinn_Folder.xml
new file mode 100644 (file)
index 0000000..49c99af
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<object name="Huge Plinn Folder" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Huge Folder</property>
+ <property
+    name="description">Container to put content in categories.</property>
+ <property name="icon_expr">string:${portal_url}/folder_icon.gif</property>
+ <property name="content_meta_type">Huge Plinn Folder</property>
+ <property name="product"></property>
+ <property name="factory">plinn.folder.huge</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">object/folderContents</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="Calendar"/>
+  <element value="Document"/>
+  <element value="File"/>
+  <element value="Link"/>
+  <element value="Mosaic Document"/>
+  <element value="News Item"/>
+  <element value="Plinn Document"/>
+  <element value="Plinn Folder"/>
+  <element value="Huge Plinn Folder"/>
+  <element value="Portfolio"/>
+  <element value="Topic"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="folder_contents"/>
+ <alias from="mkdir" to="createHugePlinnFolder"/>
+ <alias from="view" to="folder_contents"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_contents" visible="False">
+  <permission value="View"/>
+ </action>
+ <action title="List" action_id="folderContents" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_contents" visible="True">
+  <permission value="List folder contents"/>
+ </action>
+ <action title="Share" action_id="localroles" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_localrole_form" visible="True">
+  <permission value="Set Local Roles"/>
+ </action>
+ <action title="New..." action_id="new" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_factories" visible="False">
+  <permission value="Add portal content"/>
+ </action>
+ <action title="Rename items" action_id="rename_items" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_rename_form" visible="False">
+  <permission value="Add portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/Image_Slot.xml b/profiles/photo/types/Image_Slot.xml
new file mode 100644 (file)
index 0000000..13a4af6
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<object name="Image Slot" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Image Slot</property>
+ <property name="description">Image Slot for Mosaic Document</property>
+ <property name="icon_expr">string:${portal_url}/mosaic_tool/photo_icon.gif</property>
+ <property name="content_meta_type">Image Slot</property>
+ <property name="product">MosaicDocument</property>
+ <property name="factory">addImageSlot</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="slot_image_view"/>
+ <alias from="view" to="slot_image_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:slot_image_view"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:slot_image_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/Lightbox.xml b/profiles/photo/types/Lightbox.xml
new file mode 100644 (file)
index 0000000..def8f7e
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<object name="Lightbox" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Lightbox</property>
+ <property name="description">lightbox holds references to photos</property>
+ <property name="icon_expr">string:${portal_url}/lightbox_icon.png</property>
+ <property name="content_meta_type">Lightbox</property>
+ <property name="product"></property>
+ <property name="factory">portfolio.lightbox</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">object/view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="lightbox_view"/>
+ <alias from="view" to="lightbox_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:${object_url}/lightbox_view"
+    visible="True">
+  <permission value="View"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/Link.xml b/profiles/photo/types/Link.xml
new file mode 100644 (file)
index 0000000..0172f76
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<object name="Link" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Link</property>
+ <property name="description">Annotated URL.</property>
+ <property name="icon_expr">string:${portal_url}/link_icon.gif</property>
+ <property name="content_meta_type">Link</property>
+ <property name="product">CMFDefault</property>
+ <property name="factory">addLink</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">object/edit</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="link_view"/>
+ <alias from="info" to="content_info"/>
+ <alias from="view" to="link_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:${object_url}/link_view"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:${object_url}/link_edit_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Share" action_id="localroles" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_localrole_form" visible="True">
+  <permission value="Set Local Roles"/>
+ </action>
+ <action title="Status history" action_id="history" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/content_status_history" visible="True">
+  <permission value="Request review"/>
+  <permission value="Review portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/List_Slot.xml b/profiles/photo/types/List_Slot.xml
new file mode 100644 (file)
index 0000000..1da28ad
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<object name="List Slot" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">List Slot</property>
+ <property name="description">List Slot for Mosaic Document</property>
+ <property name="icon_expr">string:${portal_url}/mosaic_tool/str_icon.gif</property>
+ <property name="content_meta_type">List Slot</property>
+ <property name="product">MosaicDocument</property>
+ <property name="factory">addStringSlot</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="slot_list_view"/>
+ <alias from="view" to="slot_list_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:slot_list_view"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:slot_text_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/Mosaic_Document.xml b/profiles/photo/types/Mosaic_Document.xml
new file mode 100644 (file)
index 0000000..23bc637
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<object name="Mosaic Document" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Mosaic Document</property>
+ <property name="description"></property>
+ <property name="icon_expr">string:${portal_url}/mosaic_icon.gif</property>
+ <property name="content_meta_type">Mosaic Document</property>
+ <property name="product">MosaicDocument</property>
+ <property name="factory">addMosaicDocument</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">object/edit</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">False</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="mosaicdocument_view"/>
+ <alias from="info" to="content_info"/>
+ <alias from="view" to="mosaicdocument_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/mosaicdocument_view" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/mosaicdocument_edit_form" visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Share" action_id="localroles" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_localrole_form" visible="True">
+  <permission value="Set Local Roles"/>
+ </action>
+ <action title="Status history" action_id="history" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/content_status_history" visible="True">
+  <permission value="Request review"/>
+  <permission value="Review portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/News_Item.xml b/profiles/photo/types/News_Item.xml
new file mode 100644 (file)
index 0000000..68f1717
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<object name="News Item" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">News Item</property>
+ <property
+    name="description">Short text article with a title and an optional lead-in.</property>
+ <property name="icon_expr">string:${portal_url}/newsitem_icon.gif</property>
+ <property name="content_meta_type">News Item</property>
+ <property name="product">CMFDefault</property>
+ <property name="factory">addNewsItem</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">object/edit</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="newsitem_view"/>
+ <alias from="gethtml" to="source_html"/>
+ <alias from="info" to="content_info"/>
+ <alias from="view" to="newsitem_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:${object_url}/newsitem_view"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/newsitem_edit_form" visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Share" action_id="localroles" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_localrole_form" visible="True">
+  <permission value="Set Local Roles"/>
+ </action>
+ <action title="Status history" action_id="history" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/content_status_history" visible="True">
+  <permission value="Request review"/>
+  <permission value="Review portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/Order.xml b/profiles/photo/types/Order.xml
new file mode 100644 (file)
index 0000000..c5c021d
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<object name="Order" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Order</property>
+ <property name="description"></property>
+ <property name="icon_expr">string:${portal_url}/text.gif</property>
+ <property name="content_meta_type">Print order</property>
+ <property name="product"></property>
+ <property name="factory">photoprint.order</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">object/edit</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="order_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:${object_url}/order_view"
+    visible="True">
+  <permission value="View"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/Order_Folder.xml b/profiles/photo/types/Order_Folder.xml
new file mode 100644 (file)
index 0000000..4378dbb
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<object name="Order Folder" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Order Folder</property>
+ <property name="description"></property>
+ <property name="icon_expr">string:${portal_url}/folder_icon.gif</property>
+ <property name="content_meta_type">Huge Plinn Folder</property>
+ <property name="product"></property>
+ <property name="factory">plinn.folder.huge</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">object/folderContents</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="Order"/>
+  <element value="Order Folder"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="order_list"/>
+ <alias from="mkdir" to="createHugePlinnFolder"/>
+ <alias from="view" to="folder_contents"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_contents" visible="False">
+  <permission value="View"/>
+ </action>
+ <action title="List" action_id="orderlist" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/order_list" visible="True">
+  <permission value="List print orders"/>
+ </action>
+ <action title="Share" action_id="localroles" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_localrole_form" visible="True">
+  <permission value="Set Local Roles"/>
+ </action>
+ <action title="New..." action_id="new" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_factories" visible="False">
+  <permission value="Add portal content"/>
+ </action>
+ <action title="Rename items" action_id="rename_items" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_rename_form" visible="False">
+  <permission value="Add portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/Photo.xml b/profiles/photo/types/Photo.xml
new file mode 100644 (file)
index 0000000..9ab28d1
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<object name="Photo" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Photo</property>
+ <property name="description">Photo</property>
+ <property name="icon_expr">string:${portal_url}/photo_icon.gif</property>
+ <property name="content_meta_type">Photo</property>
+ <property name="product"></property>
+ <property name="factory">portfolio.photo</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">object/edit</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="photo_view"/>
+ <alias from="info" to="photo_info"/>
+ <alias from="view" to="photo_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:${object_url}/photo_view"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/photo_edit_form" visible="True">
+  <permission value="Manage properties"/>
+ </action>
+ <action title="Share" action_id="localroles" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_localrole_form" visible="True">
+  <permission value="Set Local Roles"/>
+ </action>
+ <action title="Printing settings" action_id="printing_settings"
+    category="object" condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/photoprint_templates_edit_form"
+    visible="True">
+  <permission value="Manage print order template"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/Plinn_Document.xml b/profiles/photo/types/Plinn_Document.xml
new file mode 100644 (file)
index 0000000..ff2f692
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<object name="Plinn Document" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Plinn Document</property>
+ <property
+    name="description">Plinn Documents contain text and images that can be layout with  WYSIWYG and drag&amp;drop editor.</property>
+ <property name="icon_expr">string:${portal_url}/plinn_doc.gif</property>
+ <property name="content_meta_type">Plinn Document</property>
+ <property name="product"></property>
+ <property name="factory">plinndocument</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">object/edit</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="plinndocument_view"/>
+ <alias from="gethtml" to="source_html"/>
+ <alias from="info" to="content_info"/>
+ <alias from="view" to="plinndocument_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/plinndocument_view" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/plinndocument_edit_form" visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="Share" action_id="localroles" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_localrole_form" visible="True">
+  <permission value="Set Local Roles"/>
+ </action>
+ <action title="Status history" action_id="history" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/content_status_history" visible="True">
+  <permission value="Request review"/>
+  <permission value="Review portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/Plinn_Folder.xml b/profiles/photo/types/Plinn_Folder.xml
new file mode 100644 (file)
index 0000000..41663ff
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<object name="Plinn Folder" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Folder</property>
+ <property
+    name="description">Container to put content in categories.</property>
+ <property name="icon_expr">string:${portal_url}/folder_icon.gif</property>
+ <property name="content_meta_type">Plinn Folder</property>
+ <property name="product"></property>
+ <property name="factory">plinn.folder.normal</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">object/folderContents</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="Calendar"/>
+  <element value="Document"/>
+  <element value="File"/>
+  <element value="News Item"/>
+  <element value="Plinn Document"/>
+  <element value="Plinn Folder"/>
+  <element value="Portfolio"/>
+  <element value="Topic"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="plinn_folder_view"/>
+ <alias from="mkdir" to="createPlinnFolder"/>
+ <alias from="view" to="folder_contents"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_contents" visible="False">
+  <permission value="View"/>
+ </action>
+ <action title="List" action_id="folderContents" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_contents" visible="True">
+  <permission value="List folder contents"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_contents" visible="False">
+  <permission value="Manage properties"/>
+ </action>
+ <action title="Share" action_id="localroles" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_localrole_form" visible="True">
+  <permission value="Set Local Roles"/>
+ </action>
+ <action title="New..." action_id="new" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_factories" visible="False">
+  <permission value="Add portal content"/>
+ </action>
+ <action title="Rename items" action_id="rename_items" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_rename_form" visible="False">
+  <permission value="Add portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/Portfolio.xml b/profiles/photo/types/Portfolio.xml
new file mode 100644 (file)
index 0000000..15fee88
--- /dev/null
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<object name="Portfolio" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Collection</property>
+ <property name="description">Folder for photo storage</property>
+ <property name="icon_expr">string:${portal_url}/portfolio_icon.gif</property>
+ <property name="content_meta_type">Portfolio</property>
+ <property name="product"></property>
+ <property name="factory">portfolio.portfolio</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">object/import</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="Photo"/>
+  <element value="Portfolio"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="portfolio_view"/>
+ <alias from="mkdir" to="createPortfolio"/>
+ <alias from="view" to="portfolio_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:${object_url}/portfolio_view"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Slide show" action_id="noajax" category="object"
+    condition_expr="python:object.listNearestFolderContents(contentFilter={'portal_type' : 'Photo'})"
+    icon_expr="" link_target="" url_expr="string:${object_url}/slide_show"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Presentation" action_id="presentation" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/portfolio_presentation_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+ <action title="List" action_id="folderContents" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_contents" visible="True">
+  <permission value="List folder contents"/>
+ </action>
+ <action title="Import" action_id="import" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/portfolio_edit_form" visible="True">
+  <permission value="Add portal content"/>
+ </action>
+ <action title="Share" action_id="localroles" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_localrole_form" visible="True">
+  <permission value="Set Local Roles"/>
+ </action>
+ <action title="Printing settings" action_id="printing_settings"
+    category="object" condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/photoprint_templates_edit_form"
+    visible="True">
+  <permission value="Manage print order template"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_contents" visible="False">
+  <permission value="Manage properties"/>
+ </action>
+ <action title="New..." action_id="new" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_factories" visible="False">
+  <permission value="Add portal content"/>
+ </action>
+ <action title="Rename items" action_id="rename_items" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_rename_form" visible="False">
+  <permission value="Add portal content"/>
+ </action>
+ <action title="mkdir" action_id="mkdir" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:createPortfolio"
+    visible="False">
+  <permission value="Add portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/Spacer_Slot.xml b/profiles/photo/types/Spacer_Slot.xml
new file mode 100644 (file)
index 0000000..f34dccb
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<object name="Spacer Slot" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Spacer Slot</property>
+ <property name="description">Spacer Slot for Mosaic Document</property>
+ <property name="icon_expr">string:${portal_url}/mosaic_tool/spacer_icon.gif</property>
+ <property name="content_meta_type">Spacer Slot</property>
+ <property name="product">MosaicDocument</property>
+ <property name="factory">addSpacerSlot</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="slot_spacer_view"/>
+ <alias from="view" to="slot_spacer_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:slot_spacer_view"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:slot_spacer_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/String_Slot.xml b/profiles/photo/types/String_Slot.xml
new file mode 100644 (file)
index 0000000..428e4f9
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<object name="String Slot" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">String Slot</property>
+ <property name="description">String Slot for Mosaic Document</property>
+ <property name="icon_expr">string:${portal_url}/mosaic_tool/str_icon.gif</property>
+ <property name="content_meta_type">String Slot</property>
+ <property name="product">MosaicDocument</property>
+ <property name="factory">addStringSlot</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="slot_string_view"/>
+ <alias from="view" to="slot_string_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:slot_string_view"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:slot_string_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/Text_Slot.xml b/profiles/photo/types/Text_Slot.xml
new file mode 100644 (file)
index 0000000..b15e189
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<object name="Text Slot" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title">Text Slot</property>
+ <property name="description">Text Slot for Mosaic Document</property>
+ <property name="icon_expr">string:${portal_url}/mosaic_tool/txt_icon.gif</property>
+ <property name="content_meta_type">Text Slot</property>
+ <property name="product">MosaicDocument</property>
+ <property name="factory">addStringSlot</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">view</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types"/>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="slot_text_view"/>
+ <alias from="view" to="slot_text_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:slot_text_view"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:slot_text_form"
+    visible="True">
+  <permission value="Modify portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/types/Topic.xml b/profiles/photo/types/Topic.xml
new file mode 100644 (file)
index 0000000..8c62c8d
--- /dev/null
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<object name="Topic" meta_type="Factory-based Type Information"
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+ <property name="title"></property>
+ <property
+    name="description">Topics are canned queries for organizing content with up to date queries into the catalog.</property>
+ <property name="icon_expr">string:${portal_url}/topic_icon.gif</property>
+ <property name="content_meta_type">Plinn Topic</property>
+ <property name="product"></property>
+ <property name="factory">plinn.topic</property>
+ <property name="add_view_expr"></property>
+ <property name="link_target"></property>
+ <property name="immediate_view">object/edit</property>
+ <property name="global_allow">True</property>
+ <property name="filter_content_types">True</property>
+ <property name="allowed_content_types">
+  <element value="Topic"/>
+ </property>
+ <property name="allow_discussion">False</property>
+ <alias from="(Default)" to="topic_view"/>
+ <alias from="view" to="topic_view"/>
+ <action title="View" action_id="view" category="object" condition_expr=""
+    icon_expr="" link_target="" url_expr="string:${object_url}/topic_view"
+    visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="Edit" action_id="edit" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/topic_edit_form" visible="True">
+  <permission value="Change portal topics"/>
+ </action>
+ <action title="Subtopics" action_id="folderContents" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_contents" visible="True">
+  <permission value="View"/>
+ </action>
+ <action title="New..." action_id="new" category="object" condition_expr=""
+    icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_factories" visible="False">
+  <permission value="Add portal topics"/>
+ </action>
+ <action title="Rename items" action_id="rename_items" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/folder_rename_form" visible="False">
+  <permission value="Add portal topics"/>
+ </action>
+ <action title="Status history" action_id="history" category="object"
+    condition_expr="" icon_expr="" link_target=""
+    url_expr="string:${object_url}/content_status_history" visible="True">
+  <permission value="Request review"/>
+  <permission value="Review portal content"/>
+ </action>
+</object>
diff --git a/profiles/photo/typestool.xml b/profiles/photo/typestool.xml
new file mode 100644 (file)
index 0000000..dcedfbf
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<types-tool>
+ <type id="CMF Site" filename="types/CMF_Site.xml"/>
+ <type id="Calendar"/>
+ <type id="Discussion Item"
+       filename="types/Discussion_Item.xml"/>
+ <type id="Document"/>
+ <type id="Event"/>
+ <type id="Favorite"/>
+ <type id="File"/>
+ <type id="File Slot" filename="types/File_Slot.xml"/>
+ <type id="Huge Plinn Folder"
+       filename="types/Huge_Plinn_Folder.xml"/>
+ <type id="Image Slot" filename="types/Image_Slot.xml"/>
+ <type id="Lightbox"/>
+ <type id="Link"/>
+ <type id="List Slot" filename="types/List_Slot.xml"/>
+ <type id="Mosaic Document"
+       filename="types/Mosaic_Document.xml"/>
+ <type id="News Item" filename="types/News_Item.xml"/>
+ <type id="Photo"/>
+ <type id="Plinn Document"
+       filename="types/Plinn_Document.xml"/>
+ <type id="Plinn Folder" filename="types/Plinn_Folder.xml"/>
+ <type id="Portfolio"/>
+ <type id="Spacer Slot" filename="types/Spacer_Slot.xml"/>
+ <type id="String Slot" filename="types/String_Slot.xml"/>
+ <type id="Text Slot" filename="types/Text_Slot.xml"/>
+ <type id="Topic"/>
+</types-tool>
diff --git a/profiles/photo/various.py b/profiles/photo/various.py
new file mode 100644 (file)
index 0000000..2932d81
--- /dev/null
@@ -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 (file)
index 0000000..cf8ec47
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<object name="portal_workflow" meta_type="CMF Workflow Tool">
+ <property name="title"></property>
+ <object name="default_workflow" meta_type="Workflow"/>
+ <object name="folder_workflow" meta_type="Workflow"/>
+ <object name="member_workflow" meta_type="Workflow"/>
+ <object name="order_workflow" meta_type="Workflow"/>
+ <object name="portfolio_workflow" meta_type="Workflow"/>
+ <bindings>
+  <default>
+   <bound-workflow workflow_id="default_workflow"/>
+  </default>
+  <type type_id="CMF Site"/>
+  <type type_id="Calendar">
+   <bound-workflow workflow_id="folder_workflow"/>
+  </type>
+  <type type_id="Discussion Item"/>
+  <type type_id="File Slot"/>
+  <type type_id="Huge Plinn Folder">
+   <bound-workflow workflow_id="folder_workflow"/>
+  </type>
+  <type type_id="Image Slot"/>
+  <type type_id="List Slot"/>
+  <type type_id="Order">
+   <bound-workflow workflow_id="order_workflow"/>
+  </type>
+  <type type_id="Order Folder"/>
+  <type type_id="Photo"/>
+  <type type_id="Plinn Folder">
+   <bound-workflow workflow_id="folder_workflow"/>
+  </type>
+  <type type_id="Portfolio">
+   <bound-workflow workflow_id="portfolio_workflow"/>
+  </type>
+  <type type_id="Spacer Slot"/>
+  <type type_id="String Slot"/>
+  <type type_id="Text Slot"/>
+ </bindings>
+</object>
diff --git a/profiles/photo/workflows/default_workflow/definition.xml b/profiles/photo/workflows/default_workflow/definition.xml
new file mode 100644 (file)
index 0000000..a8373a3
--- /dev/null
@@ -0,0 +1,256 @@
+<?xml version="1.0"?>
+<dc-workflow workflow_id="default_workflow"
+             title="Plinn default workflow" description=""
+             state_variable="review_state"
+             initial_state="private" manager_bypass="0">
+ <permission>Access contents information</permission>
+ <permission>Change portal events</permission>
+ <permission>Change portal topics</permission>
+ <permission>Delete Owned Objects</permission>
+ <permission>Manage properties</permission>
+ <permission>Modify portal content</permission>
+ <permission>View</permission>
+ <state state_id="pending" title="Waiting for reviewer">
+  <exit-transition transition_id="publish"/>
+  <exit-transition transition_id="reject"/>
+  <exit-transition transition_id="retract"/>
+  <permission-map name="Access contents information"
+                  acquired="True">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Change portal events"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Reviewer</permission-role>
+  </permission-map>
+  <permission-map name="Change portal topics"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Reviewer</permission-role>
+  </permission-map>
+  <permission-map name="Delete Owned Objects"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Manage properties" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Reviewer</permission-role>
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Reviewer</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Contributor</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+   <permission-role>Reader</permission-role>
+   <permission-role>Reviewer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="private"
+        title="Non-visible and editable only by owner">
+  <exit-transition transition_id="direct_publish"/>
+  <exit-transition transition_id="submit"/>
+  <permission-map name="Access contents information"
+                  acquired="False">
+   <permission-role>Contributor</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="Change portal events"
+                  acquired="False">
+   <permission-role>Contributor</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="Change portal topics"
+                  acquired="False">
+   <permission-role>Contributor</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="Delete Owned Objects"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="Manage properties" acquired="False">
+   <permission-role>Contributor</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Contributor</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Contributor</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+   <permission-role>Reader</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="published" title="Public">
+  <exit-transition transition_id="reject"/>
+  <exit-transition transition_id="retract"/>
+  <permission-map name="Access contents information"
+                  acquired="True">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Change portal events"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Change portal topics"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Delete Owned Objects"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Manage properties" acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>Anonymous</permission-role>
+   <permission-role>Manager</permission-role>
+  </permission-map>
+ </state>
+ <transition transition_id="direct_publish"
+             title="Reviewer publishes content"
+             new_state="published" trigger="USER"
+             before_script="" after_script="">
+  <description>Reviewer can directly publish content  if he have de Owner role (not necessarily ownership)</description>
+  <action url="%(content_url)s/content_publish_form?direct:boolean=True"
+          category="workflow">Publish</action>
+  <guard>
+   <guard-permission>Review portal content</guard-permission>
+   <guard-expression>python:user.allowed(here, ['Owner'])</guard-expression>
+  </guard>
+ </transition>
+ <transition transition_id="publish"
+             title="Reviewer publishes content"
+             new_state="published" trigger="USER"
+             before_script="" after_script="">
+  <action url="%(content_url)s/content_publish_form"
+          category="workflow">Publish</action>
+  <guard>
+   <guard-permission>Review portal content</guard-permission>
+  </guard>
+ </transition>
+ <transition transition_id="reject"
+             title="Reviewer rejects submission"
+             new_state="private" trigger="USER"
+             before_script="" after_script="">
+  <action url="%(content_url)s/content_reject_form"
+          category="workflow">Reject</action>
+  <guard>
+   <guard-permission>Review portal content</guard-permission>
+  </guard>
+ </transition>
+ <transition transition_id="retract"
+             title="Member retracts submission"
+             new_state="private" trigger="USER"
+             before_script="" after_script="">
+  <action url="%(content_url)s/content_retract_form"
+          category="workflow">Retract</action>
+  <guard>
+   <guard-permission>Request review</guard-permission>
+   <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))</guard-expression>
+  </guard>
+ </transition>
+ <transition transition_id="submit"
+             title="Member requests publishing"
+             new_state="pending" trigger="USER"
+             before_script="" after_script="">
+  <action url="%(content_url)s/content_submit_form"
+          category="workflow">Submit</action>
+  <guard>
+   <guard-permission>Request review</guard-permission>
+  </guard>
+ </transition>
+ <worklist worklist_id="reviewer_queue" title="">
+  <description>Reviewer tasks</description>
+  <action url="%(portal_url)s/list_pending_contents"
+          category="global">Pending (%(count)d)</action>
+  <guard>
+   <guard-expression>here/havePendingContents</guard-expression>
+  </guard>
+  <match name="review_state" values="pending"/>
+ </worklist>
+ <variable variable_id="action" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The last transition</description>
+  <default>
+   
+   <expression>transition/getId|nothing</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="actor" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The ID of the user who performed the last transition</description>
+  <default>
+   
+   <expression>user/getId</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="comments" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>Comments about the last transition</description>
+  <default>
+   
+   <expression>python:state_change.kwargs.get('comment', '')</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="email_sent" for_catalog="False"
+           for_status="True" update_always="True">
+  <default>
+   
+   <expression>python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', [])</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="review_history" for_catalog="False"
+           for_status="False" update_always="False">
+  <description>Provides access to workflow history</description>
+  <default>
+   
+   <expression>state_change/getHistory</expression>
+  </default>
+  <guard>
+   <guard-permission>Request review</guard-permission>
+   <guard-permission>Review portal content</guard-permission>
+  </guard>
+ </variable>
+ <variable variable_id="time" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>Time of the last transition</description>
+  <default>
+   
+   <expression>state_change/getDateTime</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <script script_id="sendNotificationEmail"
+         type="Script (Python)"
+         filename="workflows/default_workflow/scripts/sendNotificationEmail.py"
+         module="" function=""/>
+</dc-workflow>
diff --git a/profiles/photo/workflows/default_workflow/scripts/sendNotificationEmail.py b/profiles/photo/workflows/default_workflow/scripts/sendNotificationEmail.py
new file mode 100644 (file)
index 0000000..17dd864
--- /dev/null
@@ -0,0 +1,61 @@
+## Script (Python) "sendNotificationEmail"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=sci
+##title=
+##
+#TODO : translate messages
+#from Products.PlacelessTranslationService.MessageID import MessageIDFactory
+#_ = MessageIDFactory('plinn')
+_ = lambda x : lambda : x
+
+portal = context.portal_url.getPortalObject()
+
+mtool = portal.portal_membership
+
+recipients = sci.kwargs.get('recipients', [])
+if not recipients :
+       return []
+
+
+MailHost = portal.MailHost
+from quopri import encodestring
+
+def encodeAdr(member) :
+       name = member.getMemberFullName(nameBefore=0)
+       email = member.getProperty('email')
+       qpName = encodestring(name).replace('=\n', '')
+       return '''"=?utf-8?q?%s?=" <%s>''' % (qpName, email)
+
+
+object = sci.object
+
+sender = mtool.getAuthenticatedMember()
+sender = encodeAdr(sender)
+
+recipientsFormated = map(encodeAdr, mtool.getMembers( recipients ))
+mto = ', '.join(recipientsFormated)
+if mto[-2:] == ', ' :
+       mto = mto[:-2]
+
+footer = """
+------------
+Document : %s
+""" % object.absolute_url()
+
+
+message = context.echange_mail_template(  From = sender
+                                                                               , To = mto
+                                                                               , Subject = "=?utf-8?q?%s?=" % encodestring(portal.Title() + " : " + _("Document state change notificaction")()).replace('=\n', '')
+                                                                               , ContentType = 'text/plain'
+                                                                               , charset = 'UTF-8'
+                                                                               , body=sci.kwargs.get('comment', '')
+                                                                               , footer=footer)
+
+
+MailHost.send( message )
+
+return recipients
diff --git a/profiles/photo/workflows/folder_workflow/definition.xml b/profiles/photo/workflows/folder_workflow/definition.xml
new file mode 100644 (file)
index 0000000..eff5a82
--- /dev/null
@@ -0,0 +1,184 @@
+<?xml version="1.0"?>
+<dc-workflow workflow_id="folder_workflow"
+             title="Plinn folder workflow" description=""
+             state_variable="review_state"
+             initial_state="private" manager_bypass="0">
+ <permission>Manage properties</permission>
+ <permission>Modify portal content</permission>
+ <permission>View</permission>
+ <state state_id="pending" title="">
+  <exit-transition transition_id="publish"/>
+  <exit-transition transition_id="reject"/>
+  <exit-transition transition_id="retract"/>
+  <permission-map name="Manage properties" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Reviewer</permission-role>
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Reviewer</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Contributor</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+   <permission-role>Reader</permission-role>
+   <permission-role>Reviewer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="private" title="">
+  <exit-transition transition_id="direct_publish"/>
+  <exit-transition transition_id="submit"/>
+  <permission-map name="Manage properties" acquired="False">
+   <permission-role>Contributor</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Contributor</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Contributor</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+   <permission-role>Reader</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="published" title="">
+  <exit-transition transition_id="reject"/>
+  <exit-transition transition_id="retract"/>
+  <permission-map name="Manage properties" acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>Anonymous</permission-role>
+  </permission-map>
+ </state>
+ <transition transition_id="direct_publish"
+             title="Reviewer publishes content"
+             new_state="published" trigger="USER"
+             before_script="" after_script="">
+  <description>Reviewer can directly publish content  if he have de Owner role (not necessarily ownership)</description>
+  <action url="%(content_url)s/content_publish_form?direct:boolean=True"
+          category="workflow">Publish</action>
+  <guard>
+   <guard-permission>Review portal content</guard-permission>
+   <guard-expression>python:user.allowed(here, ['Owner'])</guard-expression>
+  </guard>
+ </transition>
+ <transition transition_id="publish"
+             title="Reviewer publishes content"
+             new_state="published" trigger="USER"
+             before_script="" after_script="">
+  <action url="%(content_url)s/content_publish_form"
+          category="workflow">Publish</action>
+  <guard>
+   <guard-permission>Review portal content</guard-permission>
+  </guard>
+ </transition>
+ <transition transition_id="reject"
+             title="Reviewer rejects submission"
+             new_state="private" trigger="USER"
+             before_script="" after_script="">
+  <action url="%(content_url)s/content_reject_form"
+          category="workflow">Reject</action>
+  <guard>
+   <guard-permission>Review portal content</guard-permission>
+  </guard>
+ </transition>
+ <transition transition_id="retract"
+             title="Member retracts submission"
+             new_state="private" trigger="USER"
+             before_script="" after_script="">
+  <action url="%(content_url)s/content_retract_form"
+          category="workflow">Retract</action>
+  <guard>
+   <guard-permission>Request review</guard-permission>
+   <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))</guard-expression>
+  </guard>
+ </transition>
+ <transition transition_id="submit"
+             title="Member requests publishing"
+             new_state="pending" trigger="USER"
+             before_script="" after_script="">
+  <action url="%(content_url)s/content_submit_form"
+          category="workflow">Submit</action>
+  <guard>
+   <guard-permission>Request review</guard-permission>
+  </guard>
+ </transition>
+ <variable variable_id="action" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The last transition</description>
+  <default>
+   
+   <expression>transition/getId|nothing</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="actor" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The ID of the user who performed the last transition</description>
+  <default>
+   
+   <expression>user/getId</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="comments" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>Comments about the last transition</description>
+  <default>
+   
+   <expression>python:state_change.kwargs.get('comment', '')</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="email_sent" for_catalog="False"
+           for_status="True" update_always="True">
+  <default>
+   
+   <expression>python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', [])</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="review_history" for_catalog="False"
+           for_status="False" update_always="False">
+  <description>Provides access to workflow history</description>
+  <default>
+   
+   <expression>state_change/getHistory</expression>
+  </default>
+  <guard>
+   <guard-permission>Request review</guard-permission>
+   <guard-permission>Review portal content</guard-permission>
+  </guard>
+ </variable>
+ <variable variable_id="time" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>Time of the last transition</description>
+  <default>
+   
+   <expression>state_change/getDateTime</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <script script_id="sendNotificationEmail"
+         type="Script (Python)"
+         filename="workflows/folder_workflow/scripts/sendNotificationEmail.py"
+         module="" function=""/>
+</dc-workflow>
diff --git a/profiles/photo/workflows/folder_workflow/scripts/sendNotificationEmail.py b/profiles/photo/workflows/folder_workflow/scripts/sendNotificationEmail.py
new file mode 100644 (file)
index 0000000..17dd864
--- /dev/null
@@ -0,0 +1,61 @@
+## Script (Python) "sendNotificationEmail"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=sci
+##title=
+##
+#TODO : translate messages
+#from Products.PlacelessTranslationService.MessageID import MessageIDFactory
+#_ = MessageIDFactory('plinn')
+_ = lambda x : lambda : x
+
+portal = context.portal_url.getPortalObject()
+
+mtool = portal.portal_membership
+
+recipients = sci.kwargs.get('recipients', [])
+if not recipients :
+       return []
+
+
+MailHost = portal.MailHost
+from quopri import encodestring
+
+def encodeAdr(member) :
+       name = member.getMemberFullName(nameBefore=0)
+       email = member.getProperty('email')
+       qpName = encodestring(name).replace('=\n', '')
+       return '''"=?utf-8?q?%s?=" <%s>''' % (qpName, email)
+
+
+object = sci.object
+
+sender = mtool.getAuthenticatedMember()
+sender = encodeAdr(sender)
+
+recipientsFormated = map(encodeAdr, mtool.getMembers( recipients ))
+mto = ', '.join(recipientsFormated)
+if mto[-2:] == ', ' :
+       mto = mto[:-2]
+
+footer = """
+------------
+Document : %s
+""" % object.absolute_url()
+
+
+message = context.echange_mail_template(  From = sender
+                                                                               , To = mto
+                                                                               , Subject = "=?utf-8?q?%s?=" % encodestring(portal.Title() + " : " + _("Document state change notificaction")()).replace('=\n', '')
+                                                                               , ContentType = 'text/plain'
+                                                                               , charset = 'UTF-8'
+                                                                               , body=sci.kwargs.get('comment', '')
+                                                                               , footer=footer)
+
+
+MailHost.send( message )
+
+return recipients
diff --git a/profiles/photo/workflows/member_workflow/definition.xml b/profiles/photo/workflows/member_workflow/definition.xml
new file mode 100644 (file)
index 0000000..bbde86b
--- /dev/null
@@ -0,0 +1,129 @@
+<?xml version="1.0"?>
+<dc-workflow workflow_id="member_workflow"
+             title="Plinn member registration workflow"
+             description="" state_variable="review_state"
+             initial_state="m_initial" manager_bypass="0">
+ <state state_id="m_initial" title="">
+  <exit-transition transition_id="create"/>
+  <exit-transition transition_id="silent_register"/>
+ </state>
+ <state state_id="m_pending" title="">
+  <exit-transition transition_id="register"/>
+  <exit-transition transition_id="reject"/>
+ </state>
+ <state state_id="m_registered" title="">
+ </state>
+ <state state_id="m_rejected" title="">
+ </state>
+ <transition transition_id="create" title=""
+             new_state="m_pending" trigger="AUTOMATIC"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-expression>python:state_change.getPortal().portal_membership.isAnonymousUser()</guard-expression>
+  </guard>
+ </transition>
+ <transition transition_id="register"
+             title="Register member"
+             new_state="m_registered" trigger="USER"
+             before_script="before_register"
+             after_script="sendNotificationEmail">
+  
+  <guard>
+   <guard-permission>Manage Groups</guard-permission>
+   <guard-permission>Set Member Properties</guard-permission>
+  </guard>
+ </transition>
+ <transition transition_id="reject"
+             title="Reviewer rejects registration"
+             new_state="" trigger="USER" before_script=""
+             after_script="after_reject">
+  
+  <guard>
+   <guard-permission>Manage Groups</guard-permission>
+   <guard-permission>Set Member Properties</guard-permission>
+   <guard-permission>Remove member</guard-permission>
+  </guard>
+ </transition>
+ <transition transition_id="silent_register" title=""
+             new_state="m_registered" trigger="AUTOMATIC"
+             before_script="before_register" after_script="">
+  
+  <guard>
+   <guard-permission>Manage Groups</guard-permission>
+   <guard-permission>Set Member Properties</guard-permission>
+  </guard>
+ </transition>
+ <worklist worklist_id="reviewer_queue" title="">
+  <description>Reviewer tasks</description>
+  <action url="%(portal_url)s/pending_members"
+          category="global">Membres en attente (%(count)d)</action>
+  <guard>
+   <guard-permission>Set Member Properties</guard-permission>
+  </guard>
+  <match name="review_state" values="m_pending"/>
+ </worklist>
+ <variable variable_id="action" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The last transition</description>
+  <default>
+   
+   <expression>transition/getId|nothing</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="actor" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The ID of the user who performed the last transition</description>
+  <default>
+   
+   <expression>user/getId</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="comments" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>Comments about the last transition</description>
+  <default>
+   
+   <expression>python:state_change.kwargs.get('comment', '')</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="review_history" for_catalog="False"
+           for_status="False" update_always="False">
+  <description>Provides access to workflow history</description>
+  <default>
+   
+   <expression>state_change/getHistory</expression>
+  </default>
+  <guard>
+   <guard-permission>Request review</guard-permission>
+   <guard-permission>Review portal content</guard-permission>
+  </guard>
+ </variable>
+ <variable variable_id="time" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>Time of the last transition</description>
+  <default>
+   
+   <expression>state_change/getDateTime</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <script script_id="after_reject" type="Script (Python)"
+         filename="workflows/member_workflow/scripts/after_reject.py"
+         module="" function=""/>
+ <script script_id="before_register" type="Script (Python)"
+         filename="workflows/member_workflow/scripts/before_register.py"
+         module="" function=""/>
+ <script script_id="sendNotificationEmail"
+         type="Script (Python)"
+         filename="workflows/member_workflow/scripts/sendNotificationEmail.py"
+         module="" function=""/>
+</dc-workflow>
diff --git a/profiles/photo/workflows/member_workflow/scripts/after_reject.py b/profiles/photo/workflows/member_workflow/scripts/after_reject.py
new file mode 100644 (file)
index 0000000..4b2b2d0
--- /dev/null
@@ -0,0 +1,45 @@
+## Script (Python) "after_reject"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=sci
+##title=
+##
+from Products.CMFCore.utils import getToolByName
+mtool = getToolByName(context, 'portal_membership')
+portal = context.portal_url.getPortalObject()
+MailHost = portal.MailHost
+from quopri import encodestring
+
+def encodeAdr(member) :
+       name = member.getMemberFullName(nameBefore=0)
+       email = member.getProperty('email')
+       qpName = encodestring(name).replace('=\n', '')
+       return '''"=?utf-8?q?%s?=" <%s>''' % (qpName, email)
+
+
+member = sci.object
+
+sender = mtool.getAuthenticatedMember()
+sender = encodeAdr(sender)
+mto = encodeAdr(member)
+
+subject = sci.kwargs.get('subject', '').strip()
+body = sci.kwargs.get('body', '').strip()
+
+if not (subject and body) :
+       raise ValueError, "You must send a consitent email to reject the membership request."
+
+mtool.removeMembers(memberIds = [member.getId()])
+
+message = context.echange_mail_template(  From = sender
+                                                                               , To = mto
+                                                                               , Subject = "=?utf-8?q?%s?=" % encodestring(subject).replace('=\n', '')
+                                                                               , ContentType = 'text/plain'
+                                                                               , charset = 'UTF-8'
+                                                                               , body= body
+                                                                               )
+
+MailHost.send( message )
diff --git a/profiles/photo/workflows/member_workflow/scripts/before_register.py b/profiles/photo/workflows/member_workflow/scripts/before_register.py
new file mode 100644 (file)
index 0000000..40b93c0
--- /dev/null
@@ -0,0 +1,27 @@
+## Script (Python) "before_register"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=sci
+##title=
+##
+portal = sci.getPortal()
+member = sci.object
+
+
+from Products.Plinn.RegistrationTool import DEFAULT_MEMBER_GROUP
+from Products.CMFCore.utils import getToolByName
+
+gtool = getToolByName(portal, 'portal_groups')
+mtool = getToolByName(portal, 'portal_membership')
+
+
+if gtool.getGroupById(DEFAULT_MEMBER_GROUP) is None :
+       gtool.addGroup(DEFAULT_MEMBER_GROUP)
+       aclu = portal.acl_users
+       aclu.changeUser(aclu.getGroupPrefix() + DEFAULT_MEMBER_GROUP, roles=['Member', ])
+
+g = gtool.getGroupById(DEFAULT_MEMBER_GROUP)
+g.addMember(member.getId())
diff --git a/profiles/photo/workflows/member_workflow/scripts/sendNotificationEmail.py b/profiles/photo/workflows/member_workflow/scripts/sendNotificationEmail.py
new file mode 100644 (file)
index 0000000..ce0e0da
--- /dev/null
@@ -0,0 +1,64 @@
+## Script (Python) "sendNotificationEmail"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=sci
+##title=
+##
+#TODO : translate messages
+#from Products.PlacelessTranslationService.MessageID import MessageIDFactory
+#_ = MessageIDFactory('plinn')
+#cmfMessages = MessageIDFactory('cmf_default')
+_ = cmfMessages = lambda x : lambda : x
+from quopri import encodestring
+
+portal = context.portal_url.getPortalObject()
+mtool = portal.portal_membership
+rtool = portal.portal_registration
+MailHost = portal.MailHost
+
+
+def encodeAdr(member) :
+       name = member.getMemberFullName(nameBefore=0)
+       email = member.getProperty('email')
+       qpName = encodestring(name).replace('=\n', '')
+       return '''"=?utf-8?q?%s?=" <%s>''' % (qpName, email)
+
+member = sci.object
+
+sender = mtool.getAuthenticatedMember()
+sender = encodeAdr(sender)
+mto = encodeAdr(member)
+
+text = _( """
+You have been registered as a member of "%(portal_title)s", which
+allows you to personalize your view of the website and participate in
+the community.
+""".strip().replace('\n', ' ') )() % {'portal_title' :portal.Title()}
+
+if portal.getProperty('validate_email') :
+       text += '\n'
+       text += _( """You will receive an other mail with your randomly-generated
+password. Once you have logged in with this password, you
+may change it to anything you like.""".strip().replace('\n', ' ') )()
+
+else :
+       text += '\n'*2
+       text += cmfMessages( "You can use this URL to log in:" )()
+       text += '\n' + portal.absolute_url() + '/login_form'
+
+message = context.echange_mail_template(  From = sender
+                                                                               , To = mto
+                                                                               , Subject = "=?utf-8?q?%s?=" % encodestring(portal.Title() + " : " + \
+                                                                               _("your registration has been accepted")()).replace('=\n', '')
+                                                                               , ContentType = 'text/plain'
+                                                                               , charset = 'UTF-8'
+                                                                               , body= text
+                                                                               )
+
+
+MailHost.send( message )
+if portal.getProperty('validate_email') :
+       rtool.mailPassword(member.getId(), context.REQUEST)
diff --git a/profiles/photo/workflows/order_workflow/definition.xml b/profiles/photo/workflows/order_workflow/definition.xml
new file mode 100644 (file)
index 0000000..c72c600
--- /dev/null
@@ -0,0 +1,245 @@
+<?xml version="1.0"?>
+<dc-workflow workflow_id="order_workflow"
+             title="Order workflow" description=""
+             state_variable="review_state"
+             initial_state="recorded" manager_bypass="0">
+ <instance-creation-conditions>
+   <guard>
+    <guard-role>Authenticated</guard-role>
+   </guard>
+ </instance-creation-conditions>
+ <permission>Access contents information</permission>
+ <permission>Delete Owned Objects</permission>
+ <permission>Manage properties</permission>
+ <permission>Modify portal content</permission>
+ <permission>View</permission>
+ <state state_id="canceled" title="">
+  <permission-map name="Access contents information"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="Delete Owned Objects"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Manage properties" acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="done" title="">
+  <exit-transition transition_id="notify_sent"/>
+ </state>
+ <state state_id="paid" title="">
+  <exit-transition transition_id="get_printing_list"/>
+  <exit-transition transition_id="notify_done"/>
+ </state>
+ <state state_id="recorded" title="">
+  <exit-transition transition_id="auto_accept_payment"/>
+  <exit-transition transition_id="auto_cancel_order"/>
+  <exit-transition transition_id="auto_refuse_payment"/>
+  <exit-transition transition_id="auto_transaction_failed"/>
+  <exit-transition transition_id="cancel"/>
+  <exit-transition transition_id="manual_payment"/>
+  <permission-map name="Access contents information"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="Delete Owned Objects"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Manage properties" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="refused" title="">
+ </state>
+ <state state_id="sent" title="">
+ </state>
+ <transition transition_id="auto_accept_payment"
+             title="Accept payment" new_state="paid"
+             trigger="USER" before_script="" after_script="">
+  <description>Payment accepted by the bank</description>
+  
+  <guard>
+   <guard-expression>nothing</guard-expression>
+  </guard>
+ </transition>
+ <transition transition_id="auto_cancel_order"
+             title="Cancel order" new_state=""
+             trigger="USER" before_script="" after_script="">
+  <description>The customer has canceled the order from payement site.</description>
+  
+  <guard>
+   <guard-expression>nothing</guard-expression>
+  </guard>
+ </transition>
+ <transition transition_id="auto_refuse_payment"
+             title="Refuse payment" new_state="refused"
+             trigger="USER" before_script="" after_script="">
+  <description>Payment refused by the bank.</description>
+  
+  <guard>
+   <guard-expression>nothing</guard-expression>
+  </guard>
+ </transition>
+ <transition transition_id="auto_transaction_failed"
+             title="" new_state="" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-expression>nothing</guard-expression>
+  </guard>
+ </transition>
+ <transition transition_id="cancel" title=""
+             new_state="canceled" trigger="USER"
+             before_script="" after_script="relistCopies">
+  <action url="%(content_url)s/order_cancel_form"
+          category="workflow">Cancel</action>
+  <guard>
+   <guard-permission>Manage print orders</guard-permission>
+  </guard>
+ </transition>
+ <transition transition_id="get_printing_list" title=""
+             new_state="" trigger="USER" before_script=""
+             after_script="">
+  <action url="%(object_url)s/order_printing_list"
+          category="workflow">Printing list</action>
+  <guard>
+   <guard-permission>Manage print orders</guard-permission>
+  </guard>
+ </transition>
+ <transition transition_id="manual_payment" title=""
+             new_state="paid" trigger="USER"
+             before_script="" after_script="">
+  <action url="%(content_url)s/order_manual_payment_form"
+          category="workflow">Manual payment</action>
+  <guard>
+   <guard-permission>Manage print orders</guard-permission>
+  </guard>
+ </transition>
+ <transition transition_id="notify_done" title=""
+             new_state="done" trigger="USER"
+             before_script="" after_script="">
+  <action url="%(content_url)s/order_notify_done_form"
+          category="workflow">Notify done</action>
+  <guard>
+   <guard-permission>Manage print orders</guard-permission>
+  </guard>
+ </transition>
+ <transition transition_id="notify_sent" title=""
+             new_state="sent" trigger="USER"
+             before_script="" after_script="">
+  <action url="%(content_url)s/order_notify_sent_form"
+          category="workflow">Notify sent</action>
+  <guard>
+   <guard-permission>Manage print orders</guard-permission>
+  </guard>
+ </transition>
+ <variable variable_id="action" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The last transition</description>
+  <default>
+   
+   <expression>transition/getId|nothing</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="actor" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The ID of the user who performed the last transition</description>
+  <default>
+   
+   <expression>user/getId</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="comments" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>Comments about the last transition</description>
+  <default>
+   
+   <expression>python:state_change.kwargs.get('comment', '')</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="email_sent" for_catalog="False"
+           for_status="True" update_always="True">
+  <default>
+   
+   <expression>python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', [])</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="review_history" for_catalog="False"
+           for_status="False" update_always="False">
+  <description>Provides access to workflow history</description>
+  <default>
+   
+   <expression>state_change/getHistory</expression>
+  </default>
+  <guard>
+   <guard-permission>Request review</guard-permission>
+   <guard-permission>Review portal content</guard-permission>
+  </guard>
+ </variable>
+ <variable variable_id="time" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>Time of the last transition</description>
+  <default>
+   
+   <expression>state_change/getDateTime</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="tracking_number" for_catalog="False"
+           for_status="True" update_always="False">
+  <default>
+   
+   
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="tracking_url" for_catalog="False"
+           for_status="True" update_always="False">
+  <default>
+   
+   
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <script script_id="relistCopies" type="Script (Python)"
+         filename="workflows/order_workflow/scripts/relistCopies.py"
+         module="" function=""/>
+ <script script_id="sendNotificationEmail"
+         type="Script (Python)"
+         filename="workflows/order_workflow/scripts/sendNotificationEmail.py"
+         module="" function=""/>
+</dc-workflow>
diff --git a/profiles/photo/workflows/order_workflow/scripts/relistCopies.py b/profiles/photo/workflows/order_workflow/scripts/relistCopies.py
new file mode 100755 (executable)
index 0000000..4778906
--- /dev/null
@@ -0,0 +1,10 @@
+## Script (Python) "relistCopies"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=sci
+##title=
+##
+sci.object.resetCopiesCounters()
diff --git a/profiles/photo/workflows/order_workflow/scripts/sendNotificationEmail.py b/profiles/photo/workflows/order_workflow/scripts/sendNotificationEmail.py
new file mode 100755 (executable)
index 0000000..26ba76b
--- /dev/null
@@ -0,0 +1,72 @@
+## Script (Python) "sendNotificationEmail"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=sci
+##title=
+##
+from Products.photoprint.utils import translate
+_ = lambda msg : translate(msg, context)
+portal = context.portal_url.getPortalObject()
+
+mtool = portal.portal_membership
+
+recipients = sci.kwargs.get('recipients', [])
+if not recipients :
+       return []
+
+
+MailHost = portal.MailHost
+from quopri import encodestring
+
+def encodeAdr(member) :
+       name = member.getMemberFullName(nameBefore=0)
+       email = member.getProperty('email')
+       qpName = encodestring(name).replace('=\n', '')
+       return '''"=?utf-8?q?%s?=" <%s>''' % (qpName, email)
+
+
+object = sci.object
+
+sender = mtool.getAuthenticatedMember()
+sender = encodeAdr(sender)
+
+recipientsFormated = map(encodeAdr, mtool.getMembers( recipients ))
+mto = ', '.join(recipientsFormated)
+if mto[-2:] == ', ' :
+       mto = mto[:-2]
+
+subject = sci.kwargs.get('subject', '')
+
+body = []
+pr = body.append
+pr(sci.kwargs.get('comment', ''))
+
+pr('')
+
+trNumber = sci.kwargs.get('tracking_number', '')
+if trNumber :
+       pr(_('Tracking number').encode('utf-8') + ' ' + trNumber)
+
+trUrl = sci.kwargs.get('tracking_url', '')
+if trUrl :
+       pr(_('Tracking url').encode('utf-8') + ' ' + trUrl)
+
+body = '\n'.join(body)
+
+
+
+message = context.echange_mail_template(  From = sender
+                                                                               , To = mto
+                                                                               , Subject = "=?utf-8?q?%s?=" % encodestring(subject).replace('=\n', '')
+                                                                               , ContentType = 'text/plain'
+                                                                               , charset = 'UTF-8'
+                                                                               , body=body
+                                                                               )
+
+
+MailHost.send( message.encode('utf-8') )
+
+return recipients
diff --git a/profiles/photo/workflows/portfolio_workflow/definition.xml b/profiles/photo/workflows/portfolio_workflow/definition.xml
new file mode 100644 (file)
index 0000000..81ca24e
--- /dev/null
@@ -0,0 +1,241 @@
+<?xml version="1.0"?>
+<dc-workflow workflow_id="portfolio_workflow"
+             title="Plinn folder workflow" description=""
+             state_variable="review_state"
+             initial_state="private" manager_bypass="0">
+ <permission>Add portal content</permission>
+ <permission>Change Images and Files</permission>
+ <permission>Delete Owned Objects</permission>
+ <permission>Delete objects</permission>
+ <permission>Manage properties</permission>
+ <permission>Modify portal content</permission>
+ <permission>View</permission>
+ <state state_id="pending" title="">
+  <exit-transition transition_id="publish"/>
+  <exit-transition transition_id="reject"/>
+  <exit-transition transition_id="retract"/>
+  <permission-map name="Add portal content" acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Change Images and Files"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Reviewer</permission-role>
+  </permission-map>
+  <permission-map name="Delete Owned Objects"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Delete objects" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Reviewer</permission-role>
+  </permission-map>
+  <permission-map name="Manage properties" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Reviewer</permission-role>
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Reviewer</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Contributor</permission-role>
+   <permission-role>Downloader</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+   <permission-role>Reader</permission-role>
+   <permission-role>Reviewer</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="private" title="">
+  <exit-transition transition_id="direct_publish"/>
+  <exit-transition transition_id="submit"/>
+  <permission-map name="Add portal content" acquired="False">
+   <permission-role>Contributor</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="Change Images and Files"
+                  acquired="False">
+   <permission-role>Contributor</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="Delete Owned Objects"
+                  acquired="False">
+   <permission-role>Contributor</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="Delete objects" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="Manage properties" acquired="False">
+   <permission-role>Contributor</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Contributor</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Contributor</permission-role>
+   <permission-role>Downloader</permission-role>
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+   <permission-role>Reader</permission-role>
+  </permission-map>
+ </state>
+ <state state_id="published" title="">
+  <exit-transition transition_id="reject"/>
+  <exit-transition transition_id="retract"/>
+  <permission-map name="Add portal content" acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Change Images and Files"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Delete Owned Objects"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Delete objects" acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Manage properties" acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+   <permission-role>Anonymous</permission-role>
+  </permission-map>
+ </state>
+ <transition transition_id="direct_publish"
+             title="Reviewer publishes content"
+             new_state="published" trigger="USER"
+             before_script="" after_script="">
+  <description>Reviewer can directly publish content  if he have de Owner role (not necessarily ownership)</description>
+  <action url="%(content_url)s/content_publish_form?direct:boolean=True"
+          category="workflow">Publish</action>
+  <guard>
+   <guard-permission>Review portal content</guard-permission>
+   <guard-expression>python:user.allowed(here, ['Owner'])</guard-expression>
+  </guard>
+ </transition>
+ <transition transition_id="publish"
+             title="Reviewer publishes content"
+             new_state="published" trigger="USER"
+             before_script="" after_script="">
+  <action url="%(content_url)s/content_publish_form"
+          category="workflow">Publish</action>
+  <guard>
+   <guard-permission>Review portal content</guard-permission>
+  </guard>
+ </transition>
+ <transition transition_id="reject"
+             title="Reviewer rejects submission"
+             new_state="private" trigger="USER"
+             before_script="" after_script="">
+  <action url="%(content_url)s/content_reject_form"
+          category="workflow">Reject</action>
+  <guard>
+   <guard-permission>Review portal content</guard-permission>
+  </guard>
+ </transition>
+ <transition transition_id="retract"
+             title="Member retracts submission"
+             new_state="private" trigger="USER"
+             before_script="" after_script="">
+  <action url="%(content_url)s/content_retract_form"
+          category="workflow">Retract</action>
+  <guard>
+   <guard-permission>Request review</guard-permission>
+   <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))</guard-expression>
+  </guard>
+ </transition>
+ <transition transition_id="submit"
+             title="Member requests publishing"
+             new_state="pending" trigger="USER"
+             before_script="" after_script="">
+  <action url="%(content_url)s/content_submit_form"
+          category="workflow">Submit</action>
+  <guard>
+   <guard-permission>Request review</guard-permission>
+  </guard>
+ </transition>
+ <variable variable_id="action" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The last transition</description>
+  <default>
+   
+   <expression>transition/getId|nothing</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="actor" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>The ID of the user who performed the last transition</description>
+  <default>
+   
+   <expression>user/getId</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="comments" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>Comments about the last transition</description>
+  <default>
+   
+   <expression>python:state_change.kwargs.get('comment', '')</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="email_sent" for_catalog="False"
+           for_status="True" update_always="True">
+  <default>
+   
+   <expression>python:scripts.sendNotificationEmail(state_change) or state_change.kwargs.get('email_sent', [])</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <variable variable_id="review_history" for_catalog="False"
+           for_status="False" update_always="False">
+  <description>Provides access to workflow history</description>
+  <default>
+   
+   <expression>state_change/getHistory</expression>
+  </default>
+  <guard>
+   <guard-permission>Request review</guard-permission>
+   <guard-permission>Review portal content</guard-permission>
+  </guard>
+ </variable>
+ <variable variable_id="time" for_catalog="False"
+           for_status="True" update_always="True">
+  <description>Time of the last transition</description>
+  <default>
+   
+   <expression>state_change/getDateTime</expression>
+  </default>
+  <guard>
+  </guard>
+ </variable>
+ <script script_id="sendNotificationEmail"
+         type="Script (Python)"
+         filename="workflows/portfolio_workflow/scripts/sendNotificationEmail.py"
+         module="" function=""/>
+</dc-workflow>
diff --git a/profiles/photo/workflows/portfolio_workflow/scripts/sendNotificationEmail.py b/profiles/photo/workflows/portfolio_workflow/scripts/sendNotificationEmail.py
new file mode 100644 (file)
index 0000000..17dd864
--- /dev/null
@@ -0,0 +1,61 @@
+## Script (Python) "sendNotificationEmail"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=sci
+##title=
+##
+#TODO : translate messages
+#from Products.PlacelessTranslationService.MessageID import MessageIDFactory
+#_ = MessageIDFactory('plinn')
+_ = lambda x : lambda : x
+
+portal = context.portal_url.getPortalObject()
+
+mtool = portal.portal_membership
+
+recipients = sci.kwargs.get('recipients', [])
+if not recipients :
+       return []
+
+
+MailHost = portal.MailHost
+from quopri import encodestring
+
+def encodeAdr(member) :
+       name = member.getMemberFullName(nameBefore=0)
+       email = member.getProperty('email')
+       qpName = encodestring(name).replace('=\n', '')
+       return '''"=?utf-8?q?%s?=" <%s>''' % (qpName, email)
+
+
+object = sci.object
+
+sender = mtool.getAuthenticatedMember()
+sender = encodeAdr(sender)
+
+recipientsFormated = map(encodeAdr, mtool.getMembers( recipients ))
+mto = ', '.join(recipientsFormated)
+if mto[-2:] == ', ' :
+       mto = mto[:-2]
+
+footer = """
+------------
+Document : %s
+""" % object.absolute_url()
+
+
+message = context.echange_mail_template(  From = sender
+                                                                               , To = mto
+                                                                               , Subject = "=?utf-8?q?%s?=" % encodestring(portal.Title() + " : " + _("Document state change notificaction")()).replace('=\n', '')
+                                                                               , ContentType = 'text/plain'
+                                                                               , charset = 'UTF-8'
+                                                                               , body=sci.kwargs.get('comment', '')
+                                                                               , footer=footer)
+
+
+MailHost.send( message )
+
+return recipients
index 0eecace..712a44f 100644 (file)
@@ -1,7 +1,7 @@
 // (c) Benoît PIN 2006-2009
 // http://plinn.org
 // Licence GPL
-// $Id: javascript_events_api.js 1532 2009-08-13 14:18:16Z pin $
+// $Id: javascript_events_api.js 1535 2009-10-21 16:56:13Z pin $
 // $URL: http://svn.cri.ensmp.fr/svn/Plinn/branches/CMF-2.1/skins/ajax_scripts/javascript_events_api.js $
 // Meta functions for events management.
 
@@ -261,7 +261,6 @@ if (browser.isIE) {
                                e.className = value;
                                break;
                        case 'style' :
-                               var cssText = value;
                                loadCssText(e, value);
                                break;
                        default:
index d82925a..efa535a 100644 (file)
@@ -1,7 +1,7 @@
 // (c) Benoît PIN 2006
 // http://plinn.org
 // Licence GPL
-// $Id: palette.js 1315 2008-07-29 15:36:15Z pin $
+// $Id: palette.js 1548 2010-01-09 09:28:53Z pin $
 // $URL: http://svn.cri.ensmp.fr/svn/Plinn/branches/CMF-2.1/skins/ajax_scripts/palette.js $
 
 
@@ -23,6 +23,7 @@ function InspectorPalette(baseUrl, toggleButton, contentNode, onExpand, onCollap
                        thisInspector.expand();
                disableDefault(evt);
                disablePropagation(evt);
+               toggleButton.parentNode.blur();
        };
 }
 
diff --git a/skins/ajax_scripts/swfobject.js b/skins/ajax_scripts/swfobject.js
new file mode 100644 (file)
index 0000000..e7edd42
--- /dev/null
@@ -0,0 +1,8 @@
+/**
+ * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
+ *
+ * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ */
+if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
\ No newline at end of file
index e22a180..2c0aada 100644 (file)
@@ -1,18 +1,25 @@
 // © 2009 Benoît Pin
 // http://plinn.org
 // Licence GPL
-// $Id: widget_form_manager.js 1473 2009-03-06 17:02:21Z pin $
+// $Id: widget_form_manager.js 1535 2009-10-21 16:56:13Z pin $
 // $URL: http://svn.cri.ensmp.fr/svn/Plinn/branches/CMF-2.1/skins/ajax_scripts/widget_form_manager.js $
 
 var WidgetBasedFormManager;
 
 (function(){
-       WidgetBasedFormManager = function(widgets, editingArea, dataArea, dataAreaSpecs) {
+       WidgetBasedFormManager = function(widgets, editingArea, dataArea, dataAreaSpecs, afterShow) {
+               /* widgets : {'add':element, 'edit':element} element targets nodes to clone.
+               *  editingArea : surrounding element where form is
+               *  dataArea : element where data are
+               *  dataAreaSpecs : by default, param used to indicate the total number of columns
+               *  afterShow : function called after a widget insertion
+               */
                var thisWgtManager = this;
                this.widgets = widgets;
                this.openedWidget = null;
                this.dataArea = dataArea;
                this.dataAreaSpecs = dataAreaSpecs;
+               this.afterShow = afterShow;
 
                var form = editingArea.getElementsByTagName('form')[0];
                this.form = form;
@@ -33,6 +40,8 @@ var WidgetBasedFormManager;
                dest.appendChild(wdgtCopy);
                if (this.addButton)
                        this.addButton.style.visibility = 'hidden';
+               if (this.afterShow)
+                       this.afterShow(this);
        };
        
        WidgetBasedFormManager.prototype.showPopulatedWidget = function(dest, url) {
@@ -71,6 +80,8 @@ var WidgetBasedFormManager;
                        }
                }
                dest.appendChild(wdgtCopy);
+               if (this.afterShow)
+                       this.afterShow(this);
        };
        
        WidgetBasedFormManager.prototype.cancelWidget = function() {
diff --git a/skins/content/file_view.py b/skins/content/file_view.py
new file mode 100755 (executable)
index 0000000..a1b35a3
--- /dev/null
@@ -0,0 +1,10 @@
+##parameters=
+
+options = {}
+
+if context.content_type == 'application/x-shockwave-flash' :
+       options['width'] = context.getProperty('width', 600)
+       options['height'] = context.getProperty('height', 600)
+       return context.flash_view_template(**options)
+
+return context.file_view_template(**options)
diff --git a/skins/content/flash_view_template.pt b/skins/content/flash_view_template.pt
new file mode 100644 (file)
index 0000000..8b922d0
--- /dev/null
@@ -0,0 +1,50 @@
+<html metal:use-macro="here/main_template/macros/master"
+      xmlns:tal="http://xml.zope.org/namespaces/tal"
+      xmlns:metal="http://xml.zope.org/namespaces/metal"
+      xmlns:i18n="http://xml.zope.org/namespaces/i18n">
+  <head>
+    <title>flash viewer</title>
+    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
+    <!--
+    <metal:block metal:fill-slot="javascript_head_slot">
+      <script type="text/javascript" tal:attributes="src string:$portal_url/swfobject.js"></script>
+    </metal:block>
+    -->
+  </head>
+  <body>
+    <div metal:fill-slot="main" tal:omit-tag="">
+      <!--
+      <p id="audio_player"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>
+      <script type="text/javascript" src="http://kwak.fr/swfobject.js"></script>
+      <script type="text/javascript">
+       var swf = new SWFObject('http://kwak.fr/mp3player.swf', 'playlist', '260', '140', '7');
+       swf.addVariable('file','http://kwak.fr/Members/pinbe/Playlist/podcast.xml?all:boolean=True');
+       swf.addVariable('displayheight','0');
+       swf.addVariable('thumbsinplaylist', true);
+       swf.write('audio_player');
+      </script>
+      <a href="itpc://kwak.fr/Members/pinbe/Playlist/podcast.xml?disable_cookie_login__=1"
+         title="Installer dans iTunes"
+         ><img src="http://kwak.fr/podcast_logo.gif" border="0" alt="Installer dans iTunes" width="70" height="22"/></a>
+      -->
+      
+      <p id="player_placeholder">
+        <a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.
+      </p>
+      
+      <script type="text/javascript" tal:attributes="src string:$portal_url/swfobject.js"></script>
+      <script type="text/javascript" tal:content="structure python:'''
+        var url = '%(url)s';
+        var so = new SWFObject(url,'%(id)s', %(width)s, %(height)s,'8');
+        so.addParam('allowfullscreen','true');
+        so.addVariable('height', %(width)s);
+        so.addVariable('width', %(height)s);
+        so.write('player_placeholder');
+        ''' % {'url' : '%s/index_html' % context.absolute_url(),
+               'id' : context.getId(),
+               'width' : options['width'],
+               'height' : options['height']}">
+      </script>
+    </div>
+  </body>
+</html>
index 7977f15..d225f32 100644 (file)
@@ -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) )
 
index 35b3d82..93c573f 100644 (file)
@@ -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 (executable)
index 0000000..4fc1163
--- /dev/null
@@ -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.'))
index 8fce45f..7c8301d 100644 (file)
@@ -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
index f5dedc1..78fd9f7 100644 (file)
@@ -8,12 +8,12 @@
 <div class="listingBar"
      metal:define-macro="navigation"
      tal:define="request request|here/request|container/request|nothing;
-                 form python:request.form.copy();
+                 form form|request/form/copy;
                  dummy python:form.has_key('ajax') and form.pop('ajax');
                  batch batch|nothing;
                  mq python:modules['ZTUtils'].make_query;
                  mpq python:lambda fv,pn=-1 : mq(fv, {batch.b_start_str : pn * (batch.size - batch.overlap) - batch.size}) ;
-                 url python:request.get('URL0');
+                 url python:options.get('batchBaseUrl', request.get('URL0'));
                  currentpage batch/pagenumber;"
      tal:attributes="id navBatchBarId|nothing"
      tal:condition="python: batch.next or  batch.previous"
index 47bc193..8ad8f61 100644 (file)
@@ -75,7 +75,7 @@ global specialCtxHeader options/specialCtxHeader|nothing"
 
 <div metal:define-macro="Breadcrumbs" tal:omit-tag="">
        <span tal:content="here/absolute_url" id="BC_Object_URL" style="display:none"></span>
-  <span i18n:translate="">You are here:</span> <span tal:omit-tag="" tal:repeat="bc options/breadcrumbs|here/breadcrumbs"><a href="." tal:attributes="href bc/url" tal:content="python:bc['title'] or bc['id']">ID</a><span tal:condition="not: repeat/bc/end" tal:omit-tag=""> <img src="fleche_bc.gif" alt="/" height="14" width="11" tal:attributes="src string:${portal_url}/fleche_bc.gif" border="0" /> </span> </span>
+  <span i18n:translate="">You are here:</span> <span tal:omit-tag="" tal:repeat="bc options/breadcrumbs|here/breadcrumbs"><a href="." tal:attributes="href bc/url" tal:content="python:bc['title'] or bc['id']" tal:omit-tag="not:bc/url">ID</a><span tal:condition="not: repeat/bc/end" tal:omit-tag=""> <img src="fleche_bc.gif" alt="/" height="14" width="11" tal:attributes="src string:${portal_url}/fleche_bc.gif" border="0" /> </span> </span>
 </div>
 
 
index 91ffb14..efa3f70 100644 (file)
@@ -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 }
index 4e52520..baa0b3f 100644 (file)
@@ -40,9 +40,9 @@
                        <div tal:repeat="m mir" tal:omit-tag="" tal:condition="python:len(mir) <= 10">
                        <label tal:define="selectAll python:r in batchM">
                          <input type="checkbox"
-                                tal:attributes="value m/id;
+                                tal:attributes="value m/getId;
                                                 name python:'customized_batch.%s:list:record' % r;
-                                                checked python:selectAll or m.id in customized_batch.get(r,[])" />
+                                                checked python:selectAll or m.getId() in customized_batch.get(r,[])" />
                          <span tal:replace="python:m.getMemberFullName(nameBefore=0)">membre</span>
                          <span tal:condition="python:m == member" i18n:translate="">(as copy)</span>
                        </label>
@@ -73,7 +73,7 @@
                                      <div tal:condition="python:expand == r" tal:omit-tag="">
                       <select size="10" multiple="multiple" name="customized_batch.role:list:record" tal:condition="python:expand == r"
                                                                        tal:attributes="name python:'customized_batch.%s:list:record' % r">
-                                               <option tal:repeat="m mir" tal:attributes="value m/id ; selected python:(not customized_batch.has_key(r)) and True or (m.id in customized_batch[r])" tal:content="python:m.getMemberFullName(nameBefore=1)" >PIN Beno&icirc;t</option>
+                                               <option tal:repeat="m mir" tal:attributes="value m/getId ; selected python:(not customized_batch.has_key(r)) and True or (m.id in customized_batch[r])" tal:content="python:m.getMemberFullName(nameBefore=1)" >PIN Beno&icirc;t</option>
                                        </select>
                                        <br />
                                        <input type="submit" value="Validate" i18n:attributes="value" name="collapse" /> <span i18n:translate="" tal:omit-tag="">(not required)</span>