Changeset 560
- Timestamp:
- 10/05/06 09:38:21
- Files:
-
- qPloneComments/branches/plone-2.5/Extensions/__init__.py (modified) (1 diff)
- qPloneComments/branches/plone-2.5/i18n (copied) (copied from qPloneComments/branches/plone-2.5-i18n/i18n)
- qPloneComments/branches/plone-2.5/i18n/plonecomments-plone.pot (copied) (copied from qPloneComments/branches/plone-2.5-i18n/i18n/plonecomments-plone.pot)
- qPloneComments/branches/plone-2.5/i18n/plonecomments.pot (copied) (copied from qPloneComments/branches/plone-2.5-i18n/i18n/plonecomments.pot)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.0.5/discussion_publish_comment.py (modified) (1 diff)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.0.5/discussion_reply.cpy (modified) (1 diff)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.0.5/discussion_reply_form.cpt (modified) (2 diffs)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.0.5/discussionitem_view.pt (modified) (3 diffs)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.0.5/validate_talkback.vpy (modified) (1 diff)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.0.5/viewThreadsAtBottom.pt (modified) (3 diffs)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.1/discussion_publish_comment.py (modified) (1 diff)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.1/discussion_reply.cpy (modified) (1 diff)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.1/discussion_reply_form.cpt (modified) (2 diffs)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.1/validate_talkback.vpy (modified) (1 diff)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.1/viewThreadsAtBottom.pt (modified) (1 diff)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.5/discussion_publish_comment.py (modified) (1 diff)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.5/discussion_reply.cpy (modified) (1 diff)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.5/discussion_reply_form.cpt (modified) (2 diffs)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.5/validate_talkback.vpy (modified) (1 diff)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/2.5/viewThreadsAtBottom.pt (modified) (1 diff)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/approve_comment_template.pt (modified) (2 diffs)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/prefs_comments_setup_form.cpt (modified) (7 diffs)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/prefs_recent_comments_delete.cpy (modified) (2 diffs)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/prefs_recent_comments_form.cpt (modified) (5 diffs)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/prefs_recent_comments_publish.cpy (modified) (1 diff)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/published_comment_template.pt (modified) (2 diffs)
- qPloneComments/branches/plone-2.5/skins/qplonecomments/validate_reply.vpy (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
qPloneComments/branches/plone-2.5/Extensions/__init__.py
r559 r560 1 1 # this file is here to make Install.py importable. 2 # we need to make it non-zero size to make winzip cooperateqPloneComments/branches/plone-2.5/skins/qplonecomments/2.0.5/discussion_publish_comment.py
r559 r560 25 25 publishDiscussion(reply) 26 26 27 portal_status_message='Comment+ successfully+published'27 portal_status_message='Comment+published' 28 28 29 29 transaction_note('Published discussion item') qPloneComments/branches/plone-2.5/skins/qplonecomments/2.0.5/discussion_reply.cpy
r559 r560 90 90 transaction_note('Added comment to %s at %s' % (parent.title_or_id(), reply.absolute_url())) 91 91 92 portal_status_message='Comment successfully added.'92 portal_status_message='Comment published.' 93 93 94 94 # Inform user about awaiting moderation 95 95 if ifModerate and reply: 96 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.') 97 97 98 98 target = '%s/%s?portal_status_message=%s' % (parent.absolute_url(), parent.getTypeInfo().getActionById('view'), portal_status_message) qPloneComments/branches/plone-2.5/skins/qplonecomments/2.0.5/discussion_reply_form.cpt
r559 r560 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()); qPloneComments/branches/plone-2.5/skins/qplonecomments/2.0.5/discussionitem_view.pt
r559 r560 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/branches/plone-2.5/skins/qplonecomments/2.0.5/validate_talkback.vpy
r559 r560 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/branches/plone-2.5/skins/qplonecomments/2.0.5/viewThreadsAtBottom.pt
r559 r560 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/branches/plone-2.5/skins/qplonecomments/2.1/discussion_publish_comment.py
r559 r560 25 25 publishDiscussion(reply) 26 26 27 portal_status_message='Comment +successfully+published'27 portal_status_message='Comment published.' 28 28 29 29 putils = getToolByName(context, 'plone_utils') qPloneComments/branches/plone-2.5/skins/qplonecomments/2.1/discussion_reply.cpy
r559 r560 93 93 94 94 # Inform user about awaiting moderation 95 portal_status_message='Comment +successfully+added'95 portal_status_message='Comment published.' 96 96 if ifModerate and reply: 97 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.') 98 98 99 99 from Products.CMFPlone.utils import transaction_note qPloneComments/branches/plone-2.5/skins/qplonecomments/2.1/discussion_reply_form.cpt
r559 r560 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()); qPloneComments/branches/plone-2.5/skins/qplonecomments/2.1/validate_talkback.vpy
r559 r560 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/branches/plone-2.5/skins/qplonecomments/2.1/viewThreadsAtBottom.pt
r559 r560 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/branches/plone-2.5/skins/qplonecomments/2.5/discussion_publish_comment.py
r559 r560 25 25 publishDiscussion(reply) 26 26 27 portal_status_message='Comment +successfully+published'27 portal_status_message='Comment published.' 28 28 29 29 putils = getToolByName(context, 'plone_utils') qPloneComments/branches/plone-2.5/skins/qplonecomments/2.5/discussion_reply.cpy
r559 r560 91 91 92 92 # Inform user about awaiting moderation 93 portal_status_message='Comment +successfully+added'93 portal_status_message='Comment published.' 94 94 if ifModerate and reply: 95 portal_status_message= 'Your+comment+awaits+moderation'95 portal_status_message=url_quote_plus('Currently, all comments require approval before being published. Please check back later.') 96 96 97 97 from Products.CMFPlone.utils import transaction_note qPloneComments/branches/plone-2.5/skins/qplonecomments/2.5/discussion_reply_form.cpt
r559 r560 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()); qPloneComments/branches/plone-2.5/skins/qplonecomments/2.5/validate_talkback.vpy
r559 r560 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/branches/plone-2.5/skins/qplonecomments/2.5/viewThreadsAtBottom.pt
r559 r560 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/branches/plone-2.5/skins/qplonecomments/approve_comment_template.pt
r559 r560 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/branches/plone-2.5/skins/qplonecomments/prefs_comments_setup_form.cpt
r559 r560 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'),; … … 33 33 <!-- End of tabs --> 34 34 <div class="documentContent" metal:define-slot="prefs_content"> 35 <h1 i18n:translate=" qpc_setup">Plone Comments 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" … … 235 236 tabindex tabindex/next;"/> 236 237 237 <label i18n:translate="label_enable_approve_ notification"238 <label i18n:translate="label_enable_approve_user_notification" 238 239 for="isEnableApproveUserNotification">Enable Commentator notification on comment was published.</label> 239 240 </div> … … 254 255 tabindex tabindex/next;"/> 255 256 256 <label i18n:translate="label_enable_ approve_notification"257 <label i18n:translate="label_enable_reject_notification" 257 258 for="isRejectionNotificationEnabled">Enable Commentator notification on comment was rejected.</label> 258 259 </div> … … 274 275 tabindex tabindex/next;"/> 275 276 276 <label i18n:translate="label_enable_ approve_notification"277 <label i18n:translate="label_enable_reply_notification" 277 278 for="isReplyNotificationEnabled">Enable Commentator notification on comment was replied.</label> 278 279 </div> qPloneComments/branches/plone-2.5/skins/qplonecomments/prefs_recent_comments_delete.cpy
r559 r560 1 <<<<<<< .working 1 2 ## Script (Python) "prefs_recent_comments_delete" 2 3 ##bind container=container … … 32 33 psm = comment_ids and 'Comments was successfully deleted.' or 'Please select items to be processed.' 33 34 return state.set(portal_status_message=psm) 35 ======= 36 ## Script (Python) "prefs_recent_comments_delete" 37 ##bind container=container 38 ##bind context=context 39 ##bind namespace= 40 ##bind script=script 41 ##bind subpath=traverse_subpath 42 ##parameters= 43 ##title= 44 ## 45 46 from Products.CMFCore.utils import getToolByName 47 portal_discussion = getToolByName(context, "portal_discussion") 48 portal_catalog = getToolByName(context, "portal_catalog") 49 50 request = context.REQUEST 51 comment_ids = request.get('ids') 52 53 for comment_id in comment_ids: 54 comment = portal_catalog(id=comment_id,portal_type='Discussion Item')[0].getObject() 55 56 parent = comment.inReplyTo() 57 if parent is not None: 58 talkback = portal_discussion.getDiscussionFor(parent) 59 else: 60 talkback = parent = comment.aq_parent 61 62 talkback.deleteReply( comment_id ) 63 64 return state.set(portal_status_message='Comment(s) deleted.') 65 66 >>>>>>> .merge-right.r488 qPloneComments/branches/plone-2.5/skins/qplonecomments/prefs_recent_comments_form.cpt
r559 r560 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" --> … … 13 13 <div class="configlet"> 14 14 <div class="documentEditable"> 15 <!-- simulating views on the configure/comments pages until we have real objects. --> 16 <ul class="contentViews"> 17 <li class=""> 18 <a href="" 19 tal:attributes="href string:prefs_comments_setup_form" 20 i18n:translate="label_configure">Configure qPloneComments</a> 21 </li> 15 22 16 <!-- simulating views --> 17 <ul class="contentViews" 18 tal:define="tabs python:('Configure qPloneComments','prefs_comments_setup_form'), ('Recent comments moderation','prefs_recent_comments_form'),; 19 tabs python:[ {'label':label, 'name':name} for (label,name) in tabs ];" 20 > 21 <li class="selected" 22 tal:repeat="tab tabs" 23 tal:attributes="class python:tab['name']==template.id and 'selected' or ''"> 23 <li class="selected"> 24 24 <a href="" 25 tal:attributes="href string:${here/absolute_url}/${tab/name}"26 i18n:translate="" tal:content="tab/label">Recent comments moderation</a>25 tal:attributes="href string:${template/id}" 26 i18n:translate="label_comments">Recent comments moderation</a> 27 27 </li> 28 28 </ul> … … 36 36 tal:define ="results python:here.portal_catalog.searchResults(portal_type='Discussion Item',review_state='private',sort_on='created',sort_order='reverse');"> 37 37 38 <h1 i18n:translate=" qpc_setup">Recent comments</h1>38 <h1 i18n:translate="heading_comments">Recent comments</h1> 39 39 40 40 <a href="" 41 41 class="link-parent" 42 42 tal:attributes="href string: $portal_url/plone_control_panel" 43 i18n:translate="label_up_to_plone_setup"> 43 i18n:translate="label_up_to_plone_setup" 44 i18n:domain="plone"> 44 45 Up to Plone Setup 45 46 </a> 46 <div tal:condition="not:results"> No new comments.</div> 47 48 <p tal:condition="not:results" i18n:translate="text_no_new_comments">No new comments.</p> 47 49 48 50 <div tal:condition="results" … … 57 59 tal:attributes="action string:${here/getId}/${template/getId}"> 58 60 <fieldset> 59 <legend i18n:translate="legend_ qpc_notification_legend">List of recent comments</legend>61 <legend i18n:translate="legend_recent_comments">List of recent comments</legend> 60 62 61 63 <table><tbody> … … 72 74 alt="Select all items" 73 75 i18n:attributes="title label_select_all_items; alt label_select_all_items;" 76 i18n:domain="plone" 74 77 /> 75 78 </th> qPloneComments/branches/plone-2.5/skins/qplonecomments/prefs_recent_comments_publish.cpy
r559 r560 21 21 manage_mails(comment, container, action='publishing') 22 22 23 psm = comment_ids and 'Comment s was successfullypublished.' or 'Please select items to be processed.'23 psm = comment_ids and 'Comment(s) published.' or 'Please select items to be processed.' 24 24 return state.set(portal_status_message=psm) qPloneComments/branches/plone-2.5/skins/qplonecomments/published_comment_template.pt
r559 r560 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 added8 Subject: <tal:x condition="organization_name" replace="string:[$organization_name] "/><tal:subject i18n:translate="publishedmail_subject">New comment added</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" i18n:translate="publishedmail_new_comment_link"> 11 View new comment added to the following page "<tal:x replace="obj/Title" i18n:name="title"/>": 12 <tal:x replace="obj/absolute_url" i18n:name="link"/> 13 </tal:new_comment> 14 14 15 15 -- 16 <tal:x condition="organization_name" replace="string:$organization_name "/>Support Team. 16 <tal:signature i18n:translate="signature"> 17 <tal:organization_name condition="organization_name" 18 replace="string:$organization_name" 19 i18n:name="organization_name"/> 20 Support Team. 21 </tal:signature> 17 22 18 23 </div> qPloneComments/branches/plone-2.5/skins/qplonecomments/validate_reply.vpy
r559 r560 10 10 11 11 if hasattr(context, 'review_state') and not context.review_state=="published": 12 return state.set(status='failure', portal_status_message=" You can't add comment to not published reply.")12 return state.set(status='failure', portal_status_message="Reply not allowed because the response is to a comment waiting to be approved. Please wait for the comment to be approved before replying.") 13 13 14 14 return state
