Always show existing comments, even if commenting is disabled.

svn path=/plone.app.discussion/trunk/; revision=46785
This commit is contained in:
Timo Stollenwerk 2011-01-07 15:27:17 +00:00
parent 61e231b336
commit 75cde25b6f
3 changed files with 31 additions and 13 deletions

View File

@ -4,6 +4,9 @@ Changelog
1.0RC1 (unreleased) 1.0RC1 (unreleased)
------------------- -------------------
- Always show existing comments, even if commenting is disabled.
[timo]
- Fix CSS for commenter images with a width of more than 2.5em. This fixes - Fix CSS for commenter images with a width of more than 2.5em. This fixes
http://dev.plone.org/plone/ticket/11391. http://dev.plone.org/plone/ticket/11391.
[timo] [timo]

View File

@ -1,7 +1,5 @@
<tal:block tal:define="isDiscussionAllowed view/is_discussion_allowed" <tal:block tal:define="userHasReplyPermission view/can_reply;
tal:condition="isDiscussionAllowed" isDiscussionAllowed view/is_discussion_allowed;
i18n:domain="plone">
<tal:block define="userHasReplyPermission view/can_reply;
isAnonymousDiscussionAllowed view/anonymous_discussion_allowed; isAnonymousDiscussionAllowed view/anonymous_discussion_allowed;
isAnon view/is_anonymous; isAnon view/is_anonymous;
canReview view/can_review; canReview view/can_review;
@ -9,7 +7,9 @@
has_replies python:view.has_replies(canReview); has_replies python:view.has_replies(canReview);
showCommenterImage view/show_commenter_image; showCommenterImage view/show_commenter_image;
errors options/state/getErrors|nothing; errors options/state/getErrors|nothing;
wtool context/@@plone_tools/workflow;"> wtool context/@@plone_tools/workflow;"
tal:condition="python:isDiscussionAllowed or has_replies"
i18n:domain="plone">
<div class="reply" <div class="reply"
tal:condition="python:isAnon and not isAnonymousDiscussionAllowed"> tal:condition="python:isAnon and not isAnonymousDiscussionAllowed">
@ -126,6 +126,13 @@
</div> </div>
</tal:getreplies> </tal:getreplies>
<div tal:condition="python: has_replies and not isDiscussionAllowed"
class="discreet"
i18n:translate="label_commenting_disabled">
Commenting has been disabled.
</div>
</div> </div>
<div class="reply" <div class="reply"
@ -156,4 +163,3 @@
</div> </div>
</tal:block> </tal:block>
</tal:block>

View File

@ -63,6 +63,11 @@
text-align: right; text-align: right;
} }
.discussion .discreet {
color: #666666;
font-size: 85%;
}
/* Reply Form /* Reply Form
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
@ -143,6 +148,10 @@
font-size: 80%; font-size: 80%;
} }
.row #commenting .formControls {
margin: 0;
}
.row #commenting textarea, .row #commenting textarea,
.row .discussion textarea { .row .discussion textarea {
font: 100% Monaco, "Courier New", Courier, monospace; font: 100% Monaco, "Courier New", Courier, monospace;