Commit Graph

190 Commits

Author SHA1 Message Date
David Glick
eb004aab44 merge r46437 and r46946 from davisagli-features: respect the per-comment mime_type setting, and use the old cooked text/html from legacy comments when migrating
svn path=/plone.app.discussion/trunk/; revision=48356
2011-04-02 19:51:37 +00:00
David Glick
feb1759958 fix incorrect parenthesization
svn path=/plone.app.discussion/trunk/; revision=48240
2011-03-26 05:04:22 +00:00
Thomas Desvenain
7c2a815fdb Fixed internationalization issues.
svn path=/plone.app.discussion/trunk/; revision=48110
2011-03-17 16:15:40 +00:00
Timo Stollenwerk
0c435dc9ca Check if the current user has configured an e-mail address for the email notification option. Refs #11428
svn path=/plone.app.discussion/trunk/; revision=47069
2011-01-26 08:15:14 +00:00
Timo Stollenwerk
c438743a3b Show a 'Comments are moderated.' message next to the comment form if comments are moderated.
svn path=/plone.app.discussion/trunk/; revision=46782
2011-01-07 10:20:24 +00:00
Maurits van Rees
a2a17085a3 Nuke trailing white space
svn path=/plone.app.discussion/trunk/; revision=46366
2010-12-15 23:52:56 +00:00
Timo Stollenwerk
4c4cd9e44d Replace XXX with todo.
svn path=/plone.app.discussion/trunk/; revision=46263
2010-12-12 08:14:48 +00:00
Timo Stollenwerk
7e279d3ad3 Make sure the handleComment method checks for the 'Reply to item' permission when adding a comment.
svn path=/plone.app.discussion/trunk/; revision=46212
2010-12-09 08:11:41 +00:00
Timo Stollenwerk
c311a4f88d Check for the 'review comments' permission instead of 'manage' to decide if the user should see a 'this comment is pending' message.
svn path=/plone.app.discussion/trunk/; revision=46050
2010-12-01 06:34:05 +00:00
Timo Stollenwerk
0c94707743 Dynamically show the comment formatting message dependent on the text transform setting.
svn path=/plone.app.discussion/trunk/; revision=46035
2010-11-29 22:42:20 +00:00
Timo Stollenwerk
5b788d1156 Merge 'Convert anonymous-supplied name to unicode as done for authenticated members.' from jarn-unicode branch.
svn path=/plone.app.discussion/trunk/; revision=45662
2010-11-08 17:09:26 +00:00
Timo Stollenwerk
b95707ac52 Re-add the CommentsViewlet can_manage method. This method has been removed in version 1.0b9 and added again in 1.0b11 because we don't want to change the API in beta releases.
svn path=/plone.app.discussion/trunk/; revision=45110
2010-11-03 11:26:18 +00:00
Timo Stollenwerk
82afd3ef15 New feature: As a logged-in user, I can enable/disable email notification of additional comments on this content object.
svn path=/plone.app.discussion/trunk/; revision=40949
2010-10-30 15:02:05 +00:00
Timo Stollenwerk
81dcdeaea3 Disable the plone.app.registry check on schema elements, so no error is raised on upgrades. This fixes https://dev.plone.org/plone/ticket/11195. Refs #11195
svn path=/plone.app.discussion/trunk/; revision=40868
2010-10-29 10:43:46 +00:00
Timo Stollenwerk
f6b7ef1bcb Remove the too generic id attribute of the comment form.
svn path=/plone.app.discussion/trunk/; revision=40858
2010-10-28 10:30:10 +00:00
Timo Stollenwerk
777e687169 Rename the id of the comment form from "form" to "comment-form".
svn path=/plone.app.discussion/trunk/; revision=40857
2010-10-28 09:45:34 +00:00
Timo Stollenwerk
22e4189c37 Revert revisions r40851 to r40853, they should have gone into the ajax-ui branch.
svn path=/plone.app.discussion/trunk/; revision=40856
2010-10-28 09:39:00 +00:00
Timo Stollenwerk
79f4481722 Use "#comment-form" as id for the comment form instead of "#form" which is too generic.
svn path=/plone.app.discussion/trunk/; revision=40851
2010-10-27 14:44:06 +00:00
Hanno Schlichting
aa8a1ea934 Fixed handling of non-ascii member data, like fullname and email.
svn path=/plone.app.discussion/trunk/; revision=40789
2010-10-22 10:14:07 +00:00
Timo Stollenwerk
2790e6d4eb Check the review_state instead of the workflow after a comment has been posted to decide if a message is shown to the user. This allows integrators to use custom review workflows. Refs #11184
svn path=/plone.app.discussion/trunk/; revision=40566
2010-10-08 09:53:00 +00:00
Timo Stollenwerk
4bbfe677e4 Replace the can_manage method with a can_review method that checks the 'Review comments' permission. This fixes http://dev.plone.org/plone/ticket/11145.
svn path=/plone.app.discussion/trunk/; revision=40534
2010-10-06 13:55:57 +00:00
Timo Stollenwerk
6d92d1383c Remove comment title from comments viewlet tests.
svn path=/plone.app.discussion/trunk/; revision=40496
2010-10-03 19:41:02 +00:00
Timo Stollenwerk
603bcf3547 Ignore certain lines for code coverage.
svn path=/plone.app.discussion/trunk/; revision=40494
2010-10-03 16:52:26 +00:00
Timo Stollenwerk
497c2a075e There is no need to set the title in the handleComment method anymore.
svn path=/plone.app.discussion/trunk/; revision=40492
2010-10-03 07:29:44 +00:00
Timo Stollenwerk
f67c7cde6d Remove title field from the comment form and replace it with an auto-generated title ("John Doe on Welcome to Plone").
This also fixes http://dev.plone.org/plone/ticket/11098

svn path=/plone.app.discussion/trunk/; revision=40431
2010-09-29 07:56:36 +00:00
Timo Stollenwerk
6b4fd0f0c1 Ignore certain lines for code coverage.
svn path=/plone.app.discussion/trunk/; revision=40083
2010-09-20 10:03:55 +00:00
Patrick Gerken
823da240d8 Change datetime conversion to handle TZ
The way it happens now, the timezone gets corrected

svn path=/plone.app.discussion/trunk/; revision=39728
2010-09-07 12:03:31 +00:00
Timo Stollenwerk
ea13020498 Raise an unauthorized error when authenticated users try to post a comment on a content object that has discussion disabled. Thanks to vincentfrentin for reporting this!
svn path=/plone.app.discussion/trunk/; revision=39627
2010-09-03 20:40:27 +00:00
Timo Stollenwerk
dc160f9d5e Obey the 80 chars limit in the comments view.
svn path=/plone.app.discussion/trunk/; revision=39332
2010-08-28 20:19:58 +00:00
Timo Stollenwerk
cef90c576b remove author_username variable, because it is unused.
svn path=/plone.app.discussion/trunk/; revision=39325
2010-08-28 19:54:57 +00:00
Timo Stollenwerk
87b2c5dd02 Comment out author_notification because we don't use it right now.
svn path=/plone.app.discussion/trunk/; revision=39324
2010-08-28 19:51:53 +00:00
Timo Stollenwerk
a2c89ed5e8 Plain text and intelligent text options for comment text added to preserve basic text structure and to make links clickable.
svn path=/plone.app.discussion/trunk/; revision=38931
2010-08-25 14:03:29 +00:00
Timo Stollenwerk
35d7743b7a Plain text to HTML transformation added for comment text
svn path=/plone.app.discussion/trunk/; revision=38898
2010-08-25 09:19:28 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
ae2767daec fix redirect after a comment has been posted.
svn path=/plone.app.discussion/trunk/; revision=31000
2009-11-01 09:24:27 +00:00
Timo Stollenwerk
94adf62566 do not show moderation message when user has manage rights.
svn path=/plone.app.discussion/trunk/; revision=30997
2009-10-31 16:42:04 +00:00
Timo Stollenwerk
7550e95d5c fix redirection after a comment has been added.
svn path=/plone.app.discussion/trunk/; revision=30986
2009-10-31 12:33:59 +00:00
Timo Stollenwerk
60b6196736 Show info message after adding a comment when moderation is enabled.
svn path=/plone.app.discussion/trunk/; revision=30659
2009-10-17 09:17:13 +00:00
Timo Stollenwerk
b09d42e505 fix has_replies function when get_replies returns None.
svn path=/plone.app.discussion/trunk/; revision=30256
2009-10-07 20:50:01 +00:00
Timo Stollenwerk
f0cbc787ab has_replies function added to get only published comments for anon users. elro review fix. refs #9288
svn path=/plone.app.discussion/trunk/; revision=30252
2009-10-07 20:07:55 +00:00
Timo Stollenwerk
96e2899955 hide the email field for now. we keep the field for integrators or later use.
svn path=/plone.app.discussion/trunk/; revision=29435
2009-08-28 13:12:14 +00:00
Timo Stollenwerk
48ab88a8b4 code cleanup;
reply to comment button and handler removed; 
reply-to-comment is now handled by the comment handler as well;
this also solves story 1173673;

svn path=/plone.app.discussion/trunk/; revision=29434
2009-08-28 13:03:16 +00:00
Timo Stollenwerk
f7f10a5572 fix that conversation.enabled wasn't called. evilbungle fix.
svn path=/plone.app.discussion/trunk/; revision=29432
2009-08-28 11:39:02 +00:00
Timo Stollenwerk
defb4b91c4 hide reply and cancel button with css when JS is disabled.
svn path=/plone.app.discussion/trunk/; revision=29403
2009-08-26 21:53:34 +00:00
Timo Stollenwerk
8b9a3e63c9 replace data.has_key() with "key in data".
svn path=/plone.app.discussion/trunk/; revision=29342
2009-08-24 18:09:32 +00:00
Carsten Senger
06b332a801 Compatibility with Zope 2.12: don't wrap the ViewPageTemplate into an acquisition wrapper.
svn path=/plone.app.discussion/trunk/; revision=29201
2009-08-20 02:09:53 +00:00
Timo Stollenwerk
775fc1572a Plone CSS classes added to buttons.
svn path=/plone.app.discussion/trunk/; revision=29108
2009-08-17 21:46:44 +00:00
Timo Stollenwerk
962e4dd0d3 autoresize css class added to comment-textarea.
svn path=/plone.app.discussion/trunk/; revision=29104
2009-08-17 20:31:37 +00:00
Timo Stollenwerk
dbff6b4f67 add captcha check for reply-to-comment form.
svn path=/plone.app.discussion/trunk/; revision=28922
2009-08-15 16:36:35 +00:00
Timo Stollenwerk
bbf7cb5685 show captcha validation only for anonymous users.
svn path=/plone.app.discussion/trunk/; revision=28902
2009-08-15 11:35:54 +00:00
Timo Stollenwerk
2567483281 CaptchaValidator for captcha/recaptcha/no captcha added. This is necessary because the zcml registration of the CaptchaValidator has to work with all three options.
svn path=/plone.app.discussion/trunk/; revision=28894
2009-08-15 10:21:26 +00:00
Timo Stollenwerk
2a1ae7dc62 do not make a captcha check when captcha is disabled; this fixes the non-captcha comment form.
svn path=/plone.app.discussion/trunk/; revision=28790
2009-08-13 19:21:52 +00:00
Timo Stollenwerk
e1b068dbbc captcha validator added.
svn path=/plone.app.discussion/trunk/; revision=28746
2009-08-12 20:45:47 +00:00
Timo Stollenwerk
8e9c75a6fc Set fields as class attribute to make captcha formextender work again. This is kind of ugly, the fields should be enirely omitted and not only hidden.
svn path=/plone.app.discussion/trunk/; revision=28370
2009-08-05 09:01:14 +00:00
Timo Stollenwerk
eadbb55a87 fix commenting for anonymous users.
svn path=/plone.app.discussion/trunk/; revision=28363
2009-08-04 20:47:25 +00:00
Timo Stollenwerk
2e2528aa76 clean up the imports.
svn path=/plone.app.discussion/trunk/; revision=28360
2009-08-04 19:36:33 +00:00
Timo Stollenwerk
ae0b9486b7 remove unnecessary wrap_form.
svn path=/plone.app.discussion/trunk/; revision=28358
2009-08-04 19:30:12 +00:00
Timo Stollenwerk
c0d7f326b2 remove "implements(IViewlet)" since the base class takes care of it.
svn path=/plone.app.discussion/trunk/; revision=28357
2009-08-04 19:25:40 +00:00
Timo Stollenwerk
01f44e3147 add cancel button.
make strings translatable.

svn path=/plone.app.discussion/trunk/; revision=28356
2009-08-04 19:24:47 +00:00
Timo Stollenwerk
6014a65daa replace CommentFactory() with createObject().
svn path=/plone.app.discussion/trunk/; revision=28355
2009-08-04 18:42:17 +00:00
Timo Stollenwerk
c516d6ba55 hide the in_reply_to field inside the comment form.
svn path=/plone.app.discussion/trunk/; revision=28351
2009-08-04 15:12:15 +00:00
Timo Stollenwerk
ddd8596dbd move reply to comment view to z3cform.
svn path=/plone.app.discussion/trunk/; revision=28349
2009-08-04 14:51:34 +00:00
Timo Stollenwerk
a5c8fe33ed redirect after adding a comment.
remove unnecessary Comment class.

svn path=/plone.app.discussion/trunk/; revision=28348
2009-08-04 12:55:46 +00:00
Timo Stollenwerk
4876a5fb59 move addComment view to z3cform.
svn path=/plone.app.discussion/trunk/; revision=28346
2009-08-04 11:56:52 +00:00
Timo Stollenwerk
878f45029b fix attribute error when submitting the comment form.
omit form fields for comment form the right way.

svn path=/plone.app.discussion/trunk/; revision=28345
2009-08-04 11:35:05 +00:00
Timo Stollenwerk
2e2f6fc690 set form fields manually.
svn path=/plone.app.discussion/trunk/; revision=28325
2009-08-02 17:32:41 +00:00
Timo Stollenwerk
424d1c79ed z3c.form form added to commentsviewlet (not fully functional yet).
svn path=/plone.app.discussion/trunk/; revision=28300
2009-08-01 21:47:50 +00:00
Timo Stollenwerk
b106262e31 plone.registry 1.0a2 changed methods to mixedCase (for_interface to forInterface).
svn path=/plone.app.discussion/trunk/; revision=28024
2009-07-12 19:13:42 +00:00
Timo Stollenwerk
f85acfa827 Adding missing import for IStatusMessage, fixes validation. evilbungle fix.
svn path=/plone.app.discussion/trunk/; revision=27795
2009-07-03 12:06:19 +00:00
Timo Stollenwerk
90440cfeca add bulk actions and filter to the moderation view.
move delete- and publish-comment methods from comment.py to moderation.py.

svn path=/plone.app.discussion/trunk/; revision=27670
2009-06-26 14:57:45 +00:00