[CMF-checkins] CVS: Products/CMFDefault/skins/zpt_generic -
discitem_delete.py:1.2 talkback_tree.pt:1.7
Tres Seaver
tseaver at palladion.com
Thu Jul 7 13:21:21 EDT 2005
Update of /cvs-repository/Products/CMFDefault/skins/zpt_generic
In directory cvs.zope.org:/tmp/cvs-serv23955/CMFDefault/skins/zpt_generic
Modified Files:
talkback_tree.pt
Added Files:
discitem_delete.py
Log Message:
- Merge fix for collector #38 from 1.5 branch.
=== Products/CMFDefault/skins/zpt_generic/discitem_delete.py 1.1 => 1.2 ===
--- /dev/null Thu Jul 7 13:21:16 2005
+++ Products/CMFDefault/skins/zpt_generic/discitem_delete.py Thu Jul 7 13:21:16 2005
@@ -0,0 +1,10 @@
+#
+# discitem_delete
+#
+parent = context.inReplyTo()
+talkback = context.portal_discussion.getDiscussionFor(parent)
+talkback.deleteReply( context.getId() )
+
+context.REQUEST['RESPONSE'].redirect( '%s?portal_status_message=Reply+deleted'
+ % parent.absolute_url()
+ )
=== Products/CMFDefault/skins/zpt_generic/talkback_tree.pt 1.6 => 1.7 ===
--- Products/CMFDefault/skins/zpt_generic/talkback_tree.pt:1.6 Tue Jan 20 17:20:11 2004
+++ Products/CMFDefault/skins/zpt_generic/talkback_tree.pt Thu Jul 7 13:21:16 2005
@@ -4,7 +4,10 @@
<table cellspacing="0" border="0"
metal:define-macro="tree"
tal:define="t python:here.setup_talkback_tree(here);
- height t/root/height;">
+ height t/root/height;
+ mtool here/portal_membership;
+ member mtool/getAuthenticatedMember;
+ ">
<tr tal:repeat="row t/rows">
<td colspan="1"
tal:define="indent python: row.depth - 1"
@@ -40,6 +43,9 @@
><tal:case tal:condition="not: obj/listCreators"
><span tal:omit-tag="" i18n:translate="">unknown</span></tal:case>
on <span tal:replace="obj/CreationDate">Today</span>
+ <a href="#"
+ tal:condition="python: member.has_permission('Manage portal', here)"
+ tal:attributes="href python: url + '/discitem_delete'">[ delete reply ]</a>
</td>
</tr>
</table>
More information about the CMF-checkins
mailing list