[CMF-checkins] CVS: CMF - viewThreadsAtBottom.dtml:1.3
Jens Vagelpohl
jens@digicool.com
Tue, 10 Jul 2001 11:05:48 -0400 (EDT)
Update of /cvs-repository/CMF/CMFDefault/skins/generic
In directory korak.digicool.com:/tmp/cvs-serv27094/skins/generic
Modified Files:
viewThreadsAtBottom.dtml
Log Message:
Refinements for displaying discussion items:
- hasReplies in DiscussionItem.py now simply returns the total length of the talkback object,
meaning the number reflects the total of all comments posted (response to CMF Tracker 328)
- viewThreadsAtBottom utilizes the new hasReplies to display the total number of comments,
but only when the top content object is viewed.
--- Updated File viewThreadsAtBottom.dtml in package CMF --
--- viewThreadsAtBottom.dtml 2001/06/17 19:21:06 1.2
+++ viewThreadsAtBottom.dtml 2001/07/10 15:05:47 1.3
@@ -8,9 +8,16 @@
<dtml-if talkback>
- <dtml-if expr="talkback.hasReplies()">
- <h4>Comments:</h4>
- <dtml-var showThreads>
+ <dtml-let replyCount="talkback.hasReplies()"
+ str="(replyCount == 1 and 'comment') or 'comments'"
+ is_at_top="this().Type() != 'Discussion Item'">
+
+ <dtml-if replyCount>
+ <h4>Comments<dtml-if is_at_top> (&dtml-replyCount; &dtml-str; total)</dtml-if>:</h4>
+ <dtml-var showThreads>
</dtml-if>
+ </dtml-let>
+
</dtml-if>
+