[CMF-checkins] CVS: Products/CMFDefault/skins/zpt_generic - discitem_delete.py:1.1.2.1 talkback_tree.pt:1.6.8.1

Tres Seaver tseaver at palladion.com
Thu Jul 7 13:19:15 EDT 2005


Update of /cvs-repository/Products/CMFDefault/skins/zpt_generic
In directory cvs.zope.org:/tmp/cvs-serv23377/CMFDefault/skins/zpt_generic

Modified Files:
      Tag: CMF-1_5-branch
	talkback_tree.pt 
Added Files:
      Tag: CMF-1_5-branch
	discitem_delete.py 
Log Message:
 - Allow managers to delete replies via talkback_tree (collector #38).


=== Added File Products/CMFDefault/skins/zpt_generic/discitem_delete.py ===
#
# 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.6.8.1 ===
--- 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:19:09 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