Changeset 613
- Timestamp:
- 10/27/06 11:03:44
- Files:
-
- qPloneComments/trunk/Extensions/Install.py (modified) (6 diffs)
- qPloneComments/trunk/Extensions/__init__.py (modified) (1 diff)
- qPloneComments/trunk/config.py (modified) (1 diff)
- qPloneComments/trunk/i18n (added)
- qPloneComments/trunk/i18n/plonecomments-fr.po (added)
- qPloneComments/trunk/i18n/plonecomments-plone-fr.po (added)
- qPloneComments/trunk/i18n/plonecomments-plone.pot (added)
- qPloneComments/trunk/i18n/plonecomments.pot (added)
- qPloneComments/trunk/patch.py (modified) (2 diffs)
- qPloneComments/trunk/skins/qplonecomments/2.0.5/discussion_publish_comment.py (modified) (2 diffs)
- qPloneComments/trunk/skins/qplonecomments/2.0.5/discussion_reply.cpy (modified) (4 diffs)
- qPloneComments/trunk/skins/qplonecomments/2.0.5/discussion_reply_form.cpt (modified) (3 diffs)
- qPloneComments/trunk/skins/qplonecomments/2.0.5/discussionitem_view.pt (modified) (3 diffs)
- qPloneComments/trunk/skins/qplonecomments/2.0.5/validate_talkback.vpy (modified) (1 diff)
- qPloneComments/trunk/skins/qplonecomments/2.0.5/viewThreadsAtBottom.pt (modified) (3 diffs)
- qPloneComments/trunk/skins/qplonecomments/2.1/discussion_publish_comment.py (modified) (2 diffs)
- qPloneComments/trunk/skins/qplonecomments/2.1/discussion_reply.cpy (modified) (5 diffs)
- qPloneComments/trunk/skins/qplonecomments/2.1/discussion_reply_form.cpt (modified) (3 diffs)
- qPloneComments/trunk/skins/qplonecomments/2.1/validate_talkback.vpy (modified) (1 diff)
- qPloneComments/trunk/skins/qplonecomments/2.1/viewThreadsAtBottom.pt (modified) (1 diff)
- qPloneComments/trunk/skins/qplonecomments/2.5 (added)
- qPloneComments/trunk/skins/qplonecomments/2.5/discussion_publish_comment.py (added)
- qPloneComments/trunk/skins/qplonecomments/2.5/discussion_reply.cpy (added)
- qPloneComments/trunk/skins/qplonecomments/2.5/discussion_reply.cpy.metadata (added)
- qPloneComments/trunk/skins/qplonecomments/2.5/discussion_reply_form.cpt (added)
- qPloneComments/trunk/skins/qplonecomments/2.5/discussion_reply_form.cpt.metadata (added)
- qPloneComments/trunk/skins/qplonecomments/2.5/validate_talkback.vpy (added)
- qPloneComments/trunk/skins/qplonecomments/2.5/viewThreadsAtBottom.pt (added)
- qPloneComments/trunk/skins/qplonecomments/approve_comment_template.pt (modified) (2 diffs)
- qPloneComments/trunk/skins/qplonecomments/notify_comment_template.pt (added)
- qPloneComments/trunk/skins/qplonecomments/prefs_comments_setup.cpy (modified) (1 diff)
- qPloneComments/trunk/skins/qplonecomments/prefs_comments_setup_form.cpt (modified) (10 diffs)
- qPloneComments/trunk/skins/qplonecomments/prefs_recent_comments_delete.cpy (modified) (2 diffs)
- qPloneComments/trunk/skins/qplonecomments/prefs_recent_comments_form.cpt (modified) (5 diffs)
- qPloneComments/trunk/skins/qplonecomments/prefs_recent_comments_form.cpt.metadata (modified) (1 diff)
- qPloneComments/trunk/skins/qplonecomments/prefs_recent_comments_publish.cpy (modified) (1 diff)
- qPloneComments/trunk/skins/qplonecomments/published_comment_template.pt (modified) (2 diffs)
- qPloneComments/trunk/skins/qplonecomments/rejected_comment_template.pt (added)
- qPloneComments/trunk/skins/qplonecomments/reply_notify_template.pt (added)
- qPloneComments/trunk/skins/qplonecomments/validate_reply.vpy (modified) (1 diff)
- qPloneComments/trunk/tests/helperNotify.py (modified) (4 diffs)
- qPloneComments/trunk/tests/output/mail.res (deleted)
- qPloneComments/trunk/tests/sample (deleted)
- qPloneComments/trunk/tests/testQPloneCommentsCommenting.py (modified) (1 diff)
- qPloneComments/trunk/tests/testQPloneCommentsConfiglet.py (modified) (2 diffs)
- qPloneComments/trunk/tests/testQPloneCommentsModeration.py (modified) (5 diffs)
- qPloneComments/trunk/tests/testQPloneCommentsNotification.py (modified) (5 diffs)
- qPloneComments/trunk/utils.py (modified) (2 diffs)
- qPloneComments/trunk/version.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
qPloneComments/trunk/Extensions/Install.py
r612 r613 9 9 10 10 import string 11 try:12 True13 except:14 True = 115 False = 016 11 17 12 def setupSkin(self, out, layers): … … 38 33 skinstool.addSkinSelection( skin, path ) 39 34 40 35 41 36 def install(self): 42 37 out=StringIO() … … 49 44 elif plone_version.startswith('2.0'): 50 45 plone_version = '2.0.5' 46 elif plone_version.startswith('2.5'): 47 plone_version = '2.5' 51 48 else: 52 raise Exception("Error - Unsupported version. Suported versions: Plone 2.0.5-2. 1.2")49 raise Exception("Error - Unsupported version. Suported versions: Plone 2.0.5-2.5") 53 50 54 51 product_path = package_home(GLOBALS) … … 66 63 out.write("Adding %s property sheet to portal_properies\n" % 'qPloneComments' ) 67 64 props_sheet = pp['qPloneComments'] 68 updateProperty(props_sheet, id="enable_moderation", value="True", property_type='boolean', out=out) 69 updateProperty(props_sheet, id="enable_anonymous_commenting", value="True", property_type='boolean', out=out) 70 updateProperty(props_sheet, id="enable_published_notification", value="True", property_type='boolean', out=out) 71 updateProperty(props_sheet, id="enable_approve_notification", value="True", property_type='boolean', out=out) 72 updateProperty(props_sheet, id="email_discussion_manager", value="", property_type='string', out=out) 73 updateProperty(props_sheet, id="email_subject_prefix", value="", property_type='string', out=out) 65 updateProperties(props_sheet, out, PROPERTIES) 74 66 # Tern on Anonymous commenting 75 67 self.manage_permission(ReplyToItem, ['Anonymous','Manager','Member'], 1) … … 85 77 86 78 # Add DiscussionManager role to Portal 87 roles = list(self.__ac_roles__) 88 if not 'DiscussionManager' in roles: 89 roles.append( 'DiscussionManager' ) 90 roles = tuple(roles) 91 self.__ac_roles__ = roles 92 out.write("Added DiscussionManager role top portal.\n") 79 if plone_version == '2.5': 80 uf = getToolByName(self, 'acl_users') 81 rmanager = uf.portal_role_manager 82 existing = rmanager.listRoleIds() 83 if not 'DiscussionManager' in existing: 84 rmanager.addRole('DiscussionManager') 85 out.write("Added DiscussionManager role top portal.\n") 86 else: 87 roles = list(self.__ac_roles__) 88 if not 'DiscussionManager' in roles: 89 roles.append('DiscussionManager') 90 roles = tuple(roles) 91 self.__ac_roles__ = roles 92 out.write("Added DiscussionManager role top portal.\n") 93 93 94 94 self.manage_permission('Moderate Discussion', ['DiscussionManager', 'Manager']) 95 95 # Add 'DiscussionManagers' group 96 portal_groups = getToolByName(self, 'portal_groups') 97 if not 'DiscussionManager' in portal_groups.listGroupIds(): 98 portal_groups.addGroup('DiscussionManager', roles=['DiscussionManager']) 96 gtool = getToolByName(self, 'portal_groups') 97 existing = gtool.listGroupIds() 98 if not 'DiscussionManager' in existing: 99 gtool.addGroup('DiscussionManager', roles=['DiscussionManager']) 99 100 out.write("Added DiscussionManager group to portal_groups with DiscussionManager role.\n") 100 101 … … 108 109 109 110 110 def updateProperty(pp_ps, id, value, property_type, out): 111 if not pp_ps.hasProperty(id): 112 pp_ps.manage_addProperty(id, value, property_type) 113 out.write("Adding %s property to %s property sheet\n" % (id, 'qPloneComments') ) 114 111 def updateProperties(pp_ps, out, *args): 112 for prop in args: 113 for prop_id, prop_value, prop_type in prop: 114 if not pp_ps.hasProperty(prop_id): 115 pp_ps.manage_addProperty(prop_id, prop_value, prop_type) 116 out.write("Adding %s property to %s property sheet\n" % (prop_id, 'qPloneComments') ) 115 117 116 118 def uninstall(self) : qPloneComments/trunk/Extensions/__init__.py
r612 r613 1 1 # this file is here to make Install.py importable. 2 # we need to make it non-zero size to make winzip cooperateqPloneComments/trunk/config.py
r612 r613 8 8 CONFIGLET_NAME = "qPloneComments setup" 9 9 10 PROPERTIES = (('enable_approve_user_notification', 'True', 'boolean'), 11 ('enable_reply_user_notification', 'True', 'boolean'), 12 ('enable_rejected_user_notification', 'True', 'boolean'), 13 ('enable_moderation', 'True', 'boolean'), 14 ('require_email', 'False', 'boolean'), 15 ('enable_anonymous_commenting', 'True', 'boolean'), 16 ('enable_published_notification', 'True', 'boolean'), 17 ('enable_approve_notification', 'True', 'boolean'), 18 ('email_discussion_manager', '', 'string'), 19 ('email_subject_prefix', '', 'string')) qPloneComments/trunk/patch.py
r612 r613 10 10 # Patching createReply method of 11 11 # Products.CMFDefault.DiscussionItem.DiscussionItemContainer 12 def createReply( self, title, text, Creator=None ):12 def createReply( self, title, text, Creator=None, email=''): 13 13 """ 14 14 Create a reply in the proper place … … 31 31 32 32 pm = getToolByName(self, 'portal_membership') 33 value = 0 33 34 34 if pm.isAnonymousUser(): 35 value = 1 36 if item.hasProperty('isAnon'): 37 item.manage_changeProperties({'id':'isAnon','value':value}) 35 userid = 'anonym' 38 36 else: 39 item.manage_addProperty(id='isAnon', value=value, type='boolean') 37 userid = pm.getAuthenticatedMember().getId() 38 39 item.manage_addProperty(id='userid', value=userid, type='string') 40 item.manage_addProperty(id='email', value=email, type='string') 40 41 41 42 item.review_state="private" qPloneComments/trunk/skins/qplonecomments/2.0.5/discussion_publish_comment.py
r612 r613 10 10 from Products.CMFPlone import transaction_note 11 11 from Products.CMFCore.utils import getToolByName 12 from Products.qPloneComments.utils import publishDiscussion , send_email12 from Products.qPloneComments.utils import publishDiscussion 13 13 14 14 if obj is None: … … 25 25 publishDiscussion(reply) 26 26 27 send_notification_message = send_email(reply, container, state="published") 28 29 portal_status_message='Comment+successfully+published' 27 portal_status_message='Comment+published' 30 28 31 29 transaction_note('Published discussion item') qPloneComments/trunk/skins/qplonecomments/2.0.5/discussion_reply.cpy
r612 r613 11 11 from Products.PythonScripts.standard import url_quote_plus 12 12 from Products.CMFCore.utils import getToolByName 13 from Products.qPloneComments.utils import send_email13 from Products.qPloneComments.utils import manage_mails 14 14 15 15 mtool = getToolByName(context, 'portal_membership') … … 19 19 # Get properties 20 20 isForAnonymous = pp['qPloneComments'].getProperty('enable_anonymous_commenting', None) 21 ifModerate = pp['qPloneComments'].getProperty('enable_moderation', None); 21 ifModerate = pp['qPloneComments'].getProperty('enable_moderation', None) 22 requireEmail = pp['qPloneComments'].getProperty('require_email', False) 22 23 23 24 if username or password: … … 62 63 63 64 tb = context.talkback 64 id = tb.createReply(title=subject, text=body_text, Creator=comment_creator) 65 66 if requireEmail: 67 if mtool.isAnonymousUser(): 68 email = req.get('user_email', '') 69 else: 70 email = mtool.getAuthenticatedMember().getProperty('email') 71 72 id = tb.createReply(title=subject, text=body_text, Creator=comment_creator, email=email) 73 else: 74 id = tb.createReply(title=subject, text=body_text, Creator=comment_creator) 75 65 76 reply = tb.getReply(id) 66 77 … … 72 83 73 84 # Send notification e-mail 74 send_notification_message = send_email(reply, context, state="approve")85 manage_mails(reply, context, 'aproving') 75 86 if not ifModerate: 76 send_notification_message += send_email(reply, context, state="published")87 manage_mails(reply, context, 'publishing') 77 88 78 89 from Products.CMFPlone import transaction_note 79 90 transaction_note('Added comment to %s at %s' % (parent.title_or_id(), reply.absolute_url())) 80 91 81 portal_status_message='Comment successfully added.'92 portal_status_message='Comment published.' 82 93 83 94 # Inform user about awaiting moderation 84 95 if ifModerate and reply: 85 portal_status_message= 'Your comment awaits moderation.'96 portal_status_message=url_quote_plus('Currently, all comments require approval before being published. Please check back later.') 86 97 87 98 target = '%s/%s?portal_status_message=%s' % (parent.absolute_url(), parent.getTypeInfo().getActionById('view'), portal_status_message) qPloneComments/trunk/skins/qplonecomments/2.0.5/discussion_reply_form.cpt
r612 r613 30 30 31 31 <div class="field" 32 tal:condition="isForAnonymous"> 32 tal:condition="isForAnonymous" 33 i18n:domain="plonecomments"> 33 34 34 35 <div class="field" … … 56 57 size="40" 57 58 tabindex="" 58 i18n:attributes=" title"59 i18n:attributes="alt title" 59 60 tal:attributes="tabindex tabindex/next; 60 61 value python:test(isAnon, '', member.getUserName()); … … 62 63 63 64 </div> 65 66 <div class="field" 67 tal:define="property_id string:require_email; 68 props_sheet here/portal_properties/qPloneComments" 69 tal:condition="python:props_sheet.getProperty(property_id) and isAnon"> 70 71 <label for="user_email" i18n:translate="label_discussion-manager_email">Please enter your email:</label> 72 <span class="fieldRequired" title="Required" 73 i18n:attributes="title title_required;" 74 i18n:translate="label_required">(Required) 75 </span> 76 <div tal:content="string:">Validation error output</div> 77 78 <input name="user_email" 79 value="" 80 size="40" 81 tabindex="" 82 tal:attributes="tabindex tabindex/next;" /> 83 </div> 84 64 85 </div> 65 86 </div> qPloneComments/trunk/skins/qplonecomments/2.0.5/discussionitem_view.pt
r612 r613 51 51 method="post" 52 52 style="display: inline;" 53 tal:condition="python: checkPermission('M anage portal', here)"53 tal:condition="python: checkPermission('Moderate Discussion', here)" 54 54 tal:attributes="action string:${here/absolute_url}/deleteDiscussion"> 55 55 56 56 <input class="destructive" 57 57 type="submit" 58 value="Remove This Reply"58 value="Remove this reply" 59 59 i18n:attributes="value" 60 60 /> … … 70 70 <input class="standalone" 71 71 type="submit" 72 value="Publish This Reply" 72 value="Publish" 73 i18n:domain="plonecomments" 73 74 i18n:attributes="value" 74 75 /> … … 76 77 77 78 <div class="documentByLine" 78 tal:condition="not:isPublished">Until publishing this comment adding reply impossible.</div> 79 tal:condition="not:isPublished"> 80 <span i18n:translate="text_no_reply_until_published">Until publishing this comment adding reply impossible.</span> 81 </div> 79 82 80 83 </div> qPloneComments/trunk/skins/qplonecomments/2.0.5/validate_talkback.vpy
r612 r613 25 25 req = context.REQUEST 26 26 if not (req.form.has_key('Creator') and not req.form['Creator'] == ""): 27 state.setError('Creator', 'Please enter your Name.', 'name_required')27 state.setError('Creator', 'Please enter your name.', 'name_required') 28 28 29 29 if state.getErrors(): qPloneComments/trunk/skins/qplonecomments/2.0.5/viewThreadsAtBottom.pt
r612 r613 100 100 <input class="destructive" 101 101 type="submit" 102 value="Remove This Discussion"102 value="Remove" 103 103 i18n:attributes="value" 104 104 /> … … 114 114 <input class="standalone" 115 115 type="submit" 116 value="Publish This Discussion"116 value="Publish" 117 117 i18n:attributes="value" 118 118 /> … … 120 120 121 121 <div class="documentByLine" 122 tal:condition="not:isPublished">Until publishing this comment adding reply impossible.</div> 122 i18n:translate="text_no_add_reply" 123 tal:condition="not:isPublished">Comment must be approved before replies to comment accepted.</div> 123 124 124 125 <div tal:define="replies python:here.getReplyReplies(reply)" qPloneComments/trunk/skins/qplonecomments/2.1/discussion_publish_comment.py
r612 r613 10 10 from Products.CMFPlone import transaction_note 11 11 from Products.CMFCore.utils import getToolByName 12 from Products.qPloneComments.utils import publishDiscussion , send_email12 from Products.qPloneComments.utils import publishDiscussion 13 13 14 14 if obj is None: … … 25 25 publishDiscussion(reply) 26 26 27 send_notification_message = send_email(reply, container, state="published") 28 29 portal_status_message='Comment+successfully+published' 27 portal_status_message='Comment published.' 30 28 31 29 putils = getToolByName(context, 'plone_utils') qPloneComments/trunk/skins/qplonecomments/2.1/discussion_reply.cpy
r612 r613 11 11 from Products.PythonScripts.standard import url_quote_plus 12 12 from Products.CMFCore.utils import getToolByName 13 from Products.qPloneComments.utils import send_email13 from Products.qPloneComments.utils import manage_mails 14 14 15 15 mtool = getToolByName(context, 'portal_membership') … … 19 19 # Get properties 20 20 isForAnonymous = pp['qPloneComments'].getProperty('enable_anonymous_commenting', None) 21 ifModerate = pp['qPloneComments'].getProperty('enable_moderation', None); 21 ifModerate = pp['qPloneComments'].getProperty('enable_moderation', None) 22 requireEmail = pp['qPloneComments'].getProperty('require_email', False) 22 23 23 24 if username or password: … … 62 63 63 64 tb = dtool.getDiscussionFor(context) 64 id = tb.createReply(title=subject, text=body_text, Creator=comment_creator) 65 66 if requireEmail: 67 if mtool.isAnonymousUser(): 68 email = req.get('user_email', '') 69 else: 70 email = mtool.getAuthenticatedMember().getProperty('email') 71 72 id = tb.createReply(title=subject, text=body_text, Creator=comment_creator, email=email) 73 else: 74 id = tb.createReply(title=subject, text=body_text, Creator=comment_creator) 75 65 76 reply = tb.getReply(id) 66 77 … … 72 83 73 84 # Send notification e-mail 74 send_notification_message = send_email(reply, context, state="approve")85 manage_mails(reply, context, 'aproving') 75 86 if not ifModerate: 76 send_notification_message += send_email(reply, context, state="published")87 manage_mails(reply, context, 'publishing') 77 88 78 89 # return to the discussable object. … … 82 93 83 94 # Inform user about awaiting moderation 84 portal_status_message='Comment +successfully+added'95 portal_status_message='Comment published.' 85 96 if ifModerate and reply: 86 portal_status_message= 'Your+comment+awaits+moderation'97 portal_status_message=url_quote_plus('Currently, all comments require approval before being published. Please check back later.') 87 98 88 99 from Products.CMFPlone.utils import transaction_note qPloneComments/trunk/skins/qplonecomments/2.1/discussion_reply_form.cpt
r612 r613 76 76 77 77 <div class="field" 78 tal:condition="isForAnonymous"> 78 tal:condition="isForAnonymous" 79 i18n:domain="plonecomments"> 79 80 80 81 <div class="field" … … 102 103 size="40" 103 104 tabindex="" 104 i18n:attributes=" title"105 i18n:attributes="alt title" 105 106 tal:attributes="tabindex tabindex/next; 106 107 value python:test(isAnon, '', member.getUserName()); … … 109 110 </div> 110 111 </div> 112 <div class="field" 113 tal:define="property_id string:require_email; 114 props_sheet here/portal_properties/qPloneComments" 115 tal:condition="python:props_sheet.getProperty(property_id) and isAnon"> 116 117 <label for="user_email" i18n:translate="label_discussion-manager_email">Please enter your email:</label> 118 <span class="fieldRequired" title="Required" 119 i18n:attributes="title title_required;" 120 i18n:translate="label_required">(Required) 121 </span> 122 <div tal:content="string:">Validation error output</div> 123 124 <input name="user_email" 125 value="" 126 size="40" 127 tabindex="" 128 tal:attributes="tabindex tabindex/next;" /> 129 </div> 130 111 131 </div> 112 132 qPloneComments/trunk/skins/qplonecomments/2.1/validate_talkback.vpy
r612 r613 33 33 req = context.REQUEST 34 34 if not (req.form.has_key('Creator') and not req.form['Creator'] == ""): 35 state.setError('Creator', 'Please enter your Name.', 'name_required')35 state.setError('Creator', 'Please enter your name.', 'name_required') 36 36 37 37 if state.getErrors(): qPloneComments/trunk/skins/qplonecomments/2.1/viewThreadsAtBottom.pt
r612 r613 112 112 <br/> 113 113 <div class="documentByLine" 114 tal:condition="not:isPublished">Until publishing this comment adding reply impossible.</div> 114 i18n:translate="text_no_add_reply" 115 tal:condition="not:isPublished">Comment must be approved before replies to comment accepted.</div> 115 116 116 117 </div> qPloneComments/trunk/skins/qplonecomments/approve_comment_template.pt
r612 r613 1 <div i18n:domain="plone "1 <div i18n:domain="plonecomments" 2 2 tal:omit-tag="" 3 3 tal:define="charset here/portal_properties/site_properties/default_charset|string:utf-8; … … 6 6 >To: <tal:x replace="options/mto"/> 7 7 From: <tal:x replace="options/mfrom"/> 8 Subject: <tal:x condition="organization_name" replace="string:[$organization_name] "/> New comment awaits moderation8 Subject: <tal:x condition="organization_name" replace="string:[$organization_name] "/><tal:subject i18n:translate="approvemail_subject">New comment awaits moderation</tal:subject> 9 9 10 <tal:x define="obj nocall:options/obj"> 11 New comment added to page "<tal:x replace="obj/Title"/>" at: 12 <tal:x replace="obj/absolute_url"/> 13 </tal:x> 10 <tal:new_comment define="obj nocall:options/obj" 11 i18n:translate="approvemail_new_comment_link"> 12 Please review new comment added to the following page "<tal:x replace="obj/Title" i18n:name="title"/>": 13 <tal:link replace="obj/absolute_url" i18n:name="link"/> 14 </tal:new_comment> 14 15 15 16 -- 16 <tal:x condition="organization_name" replace="string:$organization_name "/>Support Team. 17 17 <tal:signature i18n:translate="signature"> 18 <tal:organization_name condition="organization_name" 19 replace="string:$organization_name" 20 i18n:name="organization_name"/> 21 Support Team 22 </tal:signature> 18 23 </div> qPloneComments/trunk/skins/qplonecomments/prefs_comments_setup.cpy
r612 r613 10 10 from Products.CMFCore.utils import getToolByName 11 11 from Products.qPloneComments.utils import setAnonymCommenting 12 #from AccessControl.Permission import Permission 12 13 13 form = context.REQUEST.form 14 14 pp = getToolByName(context, 'portal_properties') qPloneComments/trunk/skins/qplonecomments/prefs_comments_setup_form.cpt
r612 r613 2 2 xml:lang="en" 3 3 lang="en" 4 i18n:domain="plone "4 i18n:domain="plonecomments" 5 5 metal:use-macro="here/prefs_main_template/macros/master"> 6 6 <!-- metal:use-macro="here/main_template/macros/master" --> … … 10 10 tal:define="errors python:request.get('controller_state', None).getErrors();"> 11 11 12 <div metal:define-macro="main" i18n:domain="plone ">12 <div metal:define-macro="main" i18n:domain="plonecomments"> 13 13 <div class="configlet"> 14 14 <div class="documentEditable"> 15 15 16 <!-- simulating views -->16 <!-- simulating views on the configure/comments pages until we have real objects. --> 17 17 <ul class="contentViews" 18 18 tal:define="tabs python:('Configure qPloneComments','prefs_comments_setup_form'), ('Recent comments moderation','prefs_recent_comments_form'),; … … 30 30 <div class="contentActions"> 31 31 32 </div> 32 </div> 33 33 <!-- End of tabs --> 34 34 <div class="documentContent" metal:define-slot="prefs_content"> 35 <h1 i18n:translate=" qpc_setup">qPloneComments Setup</h1>35 <h1 i18n:translate="heading_comments_setup">Plone Comments Setup</h1> 36 36 37 37 <a href="" 38 38 class="link-parent" 39 39 tal:attributes="href string: $portal_url/plone_control_panel" 40 i18n:translate="label_up_to_plone_setup"> 40 i18n:translate="label_up_to_plone_setup" 41 i18n:domain="plone"> 41 42 Up to Plone Setup 42 43 </a> … … 51 52 52 53 <fieldset> 53 <legend i18n:translate="legend_ qpc_notification_legend">qPloneComments setup Details</legend>54 <legend i18n:translate="legend_setup_options">qPloneComments setup options</legend> 54 55 55 56 <div class="field" … … 70 71 <label i18n:translate="label_enable_moderation" 71 72 for="isEnabledModeration">Enable moderation.</label> 72 73 74 </div> 75 76 <div class="field" 77 tal:define="property_id string:require_email; 78 requireEmail python:props_sheet.getProperty(property_id, False);" 79 tal:condition="python:props_sheet.hasProperty(property_id)"> 80 81 <input type="checkbox" 82 class="noborder" 83 name="requireEmail" 84 id="requireEmail" 85 tabindex ="" 86 tal:attributes="name property_id; 87 value requireEmail; 88 checked python:test(requireEmail, 'True', ''); 89 tabindex tabindex/next;"/> 90 91 <label i18n:translate="label_require_anonym_email" 92 for="requireEmail">Require Anonym Email.</label> 93 73 94 </div> 74 95 … … 89 110 90 111 <label i18n:translate="label_anonymous_commenting" 91 for="isEnabledAnonymousCommenting">Enable anonymous comenting.</label> 92 93 </div> 94 95 <div class="field" 96 tal:define="property_id string:enable_published_notification; 97 isEnabledPublishedNotification python:props_sheet.getProperty(property_id, False);" 98 tal:condition="python:props_sheet.hasProperty(property_id)"> 99 100 <input type="checkbox" 101 class="noborder" 102 name="isEnabledPublishedNotification" 103 id="isEnabledPublishedNotification" 104 tabindex ="" 105 tal:attributes="name property_id; 106 value isEnabledPublishedNotification; 107 checked python:test(isEnabledPublishedNotification, 'True', ''); 108 tabindex tabindex/next;"/> 109 110 <label i18n:translate="label_enable_published_notification" 111 for="isEnabledPublishedNotification">Enable Document Owner notification on new comments.</label> 112 </div> 113 114 <div class="field" 115 tal:define="property_id string:enable_approve_notification; 116 isEnableApproveNotification python:props_sheet.getProperty(property_id, False);" 117 tal:condition="python:props_sheet.hasProperty(property_id)"> 118 119 <input type="checkbox" 120 class="noborder" 121 name="isEnableApproveNotification" 122 id="isEnableApproveNotification" 123 tabindex ="" 124 tal:attributes="name property_id; 125 value isEnableApproveNotification; 126 checked python:test(isEnableApproveNotification, 'True', ''); 127 tabindex tabindex/next;"/> 128 129 <label i18n:translate="label_enable_approve_notification" 130 for="isEnableApproveNotification">Enable Discussion Manager notification on new comments.</label> 112 for="isEnabledAnonymousCommenting">Enable anonymous commenting.</label> 131 113 </div> 132 114 … … 140 122 tabindex ="" 141 123 tal:attributes="value isEnabledManagerModeration; 142 checked python:test(isEnabledManagerModeration, 'True', '');124 checked python:test(isEnabledManagerModeration, 'True', ''); 143 125 tabindex tabindex/next;"/> 144 126 … … 160 142 The e-mail address where notifications about adding new comments will be sent. 161 143 </div> 162 144 163 145 <div tal:content="error">Validation error output</div> 164 146 … … 176 158 organization_name python:props_sheet.getProperty(property_id, '');" 177 159 tal:condition="python:props_sheet.hasProperty(property_id)"> 178 160 179 161 <label i18n:translate="label_organization_name">Email subject prefix (organization name)</label> 180 162 181 163 <div class="formHelp" id="organization_name_help" 182 164 i18n:translate="help_organization_name"> 183 165 You can change notification message templates customizing 'approve_comment_template' and 'published_comment_template' from qplonecomments skin. 184 166 </div> 185 167 186 168 <input name="organization_name" 187 169 value="" … … 193 175 </div> 194 176 195 <div class="formControls"> 196 <input type="hidden" name="form.submitted" value="1" /> 197 198 <input class="context" 199 tabindex="" 200 type="submit" 201 name="form.button.form_submit" 202 value="Save" 203 i18n:attributes="value" 204 tal:attributes="tabindex tabindex/next;" 205 /> 206 </div> 207 </fieldset> 177 </fieldset> 178 179 180 181 182 <fieldset> 183 <legend i18n:translate="legend_qpc_notification_legend">Notification tuning</legend> 184 185 <div class="field" 186 tal:define="property_id string:enable_published_notification; 187 isEnabledPublishedNotification python:props_sheet.getProperty(property_id, False);" 188 tal:condition="python:props_sheet.hasProperty(property_id)"> 189 190 <input type="checkbox" 191 class="noborder" 192 name="isEnabledPublishedNotification" 193 id="isEnabledPublishedNotification" 194 tabindex ="" 195 tal:attributes="name property_id; 196 value isEnabledPublishedNotification; 197 checked python:test(isEnabledPublishedNotification, 'True', ''); 198 tabindex tabindex/next;"/> 199 200 <label i18n:translate="label_enable_published_notification" 201 for="isEnabledPublishedNotification">Enable Document Owner notification on new comments.</label> 202 </div> 203 204 <div class="field" 205 tal:define="property_id string:enable_approve_notification; 206 isEnableApproveNotifica
