Dorneles Treméa schrieb:
[..]
>
> What do you guys think about this pretty
straight-forward changes to
> Archetypes?
Would be fine with me.
And while we are at this: another straight-forward addition
from here would be to also build up something like a
modification
history (potentially limited to a configurable maximum of
entries).
Raphael
>
> Index: Archetypes/ExtensibleMetadata.py
>
============================================================
=======
> --- Archetypes/ExtensibleMetadata.py (revisão 6655)
> +++ Archetypes/ExtensibleMetadata.py (cópia de
trabalho)
>  -116,6 +116,11 
>
description_msgid="help_creators",
> i18n_domain="plone"),
> ),
> + StringField(
> + 'lastEditor',
> + widget=StringWidget(
> + visible={'edit':'invisible',
'view':'invisible'}),
> + ),
> DateTimeField(
> 'effectiveDate',
> mutator='setEffectiveDate',
>  -458,7 +463,9 
> Take appropriate action after the resource has
been modified.
> For now, change the modification_date.
> """
> - # XXX This could also store the id of the user
doing modifications.
> + mtool = getToolByName(self,
'portal_membership')
> + editor =
mtool.getAuthenticatedMember().getId()
> + self.setLastEditor(editor)
> self.setModificationDate(DateTime())
> if shasattr(self, 'http__refreshEtag'):
> self.http__refreshEtag()
>
------------------------------------------------------------
-------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Archetypes-devel mailing list
Archetypes-devel lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/archet
ypes-devel
|