[Erp5-report] r12763 - in /spec/debian/unstable/erp5-cmfphoto: ./ CMFPhoto/ CMFPhoto/Extens...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Feb 15 18:15:03 CET 2007
Author: yusei
Date: Thu Feb 15 18:15:00 2007
New Revision: 12763
URL: http://svn.erp5.org?rev=12763&view=rev
Log:
added debian package and workspace.
Added:
spec/debian/unstable/erp5-cmfphoto/
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/CMFPhoto.py
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/CMFPhotoFolder.py
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/Extensions/
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/Extensions/Install.py (with props)
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/README
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/__init__.py
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/changelog
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/compat
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/control
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/copyright
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/dzproduct
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/postinst
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/rules (with props)
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/refresh.txt
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_edit.py (with props)
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_edit_form.pt (with props)
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_folder_view.pt (with props)
spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_view.pt (with props)
spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5.diff.gz (with props)
spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5.dsc
spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5_all.deb (with props)
spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5_i386.build
spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5_i386.changes
spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3.orig.tar.gz (with props)
Added: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/CMFPhoto.py
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/CMFPhoto/CMFPhoto.py?rev=12763&view=auto
==============================================================================
--- spec/debian/unstable/erp5-cmfphoto/CMFPhoto/CMFPhoto.py (added)
+++ spec/debian/unstable/erp5-cmfphoto/CMFPhoto/CMFPhoto.py Thu Feb 15 18:15:00 2007
@@ -1,0 +1,135 @@
+
+from AccessControl import ClassSecurityInfo
+from Globals import InitializeClass
+
+from Products.CMFCore.CMFCorePermissions import View, ManageProperties, ModifyPortalContent
+
+from Products.CMFCore.PortalContent import PortalContent
+from Products.CMFDefault.DublinCore import DefaultDublinCoreImpl
+
+from Products.Photo.Photo import Photo
+
+def addCMFPhoto(
+ self,
+ id,
+ title='',
+ file='',
+ store='Image',
+ engine='ImageMagick',
+ quality=75,
+ pregen=0,
+ timeout=0):
+ """
+ Add a Photo
+ """
+
+ photo = CMFPhoto(id, title, file, store, engine, quality, pregen, timeout)
+ photo._data = ''
+ self._setObject(id, photo)
+
+factory_type_information = {
+ 'id' : 'Photo',
+ 'meta_type' : 'CMFPhoto',
+ 'description' : 'A Photo.',
+ 'icon' : 'image_icon.gif',
+ 'product' : 'CMFPhoto',
+ 'factory' : 'addCMFPhoto',
+ 'filter_content_types' : 0,
+ 'immediate_view' : 'metadata_edit_form',
+ 'actions' :
+ ( { 'id' : 'view',
+ 'name' : 'View',
+ 'action' : 'photo_view',
+ 'permissions' : (View, )
+ },
+ { 'id' : 'edit',
+ 'name' : 'Edit',
+ 'action' : 'photo_edit_form',
+ 'permissions' : (ModifyPortalContent, )
+ },
+ { 'id' : 'metadata',
+ 'name' : 'Metadata',
+ 'action' : 'metadata_edit_form',
+ 'permissions' : (ModifyPortalContent, )
+ }
+ )
+ }
+
+class CMFPhoto(Photo, PortalContent, DefaultDublinCoreImpl):
+ """
+ """
+
+ meta_type = 'CMFPhoto'
+ portal_type = 'CMFPhoto'
+
+ def __init__(self,
+ id,
+ title='',
+ file='',
+ store='Image',
+ engine='ImageMagick',
+ quality=75,
+ pregen=0,
+ timeout=0,
+ ):
+
+ Photo.__init__(self, id=id, title=title, file=file, store=store, engine=engine, quality=quality, pregen=pregen, timeout=timeout)
+ DefaultDublinCoreImpl.__init__(self)
+
+ self.id = id
+ self.title=title
+
+ security = ClassSecurityInfo()
+
+ def SearchableText(self):
+ """
+ SeachableText is used for full text seraches of a portal.
+ It should return a concatanation of all useful text.
+ """
+
+ return "%s %s" % (self.title, self.description)
+
+ def manage_afterClone(self, item):
+ """Both of my parents have an afterClone method"""
+ Photo.manage_afterClone(self,item)
+ PortalContent.manage_afterClone(self,item)
+
+ def manage_afterAdd(self, item, container):
+ """Both of my parents have an afterAdd method"""
+ Photo.manage_afterAdd(self,item,container)
+ PortalContent.manage_afterAdd(self, item, container)
+
+ def manage_beforeDelete(self, item, container):
+ """Both of my parents have a beforeDelete method"""
+ PortalContent.manage_beforeDelete(self, item, container)
+ Photo.manage_afterAdd(self,item,container)
+
+ security.declareProtected('Access contents information', 'nextPhoto')
+ def nextPhoto(self):
+ """Return next Photo in folder."""
+ id = self.getId()
+ photoIds = self.aq_parent.contentIds(spec='CMFPhoto')
+ if id == photoIds[-1]:
+ return None
+ return getattr(self.aq_parent, photoIds[photoIds.index(id)+1]).absolute_url()
+
+ security.declareProtected('Access contents information', 'prevPhoto')
+ def prevPhoto(self):
+ """Return previous Photo in folder."""
+ id = self.getId()
+ photoIds = self.aq_parent.contentIds(spec='CMFPhoto')
+ if id == photoIds[0]:
+ return None
+ return getattr(self.aq_parent, photoIds[photoIds.index(id)-1]).absolute_url()
+
+ security.declareProtected('Access contents information', 'tag')
+ def tag(self, display=None, height=None, width=None, cookie=0,
+ alt=None, css_class=None, **kw):
+ """Return HTML img tag."""
+ try:
+ return Photo.tag(self, display, height, width, cookie, alt, css_class)
+ except:
+ return '%s is broken!' % self.title_or_id()
+
+InitializeClass(CMFPhoto)
+
Added: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/CMFPhotoFolder.py
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/CMFPhoto/CMFPhotoFolder.py?rev=12763&view=auto
==============================================================================
--- spec/debian/unstable/erp5-cmfphoto/CMFPhoto/CMFPhotoFolder.py (added)
+++ spec/debian/unstable/erp5-cmfphoto/CMFPhoto/CMFPhotoFolder.py Thu Feb 15 18:15:00 2007
@@ -1,0 +1,122 @@
+from AccessControl import ClassSecurityInfo
+from Globals import InitializeClass
+
+from Products.CMFCore.CMFCorePermissions import View, ManageProperties
+
+from Products.CMFDefault.SkinnedFolder import SkinnedFolder
+from Products.CMFDefault.DublinCore import DefaultDublinCoreImpl
+
+from Products.Photo.PhotoFolder import PhotoFolder
+
+from ZTUtils import Batch
+
+def addCMFPhotoFolder(
+ self,
+ id,
+ title='',
+ store='Image',
+ engine='ImageMagick',
+ quality=75,
+ pregen=0,
+ timeout=0):
+ """
+ Add a Photo Folder
+ """
+
+ photofolder = CMFPhotoFolder(id, title, store, engine, quality, pregen, timeout)
+ self._setObject(id, photofolder)
+
+factory_type_information = {
+ 'id' : 'Photo Folder',
+ 'meta_type' : 'CMFPhotoFolder',
+ 'description' :
+ """A PhotoFolder has content and behaves like a folder.""",
+ 'icon' : 'folder_icon.gif',
+ 'product' : 'CMFPhoto',
+ 'factory' : 'addCMFPhotoFolder',
+ 'filter_content_types' : 1,
+ 'allowed_content_types' : ('Photo',),
+ 'immediate_view' : 'folder_contents',
+ 'actions' :
+ ( { 'id' : 'view',
+ 'name' : 'View',
+ 'action' : 'photo_folder_view',
+ 'permissions' : (View,),
+ 'category' : 'folder'
+ },
+ { 'id' : 'edit',
+ 'name' : 'Edit',
+ 'action' : 'folder_edit_form',
+ 'permissions' : (ManageProperties,),
+ 'category' : 'folder'
+ },
+ { 'id' : 'localroles',
+ 'name' : 'Local Roles',
+ 'action' : 'folder_localrole_form',
+ 'permissions' : (ManageProperties,),
+ 'category' : 'folder'
+ },
+ { 'id' : 'syndication',
+ 'name' : 'Syndication',
+ 'action' : 'synPropertiesForm',
+ 'permissions' : (ManageProperties,),
+ 'category' : 'folder'
+ }
+ )
+ }
+
+class CMFPhotoFolder(SkinnedFolder, PhotoFolder, DefaultDublinCoreImpl):
+ """
+ """
+
+ meta_type = 'CMFPhotoFolder'
+ portal_type = 'CMFPhotoFolder'
+
+ security = ClassSecurityInfo()
+
+ def __init__(self,
+ id,
+ title='',
+ store='Image',
+ engine='ImageMagick',
+ quality=75,
+ pregen=0,
+ timeout=0,
+ ):
+
+ PhotoFolder.__init__(self, id, title, store, engine, quality, pregen, timeout)
+ DefaultDublinCoreImpl.__init__(self)
+
+ self.id = id
+ self.title=title
+
+ security.declarePublic('getGroupsOfN')
+ def getGroupsOfN(self, at_a_time):
+ b = Batch(self.listFolderContents('CMFPhoto'), at_a_time, orphan=0)
+ batches = [b]
+ while b.next:
+ b = b.next
+ batches.append(b)
+
+ return batches
+
+ security.declareProtected('Access contents information', 'nextAlbum')
+ def nextAlbum(self):
+ """Return next PhotoFolder in folder."""
+ id = self.getId()
+ albumIds = self.aq_parent.contentIds(spec='CMFPhotoFolder')
+ if id == albumIds[-1]:
+ return None
+ return getattr(self.aq_parent, albumIds[albumIds.index(id)+1]).absolute_url()
+
+ security.declareProtected('Access contents information', 'prevAlbum')
+ def prevAlbum(self):
+ """Return previous PhotoFolder in folder."""
+ id = self.getId()
+ albumIds = self.aq_parent.contentIds(spec='CMFPhotoFolder')
+ if id == albumIds[0]:
+ return None
+ return getattr(self.aq_parent, albumIds[albumIds.index(id)-1]).absolute_url()
+
+InitializeClass(CMFPhotoFolder)
+
Added: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/Extensions/Install.py
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/CMFPhoto/Extensions/Install.py?rev=12763&view=auto
==============================================================================
--- spec/debian/unstable/erp5-cmfphoto/CMFPhoto/Extensions/Install.py (added)
+++ spec/debian/unstable/erp5-cmfphoto/CMFPhoto/Extensions/Install.py Thu Feb 15 18:15:00 2007
@@ -1,0 +1,41 @@
+from Products.CMFCore.TypesTool import ContentFactoryMetadata
+from Products.CMFCore.DirectoryView import addDirectoryViews
+from Products.CMFPhoto import CMFPhoto, CMFPhotoFolder, photo_globals
+from Products.CMFCore.utils import getToolByName
+from cStringIO import StringIO
+import string
+
+def install(self):
+ """ """
+
+ out = StringIO()
+ typesTool = getToolByName(self, 'portal_types')
+ skinsTool = getToolByName(self, 'portal_skins')
+
+ for f in (CMFPhotoFolder.factory_type_information, CMFPhoto.factory_type_information):
+ if f['id'] not in typesTool.objectIds():
+ cfm = apply(ContentFactoryMetadata, (), f)
+ typesTool._setObject(f['id'], cfm)
+ out.write('Registered with the types tool\n')
+ else:
+ out.write('Object "%s" already existed in the types tool\n' % (
+ f['id']))
+
+ if 'plone_photo' not in skinsTool.objectIds():
+ addDirectoryViews(skinsTool, 'skins', photo_globals)
+ out.write("Added 'plone_photo' directory views to portal_skins\n")
+
+ skins = skinsTool.getSkinSelections()
+ for skin in skins:
+ path = skinsTool.getSkinPath(skin)
+ path = map(string.strip, string.split(path,','))
+ if 'plone_photo' not in path and skin.startswith('Plone'):
+ path.append('plone_photo')
+
+ path = string.join(path, ', ')
+ skinsTool.addSkinSelection(skin, path)
+ out.write("Added 'plone_photo' to %s skins\n" % skin)
+ else:
+ out.write('Skipping %s skin\n' % skin)
+
+ return out.getvalue()
Propchange: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/Extensions/Install.py
------------------------------------------------------------------------------
svn:executable =
Added: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/README
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/CMFPhoto/README?rev=12763&view=auto
==============================================================================
--- spec/debian/unstable/erp5-cmfphoto/CMFPhoto/README (added)
+++ spec/debian/unstable/erp5-cmfphoto/CMFPhoto/README Thu Feb 15 18:15:00 2007
@@ -1,0 +1,16 @@
+
+INSTALLATION:
+
+ * Zope 2.5 - http://www.zope.org
+
+ * Plone 0.9.9 preview 5 - http://www.plone.org
+
+ * CMF 1.2 - http://cmf.zope.org
+
+ * Photo 1.2.3 - http://www.zope.org/Members/rbickers/Photo
+
+ Add and run Extenstions/Install/install as an external method after plone is installed.
+
+CONTACT:
+
+ magnus.heino at home.se
Added: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/__init__.py
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/CMFPhoto/__init__.py?rev=12763&view=auto
==============================================================================
--- spec/debian/unstable/erp5-cmfphoto/CMFPhoto/__init__.py (added)
+++ spec/debian/unstable/erp5-cmfphoto/CMFPhoto/__init__.py Thu Feb 15 18:15:00 2007
@@ -1,0 +1,26 @@
+import sys
+import CMFPhotoFolder
+import CMFPhoto
+from Products.CMFCore import utils, DirectoryView
+
+ADD_CONTENT_PERMISSION = 'Add portal content' # disgusting isn't it ?
+
+bases = (CMFPhotoFolder.CMFPhotoFolder, CMFPhoto.CMFPhoto)
+
+this_module = sys.modules[__name__]
+z_bases = utils.initializeBasesPhase1(bases, this_module)
+
+photo_globals = globals()
+
+DirectoryView.registerDirectory('skins', globals())
+
+def initialize(registrar):
+ utils.initializeBasesPhase2(z_bases, registrar)
+ utils.ContentInit(
+ 'CMFPhoto',
+ content_types = bases,
+ permission = ADD_CONTENT_PERMISSION,
+ extra_constructors = (CMFPhotoFolder.addCMFPhotoFolder, CMFPhoto.addCMFPhoto),
+ fti = (CMFPhotoFolder.factory_type_information, CMFPhoto.factory_type_information),
+ ).initialize(registrar)
+
Added: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/changelog
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/changelog?rev=12763&view=auto
==============================================================================
--- spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/changelog (added)
+++ spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/changelog Thu Feb 15 18:15:00 2007
@@ -1,0 +1,6 @@
+erp5-cmfphoto (1.2.3-1erp5) unstable; urgency=low
+
+ * Initial Release.
+
+ -- Yusei TAHARA <yusei at domen.cx> Wed, 14 Feb 2007 03:27:56 +0900
+
Added: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/compat
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/compat?rev=12763&view=auto
==============================================================================
--- spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/compat (added)
+++ spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/compat Thu Feb 15 18:15:00 2007
@@ -1,0 +1,1 @@
+5
Added: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/control
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/control?rev=12763&view=auto
==============================================================================
--- spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/control (added)
+++ spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/control Thu Feb 15 18:15:00 2007
@@ -1,0 +1,23 @@
+Source: erp5-cmfphoto
+Section: web
+Priority: optional
+Maintainer: Yusei TAHARA
+Build-Depends: debhelper (>= 5.0)
+Build-Depends-Indep: zope-debhelper (>= 0.3.6)
+Standards-Version: 3.7.2
+
+Package: erp5-cmfphoto
+Architecture: all
+Depends: erp5-zope, erp5-photo
+Description: Custom version for ERP5 of the official CMFPhoto Zope product
+ Extremely useful Zope Product for representing a resizable image (photo) in a
+ Plone or CMF based site. Like Zope's standard Image but smarter.
+ Requires either the ImageMagick or PIL package on your system, which can be
+ tricky to install.
+ .
+ This CMFPhoto product is different from the official CMFPhoto products that you
+ can find at http://cvs.sourceforge.net/viewcvs.py/collective/CMFPhoto . The
+ latter is packaged as "zope-CMFPhoto". The erp5-CMFPhoto is a custom version
+ made by Nexedi from an old version of CMFPhoto. To make things perfect, new
+ code from erp5-CMFPhoto must be merged with the official CMFPhoto, to let us
+ deprecate erp5-CMFPhoto.
Added: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/copyright
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/copyright?rev=12763&view=auto
==============================================================================
--- spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/copyright (added)
+++ spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/copyright Thu Feb 15 18:15:00 2007
@@ -1,0 +1,3 @@
+CONTACT:
+
+ magnus.heino at home.se
Added: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/dzproduct
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/dzproduct?rev=12763&view=auto
==============================================================================
--- spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/dzproduct (added)
+++ spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/dzproduct Thu Feb 15 18:15:00 2007
@@ -1,0 +1,3 @@
+Name: CMFPhoto
+Package: erp5-cmfphoto
+ZopeVersions: >= 2.7
Added: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/postinst
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/postinst?rev=12763&view=auto
==============================================================================
--- spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/postinst (added)
+++ spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/postinst Thu Feb 15 18:15:00 2007
@@ -1,0 +1,7 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+
+#DEBHELPER#
+
+db_stop
Added: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/rules
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/rules?rev=12763&view=auto
==============================================================================
--- spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/rules (added)
+++ spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/rules Thu Feb 15 18:15:00 2007
@@ -1,0 +1,44 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+pwd := $(shell pwd)
+debian := $(pwd)/debian/erp5-cmfphoto
+
+build: build-stamp
+build-stamp:
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_installerp5zope .
+
+binary-indep: build install
+ dh_testdir
+ dh_testroot
+ dh_installdocs
+ dh_installexamples
+ dh_installchangelogs
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary-arch:
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary install
Propchange: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/debian/rules
------------------------------------------------------------------------------
svn:executable =
Added: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/refresh.txt
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/CMFPhoto/refresh.txt?rev=12763&view=auto
==============================================================================
(empty)
Added: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_edit.py
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_edit.py?rev=12763&view=auto
==============================================================================
--- spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_edit.py (added)
+++ spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_edit.py Thu Feb 15 18:15:00 2007
@@ -1,0 +1,49 @@
+## Script (Python) "photo_edit"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=precondition='', field_file='', field_id='', title=None, description=None
+##title=Edit a photo
+##
+qst='portal_status_message=Photo+changed.'
+REQUEST=context.REQUEST
+file=field_file
+id=field_id
+
+context.manage_editPhoto(file=file)
+
+errors=context.validate_image_edit()
+if errors:
+ form=getattr( context, context.getTypeInfo().getActionById( 'edit' ) )
+ return form()
+
+if file.filename and context.isIDAutoGenerated(id):
+ if file.filename.find('\\') > -1: #winXX
+ id=file.filename.split('\\')[-1]
+ else:
+ id=file.filename.split('/')[-1]
+
+ # strips extensions
+ # if id.find('.')>-1: id=id[:id.find('.')]
+
+if not context.isIDAutoGenerated(id):
+ context.REQUEST.set('id', id)
+
+if hasattr(context, 'extended_edit'):
+ REQUEST.set('portal_status_message', 'Photo+changed.')
+ edit_hook=getattr(context,'extended_edit')
+ response=edit_hook(redirect=0)
+ if response:
+ return response
+
+target_action = context.getTypeInfo().getActionById( 'view' )
+
+context.REQUEST.RESPONSE.redirect( '%s/%s?%s' % ( context.absolute_url()
+ , target_action
+ , qst
+ ) )
+
+
+
Propchange: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_edit.py
------------------------------------------------------------------------------
svn:executable =
Added: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_edit_form.pt
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_edit_form.pt?rev=12763&view=auto
==============================================================================
--- spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_edit_form.pt (added)
+++ spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_edit_form.pt Thu Feb 15 18:15:00 2007
@@ -1,0 +1,124 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"
+ lang="en-US"
+ metal:use-macro="here/main_template/macros/master">
+
+<body>
+
+<div metal:fill-slot="main"
+ tal:define="errors python:request.get('errors', {})">
+
+ <h1>Edit Photo</h1>
+
+ <p>
+ Using this form, you can enter details about the photo, and upload
+ a photo if required.
+ </p>
+
+ <form class="group"
+ action="photo_edit"
+ name="edit_form"
+ method="post"
+ enctype="multipart/form-data"
+ tal:attributes="action string:${here/getId}/photo_edit">
+
+ <span class="legend">Photo Details</span>
+
+ <div class="row"
+ tal:define="error_id errors/id | nothing;
+ id request/id | here/getId;">
+ <span class="label required">ID</span>
+ <span class="field"
+ tal:attributes="class python:test(error_id, 'field error', 'field')" >
+
+ <div tal:condition="error_id"
+ tal:replace="error_id" />
+
+ <input type="text"
+ name="field_id"
+ value="#"
+ size="25"
+ tal:attributes="value id" />
+ </span>
+ <span class="info">
+ Enter the ID of the photo. If you don't know what this means,
+ just leave it at the supplied value.
+ </span>
+ </div>
+
+ <div class="row"
+ tal:define="error_title errors/title|nothing;
+ Title request/title | here/Title;">
+ <span class="label required">Title</span>
+ <span class="field"
+ tal:attributes="class python:test(error_title, 'field error', 'field')" >
+
+ <div tal:condition="error_title"
+ tal:replace="error_title" />
+
+ <input type="text"
+ name="field_title"
+ value="#"
+ tal:attributes="value Title" />
+
+ </span>
+ <span class="info">
+ Enter the title of the photo.
+ </span>
+ </div>
+
+ <div class="row">
+ <span class="label">Description</span>
+ <span class="field" tal:define="description request/description | here/Description">
+ <textarea name="field_description:text" rows="10" cols="34"
+ tal:content="description">Some descriptive text</textarea>
+ </span>
+ <span class="info">A short description of the item.</span>
+ </div>
+
+
+ <div class="row"
+ tal:define="error_file errors/file|nothing;
+ file request/file | here/file | nothing;">
+
+ <span class="label required">
+ Photo
+ </span>
+
+ <span class="field"
+ tal:attributes="class python:test(error_file, 'field error', 'field')" >
+
+ <div tal:condition="error_file"
+ tal:replace="error_file" />
+
+ <input type="file"
+ name="field_file"
+ size="20" />
+
+ <span tal:condition="python:test(here.size, 0, 1)">
+ <br /> (No file has been uploaded)
+ </span>
+
+ </span>
+
+ <span class="info">
+ Select the photo to be added by clicking the "Browse" button.
+ </span>
+
+ </div>
+
+ <div class="row">
+
+ <span class="label"> </span>
+ <span class="field"> <input class="context" type="submit" name="change" value="save" /> </span>
+ <span class="info"> </span>
+
+ </div>
+
+ </form>
+
+</div>
+
+</body>
+</html>
Propchange: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_edit_form.pt
------------------------------------------------------------------------------
svn:executable =
Added: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_folder_view.pt
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_folder_view.pt?rev=12763&view=auto
==============================================================================
--- spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_folder_view.pt (added)
+++ spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_folder_view.pt Thu Feb 15 18:15:00 2007
@@ -1,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"
+ lang="en-US"
+ metal:use-macro="here/main_template/macros/master">
+
+<body>
+
+<div metal:fill-slot="main" tal:define="batches python:here.getGroupsOfN(3);">
+
+ <h1 tal:content="here/title_or_id">Title</h1>
+
+ <div class="group">
+ <div class="row" tal:repeat="batch batches">
+ <span tal:repeat="photo batch">
+ <a tal:condition="python:here.getObjSize(photo)" tal:attributes="href string:${photo/absolute_url}/photo_view"><img tal:replace="structure python:photo.tag(display='thumbnail', alt=photo.Description())" /></a>
+ </span>
+ </div>
+ </div>
+
+ <span>
+ <span class="left" tal:condition="here/prevAlbum">
+ <form tal:attributes="action string:${here/prevAlbum}/view">
+ <input class="standalone" type="submit" value="Previous Album" />
+ </form>
+ </span>
+ <span class="right" tal:condition="here/nextAlbum">
+ <form tal:attributes="action string:${here/nextAlbum}/view">
+ <input class="standalone" type="submit" value="Next Album" />
+ </form>
+ </span>
+ <span class="right" tal:condition="python:here.aq_parent.Type() == 'Photo Folder'">
+ <form tal:attributes="action string:${here/aq_parent/absolute_url}/view">
+ <input class="standalone" type="submit" tal:attributes="value string:Upp en nivå till ${here/aq_parent/title_or_id}" value="Upp en nivå till album" />
+ </form>
+ </span>
+ </span>
+
+
+</div>
+
+</body>
+</html>
+
+
Propchange: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_folder_view.pt
------------------------------------------------------------------------------
svn:executable =
Added: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_view.pt
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_view.pt?rev=12763&view=auto
==============================================================================
--- spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_view.pt (added)
+++ spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_view.pt Thu Feb 15 18:15:00 2007
@@ -1,0 +1,87 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"
+ lang="en-US"
+ metal:use-macro="here/main_template/macros/master">
+
+<body>
+
+<span metal:fill-slot="main" tal:define="default_size string:small">
+
+ <div class="contentHeader"
+ metal:use-macro="here/portal_boxes/macros/contentHeader">
+ content header
+ </div>
+
+ <span class="description" tal:content="structure here/Description">
+ Description
+ </span>
+
+ <div class="group">
+ <span class="legend">Image details</span>
+
+ <div class="row">
+ <span class="label"></span>
+ <span class="field" tal:condition="here/size">
+ <a tal:attributes="href here/absolute_url"><img tal:define="size python:getattr(request, 'display', default_size)" tal:replace="structure python:here.tag(display=size, cookie=test(request.get('display'), 1, 0))" /></a>
+ </span>
+ </div>
+
+ <div class="row">
+ <span class="label">Size</span>
+ <span class="field"
+ tal:define="size python:here.getObjSize(here)"
+ tal:content="size">
+ File size
+ </span>
+ <span class="info" tal:condition="python:test(here.size, 0, 1)">
+ (No file has been uploaded)
+ </span>
+ </div>
+
+ <div class="row">
+ <span class="label">File type</span>
+ <span class="field" tal:content="here/content_type">
+ Content type
+ </span>
+ </div>
+
+ <div class="row">
+ <span class="label">Display size</span>
+ <span class="field">
+ <form>
+ <select tal:attributes="onChange string:location.href='${request/URL0}?display='+this.options[this.selectedIndex].value" name="display">
+ <option tal:repeat="display here/displayMap" tal:content="string:${display/id/capitalize} ${display/width}x${display/height}"
+ tal:attributes="value display/id;
+ selected python:test(request.get('display', default_size)==display['id'], 'selected', '');"
+ />
+ </select>
+ </form>
+ </span>
+ </div>
+
+ </div>
+
+ <span tal:define="display request/form/display | default_size">
+ <span class="left" tal:condition="here/prevPhoto">
+ <form tal:attributes="action string:${here/prevPhoto}/view">
+ <input class="standalone" type="submit" value="Previous Photo" />
+ </form>
+ </span>
+ <span class="right" tal:condition="here/nextPhoto">
+ <form tal:attributes="action string:${here/nextPhoto}/view">
+ <input class="standalone" type="submit" value="Next Photo" />
+ </form>
+ </span>
+ <span class="right" tal:condition="python:here.aq_parent.Type() == 'Photo Folder'">
+ <form tal:attributes="action string:${here/aq_parent/absolute_url}/view">
+ <input class="standalone" type="submit" value="Back to Album" />
+ </form>
+ </span>
+ </span>
+
+</span>
+
+</body>
+</html>
+
Propchange: spec/debian/unstable/erp5-cmfphoto/CMFPhoto/skins/plone_photo/photo_view.pt
------------------------------------------------------------------------------
svn:executable =
Added: spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5.diff.gz
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5.diff.gz?rev=12763&view=auto
==============================================================================
Binary file - no diff available.
Propchange: spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5.diff.gz
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5.dsc
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5.dsc?rev=12763&view=auto
==============================================================================
--- spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5.dsc (added)
+++ spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5.dsc Thu Feb 15 18:15:00 2007
@@ -1,0 +1,12 @@
+Format: 1.0
+Source: erp5-cmfphoto
+Version: 1.2.3-1erp5
+Binary: erp5-cmfphoto
+Maintainer: Yusei TAHARA
+Architecture: all
+Standards-Version: 3.7.2
+Build-Depends: debhelper (>= 5.0)
+Build-Depends-Indep: zope-debhelper (>= 0.3.6)
+Files:
+ 1acc1142adb102d60d677a66fa65bbb1 5616 erp5-cmfphoto_1.2.3.orig.tar.gz
+ 15e1c017a2bd28436edd33481f204e52 1218 erp5-cmfphoto_1.2.3-1erp5.diff.gz
Added: spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5_all.deb
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5_all.deb?rev=12763&view=auto
==============================================================================
Binary file - no diff available.
Propchange: spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5_all.deb
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5_i386.build
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5_i386.build?rev=12763&view=auto
==============================================================================
--- spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5_i386.build (added)
+++ spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5_i386.build Thu Feb 15 18:15:00 2007
@@ -1,0 +1,34 @@
+ fakeroot debian/rules clean
+dh_testdir
+dh_testroot
+rm -f build-stamp configure-stamp
+dh_clean
+ dpkg-source -b CMFPhoto
+dpkg-source: warning: source directory `./CMFPhoto' is not <sourcepackage>-<upstreamversion> `erp5-cmfphoto-1.2.3'
+dpkg-source: warning: .orig directory name CMFPhoto.orig is not <package>-<upstreamversion> (wanted erp5-cmfphoto-1.2.3.orig)
+dpkg-source: building erp5-cmfphoto using existing erp5-cmfphoto_1.2.3.orig.tar.gz
+dpkg-source: building erp5-cmfphoto in erp5-cmfphoto_1.2.3-1erp5.diff.gz
+dpkg-source: building erp5-cmfphoto in erp5-cmfphoto_1.2.3-1erp5.dsc
+ debian/rules build
+touch build-stamp
+ fakeroot debian/rules binary
+dh_testdir
+dh_testroot
+dh_clean -k
+dh_installdirs
+dh_installerp5zope .
+dh_testdir
+dh_testroot
+dh_installdocs
+dh_installexamples
+dh_installchangelogs
+dh_compress
+dh_fixperms
+dh_installdeb
+dh_gencontrol
+dh_md5sums
+dh_builddeb
+dpkg-deb: `../erp5-cmfphoto_1.2.3-1erp5_all.deb' ¤Ë¥Ñ¥Ã¥±¡¼¥¸ `erp5-cmfphoto' ¤ò¹½ÃÛ¤·¤Æ¤¤¤Þ¤¹¡£
+ dpkg-genchanges
+dpkg-genchanges: not including original source code in upload
+dpkg-buildpackage (debuild emulation): binary and diff upload (original source NOT included)
Added: spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5_i386.changes
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5_i386.changes?rev=12763&view=auto
==============================================================================
--- spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5_i386.changes (added)
+++ spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3-1erp5_i386.changes Thu Feb 15 18:15:00 2007
@@ -1,0 +1,20 @@
+Format: 1.7
+Date: Wed, 14 Feb 2007 03:27:56 +0900
+Source: erp5-cmfphoto
+Binary: erp5-cmfphoto
+Architecture: source all
+Version: 1.2.3-1erp5
+Distribution: unstable
+Urgency: low
+Maintainer: Yusei TAHARA
+Changed-By: Yusei TAHARA <yusei at domen.cx>
+Description:
+ erp5-cmfphoto - Custom version for ERP5 of the official CMFPhoto Zope product
+Changes:
+ erp5-cmfphoto (1.2.3-1erp5) unstable; urgency=low
+ .
+ * Initial Release.
+Files:
+ 40f9260b60c175963220435852793f4c 378 web optional erp5-cmfphoto_1.2.3-1erp5.dsc
+ 15e1c017a2bd28436edd33481f204e52 1218 web optional erp5-cmfphoto_1.2.3-1erp5.diff.gz
+ 30ef606a30a58b054563fb77bb80fc89 8004 web optional erp5-cmfphoto_1.2.3-1erp5_all.deb
Added: spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3.orig.tar.gz
URL: http://svn.erp5.org/spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3.orig.tar.gz?rev=12763&view=auto
==============================================================================
Binary file - no diff available.
Propchange: spec/debian/unstable/erp5-cmfphoto/erp5-cmfphoto_1.2.3.orig.tar.gz
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
More information about the Erp5-report
mailing list