From: Thomas D. <svn...@pl...> - 2011-12-22 16:13:58
|
Author: thomasdesvenain Date: Thu Dec 22 16:13:48 2011 New Revision: 247534 Modified: collective.edm.listing/trunk/collective/edm/listing/listing.py collective.edm.listing/trunk/collective/edm/listing/locales/fr/LC_MESSAGES/collective.edm.listing.po collective.edm.listing/trunk/collective/edm/listing/templates/table.pt Log: check if user can delete for button display Modified: collective.edm.listing/trunk/collective/edm/listing/listing.py ============================================================================== --- collective.edm.listing/trunk/collective/edm/listing/listing.py (original) +++ collective.edm.listing/trunk/collective/edm/listing/listing.py Thu Dec 22 16:13:48 2011 @@ -123,7 +123,7 @@ def checkDelete(self): return self.listingrights.globally_can_delete(self.brains) - def checkDeleteItem(self): + def checkDeleteItem(self, item): return self.listingrights.can_delete(item['brain']) def useEditPopup(self, item): Modified: collective.edm.listing/trunk/collective/edm/listing/locales/fr/LC_MESSAGES/collective.edm.listing.po ============================================================================== --- collective.edm.listing/trunk/collective/edm/listing/locales/fr/LC_MESSAGES/collective.edm.listing.po (original) +++ collective.edm.listing/trunk/collective/edm/listing/locales/fr/LC_MESSAGES/collective.edm.listing.po Thu Dec 22 16:13:48 2011 @@ -46,7 +46,7 @@ #. Default: "Modify all selected documents:" #: ../templates/table.pt:237 msgid "help_folderlisting_buttons" -msgstr "Modifiez tous les documents sélectionnés :" +msgstr "Modifier tous les documents sélectionnés :" #. Default: "Choose the new state of your document" #: ../templates/editpopup.pt:61 Modified: collective.edm.listing/trunk/collective/edm/listing/templates/table.pt ============================================================================== --- collective.edm.listing/trunk/collective/edm/listing/templates/table.pt (original) +++ collective.edm.listing/trunk/collective/edm/listing/templates/table.pt Thu Dec 22 16:13:48 2011 @@ -183,20 +183,20 @@ </tal:block> <tal:block condition="canRemoveItems"> <tal:var define="canRemoveItem python:view.checkRemoveItem(item)"> - <td tal:condition="canRemoveItem"> - <a href="#" + <td> + <a href="#" tal:condition="canRemoveItem" tal:attributes="href string:${item/url}/object_cut" title="Cut" i18n:attributes="title"> <img tal:attributes="src view/icon_cut" /> </a> </td> - <td tal:condition="not:canRemoveItem" /> </tal:var> </tal:block> <td tal:condition="canDeleteItems"> <a href="#" class="edm-popup-link" + tal:condition="python:view.checkDeleteItem(item)" tal:attributes="href string:${item/url}/delete_confirmation" title="Delete" i18n:attributes="title"> |