r13768 - Products.OrderableReferenceField/trunk/Products/OrderableReferenceField/skins/orderablereferencefield
"Luca Fabbri" <[email protected]> Mon, 22 Aug 2011 10:49:02 +0000
| Newsgroups | gmane.comp.web.zope.plone.archetypes.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: keul
Date: Mon Aug 22 10:49:02 2011
New Revision: 13768
Modified:
Products.OrderableReferenceField/trunk/Products/OrderableReferenceField/skins/orderablereferencefield/orderablereferencebrowser.pt
Log:
Make widget a more robust. Sometimes can happen that the reference field point to broken/unexistent content; this break the edit form
Modified: Products.OrderableReferenceField/trunk/Products/OrderableReferenceField/skins/orderablereferencefield/orderablereferencebrowser.pt
==============================================================================
--- Products.OrderableReferenceField/trunk/Products/OrderableReferenceField/skins/orderablereferencefield/orderablereferencebrowser.pt (original)
+++ Products.OrderableReferenceField/trunk/Products/OrderableReferenceField/skins/orderablereferencefield/orderablereferencebrowser.pt Mon Aug 22 10:49:02 2011
@@ -160,18 +160,19 @@
<ul class="visualNoMarker"
tal:attributes="id string:${fieldName};">
<li tal:repeat="set targets">
- <a class="orderablereferencebrowser_arrow">▲</a>
- <a class="orderablereferencebrowser_arrow">▼</a>
- <label tal:define="title python: set[0].title_or_id();
- obj_path python: '/'.join(set[0].getPhysicalPath());">
- <input type="checkbox"
- tal:attributes="name string:${fieldName}:list;
- value python:set[1];"
- checked="checked" />
+ <tal:notempty condition="python:set[0]">
+ <a class="orderablereferencebrowser_arrow">▲</a>
+ <a class="orderablereferencebrowser_arrow">▼</a>
+ <label tal:define="title python: set[0].title_or_id();
+ obj_path python: '/'.join(set[0].getPhysicalPath());">
+ <input type="checkbox"
+ tal:attributes="name string:${fieldName}:list;
+ value python:set[1];"
+ checked="checked" />
- <tal:block replace="python: show_path and '%s (%s)' % (title, obj_path.replace(portal_path, '')) or title" />
- </label>
-
+ <tal:block replace="python: show_path and '%s (%s)' % (title, obj_path.replace(portal_path, '')) or title" />
+ </label>
+ </tal:notempty>
</li>
</ul>
</div>
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model
configuration take the hassle out of deploying and managing Subversion and
the tools developers use with it. Learn more about uberSVN and get a free
download at: http://p.sf.net/sfu/wandisco-dev2dev