[Zope-CMF] How often do you rewiev? Disable CMF Wiki?

Pieter Claerhout pieter.claerhout@pandora.be
Mon, 18 Feb 2002 07:48:39 +0100


I did it by changing the content_status_modify script to:

# Perform the workflow action
context.portal_workflow.doActionFor(context, workflow_action,
comment=comment)

# Get a mailhost object
try:
    mailhost=getattr(context, context.superValues('Mail Host')[0].id)
except:
    raise AttributeError, "cant find a Mail Host object"

# Compose the message
mMsg = ''
mMsg = mMsg + 'Document: ' + context.title_or_id() + '\n'
mMsg = mMsg + 'Workflow action: ' + workflow_action + '\n'
mMsg = mMsg + 'URL: ' + context.absolute_url() + '\n'
if comment != '':
    mMsg = mMsg + '\nComment:' + comment + '\n'
mMsg = mMsg + '\nKind regards,\n\n\n'
mMsg = mMsg + 'The ' + context.portal_properties.title() + ' team'

# Compose the to list
mailToList=[]
for member in context.portal_membership.listMembers():
    if member.email !='':
        if 'Reviewer' in
context.portal_membership.getMemberById(member.id).getRoles():
            mailToList.append(member.email)
mTo = string.join(mailToList, ', ')

# From and subject
mFrom = context.email_from_address
mSubj = context.portal_properties.title() + ' - new content'

# Send the email
mailhost.send(mMsg, mTo, mFrom, mSubj)

# Find out how we should redirect
if workflow_action == 'reject':
    redirect_url = context.portal_url() + '/search?review_state=pending'
else:
    redirect_url = '%s/view?%s' % ( context.absolute_url(),
'portal_status_message=Status+changed.')

# Redirect
context.REQUEST[ 'RESPONSE' ].redirect( redirect_url )

Cheers,



Pieter

-----Original Message-----
From: zope-cmf-admin@zope.org [mailto:zope-cmf-admin@zope.org]On Behalf
Of marc lindahl
Sent: Monday, February 18, 2002 12:39 AM
To: zope-cmf@zope.org
Subject: Re: [Zope-CMF] How often do you rewiev? Disable CMF Wiki?




> From: Tres Seaver <tseaver@zope.com>
>  We should probably implement
> some kind of daily e-mail notification / reminder for it.

If you do, can you document (at least rougly) how you did it?  I'd like to
email reviewers when there's new stuff to review on my own site (and/or
periodic reminders)



_______________________________________________
Zope-CMF maillist  -  Zope-CMF@zope.org
http://lists.zope.org/mailman/listinfo/zope-cmf

See http://www.zope.org/Products/PTK/Tracker for bug reports and feature
requests