Utilisation de la taille du batch par défaut.
authorBenoît Pin <benoit.pin@gmail.com>
Sun, 7 Nov 2010 02:33:14 +0000 (03:33 +0100)
committerBenoît Pin <benoit.pin@gmail.com>
Sun, 7 Nov 2010 02:33:14 +0000 (03:33 +0100)
skins/content/list_pending_contents.pt
skins/custom_content/topic_view.pt
skins/custom_generic/folder_contents.py
skins/generic/search_results_template.pt

index 04ea27f..2c0ae52 100644 (file)
@@ -19,7 +19,7 @@
                                                                        arrow python:test(sorted_dir=='up', 'arrowUp.gif', 'arrowDown.gif');
                                                              sortedItems python: here.sort_folder_contents(items, sorted_field, sorted_dir);
                     Batch python:modules['Products.Plinn'].Batch;
-                    batch python:Batch(sortedItems, 50, request.get('b_start', 0), orphan=0)">
+                    batch python:Batch(sortedItems, here.default_batch_size, request.get('b_start', 0), orphan=0)">
     <h2 i18n:translate="">Pending documents</h2>
     <div metal:use-macro="here/batch_macros/macros/navigation">batch navigation</div>
     <table class="listing" cellspacing="0">
index 495b40c..0e9a91b 100755 (executable)
@@ -20,7 +20,7 @@
             b_start string:0;b_start request/b_start | b_start;
             results here/queryCatalog;
             Batch python:modules['Products.Plinn'].Batch;
-            global batch python:Batch(results, 20, int(b_start), orphan=1)" class="listing" cellspacing="0">
+            global batch python:Batch(results, here.default_batch_size, int(b_start), orphan=1)" class="listing" cellspacing="0">
           <tr>
             <td colspan="2"><span metal:use-macro="here/batch_macros/macros/navigation">batch navigation</span></td>
           </tr>
index 1735b4d..26fa044 100644 (file)
@@ -174,7 +174,7 @@ items = context.listNearestFolderContents(contentFilter=filter)
 sort_dir = reverse and 'desc' or 'asc'
 sortFunc = key in ['Type', 'title_or_id'] and 'nocase' or 'cmp'
 items = sequence.sort( items, ((key, sortFunc, sort_dir),) )
-batch_obj = Batch(items, 20, b_start, orphan=0, quantumleap=1)
+batch_obj = Batch(items, context.default_batch_size, b_start, orphan=0, quantumleap=1)
 items = []
 i = 1
 display_delete_button = False
index 9532dc4..006a2bd 100644 (file)
@@ -11,7 +11,7 @@
                           stext request/SearchableText|nothing;
                           resultsLength options/resultsLength;
                           Batch python:modules['Products.Plinn'].Batch;
-                          batch python:Batch(results, 20, b_start, orphan=1, quantumleap=1);
+                          batch python:Batch(results, here.default_batch_size, b_start, orphan=1, quantumleap=1);
                           mch nocall:options/makeColumnHeader">
       <h2 i18n:translate="">Search Results</h2>
       <div tal:condition="resultsLength" tal:omit-tag="">