From f513e98e88c6603388af1517d9c1757aa628ad07 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Wed, 21 Feb 2007 18:15:36 +0000
Subject: [PATCH] This macro was not working when the selection was not
 initialized yet.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12943 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_skins/erp5_pdf_style/listbox_pdf_macro.xml  | 10 +++++-----
 bt5/erp5_pdf_style/bt/revision                         |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/listbox_pdf_macro.xml b/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/listbox_pdf_macro.xml
index 66294f4ab7..5a09bb02ac 100644
--- a/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/listbox_pdf_macro.xml
+++ b/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/listbox_pdf_macro.xml
@@ -69,15 +69,15 @@
                  editable_columns python:listbox.get_value(\'editable_columns\', REQUEST=request);\n
                  editable_fields python:dict([(column[0], getattr(listbox.aq_parent, \'listbox_%s\' % column[0], None)) for column in editable_columns]);\n
                  selection python:here.portal_selections.getSelectionFor(selection_name, REQUEST=request);\n
-                 is_domain_tree_mode python:selection.domain_tree_mode;\n
-                 is_report_tree_mode python:selection.report_tree_mode;" >\n
+                 is_domain_tree_mode selection/domain_tree_mode | nothing;\n
+                 is_report_tree_mode selection/report_tree_mode | nothing;" >\n
 \n
 \n
     <tal:block tal:condition="python: len(listboxline_list) > 1" >\n
 \n
-      <tal:block tal:condition="python: is_domain_tree_mode"\n
-                 tal:define="domain_list python: selection.getDomainList()">\n
-        <tal:block tal:condition="python: len(domain_list) > 0" >\n
+      <tal:block tal:condition="python: is_domain_tree_mode">\n
+        <tal:block tal:define="domain_list python: selection.getDomainList()"\n
+                   tal:condition="python: len(domain_list) > 0" >\n
         <table style="StandardTableWithGrid">\n
           <tr>\n
             <td tal:attributes="colwidth python:\'%.2fcm\' % float(frame_width)">\n
diff --git a/bt5/erp5_pdf_style/bt/revision b/bt5/erp5_pdf_style/bt/revision
index dec2bf5d61..b5045cc404 100644
--- a/bt5/erp5_pdf_style/bt/revision
+++ b/bt5/erp5_pdf_style/bt/revision
@@ -1 +1 @@
-19
\ No newline at end of file
+21
\ No newline at end of file
-- 
2.30.9