Commit Graph

362 Commits

Author SHA1 Message Date
Vincent Fretin
17fce9d515 Rewrote all tal:condition in comments.pt. The authenticated user has
the reply button and the comment form if he has the "Reply to item"
permission and the conversation is currently enabled.

Warning:
There is a security hole at the moment. Any authenticated user having the
zope2.View permission or anonymous user without captcha can add a comment
by creating a post request.

svn path=/plone.app.discussion/trunk/; revision=38888
2010-08-24 11:25:17 +00:00
Timo Stollenwerk
7a2f1ff12b Fix indentation.
svn path=/plone.app.discussion/trunk/; revision=38665
2010-08-09 12:42:21 +00:00
Timo Stollenwerk
d37d5aa9f5 Redirect to the comment form action instead of the absolute url when a comment is posted. This fixes the accidentially triggered file upload when a comment is posted on a file content object.
svn path=/plone.app.discussion/trunk/; revision=38664
2010-08-09 12:25:14 +00:00
Vincent Fretin
fd6a8e0fd8 * Renamed legend_add_comment to label_add_comment to have the translation from
plone domain.
* label_comment_by and label_commented_at are not in Plone 4 translation anymore, so
  these two messages moved to plone.app.discussions i18n domain.

svn path=/plone.app.discussion/trunk/; revision=38574
2010-08-06 15:33:34 +00:00
Vincent Fretin
733c3439ca Translate "Warning" shown in @@moderate-comments in the plone domain.
svn path=/plone.app.discussion/trunk/; revision=38568
2010-08-06 10:46:37 +00:00
Vincent Fretin
d2b19deeac use double quotes
svn path=/plone.app.discussion/trunk/; revision=38565
2010-08-06 10:01:52 +00:00
Vincent Fretin
c1e861e969 Fixed i18n markup of message_moderation_disabled.
svn path=/plone.app.discussion/trunk/; revision=38564
2010-08-06 09:51:23 +00:00
Vincent Fretin
27710ca541 It's 'Allow comments', not 'enable moderation'
svn path=/plone.app.discussion/trunk/; revision=38563
2010-08-06 09:34:05 +00:00
Timo Stollenwerk
27a2d3fa36 Use only one MessageFactory.
svn path=/plone.app.discussion/trunk/; revision=38551
2010-08-05 18:40:22 +00:00
Timo Stollenwerk
f72972844d Call the CaptchaValidator even when no captcha data was submitted. This is necessary to ensure that the collective.akismet validator is called when installed.
svn path=/plone.app.discussion/trunk/; revision=38541
2010-08-05 15:36:07 +00:00
Timo Stollenwerk
0925a63c15 Unnecessary imports removed.
svn path=/plone.app.discussion/trunk/; revision=38139
2010-07-19 08:25:37 +00:00
Timo Stollenwerk
88ce860aa5 Use self.form instead of CommentForm for the CommentsViewlet update method so integrators don't have to override the viewlet's update method. [Matous]
svn path=/plone.app.discussion/trunk/; revision=37916
2010-07-16 15:26:01 +00:00
Timo Stollenwerk
85d5b823b0 Remove collective.akismet from the captcha documentation.
svn path=/plone.app.discussion/trunk/; revision=37915
2010-07-16 15:08:18 +00:00
Timo Stollenwerk
c3320def88 Make sure the form fields in the reply form are always placed under the field labels; Fix CSS overflow bug that occurs with the new Plone 4.0b5 comment styles
svn path=/plone.app.discussion/trunk/; revision=37774
2010-07-13 13:39:35 +00:00
Timo Stollenwerk
6ca6f58acd Remove unnecessary variables and imports.
svn path=/plone.app.discussion/trunk/; revision=37773
2010-07-13 13:21:12 +00:00
Timo Stollenwerk
cfdd99b111 remove unnecessary imports / variables; whitespace
svn path=/plone.app.discussion/trunk/; revision=37767
2010-07-13 10:41:26 +00:00
Timo Stollenwerk
f3b1dab916 Move AkismetValidator from plone.app.discussion to collective.akismet.
svn path=/plone.app.discussion/trunk/; revision=37764
2010-07-13 09:24:23 +00:00
Timo Stollenwerk
2dbc337fc7 Remove unnecessary imports from captcha.py.
svn path=/plone.app.discussion/trunk/; revision=37760
2010-07-13 09:20:32 +00:00
Timo Stollenwerk
1a84b0b7b8 Remove unnecessary imports.
svn path=/plone.app.discussion/trunk/; revision=37759
2010-07-13 09:19:20 +00:00
Timo Stollenwerk
cac0bae7a5 revert r37751.
svn path=/plone.app.discussion/trunk/; revision=37752
2010-07-12 13:47:53 +00:00
Timo Stollenwerk
eabf3bc890 Always use zope.component getUtility instead of queryUtility.
svn path=/plone.app.discussion/trunk/; revision=37751
2010-07-12 13:34:02 +00:00
Timo Stollenwerk
bddc4a96da Remove unnecessary import.
svn path=/plone.app.discussion/trunk/; revision=37692
2010-07-07 11:37:44 +00:00
Timo Stollenwerk
5f2daced20 Captcha documentation updated (code examples included, etc).
svn path=/plone.app.discussion/trunk/; revision=37369
2010-06-21 09:11:45 +00:00
Hanno Schlichting
f7c18ea77e No tabs please
svn path=/plone.app.discussion/trunk/; revision=37350
2010-06-18 12:19:33 +00:00
Timo Stollenwerk
12589d9fd2 Remove the hard coded check for title and text when the comment form is submitted. This allows integrators to write schema extenders that remove the title from the comment form.
svn path=/plone.app.discussion/trunk/; revision=37341
2010-06-17 18:56:26 +00:00
Timo Stollenwerk
e56bc65956 raise AkismetReject if Akismet rejects a comment as spam.
svn path=/plone.app.discussion/trunk/; revision=37276
2010-06-14 13:02:46 +00:00
Timo Stollenwerk
ac84b232b8 Import Captcha validator from validator directly.
svn path=/plone.app.discussion/trunk/; revision=37273
2010-06-14 12:42:28 +00:00
Timo Stollenwerk
29015324f2 Move the Akismet validator error message to the top.
svn path=/plone.app.discussion/trunk/; revision=37272
2010-06-14 12:25:56 +00:00
Timo Stollenwerk
ac6865311d Move captcha registration to its own captcha.zcml file. Fix captcha registration for Plone 3/Zope 2.10
svn path=/plone.app.discussion/trunk/; revision=37140
2010-06-10 14:57:03 +00:00
Timo Stollenwerk
926314ea49 Akismet spam protection plugin support added (collective.akismet).
svn path=/plone.app.discussion/trunk/; revision=37136
2010-06-10 13:11:33 +00:00
Timo Stollenwerk
92766752c4 Simplify the CaptchaValidator class by dynamically adapting a view with the name of the captcha plugin (e.g. recaptcha, captcha, akismet) for the validator.
svn path=/plone.app.discussion/trunk/; revision=37131
2010-06-10 10:51:41 +00:00
Timo Stollenwerk
af1a8bfacd Replace the old NOTES.txt and PRINCIPLES.txt with the Sphinx versions. Fix Captcha title.
svn path=/plone.app.discussion/trunk/; revision=36998
2010-06-04 11:22:16 +00:00
Timo Stollenwerk
429c334376 captcha.txt added to sphinx documentation.
svn path=/plone.app.discussion/trunk/; revision=36995
2010-06-04 11:11:01 +00:00
Timo Stollenwerk
7f28f2773a Design notes for the Captcha plugin architecture added.
svn path=/plone.app.discussion/trunk/; revision=36993
2010-06-04 10:57:57 +00:00
Timo Stollenwerk
28d88dcfb4 Clean up Javascript code. Obey the 80 character limit.
svn path=/plone.app.discussion/trunk/; revision=36991
2010-06-04 09:25:47 +00:00
Timo Stollenwerk
2e0b52889d Clean up (Re)Captcha code. Register Captcha field/validator only if a package is installed that provides the "plone.app.discussion-captcha" feature (currently plone.formwidget.captcha and plone.formwidget.recaptcha trunk only).
svn path=/plone.app.discussion/trunk/; revision=36877
2010-06-01 16:38:29 +00:00
Timo Stollenwerk
682ceb2760 fix r36843 commit. set HAS_WRAPPED_FORM to false for plone.z3cform < 0.6.0.
svn path=/plone.app.discussion/trunk/; revision=36845
2010-05-31 10:05:57 +00:00
Timo Stollenwerk
3d22bc56c4 Fix encoding error in migration procedure, otherwise migration procedure breaks on joining output list in case we have there any non-ascii characters. [piv]
svn path=/plone.app.discussion/trunk/; revision=36844
2010-05-31 09:58:42 +00:00
Timo Stollenwerk
4f13054ae4 plone.z3cform 0.6.0 compatibility (fix maximum recursion depth error which appears with plone.z3cform higher than 0.5.10); [piv]
svn path=/plone.app.discussion/trunk/; revision=36843
2010-05-31 09:50:46 +00:00
Yiorgis Gozadinos
abe4cda5ba removed moderation.js from js registry and include it only in moderation.pt as that is the only place where it is used
svn path=/plone.app.discussion/trunk/; revision=36468
2010-05-03 11:53:20 +00:00
Lennart Regebro
30c66b0b24 A bug in the moderator panel meant you couldn't delete items in a virtual host, if your portal was named "plone".
svn path=/plone.app.discussion/trunk/; revision=35608
2010-04-01 13:48:03 +00:00
Lennart Regebro
f7c676622b The the author_name in the control panel.
svn path=/plone.app.discussion/trunk/; revision=35533
2010-03-24 15:38:18 +00:00
Timo Stollenwerk
5ce942d1d2 Rename 'publish comment' to 'approve comment'. This fixes #1608470.
svn path=/plone.app.discussion/trunk/; revision=35342
2010-03-19 09:58:35 +00:00
Timo Stollenwerk
437094d951 Show a warning in the moderation view if the moderation workflow is disabled.
svn path=/plone.app.discussion/trunk/; revision=35341
2010-03-19 09:44:07 +00:00
Timo Stollenwerk
37b8e0fe15 Fix #2419342: Fix untranslated published/deleted status messages. import _ from p.a.d message factory instead of from the standard Plone message factory.
svn path=/plone.app.discussion/trunk/; revision=35092
2010-03-17 12:34:38 +00:00
Timo Stollenwerk
5fedf90f18 Remove fixed width of the actions column of the moderation view. The translated button titles can differ in size from the English titles.
svn path=/plone.app.discussion/trunk/; revision=35087
2010-03-17 11:00:10 +00:00
Timo Stollenwerk
0776fecfd2 we can't set a widget for the author_notification field because we removed it.
svn path=/plone.app.discussion/trunk/; revision=35081
2010-03-17 10:49:26 +00:00
Timo Stollenwerk
eec6bca238 hide the email field again since this does not make sense without user email notification.
svn path=/plone.app.discussion/trunk/; revision=34943
2010-03-16 13:24:13 +00:00
Timo Stollenwerk
819b66e149 merge r34694-r34695 from the jarn-1.0b3 branch.
Fix unicode error when non-ASCII characters are typed into the name field of a comment by anonymous users. 
We are indexing the member.id only now instead of the full member name or what anonymous users typed into the name field.

svn path=/plone.app.discussion/trunk/; revision=34932
2010-03-16 13:06:08 +00:00
Timo Stollenwerk
2301565e27 remove the user notification feature for now, since it requires the current z3c.form trunk and does not work with the latest release on PyPi.
svn path=/plone.app.discussion/trunk/; revision=34696
2010-03-11 19:23:02 +00:00
Timo Stollenwerk
1d39b53c4b Merge notification branch into trunk:
New feature: As a moderator, I am notified when new comments require my attention;
New feature: As a commenter, I can enable/disable email notification of additional comments on this object;
Make p.a.d. work with the recent version of plone.z3cform (0.5.10);

svn path=/plone.app.discussion/trunk/; revision=34602
2010-03-06 10:04:34 +00:00
Timo Stollenwerk
ff0270dac7 hide author_notification field if author notification is disabled. save author notification setting properly when saving the form.
svn path=/plone.app.discussion/branches/notification/; revision=34475
2010-03-03 19:17:13 +00:00
Timo Stollenwerk
1920869f8b Make p.a.d. styles less generic. This fixes #10253.
svn path=/plone.app.discussion/trunk/; revision=34373
2010-02-26 16:56:31 +00:00
Timo Stollenwerk
57b41454bb update CommentsViewlet to follow best practice for showing a z3c.form inside a Viewlet. Override update method instead of init method.
svn path=/plone.app.discussion/branches/notification/; revision=34052
2010-02-16 20:25:56 +00:00
Timo Stollenwerk
be3d347471 user email notification added.
svn path=/plone.app.discussion/branches/notification/; revision=33963
2010-02-13 21:31:17 +00:00
Timo Stollenwerk
f0fb6514c7 Moderator email notification added: As a moderator, I am notified when new comments require my attention.
svn path=/plone.app.discussion/branches/notification/; revision=33921
2010-02-11 21:05:28 +00:00
Timo Stollenwerk
67b5ff566e fix singlecheckboxwidget for comment form.
svn path=/plone.app.discussion/branches/notification/; revision=33873
2010-02-08 18:28:03 +00:00
Timo Stollenwerk
26031cd1f4 notification enabled field added to discussion control panel.
svn path=/plone.app.discussion/branches/notification/; revision=33869
2010-02-08 15:02:17 +00:00
Timo Stollenwerk
de3bb53c13 move author notification field to the bottom of the form.
svn path=/plone.app.discussion/branches/notification/; revision=33868
2010-02-08 14:47:53 +00:00
Timo Stollenwerk
c4dbf971fb author_notification field added.
svn path=/plone.app.discussion/branches/notification/; revision=33867
2010-02-08 12:02:54 +00:00
Hanno Schlichting
9c80b99ead Play by the Plone 3.3+ rules and use the INavigationRoot as a base for the moderation views.
svn path=/plone.app.discussion/trunk/; revision=33544
2010-01-28 13:23:58 +00:00
Hanno Schlichting
d937bcc42e Added a commentTitle CSS class to the comment titles.
svn path=/plone.app.discussion/trunk/; revision=33543
2010-01-28 11:48:44 +00:00
Hanno Schlichting
590b343a53 Update message ids to match their real text.
svn path=/plone.app.discussion/trunk/; revision=33542
2010-01-28 10:57:36 +00:00
Timo Stollenwerk
2179e447ab Set CSS classes for the comment form in the updateActions method.
svn path=/plone.app.discussion/trunk/; revision=33520
2010-01-27 19:20:25 +00:00
Hanno Schlichting
9f4129a65f Respect the allow_comments field on an object and avoid calculations if no comments should be shown.
svn path=/plone.app.discussion/trunk/; revision=33511
2010-01-27 17:00:58 +00:00
Hanno Schlichting
c27d1b5cc1 De-tabbify
svn path=/plone.app.discussion/trunk/; revision=33491
2010-01-27 14:54:07 +00:00
Timo Stollenwerk
f93f419f99 Custom cancel button class added again. Plone 3.x reply-to-comment form still uses this.
svn path=/plone.app.discussion/trunk/; revision=33453
2010-01-26 10:27:38 +00:00
Timo Stollenwerk
a7017cedb7 i18n tag added to 'show full comment text'.
svn path=/plone.app.discussion/trunk/; revision=33452
2010-01-26 10:18:46 +00:00
Timo Stollenwerk
b0c8b38199 fix comment actions column in Plone 3.x.
svn path=/plone.app.discussion/trunk/; revision=33451
2010-01-26 10:08:44 +00:00
Timo Stollenwerk
4fa3f476d4 allow to show the full text of a comment in the moderation view.
svn path=/plone.app.discussion/trunk/; revision=33400
2010-01-25 11:43:29 +00:00
Timo Stollenwerk
489afd8636 Bugfix #2281226: Moderation View: Comments disappear when hitting the 'Apply' button without choosing a bulk action.
svn path=/plone.app.discussion/trunk/; revision=33399
2010-01-25 10:51:27 +00:00
Timo Stollenwerk
c001b335b9 make i18ndude shut up about errors.
svn path=/plone.app.discussion/trunk/; revision=33388
2010-01-24 21:19:18 +00:00
Luca Fabbri
677490a445 Final fixes: now also the "Comment" button is translated
svn path=/plone.app.discussion/branches/localization-enabled/; revision=33354
2010-01-24 14:00:51 +00:00
Luca Fabbri
a6a1904d3e Commiting working translation.
Some light fixes was needed also to the code. 

svn path=/plone.app.discussion/branches/localization-enabled/; revision=33353
2010-01-24 13:47:39 +00:00
Timo Stollenwerk
ac3ade24f6 Redo the controlpanel UI.
svn path=/plone.app.discussion/trunk/; revision=33284
2010-01-22 19:17:46 +00:00
Timo Stollenwerk
1e58aa63b1 fix CommentViewlet has_replies method.
svn path=/plone.app.discussion/trunk/; revision=33282
2010-01-22 19:02:41 +00:00
Timo Stollenwerk
b1e4b2254c Fix 1513398: Show "anonymous" when name field is empty in comment form.
svn path=/plone.app.discussion/trunk/; revision=33281
2010-01-22 18:35:32 +00:00
Timo Stollenwerk
649e41fcd5 Undo r33270. Make IDiscussionLayer inherit from IDefaultPloneLayer for now, to fix the comment Viewlet in Plone 4.0a3. This can be removed again as soon as Plone 4.0b1 is out. Thanks davisagli!
svn path=/plone.app.discussion/trunk/; revision=33278
2010-01-22 17:54:30 +00:00
Timo Stollenwerk
0b530a0a75 Ugly hack that works around a "ContentProviderLookupError: plone.htmlhead" error caused by Zope 2 permissions. See https://bugs.launchpad.net/zope2/+bug/176566 for further details. This error occured on Plone 3.3.x only.
svn path=/plone.app.discussion/trunk/; revision=33275
2010-01-22 16:28:00 +00:00
Timo Stollenwerk
5ff91da15d rename plone.comments Viewlet to plone.app.discussion.comments and hide the standard plone.comments Viewlet. This is necessary because overriding plone.comments is not working anymore in Plone 4.0a3. This should be fixed properly in the future.
svn path=/plone.app.discussion/trunk/; revision=33270
2010-01-22 12:08:30 +00:00
Timo Stollenwerk
548c1debee remove unnecessary cancel button class.
svn path=/plone.app.discussion/trunk/; revision=33234
2010-01-19 08:26:41 +00:00
Timo Stollenwerk
3ceb9e1e4f use widget.addClass instead of overwriting an entire class for setting a CSS class.
svn path=/plone.app.discussion/trunk/; revision=33222
2010-01-18 19:47:46 +00:00
Timo Stollenwerk
1bfff5255a more tests for comments viewlet.
svn path=/plone.app.discussion/trunk/; revision=33217
2010-01-18 11:38:57 +00:00
Timo Stollenwerk
ca0aecd170 user portal membership tool for is_anonyous method; tests for comments viewlet added.
svn path=/plone.app.discussion/trunk/; revision=33216
2010-01-18 11:04:08 +00:00
Timo Stollenwerk
d1bd1469c8 move comment view from browser/comments.py to browser/comment.py.
svn path=/plone.app.discussion/trunk/; revision=33214
2010-01-18 09:54:27 +00:00
Timo Stollenwerk
dc2e5232f7 fix migration tests. do not use transactions during unit testing.
svn path=/plone.app.discussion/trunk/; revision=32805
2010-01-03 17:36:01 +00:00
Timo Stollenwerk
e0cc673683 count old comments only during migration. show error log when comments could not be migrated.
svn path=/plone.app.discussion/trunk/; revision=32767
2010-01-02 19:45:05 +00:00
Timo Stollenwerk
275cb885ea dry_run and abort migration added to migration view.
svn path=/plone.app.discussion/trunk/; revision=32588
2009-12-21 23:36:35 +00:00
Timo Stollenwerk
adb0390227 use object_provides instead of portal_type to query the catalog for comments. this fixes bug #2010085;
svn path=/plone.app.discussion/trunk/; revision=32538
2009-12-19 15:03:12 +00:00
Timo Stollenwerk
2e004456f5 Bugfix for #2010078: Comments that await moderation are visually distinguished from published comments.
svn path=/plone.app.discussion/trunk/; revision=32537
2009-12-19 14:04:49 +00:00
Timo Stollenwerk
0fa11f9af9 remove unnecessary link in comment title.
svn path=/plone.app.discussion/trunk/; revision=32536
2009-12-19 13:39:28 +00:00
Timo Stollenwerk
5f9e443b9c fix bug #2010181: The name of a commenter who commented while not logged in should not appear as a link.
svn path=/plone.app.discussion/trunk/; revision=32535
2009-12-19 13:35:49 +00:00
Timo Stollenwerk
8e493363c4 rename remove button to delete.
svn path=/plone.app.discussion/trunk/; revision=32358
2009-12-08 15:37:52 +00:00
Timo Stollenwerk
42f8da327b fix styles for action column in moderation view.
svn path=/plone.app.discussion/trunk/; revision=32357
2009-12-08 15:29:37 +00:00
Timo Stollenwerk
6ddfbff8df fix even/odd styles for Plone 4.
svn path=/plone.app.discussion/trunk/; revision=32356
2009-12-08 11:53:10 +00:00
Timo Stollenwerk
47cba8797f filter tabs removed from moderation view;
svn path=/plone.app.discussion/trunk/; revision=32355
2009-12-08 11:19:26 +00:00
Timo Stollenwerk
a672c1ed11 Plone 4 styles added.
svn path=/plone.app.discussion/trunk/; revision=32349
2009-12-07 19:39:23 +00:00
Timo Stollenwerk
ff9e2205c9 fix ajax call for workflow_action publish in moderation view.
svn path=/plone.app.discussion/trunk/; revision=32342
2009-12-07 16:11:49 +00:00
Timo Stollenwerk
34b37cab2d fix toLocalizedTime for Plone 4 compatibility.
svn path=/plone.app.discussion/trunk/; revision=32340
2009-12-07 15:45:39 +00:00
Timo Stollenwerk
9713bda830 fix float issue for discussion div as well.
svn path=/plone.app.discussion/trunk/; revision=32339
2009-12-07 15:41:17 +00:00