Changeset 213

Show
Ignore:
Timestamp:
01/26/06 08:42:20
Author:
mylan
Message:

Corrected bug notification document's creator on publishing comment.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • qPloneComments/trunk/skins/qplonecomments/discussion_publish_comment.py

    r212 r213  
    55##bind script=script 
    66##bind subpath=traverse_subpath 
    7 ##parameters=obj=None 
     7##parameters=reply=None 
    88##title= 
    99## 
    1010from Products.CMFPlone import transaction_note 
    1111from Products.qPloneComments.utils import publishDiscussion 
     12from Products.qPloneComments.utils import publishDiscussion, send_email 
     13 
     14if reply is None: 
     15    reply=context 
    1216 
    1317# Publish discussion item 
    1418publishDiscussion(context) 
    1519 
     20# Send notification e-mail 
     21send_notification_message = send_email(reply, container, state="published") 
     22 
     23# Inform user about awaiting moderation 
     24portal_status_message='Comment+successfully+published' 
     25 
    1626transaction_note('Published discussion item') 
    17 target = '%s/%s' % (context.absolute_url(), context.getTypeInfo().getActionById('view') ) 
     27target = '%s/%s?portal_status_message=%s' % (context.absolute_url(), context.getTypeInfo().getActionById('view'),  
     28                                             portal_status_message) 
    1829 
    1930return context.REQUEST.RESPONSE.redirect(target) 
  • qPloneComments/trunk/skins/qplonecomments/published_comment_template.pt

    r212 r213  
    33     tal:define="charset here/portal_properties/site_properties/default_charset|string:utf-8; 
    44                 dummy python:request.RESPONSE.setHeader('Content-Type', 'text/html;;charset=%s' % charset); 
    5                  firm options/firm
     5                 organization_name options/organization_name
    66>To: <tal:x replace="options/mto"/> 
    77From: <tal:x replace="options/mfrom"/> 
    8 Subject: <tal:x condition="firm" replace="string:[$firm] "/>New comment added 
     8Subject: <tal:x condition="organization_name" replace="string:[$organization_name] "/>New comment added 
    99 
    1010<tal:x define="obj nocall:options/obj"> 
     
    1414 
    1515-- 
    16 <tal:x condition="firm" replace="string:$firm "/>Support Team. 
     16<tal:x condition="organization_name" replace="string:$organization_name "/>Support Team. 
    1717 
    1818</div>