[CMF-checkins] CVS: CMF - viewThreadsAtBottom.dtml:1.4

Jens Vagelpohl jens@digicool.com
Wed, 11 Jul 2001 17:46:37 -0400 (EDT)

Update of /cvs-repository/CMF/CMFDefault/skins/generic
In directory korak.digicool.com:/tmp/cvs-serv18884/skins/generic

Modified Files:
Log Message:
Changes to simplify hasReplies and introducing a method to count replies:

- hasReplies takes a new argument, content_obj, and will be accurate from any
  content object or discussion item it is called with. it now returns a simple
  boolean "1" or "0"

- replyCount, using the content_obj argument to know where to start looking, 
  computes the exact number of all replies to this particular object, including
  nested replies.

replyCount is available with the "View" permission but is currently not used in the 
standard CMF skins because there might be a performance impact with large 

--- Updated File viewThreadsAtBottom.dtml in package CMF --
--- viewThreadsAtBottom.dtml	2001/07/10 15:05:47	1.3
+++ viewThreadsAtBottom.dtml	2001/07/11 21:46:36	1.4
@@ -8,12 +8,10 @@
 <dtml-if talkback>
-  <dtml-let replyCount="talkback.hasReplies()"
-            str="(replyCount == 1 and 'comment') or 'comments'"
-            is_at_top="this().Type() != 'Discussion Item'">
+  <dtml-let hasReplies="talkback.hasReplies( this() )">
-    <dtml-if replyCount>
-      <h4>Comments<dtml-if is_at_top> (&dtml-replyCount; &dtml-str; total)</dtml-if>:</h4>
+    <dtml-if hasReplies>
+      <h4>Comments:</h4>
       <dtml-var showThreads>