From sidnei at x3ng.com.br Fri Jan 3 10:32:39 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: NZO_SiteLayout - zproduct_targets.mk:1.13 Message-ID: <200301031532.h03FWde00577@cvs.baymountain.com> Update of /cvs-zopeorg/NZO_SiteLayout In directory cvs.zope.org:/tmp/cvs-serv563 Modified Files: zproduct_targets.mk Log Message: Add CMFPackage to the mix === NZO_SiteLayout/zproduct_targets.mk 1.12 => 1.13 === src/ExternalEditor-head: CVS_MODULE=Products/ExternalEditor src/ExternalEditor-head: CVS_TAG= +src/CMFPackage-head: CVS_REPOSITORY=${COLLECTIVE_CVS_REPOSITORY} +src/CMFPackage-head: CVS_MODULE=CMFPackage +src/CMFPackage-head: CVS_TAG= + PRODUCT_CHECKOUTS=\ src/ZopeOrg-NV \ src/BTreeFolder2-0.5 \ @@ -64,6 +68,7 @@ src/CMFPlone-1.0 \ src/Formulator-head \ src/ExternalEditor-head \ +src/CMFPackage-head \ opt/ZopeOrg: src/ZopeOrg-NV opt/BTreeFolder2: src/BTreeFolder2-0.5 @@ -76,6 +81,7 @@ opt/CMFPlone: src/CMFPlone-1.0 opt/Formulator: src/Formulator-head opt/ExternalEditor: src/ExternalEditor-head +opt/CMFPackage: src/CMFPackage-head PRODUCT_OPT_TARGETS=\ opt/ZopeOrg \ @@ -89,6 +95,7 @@ opt/CMFPlone \ opt/Formulator \ opt/ExternalEditor \ +opt/CMFPackage \ ${PRODUCTS_DIRECTORY}/ZopeOrg: opt/ZopeOrg ${PRODUCTS_DIRECTORY}/BTreeFolder2: opt/BTreeFolder2 @@ -101,6 +108,7 @@ ${PRODUCTS_DIRECTORY}/CMFPlone: opt/CMFPlone ${PRODUCTS_DIRECTORY}/Formulator: opt/Formulator ${PRODUCTS_DIRECTORY}/ExternalEditor: opt/ExternalEditor +${PRODUCTS_DIRECTORY}/CMFPackage: opt/CMFPackage PRODUCT_VAR_TARGETS=\ ${PRODUCTS_DIRECTORY}/ZopeOrg \ @@ -114,6 +122,7 @@ ${PRODUCTS_DIRECTORY}/CMFPlone \ ${PRODUCTS_DIRECTORY}/Formulator \ ${PRODUCTS_DIRECTORY}/ExternalEditor \ +${PRODUCTS_DIRECTORY}/CMFPackage \ CMF_INSTANCE_TARGETS=\ ${PRODUCTS_DIRECTORY}/CMFCore \ From sidnei at x3ng.com.br Sat Jan 4 12:34:25 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - index_html.html:1.3 Message-ID: <200301041734.h04HYP528141@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv28080/skins/nzo Modified Files: index_html.html Log Message: improved migration of properties === Products/ZopeOrg-NV/skins/nzo/index_html.html 1.2 => 1.3 === -/span> - - - - - - From sidnei at x3ng.com.br Sat Jan 4 12:34:51 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/Extensions - NZOMigrate.py:1.5 Message-ID: <200301041734.h04HYp228178@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/Extensions In directory cvs.zope.org:/tmp/cvs-serv28080/Extensions Modified Files: NZOMigrate.py Log Message: improved migration of properties === Products/ZopeOrg-NV/Extensions/NZOMigrate.py 1.4 => 1.5 === from ZODB.POSException import POSKeyError from Acquisition import aq_base from Products.CMFCore.utils import getToolByName +from DateTime import DateTime import zLOG def migrate(source, dest, ignore_path=None, type_map=None): @@ -37,7 +38,10 @@ } tmut = Transmutator(source, dest, ignore_path, type_map) - return tmut.run() + tmut.log('Migration script started at %s\n.' % DateTime().ISO()) + result = tmut.run() + tmut.log('Migration script finished at %s\n.' % DateTime().ISO()) + return result def normalizeMetaType(meta_type): return meta_type.replace(' ', '') @@ -127,14 +131,23 @@ try: wf_tool.doActionFor(subob, 'publish') except: pass massPublish(subob) + +def filterList(alist): + dict = {} + for item in alist: + dict[item] = 1 + alist = dict.keys() + alist.sort() + return alist class Transmutator: - def __init__(self, source, dest, ignore_path, type_map): + def __init__(self, source, dest, ignore_path, type_map, level=0): self._source = source self._dest = dest self._ignore_path = ignore_path self._type_map = type_map + self._level = level self._out = StringIO() def log(self, message, summary='', severity=0, dup=1): @@ -142,6 +155,9 @@ if dup: zLOG.LOG('NZOMigration: ',severity,summary,message) + def getResult(self): + return self._out.getvalue() + def getMigrationMethod(self, obj): if hasattr(obj, 'meta_type'): mt = getattr(obj, 'meta_type') @@ -197,6 +213,7 @@ title = obj.title or '' description = obj.description or '' subject = obj.Software_topics or [] + subject = filterList(subject) contact_email = obj.contact_email f.setTitle(title) f.setDescription(description) @@ -205,9 +222,6 @@ return f def ProductRelease2CMFSoftwareRelease(self, obj, source, dest): - if obj.getId() == 'Zope-2.5.x-to-2.5.1-linux2-x86.tgz': - import pdb - pdb.set_trace() dest.invokeFactory(id=obj.getId(), type_name='Software Release') f = getattr(dest, obj.getId()) title = obj.title or '' @@ -224,7 +238,8 @@ changes_url = obj.changes_url installation_url = obj.installation_url license = obj.license - data, size = obj._read_data(obj.data) + data = str(obj.data) + size = len(data) content_type = obj._get_content_type(obj.data, data, obj.__name__, 'application/octet-stream') @@ -281,7 +296,8 @@ f = getattr(dest, obj.getId()) title = obj.title or '' content_type = obj.content_type - data, size = f._read_data(obj.data) + data = str(obj.data) + size = len(data) f.update_data(data, content_type, size) f.setTitle(title) f.setFormat(content_type) @@ -292,7 +308,8 @@ f = getattr(dest, obj.getId()) title = obj.title or '' content_type = obj.content_type - data, size = f._read_data(obj.data) + data = str(obj.data) + size = len(data) f.update_data(data, content_type, size) f.setTitle(title) f.setFormat(content_type) @@ -307,6 +324,7 @@ subject = (type(obj.subject) in [type(''), type([])]) and \ obj.subject or [] subject.extend(obj.NewsItem_topics) + subject = filterList(subject) news.setTitle(title) news.edit(text_format=format, text=text) news.setSubject(subject) @@ -321,6 +339,7 @@ subject = (type(obj.subject) in [type(''), type([])]) and \ obj.subject or [] subject.extend(obj.Link_topics) + subject = filterList(subject) remote_url = obj.remote_url zope_powered = obj.zope_powered or 0 link.setTitle(title) @@ -338,9 +357,9 @@ obj.description or '' text = obj.content format = hasattr(obj, 'format') and obj.format or 'structured-text' - import pdb; pdb.set_trace() subject = (type(obj.subject) in [type(''), type([])]) and \ obj.subject or [] + subject = filterList(subject) doc.setTitle(title) doc.setDescription(description) doc.edit(text_format=format, text=text) @@ -354,14 +373,13 @@ dest.invokeFactory(id=obj.getId(), type_name='Tip') tip = getattr(dest, obj.getId()) title = obj.tip or '' - description = obj.details or '' - text = obj.content - format = obj.format + text = obj.details or '' + format = 'html' subject = (type(obj.subject) in [type(''), type([])]) and \ obj.subject or [] subject.extend(obj.tip_topics) + subject = filterList(subject) tip.setTitle(title) - tip.setDescription(description) tip.edit(text_format=format, text=text) tip.setSubject(subject) return tip @@ -375,6 +393,7 @@ subject = (type(obj.subject) in [type(''), type([])]) and \ obj.subject or [] subject.extend(obj.HowTo_topics) + subject = filterList(subject) howto.setTitle(title) howto.edit(text_format=format, text=text) howto.setSubject(subject) @@ -463,12 +482,26 @@ return new def copyProperties(self, orig, new): + if not hasattr(aq_base(orig), 'propertyIds'): + return new for prop in orig.propertyIds(): - if not new.hasProperty(prop): - new._setProperty(prop, orig.getProperty(prop), \ - orig.getPropertyType(prop)) - else: new._setPropValue(prop, orig.getProperty(prop)) - return new + if not new.hasProperty(prop) and not hasattr(aq_base(new), prop): + type = orig.getPropertyType(prop) + if type in ('selection', 'multiple selection'): + for p in orig._properties: + if p['id'] == prop: + value = p['select_variable'] + if not hasattr(new, value): + setattr(new, value, []) + else: value = orig.getProperty(prop) + try: new._setProperty(prop, value, type) + except Exception, msg: + self.log('Could not set property ' + \ + '%s of type %s to %s.\n %s\n' % \ + (prop, type, value, msg)) + else: + new._setPropValue(prop, orig.getProperty(prop)) + return new def run(self): source = self._source @@ -513,13 +546,15 @@ if hasattr(obj, 'objectIds') and new_obj is not None: ignore = self.WikiMethodsCleanup(obj, ignore) ignore = self.DefaultDTMLCleanup(obj, ignore) - get_transaction().commit(1) self.log(Transmutator(obj, new_obj, \ - ignore, self._type_map).run(), dup=0) + ignore, self._type_map, \ + self._level + 1).run(), dup=0) + if self._level <= 2: + get_transaction().commit() + else: + get_transaction().commit(1) - get_transaction().commit() - - return 'Ok.\n' or self._out.getvalue() + return 'Ok.\n' if __name__ == '__main__': From sidnei at x3ng.com.br Sat Jan 4 12:47:34 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/Extensions - setupZopeOrg.py:1.61 Message-ID: <200301041747.h04HlYV30550@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/Extensions In directory cvs.zope.org:/tmp/cvs-serv30530/Extensions Modified Files: setupZopeOrg.py Log Message: make software release addable again === Products/ZopeOrg-NV/Extensions/setupZopeOrg.py 1.60 => 1.61 === ######################################################## INVISIBLE_TYPES = ( 'Wiki Page' - , 'Software Release' , 'Software Release File' , 'BackTalk Document' ) From sidnei at x3ng.com.br Thu Jan 9 15:16:23 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - processAction.py:1.1 top_logo.png:1.1 Message-ID: <200301092016.h09KGN411761@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv11743/nzo Added Files: processAction.py top_logo.png Log Message: major ui fixes === Added File Products/ZopeOrg-NV/skins/nzo/processAction.py === ## Script (Python) "processAction" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=action_url ##title=processAction ## return context.REQUEST.RESPONSE.redirect(action_url) === Added File Products/ZopeOrg-NV/skins/nzo/top_logo.png === PNG  IHDR6ZMsBITOPLTEͽ˷ܴȲٯ׹ƪ֦԰ãѪΦ˕̜ȍƓņĉzvztqumikdabZZYVXV~R~Q}NyKyKyLwHvDtBp?n;l9l1g3f2e2e0d/d.d.bk7 pHYs  ~tEXtCreation Time01/07/03t tEXtSoftwareMacromedia Fireworks MX*$=IDATx՚}sFJfjդ5)ibh]aWXaݏ]679eﲚ ӣIfEKRZtR;H][޷c(-Þ%uTn&^(+c~5)'K1juʷaKdSz5Gkm7 HR@oWQ}6kݡ /Hg.ZQ:T)䩼jմLJ@O}UbÙH'(BLR+) ^21B\E$:8(H>^eYs4;P`aMBQp-1 (kfo|%/rQ+ЈW5 (վ=tJ Ա䷘ILR$%p͌ͱc$ ~ U~5֋L$Cj40$rdd ROԀ_848$ #\/zp:!v v62pސc]`3IT9m*'3.P`nmΒlF&ayBL$`H>Jp/q0ūO,Zabd(7 čOrw/ű V.L$& @5$gUEDӏ OZ0L~!˜wE.RDʪ{ع$&d/rS`@ 't &5+%lV-PFك'I)^&NPB70=%>u6W*l,Q亇yaAEÆ`͆]ȕt0EtS$a߁"HɌ$C8lJ>k2dJ5~I[ u'qYO>.tXqnf!z%I^؈3[VŠy D݊'+I(x-hC@I77|{=ILDgvJU׋ͪHt6wR+u?:Snp' $}~R49*s9ʆ i^ Iط|j8;MP-f Զv'l+zxB;0&,%Pl{^?&lfCQl7Q*^p Z-iX0A'pF lO G]W>' .$Po}ԸP5ip eyC|W\p+ML&(uXg4Hxĝt.I>b i I"T*ߠ[5;s ,@&J]?zHkŀDߟ x7ֳy XUԒ*N˻a8{gTYUS;g- 8=MN%2,G{x@z#˷xɓ?%$D Ǘ1 V=#o0ý,$LrWg_A}WQ.K\ɱ*gv޻\wL&Mw@藿πghn;yӴ= Ç@kYRG3[W8? $aZ8y3VB\sקO K1Ct;t-z??8grfIENDB` From sidnei at x3ng.com.br Thu Jan 9 15:15:19 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - folder_factories.html:1.2 macros_repository.html:1.5 Message-ID: <200301092015.h09KFJw11573@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv11531/nzo Modified Files: folder_factories.html macros_repository.html Log Message: major ui fixes === Products/ZopeOrg-NV/skins/nzo/folder_factories.html 1.1 => 1.2 === + tal:content="item/Title"> === Products/ZopeOrg-NV/skins/nzo/macros_repository.html 1.4 => 1.5 === -
 Job Jar For Future Projects
- -
By Some Author - (updated 2001-09-17 14:29:59 ) -
- -
- -
View | 
- -
Edit | 
- -
Status: Private - Submit | 
-
-
+tal:condition="python:not isAnon" +tal:define="getIcon python:hasattr(here, 'getIcon') and here.getIcon(); +icon python:getIcon or getattr(here, 'icon', ''); +typ python:getattr(here, 'Type', ''); +objID python:here.truncID( here.getId(), size=25 )"> + + + + + + +
+
  + Job Jar For Future Projects
+ +
By Some Author + (updated + 2001-09-17 14:29:59 ) +
+
+ +
Status: + Private
+ +
+ +
+ + + + + +
+
+ +
From sidnei at x3ng.com.br Thu Jan 9 14:12:31 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/zwiki_dtml Products/ZopeOrg-NV/skins/zwiki_dtml - New directory Message-ID: <200301091912.h09JCVt32328@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/zwiki_dtml In directory cvs.zope.org:/tmp/cvs-serv32317/zwiki_dtml Log Message: Directory /cvs-zopeorg/Products/ZopeOrg-NV/skins/zwiki_dtml added to the repository === Added directory Products/ZopeOrg-NV/skins/zwiki_dtml === From sidnei at x3ng.com.br Thu Jan 9 14:14:02 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - main_template.html:1.14 nzo.css.dtml:1.2 standard_html_header.dtml:1.2 Message-ID: <200301091914.h09JE2w32663@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv32528/nzo Modified Files: main_template.html nzo.css.dtml standard_html_header.dtml Log Message: some dtml skins for zwiki while someone writes zpt versions === Products/ZopeOrg-NV/skins/nzo/main_template.html 1.13 => 1.14 === New Zope.org + @@ -43,65 +44,58 @@ -
- - - - - - - -
-
-
- - Home | - Site map | - Help | - Search - -
+ +
+ + Home | + Site map | + Help | + Search + + + + + +
+ + + + + + - - - - - - - - - - - + +  + -
 The website for the Zope Community +
+
+ The Website for the Zope Community +
-
+
Username:  Guest   Login |  Join  -
- -
- +
- + -
-
+
+ +

About Zope

@@ -151,174 +145,34 @@ - +
-   - +
-
Byline
- + Location: + + Bread > Crumbs - -
- - - - - - - - - - - - -
-

Spotlight on...

- -

Using Zope With Amaya
- By Michel Pelletier 21 August, 2001

-

Zope is an object-oriented web application server that - is managed through a web interface. This interface allows - you to add and manipulate Zope objects. Zope's managment - interface is one of its most powerful features, but there - is one area where using Zope's managment interface is - difficult: editing templates.

- -

What is Zope?

- -

Zope is an open source application server for building - content management solutions such as publishing sites, - intranet, portals, and custom applications. The Zope - community consists of hundreds of companies and thousands - of developers all over the world, working on building - the platform and Zope applications.
- -

- -

Info for...

- -
New Users: New to Zope but familiar with - website programming. - - -
- -
Web Masters: Using Zope to make a website. - - -
- -
Product Developers: Using Zope to make - applications. - -
- -
Zope Developers: Doing the impossible, - improving Zope. - - +
+ Byline
- -
- -

Announcements

- -

14 March - O'Reilly Call For Papers - Deadline

- -

13 March - Migration to new.zope.org - Scheduled

- -

13 March - Lennart is Learning - dreamweaver, Olivier prefers plain old ZMI

- -

- -

News

- -

13 Apr - ZPT introduction

- -

13 Apr - Lambda Tricks

- -

13 Apr - Zope on Slashdot

- -

- -

Top Resources

- -
-

- Content Index 1.5.0 (haqa)

- -

- Ratings 0.3.0 (k_vertigo)

- -

- LDAP Directory Manager 0.1 (k_vertigo)

- -

- Photo Extension 0.0.2 (mngibso)

- -

- ZExternal News 1.0.2 (odeckmyn)

-
- -

- -
-
+
+ + main + +
- - - - -
- -
- Here goes the Copyright +Here goes the Copyright
+ === Products/ZopeOrg-NV/skins/nzo/nzo.css.dtml 1.1 => 1.2 === ** */ - -/* -** Instructions to set caching headers. Inside comments area to play nicer with CSS editors. -** -** ** -** -** -** -** */ -/* */ - - - body { font: 0.8em Verdana, Helvetica, Arial, sans-serif; background: White; @@ -241,11 +228,12 @@ background: transparent; margin: 0; padding: 0; + background-color: #336699; } .logo { /* Logo properties */ - margin: 1em 0em 1em 2em; + margin: 0em 2em 0em 0em; padding: 0; } @@ -254,11 +242,55 @@ background-color: transparent; color: Black; float: right; - margin: 3em 0em 0em 0em; + margin: 2em 0em 0em 0em; padding: 0em 2em 0em 0em; text-align: right; text-transform: lowercase; - width: 30%; + width: 50%; +} + +div.searchBox a { + color: White; +} + +div.top_bar { + background: transparent; + margin: 0; + padding: 0; + background-color: #CCCCCC; +} + +div.slogan { + float: left; + background: transparent; +} + +div.user_bar { + float: right; + background: transparent; +} + +span.side_menu { + border: dotted black 1px; + float: left; + width: 150px; + padding: 6px; + margin: 4px; +} + +table.columns { + width: 100%; + border: 4px; +} + +table.columns td.left { + vertical-align: top; + width: 150px; +} + +table.columns td.right { + vertical-align: top; + padding: 4px; } input.searchButton { @@ -346,29 +378,6 @@ .addFavorite { vertical-align: bottom; -} - -table.columns { - width: 100%; -} - -table.columns td.left { - vertical-align: top; - width: 15%; - padding: 2em 1em 1em 2em; -} - -table.columns td.main { - vertical-align: top; - padding: 0em 1em 1em 1em; - margin: 0; - width: 70%; -} - -table.columns td.right { - vertical-align: top; - width: 15%; - padding: 2em 2em 1em 1em; } #contentTabs { === Products/ZopeOrg-NV/skins/nzo/standard_html_header.dtml 1.1 => 1.2 === - +
- - - -
+ -   - + From sidnei at x3ng.com.br Thu Jan 9 14:20:44 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - macros_repository.html:1.4 Message-ID: <200301091920.h09JKib01658@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv1642/nzo Modified Files: macros_repository.html Log Message: minor ui fixes === Products/ZopeOrg-NV/skins/nzo/macros_repository.html 1.3 => 1.4 === typ python:getattr(here, 'Type', ''); objID python:here.truncID( here.getId(), size=25 )">
 Job Jar For Future Projects
+ tal:attributes="src icon; alt typ"> Job Jar For Future Projects -
- By By Some Author (updated 2001-09-17 14:29:59 ) @@ -27,7 +25,6 @@
-
Submit | 
+
From sidnei at x3ng.com.br Thu Jan 9 14:13:33 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/zwiki_dtml - backlinks.dtml:1.1 editform.dtml:1.1 subscribeform.dtml:1.1 Message-ID: <200301091913.h09JDXi32582@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/zwiki_dtml In directory cvs.zope.org:/tmp/cvs-serv32528/zwiki_dtml Added Files: backlinks.dtml editform.dtml subscribeform.dtml Log Message: some dtml skins for zwiki while someone writes zpt versions === Added File Products/ZopeOrg-NV/skins/zwiki_dtml/backlinks.dtml === bgcolor="#f0f0f0" >

to FrontPage Backlinks for &dtml-title_or_id;

dontusecatalog

Here are the pages which link to :

You can also set this page's parent(s), to locate it within the contents hierarchy. Check the boxes or enter a new page name and click Reparent. A single parent is usually sufficient.

  1. CHECKED>  

Other parent:

Here are the pages which link to :

You can also set this page's parent(s), to locate it within the contents hierarchy. Check the boxes or enter a new page name and click Reparent. A single parent is usually sufficient.

  1. CHECKED>  

Other parent:

=== Added File Products/ZopeOrg-NV/skins/zwiki_dtml/editform.dtml === bgcolor="#f0f0f0" >

 Creating Editing &dtml-id;

 
Optional note:  
Upload a file or image: style="background-color:#f0f0f0">
Render this page as:
Attributes
Name: Local Owner&dtml-plural;: &dtml-niceowners;
Type: &dtml-page_type;
Rename and Delete
No Delete or Rename forms for FrontPage - it can not be removed. You can not rename or delete this page. do so.
Rename to:
 
Confirm delete  
Regulations
This is where wiki page and folder owners choose who can do which of the common wiki operations on the page. The operations include editing the page, creating new pages from it, commenting on it, and resituating it (renaming it, deleting, or changing its designated parents). You can set see the page regulations below.

See RegulatingYourPages for more info.


Regulations:
Role categories: ... new pages from this one. Change the text. Append text to end. Rename, delete, reparent.
Additional allowed users:
Propagate to offspring: readonly onkeydown="this.blur(); return false;" >
Who owns pages created
from this one:
DISABLED CHECKED > Only creator of new page
DISABLED CHECKED> Only original page owner(s)
DISABLED CHECKED> Both original page owner(s) and sub-page creators

See HelpPage for help
=== Added File Products/ZopeOrg-NV/skins/zwiki_dtml/subscribeform.dtml === bgcolor="#f0f0f0" >

home Mail subscription

You can subscribe to this page or to the whole wiki. Subscribers receive a copy of comments via email (but not general edits, unless enabled by the site admin). Or return to &dtml-id;.

Your email address:

bgcolor="#88ff88" bgcolor="#ff7777" > You are currently subscribed
not subscribed
to this page.

bgcolor="#88ff88" bgcolor="#ff7777" > You are currently subscribed
not subscribed
to the whole wiki.

You are subscribed to these other pages:
You have no other page subscriptions.
subscribers:


wiki subscribers:



From sidnei at x3ng.com.br Sat Jan 11 11:15:30 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - macros_repository.html:1.6 main_template.html:1.15 Message-ID: <200301111615.h0BGFUc24020@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv24004/skins/nzo Modified Files: macros_repository.html main_template.html Log Message: minor fix === Products/ZopeOrg-NV/skins/nzo/macros_repository.html 1.5 => 1.6 === -
+
  === Products/ZopeOrg-NV/skins/nzo/main_template.html 1.14 => 1.15 === New Zope.org - @@ -33,11 +32,6 @@ @import "nzo.css"; @import "css_default.css"; - - From sidnei at x3ng.com.br Sat Jan 11 12:21:40 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - css_default.css.dtml:1.3 nzo.css.dtml:1.3 Message-ID: <200301111721.h0BHLed00971@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv950/skins/nzo Modified Files: css_default.css.dtml nzo.css.dtml Log Message: css improvements === Products/ZopeOrg-NV/skins/nzo/css_default.css.dtml 1.2 => 1.3 === color: #336699; text-align: left; font-weight: bold; + padding: 0px 0px 0px 4px; } /* ----------------------------------------- */ === Products/ZopeOrg-NV/skins/nzo/nzo.css.dtml 1.2 => 1.3 === div.top_bar { background: transparent; margin: 0; - padding: 0; + padding: 2px; background-color: #CCCCCC; + border-bottom: #BBBBBB 1px solid; } div.slogan { @@ -271,7 +272,7 @@ } span.side_menu { - border: dotted black 1px; + border: black dotted 1px; float: left; width: 150px; padding: 6px; From sidnei at x3ng.com.br Sun Jan 12 08:40:49 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: NZO_SiteLayout - zproduct_recipes.mk:1.4 zproduct_targets.mk:1.14 Message-ID: <200301121340.h0CDen207420@cvs.baymountain.com> Update of /cvs-zopeorg/NZO_SiteLayout In directory cvs.zope.org:/tmp/cvs-serv7404 Modified Files: zproduct_recipes.mk zproduct_targets.mk Log Message: iirc! we were checking out CMFPlone from HEAD! === NZO_SiteLayout/zproduct_recipes.mk 1.3 => 1.4 === ${PRODUCT_CHECKOUTS}: ${CD} ${BASE_DIR}/src \ - && ${CVS} -d ${CVS_REPOSITORY} checkout -d ${@F} ${CVS_MODULE} + && ${CVS} -d ${CVS_REPOSITORY} checkout ${CVS_TAG} -d ${@F} ${CVS_MODULE} ${PRODUCT_OPT_TARGETS}: ${CD} ${BASE_DIR} && ${CPR} $< ${<:src/%=opt/%} && \ === NZO_SiteLayout/zproduct_targets.mk 1.13 => 1.14 === src/CMFPlone-1.0: CVS_REPOSITORY=${PLONE_CVS_REPOSITORY} src/CMFPlone-1.0: CVS_MODULE=CMFPlone -src/CMFPlone-1.0: CVS_TAG=Plone-1_0 +src/CMFPlone-1.0: CVS_TAG=-rPlone-1_0 src/Formulator-head: CVS_REPOSITORY=${FORMULATOR_CVS_REPOSITORY} src/Formulator-head: CVS_MODULE=Formulator From sidnei at x3ng.com.br Sun Jan 12 12:09:03 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - personalize_form.html:NONE Message-ID: <200301121709.h0CH93v00863@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv826/nzo Removed Files: personalize_form.html Log Message: removing broken personalize_form === Removed File Products/ZopeOrg-NV/skins/nzo/personalize_form.html === From sidnei at x3ng.com.br Sun Jan 12 12:09:59 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/Extensions - NZOMigrate.py:1.6 setupZopeOrg.py:1.62 Message-ID: <200301121709.h0CH9xU00989@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/Extensions In directory cvs.zope.org:/tmp/cvs-serv973/Extensions Modified Files: NZOMigrate.py setupZopeOrg.py Log Message: Improved ownership migration. Few mods to make setupZopeOrg cooperate with latest Plone. === Products/ZopeOrg-NV/Extensions/NZOMigrate.py 1.5 => 1.6 === def normalizeMetaType(meta_type): return meta_type.replace(' ', '') -def fixZWikiPortalType(self): - ct = self.portal_catalog - result = ct(meta_type='ZWiki Page') - counter = 0 - for r in result: - obj = ct.getobject(r.data_record_id_) - obj.portal_type = 'ZWiki Page' - ct.reindexObject(obj, idxs=['portal_type']) - counter += 1 - if not (counter % 100): - get_transaction().commit(1) - return 'ok' + +# this method came from PTK -> CMF migration script def _cleanupOwnership(ob, res, cleanup_children): ''' @@ -513,6 +503,9 @@ oids = [o for o in source.objectIds() \ if (path + (o, )) not in ignore] oids.sort() + if 'acl_users' in oids: + oids.remove('acl_users') + oids.insert(0, 'acl_users') for oid in oids: obj = getattr(source, oid) try: @@ -534,8 +527,12 @@ ' %s: Failed.\n' % obj.absolute_url(relative=1)) else: new_obj = self.fixOwnership(obj, new_obj) - new_obj = self.fixModificationDate(obj, new_obj) new_obj = self.copyProperties(obj, new_obj) + res = [] + new_obj = _cleanupOwnership(obj, res, 0) + self.log('\n'.join(res)) + new_obj = self.fixModificationDate(obj, new_obj) + ct = getToolByName(new_obj, 'portal_catalog', None) if ct is not None: try: ct.reindexObject(obj) === Products/ZopeOrg-NV/Extensions/setupZopeOrg.py 1.61 => 1.62 === , 'Formulator' , 'ExternalEditor' ) -SKINPATHS = ( 'Basic', ) -SKINS = ( 'software_product' - , 'zpt_membership' - , 'zopeorg' - , 'nzo' +SKINPATHS = ( 'Basic', + 'Plone Default', + 'Plone Autumn', + 'Plone Core', + 'Plone Corporate', + 'Plone Core Inverted', + 'Plone Kitty', + 'Plone Greensleeves', + 'Plone Mozilla', + 'Plone Mozilla New', + 'Plone Prime', + 'Plone Zed' + ) + +SKINS = ( 'nzo', ) ADD_INDEXES = () @@ -267,6 +277,8 @@ # Run the CMFCalendar install script log.append('\n * Executing CMFCalendar install script') + if 'portal_calendar' in portal.objectIds(): + portal.manage_delObjects(ids = ['portal_catalog']) log_str = portal.installCMFCalendar() log_list = string.split(log_str, '\n') for i in range(len(log_list)): @@ -345,9 +357,20 @@ ', '.join(delete_skins)) skins = skins_tool.getSkinSelections() + if not 'NZO' in skins: + skins_tool.addSkinSelection('NZO', 'custom, zpt_topic, \ + zpt_calendar, zpt_content, zpt_generic, zpt_control, topic, \ + calendar, content, generic, control, Images') + skins_tool.default_skin = 'NZO' + skins = skins_tool.getSkinSelections() + log.append(' - Set default skin to newly added NZO.') + if skins_tool.getDefaultSkin() not in skins: - skins_tool.default_skin = SKINPATHS[0] - log.append(' - Set default skin to: %s' % SKINPATHS[0]) + for skin in SKINPATHS: + if skin in skins: + skins_tool.default_skin = skin + log.append(' - Set default skin to: %s' % skin) + break def registerSkins( portal_obj ): """ Register skins as Filesystem Directory Views""" @@ -355,6 +378,7 @@ installed_skins = skins_tool.objectIds() prod_path = zopeorg_globals['__path__'][0] skin_path = os.path.join( prod_path, 'skins' ) + default_skin = skins_tool.getDefaultSkin() for skin_name in SKINS: msg = ' - Filesystem Directory View "%s" added' % skin_name @@ -367,6 +391,8 @@ skins = skins_tool.getSkinPaths() for skin_name, skin_path in skins: + if skin_name != default_skin: + continue path_elems = map(string.strip, string.split(skin_path, ',')) for zo_skin in SKINS: if zo_skin not in path_elems: From sidnei at x3ng.com.br Sun Jan 12 12:59:58 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/Extensions - NZOMigrate.py:1.7 Message-ID: <200301121759.h0CHxw307681@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/Extensions In directory cvs.zope.org:/tmp/cvs-serv7666/Extensions Modified Files: NZOMigrate.py Log Message: fix string.join. added creation_date to migration. cleanup a bit the log. a typo. === Products/ZopeOrg-NV/Extensions/NZOMigrate.py 1.6 => 1.7 === from StringIO import StringIO from ZODB.POSException import POSKeyError -from Acquisition import aq_base +from Acquisition import aq_base, aq_parent, aq_inner from Products.CMFCore.utils import getToolByName from DateTime import DateTime import zLOG @@ -95,14 +95,14 @@ if udb is not None: ob._owner = udb, uid res.append('Changed ownership of %s from %s!%s to %s!%s' % - (join(ob.getPhysicalPath(), '/'), - join(old_udb, '/'), uid, - join(udb, '/'), uid,)) + ('/'.join(ob.getPhysicalPath()), + '/'.join(old_udb), uid, + '/'.join(udb), uid,)) else: res.append('Could not fix the ownership of %s, ' 'which is set to %s!%s' % - (join(ob.getPhysicalPath(), '/'), - join(old_udb, '/'), uid,)) + ('/'.join(ob.getPhysicalPath()), + '/'.join(old_udb), uid,)) if cleanup_children: if hasattr(ob, 'objectValues'): @@ -469,6 +469,7 @@ mod_date = orig.bobobase_modification_time().ISO() if hasattr(aq_base(new), 'setModificationDate'): new.setModificationDate(mod_date) + new.creation_date = DateTime(mod_date) return new def copyProperties(self, orig, new): @@ -529,8 +530,9 @@ new_obj = self.fixOwnership(obj, new_obj) new_obj = self.copyProperties(obj, new_obj) res = [] - new_obj = _cleanupOwnership(obj, res, 0) - self.log('\n'.join(res)) + res = _cleanupOwnership(new_obj, res, 0) + if res != []: + self.log('\n'.join(res)) new_obj = self.fixModificationDate(obj, new_obj) ct = getToolByName(new_obj, 'portal_catalog', None) From sidnei at x3ng.com.br Tue Jan 14 15:16:27 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/plone_nzo Products/ZopeOrg-NV/skins/plone_nzo - New directory Message-ID: <200301142016.h0EKGR626585@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/plone_nzo In directory cvs.zope.org:/tmp/cvs-serv26574/plone_nzo Log Message: Directory /cvs-zopeorg/Products/ZopeOrg-NV/skins/plone_nzo added to the repository === Added directory Products/ZopeOrg-NV/skins/plone_nzo === From sidnei at x3ng.com.br Tue Jan 14 15:18:58 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/plone_nzo - bullet.gif:1.1 header.pt:1.1 linkOpaque.gif:1.1 logo.jpg:1.1 ploneCustom.css.dtml:1.1 stylesheet_properties.props:1.1 user.gif:1.1 Message-ID: <200301142018.h0EKIww26906@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/plone_nzo In directory cvs.zope.org:/tmp/cvs-serv26878/plone_nzo Added Files: bullet.gif header.pt linkOpaque.gif logo.jpg ploneCustom.css.dtml stylesheet_properties.props user.gif Log Message: Plone style for nzo === Added File Products/ZopeOrg-NV/skins/plone_nzo/bullet.gif === === Added File Products/ZopeOrg-NV/skins/plone_nzo/header.pt === Title of page Inserts CSS specified from a page. Flexibility for published templates to inject stuff into the head tag. Inserts javascript specified from a page. function formtooltip(el,flag){}
This is here just in case actions is not defined. This would happen if you were calling from a DTML Document
  john You are not logged in dummy
You are here: Home » Home crumb » crumb

=== Added File Products/ZopeOrg-NV/skins/plone_nzo/linkOpaque.gif === === Added File Products/ZopeOrg-NV/skins/plone_nzo/logo.jpg === PNG  IHDR6ZMsBITOPLTEͽ˷ܴȲٯ׹ƪ֦԰ãѪΦ˕̜ȍƓņĉzvztqumikdabZZYVXV~R~Q}NyKyKyLwHvDtBp?n;l9l1g3f2e2e0d/d.d.bk7 pHYs  ~tEXtCreation Time01/07/03t tEXtSoftwareMacromedia Fireworks MX*$=IDATx՚}sFJfjդ5)ibh]aWXaݏ]679eﲚ ӣIfEKRZtR;H][޷c(-Þ%uTn&^(+c~5)'K1juʷaKdSz5Gkm7 HR@oWQ}6kݡ /Hg.ZQ:T)䩼jմLJ@O}UbÙH'(BLR+) ^21B\E$:8(H>^eYs4;P`aMBQp-1 (kfo|%/rQ+ЈW5 (վ=tJ Ա䷘ILR$%p͌ͱc$ ~ U~5֋L$Cj40$rdd ROԀ_848$ #\/zp:!v v62pސc]`3IT9m*'3.P`nmΒlF&ayBL$`H>Jp/q0ūO,Zabd(7 čOrw/ű V.L$& @5$gUEDӏ OZ0L~!˜wE.RDʪ{ع$&d/rS`@ 't &5+%lV-PFك'I)^&NPB70=%>u6W*l,Q亇yaAEÆ`͆]ȕt0EtS$a߁"HɌ$C8lJ>k2dJ5~I[ u'qYO>.tXqnf!z%I^؈3[VŠy D݊'+I(x-hC@I77|{=ILDgvJU׋ͪHt6wR+u?:Snp' $}~R49*s9ʆ i^ Iط|j8;MP-f Զv'l+zxB;0&,%Pl{^?&lfCQl7Q*^p Z-iX0A'pF lO G]W>' .$Po}ԸP5ip eyC|W\p+ML&(uXg4Hxĝt.I>b i I"T*ߠ[5;s ,@&J]?zHkŀDߟ x7ֳy XUԒ*N˻a8{gTYUS;g- 8=MN%2,G{x@z#˷xɓ?%$D Ǘ1 V=#o0ý,$LrWg_A}WQ.K\ɱ*gv޻\wL&Mw@藿πghn;yӴ= Ç@kYRG3[W8? $aZ8y3VB\sקO K1Ct;t-z??8grfIENDB` === Added File Products/ZopeOrg-NV/skins/plone_nzo/ploneCustom.css.dtml === #pipe ul { margin-left: 0; padding-left: 0; display: inline; } #pipe ul li { margin-left: 0; padding: 1px 10px; border-left: 1px solid #000; list-style: none; display: inline; } #pipe ul li.first { margin-left: 0; border-left: none; list-style: none; display: inline; } === Added File Products/ZopeOrg-NV/skins/plone_nzo/stylesheet_properties.props === plone_skin:string=NZO mainFont:string=65% Verdana, Helvetica, Arial, sans-serif mainBackground:string=#E0E0E0 mainFontColor:string=#808080 mainLinkColor:string=Black mainTabBorderColor:string=#A0A0A0 mainTabBorderColorSelected:string=#A0A0A0 mainTabBackground:string=#CCCCCC mainTabBackgroundNotSelected:string=White mainTabBackdrop:string=#BEBEBE mainTabFontWeight:string=normal mainTabFontColor:string=#808080 mainTabFontColorSelected:string=#808080 headingFont:string=100% Verdana, Helvetica, Arial, sans-serif headingFontColor:string=#808080 headingSize1:string=160% headingSize2:string=150% headingSize3:string=140% headingSize4:string=120% headingSize5:string=100% headingSize6:string=80% descriptionFont:string=bold 100% Verdana, Helvetica, Arial, sans-serif contentFont:string=120% Verdana, Helvetica, Arial, sans-serif contentBackground:string=White contentImageBorder:string=0 contentLinkActiveColor:string=Red contentLinkVisitedColor:string=Purple contentTabBorder:string=1px solid #A0A0A0 contentTabBackground:string=#CCCCCC contentTabBackgroundNotSelected:string=White contentTabBackdrop:string=transparent contentTabFontWeight:string=normal contentTabFontColor:string=#808080 contentTabFontColorSelected:string=#808080 preBorder:string=1px solid #A0A0A0 preBackground:string=#CCCCCC messageFont:string=bold 80% Verdana, Helvetica, Arial, sans-serif messageBackground:string=#CCCCCC messageBorder:string=1px solid #A0A0A0 textTransform:string=lowercase noBorder:string=none evenRowBackground:string=#F8F8F8 oddRowBackground:string=White groupBorder:string=1px solid #A0A0A0 requiredField:string=url(required.gif) right no-repeat inputFont:string=bold 10px Verdana, Helvetica, Arial, sans-serif inputBorder:string=1px solid #A0A0A0 contextButtonBackground:string=White url(linkTransparent.gif) 9px 1px no-repeat contextButtonPadding:string=1px 1px 1px 15px contextButtonFontColor:string=Black standaloneButtonBackground:string=#CCCCCC url(linkOpaque.gif) 9px 1px no-repeat standaloneButtonPadding:string=1px 1px 1px 15px standaloneButtonFontColor:string=Black destructiveButtonBackground:string=#FFCE7B url(linkTransparent.gif) 9px 1px no-repeat destructiveButtonPadding:string=1px 1px 1px 15px destructiveButtonBorder:string=1px solid #FFA500 destructiveButtonFontColor:string=Black buttonWeight:string=normal boxBorder:string=1px solid #A0A0A0 boxHeaderBackground:string=#CCCCCC boxHeaderFontColor:string=#808080 boxLinkBackground:string=url(linkTransparent.gif) -0.5em 0px no-repeat boxLinkColor:string=Black boxEvenBackground:string=#F8F8F8 boxOddBackground:string=White boxHighlight:string=2px solid #FFCF7F listingBorder:string=1px solid #A0A0A0 listingHeaderBackground:string=#CCCCCC listingHeaderFontColor:string=#808080 listingLinkHover:string=underline listingEvenBackground:string=#F8F8F8 listingOddBackground:string=White topBackground:string=#336699 topMargin:string=0 topPadding:string=0 logoMargin:string=0em 0em 0em 0em logoPadding:string=0 searchMargin:string=1em 0em 0em 0em searchPadding:string=0em 2em 0em 0em searchFontColor:string=#808080 footerBackground:string=#CCCCCC footerBorder:string=1px solid #A0A0A0 === Added File Products/ZopeOrg-NV/skins/plone_nzo/user.gif === From guido at python.org Thu Jan 16 12:51:56 2003 From: guido at python.org (Guido van Rossum) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - ZopeOrgPermissions.py:1.3 Message-ID: <200301161751.h0GHpup27040@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv27024 Modified Files: ZopeOrgPermissions.py Log Message: Whitespace normalization (to see if I have commit access now). === Products/ZopeOrg-NV/ZopeOrgPermissions.py 1.2 => 1.3 === # Note that we can only use the default Zope roles in calls to # setDefaultRoles(). The default Zope roles are: # Anonymous, Manager, and Owner. - + # # Zope.org Permissions # @@ -14,4 +14,3 @@ DemoteMaintainer = 'Demote maintainer' setDefaultRoles(DemoteMaintainer, ('Manager',)) - From sidnei at x3ng.com.br Sat Jan 18 12:58:18 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/Extensions - NZOMigrate.py:1.8 Message-ID: <200301181758.h0IHwIm17304@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/Extensions In directory cvs.zope.org:/tmp/cvs-serv17290/Extensions Modified Files: NZOMigrate.py Log Message: fix a buglet on folder creation and harmful use of acquisition === Products/ZopeOrg-NV/Extensions/NZOMigrate.py 1.7 => 1.8 === r.update_data(data, content_type, size) r.setPlatform(platform) - r.setMaturity(maturity) - r.setInfoURL(info_url) - r.setLicenseURL(license_url) - r.setChangesURL(changes_url) - r.setInstallationURL(installation_url) - r.setLicense(license) + f.setMaturity(maturity) + f.setInfoURL(info_url) + f.setLicenseURL(license_url) + f.setChangesURL(changes_url) + f.setInstallationURL(installation_url) + f.setLicense(license) return f @@ -392,12 +392,12 @@ def Folder2CMFPortalFolder(self, obj, source, dest): if dest is None or obj is None: return None try: - dest.manage_addFolder(obj.getId(), obj.title) + dest.invokeFactory(id=obj.getId(), type_name="Folder") + dest.setTitle(obj.title) except: pass - new = getattr(dest, obj.getId(), None) - if new is not None and hasattr(new, 'portal_type') and\ - new.portal_type == "Folder": - return new + new = getattr(aq_base(dest), obj.getId(), None) + if new is not None and hasattr(aq_base(new), 'objectValues'): + return new.__of__(dest) return None def BTreeFolder2CMFBTreeFolder(self, obj, source, dest): @@ -406,10 +406,9 @@ bt2 = dest.manage_addProduct['BTreeFolder2'] bt2.manage_addCMFBTreeFolder(obj.getId(), obj.title) except: pass - new = getattr(dest, obj.getId(), None) - if new is not None and hasattr(new, 'portal_type') and\ - new.portal_type == "Folder": - return new + new = getattr(aq_base(dest), obj.getId(), None) + if new is not None and hasattr(aq_base(new), 'objectValues'): + return new.__of__(dest) return None def WikiMethodsCleanup(self, obj, ignore_path): From sidnei at x3ng.com.br Mon Jan 20 09:12:30 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/zopeorg_products Products/ZopeOrg-NV/skins/zopeorg_products - New directory Message-ID: <200301201412.h0KECUe07854@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/zopeorg_products In directory cvs.zope.org:/tmp/cvs-serv7843/zopeorg_products Log Message: Directory /cvs-zopeorg/Products/ZopeOrg-NV/skins/zopeorg_products added to the repository === Added directory Products/ZopeOrg-NV/skins/zopeorg_products === From sidnei at x3ng.com.br Mon Jan 20 09:17:24 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - CaseStudy.py:1.1 ZopeServiceProvider.py:1.1 Message-ID: <200301201417.h0KEHOv08504@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv8482 Added Files: CaseStudy.py ZopeServiceProvider.py Log Message: Two new types: CaseStudy and ZopeServiceProvider. Management skins to come later. Reorganizing FS layout. === Added File Products/ZopeOrg-NV/CaseStudy.py === from Globals import InitializeClass from Products.CMFCore.CMFCorePermissions import View, \ ManageProperties, ListFolderContents, \ ModifyPortalContent, AddPortalContent from Products.CMFCore.utils import format_stx from Products.CMFDefault.Document import Document from Products.CMFDefault.DublinCore import DefaultDublinCoreImpl from AccessControl import ClassSecurityInfo class CaseStudy(Document): portal_type = meta_type = "Case Study" security = ClassSecurityInfo() _external_url = '' _problem = '' _solution = '' _logo = '' def __init__(self, id, title='', description='', text_format='', text=''): DefaultDublinCoreImpl.__init__(self) Document.__init__(self, id, title, description, text_format, text) security.declareProtected(View, 'Summary') Summary = Description security.declareProtected(ModifyPortalContent, 'setSummary') setSummary = setDescription security.declareProtected(View, 'CaseFacts') CaseFacts = CookedBody security.declareProtected(ModifyPortalContent, 'setCaseFacts') setCaseFacts = edit security.declareProtected(View, 'ExternalURL') def ExternalURL(self): return self._external_url security.declareProtected(ModifyPortalContent, 'setExternalURL') def setExternalURL(self, external_url): self._external_url = external_url security.declareProtected(View, 'getLogo') def getLogo(self): logo = self._logo if logo: return getattr(self, logo, None) return None security.declareProtected(ModifyPortalContent, 'setLogo') def setLogo(self, logo): self._logo = logo security.declareProtected(View, 'Problem') def Problem(self): return getCookedText(self, self._problem) security.declareProtected(ModifyPortalContent, 'setProblem') def setProblem(self, problem): self._problem = problem security.declareProtected(View, 'Solution') def Solution(self): return getCookedText(self, self._solution) security.declareProtected(ModifyPortalContent, 'setSolution') def setSolution(self, solution): self._solution = solution InitializeClass(CaseStudy) def getCookedText(self, text, stx_level=None): if (self.text_format == 'html' or self.text_format == 'plain'): return text else: cooked = format_stx(text, stx_level) return cooked === Added File Products/ZopeOrg-NV/ZopeServiceProvider.py === from Globals import InitializeClass from Products.CMFCore.CMFCorePermissions import View, \ ManageProperties, ListFolderContents, \ ModifyPortalContent, AddPortalContent from Products.CMFDefault.Document import Document from Products.CMFDefault.DublinCore import DefaultDublinCoreImpl from AccessControl import ClassSecurityInfo class ZopeServiceProvider(Document): portal_type = meta_type = "Zope Service Provider" security = ClassSecurityInfo() _location = '' _logo = '' _company_url = '' _contact_name = '' _contact_email = '' def __init__(self, id, title='', description='', text_format='', text=''): DefaultDublinCoreImpl.__init__(self) Document.__init__(self, id, title, description, text_format, text) security.declareProtected(View, 'Company') Company = Title security.declareProtected(ModifyPortalContent, 'setCompany') setCompany = setTitle security.declareProtected(View, 'Summary') Summary = Description security.declareProtected(ModifyPortalContent, 'setSummary') setSummary = setDescription security.declareProtected(View, 'ServiceInfo') ServiceInfo = CookedBody security.declareProtected(ModifyPortalContent, 'setServiceInfo') setServiceInfo = edit security.declareProtected(View, 'Location') def Location(self): return self._location security.declareProtected(ModifyPortalContent, 'setLocation') def setLocation(self, location): self._location = location security.declareProtected(View, 'getLogo') def getLogo(self): logo = self._logo if logo: return getattr(self, logo, None) return None security.declareProtected(ModifyPortalContent, 'setLogo') def setLogo(self, logo): self._logo = logo security.declareProtected(View, 'ContactName') def ContactName(self): return self._contact_name security.declareProtected(ModifyPortalContent, 'setContactName') def setContactName(self, contact_name): self._contact_name = contact_name security.declareProtected(View, 'ContactEmail') def ContactEmail(self): return self._contact_email security.declareProtected(ModifyPortalContent, 'setContactEmail') def setContactEmail(self, contact_email): self._contact_email = contact_email InitializeClass(ZopeServiceProvider) From sidnei at x3ng.com.br Mon Jan 20 09:17:26 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/zopeorg - howto_edit.py:NONE howto_edit_form.pt:NONE howto_view.pt:NONE tip_edit.py:NONE tip_edit_form.pt:NONE tip_view.pt:NONE Message-ID: <200301201417.h0KEHQR08520@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/zopeorg In directory cvs.zope.org:/tmp/cvs-serv8482/skins/zopeorg Removed Files: howto_edit.py howto_edit_form.pt howto_view.pt tip_edit.py tip_edit_form.pt tip_view.pt Log Message: Two new types: CaseStudy and ZopeServiceProvider. Management skins to come later. Reorganizing FS layout. === Removed File Products/ZopeOrg-NV/skins/zopeorg/howto_edit.py === === Removed File Products/ZopeOrg-NV/skins/zopeorg/howto_edit_form.pt === === Removed File Products/ZopeOrg-NV/skins/zopeorg/howto_view.pt === === Removed File Products/ZopeOrg-NV/skins/zopeorg/tip_edit.py === === Removed File Products/ZopeOrg-NV/skins/zopeorg/tip_edit_form.pt === === Removed File Products/ZopeOrg-NV/skins/zopeorg/tip_view.pt === From sidnei at x3ng.com.br Mon Jan 20 09:17:29 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/zopeorg_products - howto_edit.py:1.1 howto_edit_form.pt:1.1 howto_view.pt:1.1 tip_edit.py:1.1 tip_edit_form.pt:1.1 tip_view.pt:1.1 Message-ID: <200301201417.h0KEHTn08538@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/zopeorg_products In directory cvs.zope.org:/tmp/cvs-serv8482/skins/zopeorg_products Added Files: howto_edit.py howto_edit_form.pt howto_view.pt tip_edit.py tip_edit_form.pt tip_view.pt Log Message: Two new types: CaseStudy and ZopeServiceProvider. Management skins to come later. Reorganizing FS layout. === Added File Products/ZopeOrg-NV/skins/zopeorg_products/howto_edit.py === ## Script (Python) "howto_edit" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=text_format, text, file, SafetyBelt ##title= ## context.edit(text_format, text, file, SafetyBelt) context.REQUEST.RESPONSE.redirect(context.REQUEST.URL1 + '/howto_edit_form?portal_status_message=Document%20changed.') === Added File Products/ZopeOrg-NV/skins/zopeorg_products/howto_edit_form.pt === Howto Edit Form

Edit This

TitleHowto Title
DescriptionThis is a good HowTo.
Format
Upload
Edit

=== Added File Products/ZopeOrg-NV/skins/zopeorg_products/howto_view.pt ===
Document Title
 
By Me
Cooked Body
=== Added File Products/ZopeOrg-NV/skins/zopeorg_products/tip_edit.py === ## Script (Python) "tip_edit" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=text_format, text, file, SafetyBelt ##title= ## context.edit(text_format, text, file, SafetyBelt) context.REQUEST.RESPONSE.redirect(context.REQUEST.URL1 + '/tip_edit_form?portal_status_message=Document%20changed.') === Added File Products/ZopeOrg-NV/skins/zopeorg_products/tip_edit_form.pt === Howto Edit Form

Edit This

TitleHowto Title
Description This is a good Tip.
Format
Upload
Edit

=== Added File Products/ZopeOrg-NV/skins/zopeorg_products/tip_view.pt === Master Template
this will be a navbar, some day
by bob
bob's news
bob sucks.

powered by that z thing

From sidnei at x3ng.com.br Mon Jan 20 14:02:36 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/zopeorg_products - casestudy_edit.py:1.1 casestudy_edit_form.pt:1.1 casestudy_view.pt:1.1 Message-ID: <200301201902.h0KJ2a232709@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/zopeorg_products In directory cvs.zope.org:/tmp/cvs-serv32678/skins/zopeorg_products Added Files: casestudy_edit.py casestudy_edit_form.pt casestudy_view.pt Log Message: Initialize content types and add a few management views. === Added File Products/ZopeOrg-NV/skins/zopeorg_products/casestudy_edit.py === ## Script (Python) "tip_edit" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=title, summary, logo, external_url, text_format, case_facts, case_facts_file, problem, problem_file, solution, solution_file, SafetyBelt ##title= ## context.setTitle(title) context.setSummary(summary) context.setLogo(logo) context.setExternalURL(external_url) context.setCaseFacts(text_format, case_facts, case_facts_file, SafetyBelt) context.setProblem(text_format, problem, problem_file, SafetyBelt) context.setSolution(text_format, solution, solution_file, SafetyBelt) context.REQUEST.RESPONSE.redirect(context.REQUEST.URL1 + '/casestudy_edit_form?portal_status_message=Case%20Study%20changed.') === Added File Products/ZopeOrg-NV/skins/zopeorg_products/casestudy_edit_form.pt === Case Study Edit Form

Edit This

Title
Summary
Logo
External URL
Format
Case Facts
Upload Case Facts
Problem
Upload Problem
Solution
Upload Solution

=== Added File Products/ZopeOrg-NV/skins/zopeorg_products/casestudy_view.pt === Master Template

External URL

Summary

Summary

Case Facts

Problem

Solution

From sidnei at x3ng.com.br Mon Jan 20 14:03:05 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - CaseStudy.py:1.2 ZopeServiceProvider.py:1.2 __init__.py:1.18 Message-ID: <200301201903.h0KJ35n32763@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv32678 Modified Files: CaseStudy.py ZopeServiceProvider.py __init__.py Log Message: Initialize content types and add a few management views. === Products/ZopeOrg-NV/CaseStudy.py 1.1 => 1.2 === from Products.CMFDefault.Document import Document from Products.CMFDefault.DublinCore import DefaultDublinCoreImpl from AccessControl import ClassSecurityInfo +from Acquisition import aq_base + +factory_type_information = ( { 'id' : 'Case Study' + , 'meta_type' : 'Case Study' + , 'description' : """\ +A Case Study holds details about sucessful implementations of +Zope by Community Members or Zope Service Providers.""" + , 'icon' : 'document_icon.gif' + , 'product' : 'ZopeOrg' + , 'factory' : 'addCaseStudy' + , 'immediate_view' : 'casestudy_edit_form' + , 'actions' : + ( { 'id' : 'view' + , 'name' : 'View' + , 'action' : 'casestudy_view' + , 'permissions' : (View,) + } + , { 'id' : 'edit' + , 'name' : 'Edit' + , 'action' : 'casestudy_edit_form' + , 'permissions' : (ModifyPortalContent,) + } + , { 'id' : 'metadata' + , 'name' : 'Metadata' + , 'action' : 'metadata_edit_form' + , 'permissions' : (ModifyPortalContent,) + } + ) + } + , + ) class CaseStudy(Document): @@ -17,22 +48,26 @@ _problem = '' _solution = '' _logo = '' + _stx_level = 2 def __init__(self, id, title='', description='', text_format='', text=''): DefaultDublinCoreImpl.__init__(self) Document.__init__(self, id, title, description, text_format, text) security.declareProtected(View, 'Summary') - Summary = Description + Summary = Document.Description security.declareProtected(ModifyPortalContent, 'setSummary') - setSummary = setDescription + setSummary = Document.setDescription + + security.declareProtected(View, 'editableCaseFacts') + editableCaseFacts = Document.EditableBody security.declareProtected(View, 'CaseFacts') - CaseFacts = CookedBody + CaseFacts = Document.CookedBody security.declareProtected(ModifyPortalContent, 'setCaseFacts') - setCaseFacts = edit + setCaseFacts = Document.edit security.declareProtected(View, 'ExternalURL') def ExternalURL(self): @@ -42,6 +77,10 @@ def setExternalURL(self, external_url): self._external_url = external_url + security.declareProtected(View, 'Logo') + def Logo(self): + return self._logo + security.declareProtected(View, 'getLogo') def getLogo(self): logo = self._logo @@ -53,28 +92,76 @@ def setLogo(self, logo): self._logo = logo + security.declareProtected(View, 'editableProblem') + def editableProblem(self): + return self._problem + security.declareProtected(View, 'Problem') def Problem(self): - return getCookedText(self, self._problem) + return self._getCookedText('_problem') security.declareProtected(ModifyPortalContent, 'setProblem') - def setProblem(self, problem): - self._problem = problem + def setProblem(self, text_format, problem, file, safety_belt): + self._editText(text_format, problem, file, safety_belt, '_problem') + + security.declareProtected(View, 'editableSolution') + def editableSolution(self): + return self._solution security.declareProtected(View, 'Solution') def Solution(self): - return getCookedText(self, self._solution) + return self._getCookedText('_solution') security.declareProtected(ModifyPortalContent, 'setSolution') - def setSolution(self, solution): - self._solution = solution + def setSolution(self, text_format, solution, file, safety_belt): + self._editText(text_format, solution, file, safety_belt, '_solution') + + def _getCookedText(self, property, stx_level=None, set_level=0): + text_format = getattr(aq_base(self), '%s_text_format' %property, \ + 'structured-text') + text = getattr(aq_base(self), property, '') + cooked = getattr(aq_base(self), 'cooked%s' %property, '') + if (text_format == 'html' or text_format == 'plain' + or (stx_level is None) + or (stx_level == self._stx_level)): + return cooked + else: + cooked = format_stx(text, stx_level) + if set_level: + self._stx_level = stx_level + setattr(self, 'cooked%s' %property, cooked) + return cooked + + def _editText(self, text_format='structured-text', text='', \ + file=None, safety_belt='', property='text'): + level = self._stx_level + if not text_format: + text_format = getattr(aq_base(self), '%s_text_format' %property, \ + 'structured-text') + if not safety_belt: + safety_belt = '' + if not self._safety_belt_update(safety_belt=safety_belt): + msg = ("Intervening changes from elsewhere detected." + " Please refetch the document and reapply your changes." + " (You may be able to recover your version using the" + " browser 'back' button, but will have to apply them" + " to a freshly fetched copy.)") + raise 'EditingConflict', msg + if text_format == 'html': + setattr(self, property, text) + setattr(self, 'cooked%s' %property, text) + elif text_format == 'plain': + setattr(self, property, text) + setattr(self, 'cooked%s' %property, \ + html_quote(text).replace('\n','
')) + else: + setattr(self, property, text) + setattr(self, 'cooked%s' %property, \ + format_stx(text=text, level=level)) InitializeClass(CaseStudy) -def getCookedText(self, text, stx_level=None): - if (self.text_format == 'html' or self.text_format == 'plain'): - return text - else: - cooked = format_stx(text, stx_level) - return cooked +def addCaseStudy( self , id, title=''): + cs = CaseStudy(id, title) + obj = self._setObject(id, cs) === Products/ZopeOrg-NV/ZopeServiceProvider.py 1.1 => 1.2 === from Products.CMFDefault.DublinCore import DefaultDublinCoreImpl from AccessControl import ClassSecurityInfo +factory_type_information = ( { 'id' : 'Zope Service Provider' + , 'meta_type' : 'Zope Service Provider' + , 'description' : """\ +A Zope Service Provider holds contact info for companies that provide +any kind of service related to Zope (Hosting, Consulting, Development).""" + , 'icon' : 'document_icon.gif' + , 'product' : 'ZopeOrg' + , 'factory' : 'addZSP' + , 'immediate_view' : 'zsp_edit_form' + , 'actions' : + ( { 'id' : 'view' + , 'name' : 'View' + , 'action' : 'document_view' + , 'permissions' : (View,) + } + , { 'id' : 'edit' + , 'name' : 'Edit' + , 'action' : 'zsp_edit_form' + , 'permissions' : (ModifyPortalContent,) + } + , { 'id' : 'metadata' + , 'name' : 'Metadata' + , 'action' : 'metadata_edit_form' + , 'permissions' : (ModifyPortalContent,) + } + ) + } + , + ) + class ZopeServiceProvider(Document): portal_type = meta_type = "Zope Service Provider" @@ -23,22 +53,22 @@ Document.__init__(self, id, title, description, text_format, text) security.declareProtected(View, 'Company') - Company = Title + Company = Document.Title security.declareProtected(ModifyPortalContent, 'setCompany') - setCompany = setTitle + setCompany = Document.setTitle security.declareProtected(View, 'Summary') - Summary = Description + Summary = Document.Description security.declareProtected(ModifyPortalContent, 'setSummary') - setSummary = setDescription + setSummary = Document.setDescription security.declareProtected(View, 'ServiceInfo') - ServiceInfo = CookedBody + ServiceInfo = Document.CookedBody security.declareProtected(ModifyPortalContent, 'setServiceInfo') - setServiceInfo = edit + setServiceInfo = Document.edit security.declareProtected(View, 'Location') def Location(self): @@ -76,3 +106,7 @@ self._contact_email = contact_email InitializeClass(ZopeServiceProvider) + +def addZSP( self , id, title=''): + zsp = ZopeServiceProvider(id, title) + obj = self._setObject(id, zsp) === Products/ZopeOrg-NV/__init__.py 1.17 => 1.18 === #import ZopeOrgMembershipTool import ContentList import Acquisition +import CaseStudy +import ZopeServiceProvider #Hackish workaround to allow accesing the broken ZODB on ZopeOrg class ImplicitAcquirerWrapper: @@ -21,10 +23,14 @@ # Make the skins available as DirectoryViews registerDirectory('skins', globals()) registerDirectory('skins/zopeorg', globals()) +registerDirectory('skins/zopeorg_products', globals()) registerDirectory('skins/zopeorg_membership', globals()) #ftis = SoftwareProduct.factory_type_information +ftis = ( CaseStudy.factory_type_information + \ + ZopeServiceProvider.factory_type_information ) + CL_CTORS = ( ( 'manage_addContentListForm', ContentList.addContentListForm ) , ContentList.addContentList ) @@ -66,3 +72,15 @@ # ), # fti = ftis , # ).initialize(context) + + ContentInit( + 'Zope.org Content', + content_types = ( CaseStudy.CaseStudy + , ZopeServiceProvider.ZopeServiceProvider + ), + permission = AddPortalContent, + extra_constructors = ( CaseStudy.addCaseStudy + , ZopeServiceProvider.addZSP + ), + fti = ftis , + ).initialize(context) From sidnei at x3ng.com.br Mon Jan 20 14:51:16 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - .cvsignore:1.1 Message-ID: <200301201951.h0KJpGX06822@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv6792 Added Files: .cvsignore Log Message: adding .cvsignore === Added File Products/ZopeOrg-NV/.cvsignore === *~ *.pyc From sidnei at x3ng.com.br Mon Jan 20 14:52:36 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/zopeorg_products - zsp_edit.py:1.1 zsp_edit_form.pt:1.1 zsp_view.pt:1.1 casestudy_edit.py:1.2 Message-ID: <200301201952.h0KJqaV06999@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/zopeorg_products In directory cvs.zope.org:/tmp/cvs-serv6968/skins/zopeorg_products Modified Files: casestudy_edit.py Added Files: zsp_edit.py zsp_edit_form.pt zsp_view.pt Log Message: ZSP management views === Added File Products/ZopeOrg-NV/skins/zopeorg_products/zsp_edit.py === ## Script (Python) "zsp_edit" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=company, summary, location, text_format, logo, external_url, contact_name, contact_email, voice, fax, service_info, service_info_file, SafetyBelt ##title= ## context.setCompany(company) context.setSummary(summary) context.setLocation(location) context.setLogo(logo) context.setExternalURL(external_url) context.setContactName(contact_name) context.setContactEmail(contact_email) context.setVoice(voice) context.setFax(fax) context.setServiceInfo(text_format, service_info, service_info_file, SafetyBelt) context.REQUEST.RESPONSE.redirect(context.REQUEST.URL1 + '/zsp_edit_form?portal_status_message=ZSP%20changed.') === Added File Products/ZopeOrg-NV/skins/zopeorg_products/zsp_edit_form.pt === ZSP Edit Form

Edit This

Company
Summary
Logo
External URL
Location
Contact Name
Contact Email
Voice
Fax
Format
Service Info
Upload Service Info

=== Added File Products/ZopeOrg-NV/skins/zopeorg_products/zsp_view.pt === Master Template

Company

External URL

Summary

Summary

  • Contact Name:
  • Contact Email:
  • Voice:
  • Fax:

Service Info

=== Products/ZopeOrg-NV/skins/zopeorg_products/casestudy_edit.py 1.1 => 1.2 === -## Script (Python) "tip_edit" +## Script (Python) "casestudy_edit" ##bind container=container ##bind context=context ##bind namespace= From sidnei at x3ng.com.br Mon Jan 20 14:53:05 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - ZopeServiceProvider.py:1.3 Message-ID: <200301201953.h0KJr5I07047@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv6968 Modified Files: ZopeServiceProvider.py Log Message: ZSP management views === Products/ZopeOrg-NV/ZopeServiceProvider.py 1.2 => 1.3 === , 'actions' : ( { 'id' : 'view' , 'name' : 'View' - , 'action' : 'document_view' + , 'action' : 'zsp_view' , 'permissions' : (View,) } , { 'id' : 'edit' @@ -47,6 +47,10 @@ _company_url = '' _contact_name = '' _contact_email = '' + _external_url = '' + _fax = '' + _voice = '' + _stx_level = 2 def __init__(self, id, title='', description='', text_format='', text=''): DefaultDublinCoreImpl.__init__(self) @@ -67,9 +71,20 @@ security.declareProtected(View, 'ServiceInfo') ServiceInfo = Document.CookedBody + security.declareProtected(View, 'editableServiceInfo') + editableServiceInfo = Document.EditableBody + security.declareProtected(ModifyPortalContent, 'setServiceInfo') setServiceInfo = Document.edit + security.declareProtected(View, 'ExternalURL') + def ExternalURL(self): + return self._external_url + + security.declareProtected(ModifyPortalContent, 'setExternalURL') + def setExternalURL(self, external_url): + self._external_url = external_url + security.declareProtected(View, 'Location') def Location(self): return self._location @@ -85,6 +100,10 @@ return getattr(self, logo, None) return None + security.declareProtected(View, 'Logo') + def Logo(self): + return self._logo + security.declareProtected(ModifyPortalContent, 'setLogo') def setLogo(self, logo): self._logo = logo @@ -104,6 +123,22 @@ security.declareProtected(ModifyPortalContent, 'setContactEmail') def setContactEmail(self, contact_email): self._contact_email = contact_email + + security.declareProtected(View, 'Voice') + def Voice(self): + return self._voice + + security.declareProtected(ModifyPortalContent, 'setVoice') + def setVoice(self, voice): + self._voice = voice + + security.declareProtected(View, 'Fax') + def Fax(self): + return self._fax + + security.declareProtected(ModifyPortalContent, 'setFax') + def setFax(self, fax): + self._fax = fax InitializeClass(ZopeServiceProvider) From sidnei at x3ng.com.br Fri Jan 24 22:43:01 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:09 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - nzo.css.dtml:1.4 Message-ID: <200301250343.h0P3h1m15668@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv15562/skins/nzo Modified Files: nzo.css.dtml Log Message: css fix === Products/ZopeOrg-NV/skins/nzo/nzo.css.dtml 1.3 => 1.4 === table { font-size: 100%; + width: 100%; } -a { - text-decoration: none; - color: #436976; - background-color: transparent; +table td { + vertical-align: top; } -table { +table.detail { + border: black dotted 1px; + width: 200px; + background: #8cacbb; +} +a { + text-decoration: underline; + color: #436976; + background-color: transparent; } @@ -142,7 +149,6 @@ fieldset { - border: 1px solid #8cacbb; margin: 2em 0em 1em 0em; padding: 1em 0em; } @@ -159,7 +165,6 @@ } textarea { - border: 1px solid #8cacbb; color: Black; background-color: white; width: 93%; @@ -168,7 +173,6 @@ input { font: 100% Verdana, Helvetica, Arial, sans-serif; - border: 1px solid #8cacbb; color: Black; background-color: white; vertical-align: middle; @@ -178,7 +182,6 @@ select { font: 100% Verdana, Helvetica, Arial, sans-serif; - border: 1px solid #8cacbb; vertical-align: top; } @@ -552,6 +555,11 @@ font-weight: bold; display: inline; padding-right: 0.5em; +} + +td.label { + font-weight: bold; + text-align: right; } div.field { From sidnei at x3ng.com.br Fri Jan 24 23:17:42 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:10 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/zwiki_dtml - wikipage_view.pt:1.1 Message-ID: <200301250417.h0P4HgK01359@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/zwiki_dtml In directory cvs.zope.org:/tmp/cvs-serv1304 Added Files: wikipage_view.pt Log Message: wikipage_view. needs cleanup === Added File Products/ZopeOrg-NV/skins/zwiki_dtml/wikipage_view.pt === <span tal:replace="container/title">wiki name </span><span tal:replace="here/title_or_id">page name</span>
N subscribers last edited n days ago by by so-and-so
home
  • context
    • page name
or page name annoying quote
or
 

last edited n days ago by by so-and-so
or:
home page name

or:
home
  • context
    • page name
page body goes here


full simple minimal     user's bookmarks or UserOptions RecentChanges   help subscribe edit (external edit)
  with heading
manage this page:

change all links
leave placeholder
From sidnei at x3ng.com.br Mon Jan 27 13:24:38 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:10 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/zopeorg_products - zsp_edit.py:1.2 zsp_edit_form.pt:1.2 zsp_view.pt:1.2 Message-ID: <200301271824.h0RIOcc12440@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/zopeorg_products In directory cvs.zope.org:/tmp/cvs-serv12380/skins/zopeorg_products Modified Files: zsp_edit.py zsp_edit_form.pt zsp_view.pt Log Message: Improving ZSP. Adding Migration. Small CSS Cleanup === Products/ZopeOrg-NV/skins/zopeorg_products/zsp_edit.py 1.1 => 1.2 === ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath -##parameters=company, summary, location, text_format, logo, external_url, contact_name, contact_email, voice, fax, service_info, service_info_file, SafetyBelt +##parameters=company, summary, location, text_format, logo, external_url, contact_info=None, phone_info=None, service_info, service_info_file, SafetyBelt ##title= ## context.setCompany(company) @@ -12,10 +12,8 @@ context.setLocation(location) context.setLogo(logo) context.setExternalURL(external_url) -context.setContactName(contact_name) -context.setContactEmail(contact_email) -context.setVoice(voice) -context.setFax(fax) +context.setContactInfo(contact_info) +context.setPhoneInfo(phone_info) context.setServiceInfo(text_format, service_info, service_info_file, SafetyBelt) context.REQUEST.RESPONSE.redirect(context.REQUEST.URL1 + === Products/ZopeOrg-NV/skins/zopeorg_products/zsp_edit_form.pt 1.1 => 1.2 === - - - + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + +
Company -
Summary -
+ Company + + +
Logo -
External URL -
Location -
Contact Name -
Contact Email -
Voice -
Fax -
Format + + Summary + + +
+ Logo + + +
+ External URL + + +
+ Location + + +
+ Contact Info + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name + +
+ Email + + +
+ Info + + +

+ Name + + +
+ Email + + +
+ Info + + +
+ +
+ Phone Info + + + + + + + + + + + + + + + + +
Phone + + + Info + + +
+ Phone + + + + Info + + +
+ +
Format === Products/ZopeOrg-NV/skins/zopeorg_products/zsp_view.pt 1.1 => 1.2 ===

Summary

-
    -
  • - Contact Name: +

    Contact

    + +
      +
    • + + + + + +
    • -
    • - Contact Email: -
    • -
    • - Voice: -
    • -
    • - Fax: + +
    • + +
    • +

    Service Info

    From sidnei at x3ng.com.br Mon Jan 27 13:25:05 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:10 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - nzo.css.dtml:1.5 Message-ID: <200301271825.h0RIP5912506@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo In directory cvs.zope.org:/tmp/cvs-serv12380/skins/nzo Modified Files: nzo.css.dtml Log Message: Improving ZSP. Adding Migration. Small CSS Cleanup === Products/ZopeOrg-NV/skins/nzo/nzo.css.dtml 1.4 => 1.5 === table.detail { border: black dotted 1px; width: 200px; - background: #8cacbb; + background: #aabbcc; } a { @@ -174,7 +174,6 @@ input { font: 100% Verdana, Helvetica, Arial, sans-serif; color: Black; - background-color: white; vertical-align: middle; margin-bottom: 1px; /* IE bug fix */ padding: 0.1em; From sidnei at x3ng.com.br Mon Jan 27 13:25:03 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:10 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV - ZopeServiceProvider.py:1.4 Message-ID: <200301271825.h0RIP3a12494@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV In directory cvs.zope.org:/tmp/cvs-serv12380 Modified Files: ZopeServiceProvider.py Log Message: Improving ZSP. Adding Migration. Small CSS Cleanup === Products/ZopeOrg-NV/ZopeServiceProvider.py 1.3 => 1.4 === _location = '' _logo = '' _company_url = '' - _contact_name = '' - _contact_email = '' + _contact_info = None _external_url = '' - _fax = '' - _voice = '' + _phone_info = None _stx_level = 2 def __init__(self, id, title='', description='', text_format='', text=''): @@ -108,37 +106,36 @@ def setLogo(self, logo): self._logo = logo - security.declareProtected(View, 'ContactName') - def ContactName(self): - return self._contact_name - - security.declareProtected(ModifyPortalContent, 'setContactName') - def setContactName(self, contact_name): - self._contact_name = contact_name - - security.declareProtected(View, 'ContactEmail') - def ContactEmail(self): - return self._contact_email - - security.declareProtected(ModifyPortalContent, 'setContactEmail') - def setContactEmail(self, contact_email): - self._contact_email = contact_email - - security.declareProtected(View, 'Voice') - def Voice(self): - return self._voice - - security.declareProtected(ModifyPortalContent, 'setVoice') - def setVoice(self, voice): - self._voice = voice - - security.declareProtected(View, 'Fax') - def Fax(self): - return self._fax - - security.declareProtected(ModifyPortalContent, 'setFax') - def setFax(self, fax): - self._fax = fax + security.declareProtected(View, 'ContactInfo') + def ContactInfo(self): + return self._contact_info or () + + security.declareProtected(ModifyPortalContent, 'setContactInfo') + def setContactInfo(self, contact_info): + contacts = [] + if contact_info is not None: + for cinfo in contact_info: + email = cinfo['email'] + name = cinfo['name'] + info = cinfo['info'] + if name and email: + contacts.append({'name':name, 'email':email, 'info':info}) + self._contact_info = contacts + + security.declareProtected(View, 'PhoneInfo') + def PhoneInfo(self): + return self._phone_info or () + + security.declareProtected(ModifyPortalContent, 'setPhoneInfo') + def setPhoneInfo(self, phone_info): + phones = [] + if phone_info is not None: + for pinfo in phone_info: + phone = pinfo['phone'] + info = pinfo['info'] + if phone: + phones.append({'phone':phone, 'info':info}) + self._phone_info = phones InitializeClass(ZopeServiceProvider) From sidnei at x3ng.com.br Mon Jan 27 13:25:04 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:10 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/Extensions - NZOMigrate.py:1.9 Message-ID: <200301271825.h0RIP4F12500@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/Extensions In directory cvs.zope.org:/tmp/cvs-serv12380/Extensions Modified Files: NZOMigrate.py Log Message: Improving ZSP. Adding Migration. Small CSS Cleanup === Products/ZopeOrg-NV/Extensions/NZOMigrate.py 1.8 => 1.9 === alist = dict.keys() alist.sort() return alist - + +def migrateZSP(root, obj): + entries = obj[0].objectValues('ENTRY') + for entry in entries: + id = getattr(entry, 'LOGO', entry.getId()) + if hasattr(aq_base(root), id): + logo_id = '%s_logo' % id + root.manage_renameObject(id=id, new_id=logo_id) + root.invokeFactory(id=id, type_name='Zope Service Provider') + new_obj = getattr(root, id, None) + if new_obj is None: + return + new_obj.setCompany(getattr(entry, 'COMPANY', '')) + new_obj.setSummary('') + new_obj.setExternalURL(getattr(entry, 'URL', '')) + new_obj.setLocation(getattr(entry, 'LOCATION', '')) + new_obj.setLogo(logo_id) + text = [s.INFO for s in entry.objectValues('SERVICE')] + text = '\n'.join(text) + new_obj.setServiceInfo(text=text, text_format='plain') + new_contacts = [] + contacts = entry.objectValues('CONTACT') + for ct in contacts: + contact = {} + contact['name'] = getattr(ct, 'NAME', '') + contact['email'] = getattr(ct, 'EMAIL', '') + contact['info'] = getattr(ct, 'INFO', '') + new_contacts.append(contact.copy()) + new_obj.setContactInfo(new_contacts) + new_phones = [] + phones = entry.objectValues('PHONE') + for p in phones: + phone = {} + phone['phone'] = getattr(p, 'NUMBER', '') + phone['info'] = getattr(p, 'INFO', '') + new_phones.append(phone.copy()) + new_obj.setPhoneInfo(new_phones) + return new_obj + class Transmutator: def __init__(self, source, dest, ignore_path, type_map, level=0): @@ -249,7 +287,9 @@ return None def XMLDocument2XMLDocument(self, obj, source, dest): - self.log('Ignoring XML Document for now.\n') + id = obj.getId() + if id == 'zsp.xml': + return migrateZSP(dest, obj) return None def BackTalkBook2CMFBackTalkBook(self, obj, source, dest): @@ -395,9 +435,11 @@ dest.invokeFactory(id=obj.getId(), type_name="Folder") dest.setTitle(obj.title) except: pass - new = getattr(aq_base(dest), obj.getId(), None) - if new is not None and hasattr(aq_base(new), 'objectValues'): - return new.__of__(dest) + if not hasattr(aq_base(dest), obj.getId()): + return None + new = getattr(dest, obj.getId()) + if hasattr(aq_base(new), 'objectValues'): + return new return None def BTreeFolder2CMFBTreeFolder(self, obj, source, dest): @@ -507,7 +549,11 @@ oids.remove('acl_users') oids.insert(0, 'acl_users') for oid in oids: - obj = getattr(source, oid) + obj = getattr(source, oid, None) + if obj is None: + self.log('Oid %s in objectIds but object ' % oid +\ + ' not found in %s.\n' % '/'.join(path)) + continue try: # We may want to catch POSKeyErrors early, # so lets prod the object and see what happens @@ -531,7 +577,7 @@ res = [] res = _cleanupOwnership(new_obj, res, 0) if res != []: - self.log('\n'.join(res)) + self.log('\n'.join(res) + '\n') new_obj = self.fixModificationDate(obj, new_obj) ct = getToolByName(new_obj, 'portal_catalog', None) From sidnei at x3ng.com.br Tue Jan 28 20:54:05 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:10 2008 Subject: [zopeorg-checkins] CVS: NZO_SiteLayout - Makefile.zinstance:1.8 Makefile.zope:1.7 cvs.mk:1.11 Message-ID: <200301290154.h0T1s5U17162@cvs.baymountain.com> Update of /cvs-zopeorg/NZO_SiteLayout In directory cvs.zope.org:/tmp/cvs-serv17113 Modified Files: Makefile.zinstance Makefile.zope cvs.mk Log Message: cleaning up branch/dirname mess === NZO_SiteLayout/Makefile.zinstance 1.7 => 1.8 === # cvs.mk for other known checkouts). #----------------------------------------------------------------------- PYTHON_CHECKOUT=src/Python-2.1.3 -ZOPE_CHECKOUT=src/Zope-2.6-head -ZEO_CHECKOUT=src/ZEO-2.0-head -CMF_CHECKOUT=src/CMF-1.3-head +ZOPE_CHECKOUT=src/Zope-2.6-branch +ZEO_CHECKOUT=src/ZEO-2.0-ZODB3-3_1-branch +CMF_CHECKOUT=src/CMF-1.3-branch include python_targets.mk include zope_targets.mk === NZO_SiteLayout/Makefile.zope 1.6 => 1.7 === # cvs.mk for other known checkouts). #----------------------------------------------------------------------- PYTHON_CHECKOUT=src/Python-2.1.3 -ZOPE_CHECKOUT=src/Zope-2.6-head -ZEO_CHECKOUT=src/ZEO-2.0-head -CMF_CHECKOUT=src/CMF-1.3-head +ZOPE_CHECKOUT=src/Zope-2.6-branch +ZEO_CHECKOUT=src/ZEO-2.0-ZODB3-3_1-branch +CMF_CHECKOUT=src/CMF-1.3-branch include python_targets.mk include zope_targets.mk === NZO_SiteLayout/cvs.mk 1.10 => 1.11 === CUSTOM_CVS_REPOSITORY=:ext:${CVS_USER}@${CUSTOM_REPO_TAIL} endif -PYTHON_CVS_REPOSITORY=:pserver:anonymous@cvs.python.sourceforge.net:/cvsroot/python +PYTHON_CVS_REPOSITORY=:pserver:anonymous@cvs.sf.net:/cvsroot/python ZOPE_CVS_REPOSITORY=:pserver:anonymous@cvs.zope.org:/cvs-repository SQUID_CVS_REPOSITORY=:pserver:anoncvs@cvs.squid-cache.org:/squid ZOPEORG_CVS_REPOSITORY=:pserver:anonymous@cvs.zope.org:/cvs-zopeorg @@ -53,17 +53,17 @@ src/Zope-2.5.0: CVS_MODULE=Zope src/Zope-2.5.0: CVS_TAG=-r Zope-2_5_0-src -src/Zope-2.5-head: CVS_REPOSITORY=${ZOPE_CVS_REPOSITORY} -src/Zope-2.5-head: CVS_MODULE=Zope -src/Zope-2.5-head: CVS_TAG=-r Zope-2_5-branch +src/Zope-2.5-branch: CVS_REPOSITORY=${ZOPE_CVS_REPOSITORY} +src/Zope-2.5-branch: CVS_MODULE=Zope +src/Zope-2.5-branch: CVS_TAG=-r Zope-2_5-branch src/Zope-2.6.0: CVS_REPOSITORY=${ZOPE_CVS_REPOSITORY} src/Zope-2.6.0: CVS_MODULE=Zope src/Zope-2.6.0: CVS_TAG=-r Zope-2_6_0-src -src/Zope-2.6-head: CVS_REPOSITORY=${ZOPE_CVS_REPOSITORY} -src/Zope-2.6-head: CVS_MODULE=Zope -src/Zope-2.6-head: CVS_TAG=-r Zope-2_6-branch +src/Zope-2.6-branch: CVS_REPOSITORY=${ZOPE_CVS_REPOSITORY} +src/Zope-2.6-branch: CVS_MODULE=Zope +src/Zope-2.6-branch: CVS_TAG=-r Zope-2_6-branch @@ -77,9 +77,9 @@ src/ZEO-1.0-head: CVS_MODULE=ZEO src/ZEO-1.0-head: CVS_TAG=-r zeo-1_0-branch -src/ZEO-2.0-head: CVS_REPOSITORY=${ZOPE_CVS_REPOSITORY} -src/ZEO-2.0-head: CVS_MODULE=ZEO -src/ZEO-2.0-head: CVS_TAG=-r ZODB3-3_1-branch +src/ZEO-2.0-ZODB3-3_1-branch: CVS_REPOSITORY=${ZOPE_CVS_REPOSITORY} +src/ZEO-2.0-ZODB3-3_1-branch: CVS_MODULE=ZEO +src/ZEO-2.0-ZODB3-3_1-branch: CVS_TAG=-r ZODB3-3_1-branch src/StandaloneZODB-1.0: CVS_REPOSITORY=${ZOPE_CVS_REPOSITORY} src/StandaloneZODB-1.0: CVS_MODULE=StandaloneZODB @@ -87,13 +87,13 @@ # CMF versions -src/CMF-1.3: CVS_REPOSITORY=${ZOPE_CVS_REPOSITORY} -src/CMF-1.3: CVS_MODULE=CMF -src/CMF-1.3: CVS_TAG=-r CMF-1_3-release - -src/CMF-1.3-head: CVS_REPOSITORY=${ZOPE_CVS_REPOSITORY} -src/CMF-1.3-head: CVS_MODULE=CMF -src/CMF-1.3-head: CVS_TAG=-r CMF-1_3-branch +src/CMF-1.3-release: CVS_REPOSITORY=${ZOPE_CVS_REPOSITORY} +src/CMF-1.3-release: CVS_MODULE=CMF +src/CMF-1.3-release: CVS_TAG=-r CMF-1_3-release + +src/CMF-1.3-branch: CVS_REPOSITORY=${ZOPE_CVS_REPOSITORY} +src/CMF-1.3-branch: CVS_MODULE=CMF +src/CMF-1.3-branch: CVS_TAG=-r CMF-1_3-branch src/CMF-head: CVS_REPOSITORY=${ZOPE_CVS_REPOSITORY} src/CMF-head: CVS_MODULE=CMF From sidnei at x3ng.com.br Tue Jan 28 21:11:25 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:10 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/Extensions - setupZopeOrg.py:1.63 Message-ID: <200301290211.h0T2BP819932@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/Extensions In directory cvs.zope.org:/tmp/cvs-serv19765/Extensions Modified Files: setupZopeOrg.py Log Message: Use ZCTextIndex Yay! Reindex after replacing index. Use DCWorkflow -based workflows. Migrate ZSP (Still need to register it on Install) === Products/ZopeOrg-NV/Extensions/setupZopeOrg.py 1.62 => 1.63 === from Products.ZopeOrg import zopeorg_globals from Products.CMFCore.DirectoryView import addDirectoryViews from Products.CMFCore.utils import getToolByName -from Products.ZopeOrg.NewsItemWorkflow import NewsItemWorkflowDefinition -from Products.ZopeOrg.ZopeOrgWorkflow import ZopeOrgWorkflowDefinition from Products.ZopeOrg.ZopeOrgTypes import ftis from Products.CMFCore.PortalFolder import manage_addPortalFolder from Products.CMFCore.TypesTool import FactoryTypeInformation @@ -20,6 +18,7 @@ from Products.PluginIndexes.DateIndex.DateIndex import DateIndex from Products.PluginIndexes.DateRangeIndex.DateRangeIndex import DateRangeIndex +from Products.ZCTextIndex import ZCTextIndex from Products.CMFDateIndexes.RSCatalogTool import RSCatalogTool from Products.BTreeFolder2.CMFBTreeFolder import manage_addCMFBTreeFolder @@ -66,6 +65,7 @@ ) SKINS = ( 'nzo', + 'zopeorg_products' ) ADD_INDEXES = () @@ -77,8 +77,10 @@ , ( 'modified', DateIndex ) ) -WORKFLOWS = ( ('News Item', NewsItemWorkflowDefinition) - , ('default', ZopeOrgWorkflowDefinition) +ZCTEXTINDEXES = ( 'Description', 'SearchableText', 'Title' ) + +WORKFLOWS = (('default', 'zopeorg_default_workflow', + 'Default Zope.org Workflow'), ) EXT_METHODS = ( { 'id' : 'ZO_setupMembership' @@ -207,6 +209,7 @@ catalogAddIndexes(portal, ADD_INDEXES, 'portal_catalog') catalogReplaceIndexes(portal, REPLACE_INDEXES, 'portal_catalog') catalogAddColumns(portal, ADD_COLUMNS, 'portal_catalog') + catalogAddZCTextIndexes(portal, ZCTEXTINDEXES, 'portal_catalog') # Setting up roles and permissions log.append('\n * Setting up roles and permissions') @@ -278,7 +281,7 @@ # Run the CMFCalendar install script log.append('\n * Executing CMFCalendar install script') if 'portal_calendar' in portal.objectIds(): - portal.manage_delObjects(ids = ['portal_catalog']) + portal.manage_delObjects(ids = ['portal_calendar']) log_str = portal.installCMFCalendar() log_list = string.split(log_str, '\n') for i in range(len(log_list)): @@ -405,16 +408,16 @@ def registerWorkflow( portal_obj, wf_tuple ): """ Insert new zope.org workflows into the workflow tool """ wf_portaltype = wf_tuple[0] - wf_class = wf_tuple[1] - + wf_id = wf_tuple[1] + wf_title = wf_tuple[2] + wf_tool = getToolByName(portal_obj, 'portal_workflow') - wf_id = wf_class.id - wf_obj = apply(wf_class, (wf_id,)) if wf_id in wf_tool.objectIds(): wf_tool._delObject(wf_id) - wf_tool._setObject(wf_id, wf_obj) + wf_tool.manage_addWorkflow(id=wf_id, + workflow_type='%s (%s)' % (wf_id, wf_title)) if wf_portaltype == 'default': wf_tool.setDefaultChain(wf_id) @@ -479,8 +482,9 @@ index_class = index_tuple[1] try: - index_obj = apply( index_class, ( index_name, ) ) - cat_core.addIndex( index_name, index_obj ) + index_obj = apply(index_class, (index_name,)) + cat_core.addIndex(index_name, index_obj) + p_cat.reindexIndex(index_name, None) added.append(index_name) except: @@ -492,6 +496,58 @@ log.append(' - Retained catalog indexes in %s: %s' % (which_cat, string.join(retained, ', '))) +class Record: + pass + +def catalogAddZCTextIndexes(portal_obj, index_list, which_cat): + """ Add ZCTextIndexes to the portal catalog """ + p_cat = getattr(portal_obj, which_cat) + cat_core = p_cat._catalog + replaced = [] + added = [] + + existing_indexes = cat_core.indexes + elements = [] + + el1 = Record() + el1.group = "Case Normalizer" + el1.name = "Case Normalizer" + elements.append(el1) + + el2 = Record() + el2.group = "Stop Words" + el2.name = " Don't remove stop words" + elements.append(el2) + + el3 = Record() + el3.group = "Word Splitter" + el3.name = "HTML aware splitter" + elements.append(el3) + + ZCTextIndex.manage_addLexicon(p_cat, 'lexicon', 'Lexicon', elements) + + for index_name in index_list: + if (existing_indexes.has_key(index_name)): + cat_core.delIndex(index_name) + replaced.append(index_name) + else: + added.append(index_name) + + extra = Record() + extra.doc_attr = index_name + extra.index_type = "Okapi BM25 Rank" + extra.lexicon_id = "lexicon" + + p_cat.addIndex(index_name, 'ZCTextIndex', extra) + p_cat.reindexIndex(index_name, None) + + log.append(' - Added new catalog indexes to %s: %s' % + (which_cat, string.join(added, ', '))) + + log.append(' - Replaced catalog indexes in %s: %s' % + (which_cat, string.join(replaced, ', '))) + + def catalogReplaceIndexes(portal_obj, index_list, which_cat): """ Replace indexes in the portal catalog """ @@ -512,6 +568,7 @@ cat_core.delIndex(index_name) index_obj = apply( index_class, ( index_name, ) ) cat_core.addIndex( index_name, index_obj ) + p_cat.reindexIndex(index_name, None) replaced.append(index_name) log.append(' - Replaced %s indexes' % @@ -554,6 +611,7 @@ index_obj = DateRangeIndex('effectiveRange') index_obj._edit(since_field='effective', until_field='expires') cat_core.addIndex('effectiveRange', index_obj) + p_cat.reindexIndex('effectiveRange', None) log.append(' - Added effectiveRange DateRangeIndex index') @@ -752,7 +810,9 @@ """ tt = getToolByName(portal, 'portal_types') typesList = tt.listTypeInfo() - pdTypes = ['Document', 'Favorite', 'Link', 'News Item', 'File', 'Tip', 'HowTo', 'Software Package', 'Software Release', 'Software Release File'] + pdTypes = ['Document', 'Favorite', 'Link', 'News Item', + 'File', 'Tip', 'HowTo', 'Software Package', + 'Software Release', 'Software Release File'] for i in typesList: new_actions = [] for dict in i._actions: From sidnei at x3ng.com.br Tue Jan 28 23:36:31 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:10 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/plone_nzo - header.pt:1.2 Message-ID: <200301290436.h0T4aVU05784@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/plone_nzo In directory cvs.zope.org:/tmp/cvs-serv5770/skins/plone_nzo Modified Files: header.pt Log Message: forgot to commit this file === Products/ZopeOrg-NV/skins/plone_nzo/header.pt 1.1 => 1.2 === --> - + @@ -137,7 +137,7 @@ class="logo" tal:attributes="width logo/width; height logo/height; - src string:${logo/absolute_url}?skin=$current_skin" /> + src string:${logo/absolute_url}" /> From sidnei at x3ng.com.br Wed Jan 29 14:17:01 2003 From: sidnei at x3ng.com.br (Sidnei da Silva) Date: Sun Aug 10 17:02:10 2008 Subject: [zopeorg-checkins] CVS: Products/ZopeOrg-NV/Extensions - setupZopeOrg.py:1.64 Message-ID: <200301291917.h0TJH1M12014@cvs.baymountain.com> Update of /cvs-zopeorg/Products/ZopeOrg-NV/Extensions In directory cvs.zope.org:/tmp/cvs-serv11995/Extensions Modified Files: setupZopeOrg.py Log Message: Ooops. I broke ZSP & Case Studies when added new workflow. Also, a few fixes to allowed_content_types and a bug were objects already created werent getting the right workflow permissions === Products/ZopeOrg-NV/Extensions/setupZopeOrg.py 1.63 => 1.64 === log.append('\n * Creating a Members BTreeFolder') if ( 'Members' in portal.objectIds() and - getattr( portal, 'Members' ).meta_type in ( 'Folder', 'Portal Folder' ) ): + getattr( portal, 'Members' ).meta_type in ( 'Folder', + 'Portal Folder', + 'Plone Folder') ): portal._delObject( 'Members' ) manage_addCMFBTreeFolder( portal, 'Members', 'Member Folder' ) @@ -296,10 +298,9 @@ log_list[1] = ' - %s' % log_list[i] log.extend(log_list) - log.append('\n * Modifying allowed/filtered types for folderish types') - folderish_types=['Wiki Folder', 'Software Package', - 'Software Release', 'Member Folder'] - setupAllowedTypes(portal, folderish_types) + #log.append('\n * Modifying allowed/filtered types for folderish types') + #folderish_types=[] + #setupAllowedTypes(portal, folderish_types) # Prune the addable types visible in CMF Folders log.append( '\n * Pruning addable types in folder add list' ) @@ -428,6 +429,7 @@ ) log.append(' - Inserted workflow "%s" for type "%s"' % (wf_id, wf_portaltype)) + wf_tool.updateRoleMappings() def setupRolesAndPermissions(portal_obj):