In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
786 [In-Portal CMS] Admin Interfaces bug report always 2010-06-25 13:21 2010-11-30 12:48
alex  
alex  
normal  
closed 5.1.0-RC1  
fixed  
 
none 5.1.1-B1  
http://groups.google.com/group/in-portal-bugs/browse_thread/thread/beac2e175d0c347d
0
0000786: Column totals block customization issues
Recently I was trying to create custom block to display totals under one of the columns in grid I was working on.

Here are several problems I'm came across trying to do that:

    * attempt to define block and give it's name in "total_block" in column definition failed (code doesn't even look there)
    * I somehow managed to get it working, but I asked me to place "'" (single quotes) around inside my block, plus placing "," after that all.

I've managed to fix that inconsistencies and here is the patch.

To Test:

   1. Add totals_render_as="grid_total_row" parameter to "grid" block rendering
   2. Add totals="SUM" on any reasonable field
   3. Add total_block="grid_custom_total_td" to that field definition in grid

Now you must see that custom block content as total under your column. If custom block isn't defined, then default block must be shown (verify that too).

Same override problem issue with column header block (that one with sorting arrow). Combined patch attached for both issues.
parent of 0000813closed  (5.1.1)alex Support of "currency" parameter for "FieldTotal" tag 
parent of 0000858closed  (5.1.1)alex Blank screen, when visiting "Topics" and "Products" list in "Show All" mode 
related to 0000811closed  (5.1.1)alex Move grid total function definition to grid 
patch grid_block_override(totals_and_header)_fix.patch (6,164) 2010-06-25 13:21
http://tracker.in-portal.org/file_download.php?file_id=657&type=bug
patch grid_block_override(totals_and_header)_fix_v2.patch (11,014) 2010-08-02 15:59
http://tracker.in-portal.org/file_download.php?file_id=699&type=bug
Issue History
2010-11-30 12:48 Dmitry Note Added: 0003069
2010-11-30 12:48 Dmitry Status resolved => closed
2010-09-11 13:16 alex Relationship added parent of 0000858
2010-08-28 16:20 alex Note Added: 0002715
2010-08-28 16:20 alex Status reviewed and tested => resolved
2010-08-28 16:20 alex Fixed in Version => 5.1.1-B1
2010-08-28 16:20 alex Resolution open => fixed
2010-08-28 16:20 alex Changeset attached 5.1.x r13883
2010-08-02 16:29 Dmitry Note Added: 0002652
2010-08-02 16:29 Dmitry Assigned To !COMMUNITY => alex
2010-08-02 16:29 Dmitry Status needs testing => reviewed and tested
2010-08-02 15:59 alex Assigned To alex => !COMMUNITY
2010-08-02 15:59 alex Status needs work => needs testing
2010-08-02 15:59 alex File Added: grid_block_override(totals_and_header)_fix_v2.patch
2010-08-02 10:50 Dmitry Note Added: 0002640
2010-08-02 10:49 Dmitry Note Added: 0002639
2010-08-02 10:49 Dmitry Assigned To !COMMUNITY => alex
2010-08-02 10:49 Dmitry Status needs testing => needs work
2010-07-31 13:19 Dmitry Target Version Icebox => 5.1.1
2010-07-29 06:44 alex Relationship added parent of 0000813
2010-07-23 16:44 alex Relationship added related to 0000811
2010-06-25 13:21 alex Assigned To => !COMMUNITY
2010-06-25 13:21 alex Developer => alex
2010-06-25 13:21 alex Status active => needs testing
2010-06-25 13:21 alex New Issue
2010-06-25 13:21 alex File Added: grid_block_override(totals_and_header)_fix.patch
2010-06-25 13:21 alex Reference => http://groups.google.com/group/in-portal-bugs/browse_thread/thread/beac2e175d0c347d

Notes
(0002639)
Dmitry   
2010-08-02 10:49   
I have issues with applying this patch, in particular this part is problematic:

[code]
@@ -672,7 +675,7 @@
 <inp2:m_DefineElement name="grid_total_row">
     GridScrollers['<inp2:m_param name="PrefixSpecial"/>'].SetFooter(
         [
- [' ', <inp2:IterateGridFields grid="$grid" mode="total" force_block="$totals_block" ajax="$ajax"/>]
+ [' ', <inp2:IterateGridFields grid="$grid" mode="total" force_block="grid_js_total_td" ajax="$ajax"/>]
         ]
     );
 </inp2:m_DefineElement>
[/code]

Additionally can we make sure it can be applied along with 0000813 and 0000811 without any conflicts?
(0002640)
Dmitry   
2010-08-02 10:50   
Reminder sent to: alex

Please see my prev. above.
(0002652)
Dmitry   
2010-08-02 16:29   
Tested okay, please commit.
(0002715)
alex   
2010-08-28 16:20   
Fix committed to 5.1.x branch. Commit Message:

Fixes 0000786: Column totals block customization issues
(0003069)
Dmitry   
2010-11-30 12:48   
Closing released 5.1.1 task.