[CMF-checkins] CVS: CMF - aboveInThread.dtml:1.1 discussionitem_icon.gif:1.1 discussionitem_view.dtml:1.1
tseaver@digicool.com
tseaver@digicool.com
Thu, 14 Jun 2001 16:27:48 -0400 (EDT)
Update of /cvs-repository/CMF/CMFDefault/skins/content
In directory korak.digicool.com:/tmp/cvs-serv30518/skins/content
Added Files:
aboveInThread.dtml discussionitem_icon.gif
discussionitem_view.dtml
Log Message:
- Adds a set of baseline unit tests for the discussions
machinery, including tests for:
o policy checks (whether discussions are allowable)
o nested replies
o cataloguing of replies
o propagation of 'manage_beforeDelete' from the host content
object, and correct un-cataloguing.
- Cleans up a lot of cruft, including fossilized inheritance,
old-style security declarations, etc., in
CMFDefault.DiscussionItem. In particular, DiscussionItem
now implements the DiscussionResponse interface directly,
instead of mixing in the older implementation.
- Replaces the current "path-based" 'in_reply_to' with a simpler,
more robust scheme.
o The old version was a legacy of the much older usage, which
had discussion items in users' "Correspondence" folders, and
assembled them into threads using catalog queries; it was
fragile in the face of moves or renames of the "host"
content object.
o The new scheme stores 'None' in the 'in_reply_to' field to
indicate that the item is a "top-level" reply to the host
content object, or the simple ID of the sibling, for
threaded replies.
- Refactors the skins for discussions a bit, moving the "above
in thread" logic into a separate method, and adding a special
view for DiscussionItems which uses it.
- Adds an 'upgrade_discussion' ExternalMethod to CMFDefault;
this method:
1. Installs (if one isn't already there) a
FactoryTypeInformation object for DiscussionItems. This
FTI is "crippled" for adding objects (no factory/product),
but provides a hook on which to hang the custom view, and
set other type-specific policies.
2. Removes the "(default)" workflow for DiscussionItems, so
as not to present the "Retract", etc. actions; later, we
might add a special workflow, to permit sufficiently
privileged users to delete replies.
3. Updates existing DiscussionItems to conform to the new
scheme.
--- Added File aboveInThread.dtml in package CMF ---
<dtml-comment>
aboveInThread.dtml
Display any "parent" discussion, plus the "root" content object,
for DiscussionItems.
</dtml-comment>
<!-- aboveInThread -->
<dtml-if parentsInThread>
<dtml-let parents=parentsInThread>
<dtml-in parents>
<dtml-if sequence-start>
Above in thread:
<dtml-if "_.len(parents) > 5">... :</dtml-if>
</dtml-if>
<a href="&dtml-absolute_url;">&dtml-Title;</a>
<dtml-unless sequence-end>:</dtml-unless>
</dtml-in>
<p>
</dtml-let>
</dtml-if>
--- Added File discussionitem_icon.gif in package CMF ---
GIF89a
i!]7R4͗x) A;adÅf$
--- Added File discussionitem_view.dtml in package CMF ---
<dtml-let relative_to_content="1">
<dtml-var standard_html_header>
</dtml-let>
<div class="Desktop">
<div class="Document">
<dtml-var content_byline>
<div class="Discussion">
<dtml-var aboveInThread>
</div>
<h1> &dtml-Title; </h1>
<dtml-var CookedBody>
<div class="Discussion">
<dtml-var viewThreadsAtBottom>
</div>
</div>
</div>
<dtml-var standard_html_footer>