Apply the comment viewlet template and styles to the new title-less comments. This might require integrators to apply their custom templates and styles.

svn path=/plone.app.discussion/trunk/; revision=40433
This commit is contained in:
Timo Stollenwerk 2010-09-29 08:13:54 +00:00
parent 8d00463502
commit 689fd26c12
3 changed files with 96 additions and 82 deletions

View File

@ -4,6 +4,10 @@ Changelog
1.0b8 (unreleased)
------------------
- Apply the comment viewlet template and styles to the new title-less comments.
This might require integrators to apply their custom templates and styles.
[timo]
- Remove title field from the comment form and replace it with an auto-generated
title ("John Doe on Welcome to Plone").
[timo]

View File

@ -46,24 +46,20 @@
<img src="defaultUser.gif"
alt=""
border="0"
width="75"
height="32"
tal:attributes="src portrait_url;
alt reply/Creator" />
</a>
<img src="defaultUser.gif"
alt=""
border="0"
width="75"
height="32"
tal:condition="not: has_author_link"
tal:attributes="src portrait_url;
alt reply/Creator" />
</div>
<h3 class="commentTitle"
tal:content="reply/Title" />
<div class="documentByLine" i18n:domain="plone.app.discussion">
<tal:posted i18n:translate="label_comment_by">Posted by</tal:posted>
<tal:name>
<a href=""
tal:condition="has_author_link"
@ -73,23 +69,20 @@
</a>
<span tal:condition="not: has_author_link"
tal:replace="reply/Creator" />
<span tal:condition="not: reply/Creator">Anonymous</span>
</tal:name>
<tal:name condition="python:reply.Creator() in ('Anonymous User', '', None)"
tal:content="reply/author_name">Anonymous User</tal:name>
<tal:at i18n:translate="label_commented_at">at</tal:at>
<span tal:replace="python:view.format_time(reply.modification_date)">8/23/2001 12:40:44 PM</span>
<tal:posted i18n:translate="label_says">says:</tal:posted>
<div class="commentDate"
tal:content="python:view.format_time(reply.modification_date)">
8/23/2001 12:40:44 PM
</div>
</div>
<div class="commentBody"
tal:content="structure python:view.cook(reply.getText())" />
<div class="commentBody">
<span tal:replace="structure python:view.cook(reply.getText())" />
<div class="commentActions">
<button class="context reply-to-comment-button hide allowMultiSubmit"
tal:condition="python:isDiscussionAllowed and (isAnon and isAnonymousDiscussionAllowed or userHasReplyPermission)"
i18n:translate="label_reply">
Reply
</button>
<form name="delete"
action=""
method="post"
@ -121,9 +114,15 @@
i18n:attributes="value"
/>
</form>
</div>
</div>
<button class="context reply-to-comment-button hide allowMultiSubmit"
tal:condition="python:isDiscussionAllowed and (isAnon and isAnonymousDiscussionAllowed or userHasReplyPermission)"
i18n:translate="label_reply">
Reply
</button>
</div>
</tal:getreplies>

View File

@ -17,13 +17,12 @@
}
.comment {
min-height: 100px;
}
.commentImage {
width: 90px;
float: left;
margin-right: -90px;
width: 2.5em;
height: 3.5em;
}
.commentImage a:link {
@ -32,24 +31,36 @@
}
.commentImage img {
margin-right: 1em;
}
.commentDate {
display: block;
font-size: 85%;
line-height: 1.5em;
padding-top: 0.5em;
color: #76797C;
}
.commentBody {
clear: both;
margin: 1em 0;
overflow: auto;
}
.showCommenterImage h3,
.showCommenterImage .documentByLine,
.showCommenterImage .commentBody,
.showCommenterImage .commentActions,
.showCommenterImage .reply {
/* The showCommenterImage CSS class is only set if showing the
* commenters image is enabled.
*/
margin-left: 90px;
.commentBody p {
float: left;
}
.discussion .documentByLine {
float: left;
margin-left: 0;
}
.commentActions {
float: right;
text-align: right;
}
/* Reply Form
-------------------------------------------------------------------------- */