Index: trunk/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r4225 -r4287 --- trunk/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 4225) +++ trunk/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 4287) @@ -140,6 +140,14 @@ return $o; } + function GridFieldsCount($params) + { + $grids = $this->Application->getUnitOption($this->Prefix, 'Grids'); + $grid_config = $grids[$params['grid']]['Fields']; + + return count($grid_config); + } + /** * Prints list content using block specified * @@ -288,8 +296,9 @@ $direction = (isset($params['direction']) && $params['direction']=="H")?"H":"V"; $columns = (isset($params['columns'])) ? $params['columns'] : 1; + $id_field = (isset($params['id_field'])) ? $params['id_field'] : $this->Application->getUnitOption($this->Prefix, 'IDField'); - + if ($columns>1 && $direction=="V") { $list->Records = $this->LinearToVertical($list->Records, $columns, $list->GetPerPage()); $list->SelectedCount=count($list->Records); @@ -301,7 +310,7 @@ $block_params=$this->prepareTagParams($params); $block_params['name']=$this->SelectParam($params, 'render_as,block'); $block_params['pass_params']='true'; - + $block_params['column_width'] = 100 / $columns; $block_start_row_params=$this->prepareTagParams($params); $block_start_row_params['name'] = $this->SelectParam($params, 'row_start_render_as,block_row_start,row_start_block'); @@ -325,7 +334,7 @@ } if (!$list->getCurrentRecord()){ - $o.= $block_empty_cell_params['name'] ? $this->Application->ParseBlock($block_params, 1) : ' '; + $o.= $block_empty_cell_params['name'] ? $this->Application->ParseBlock($block_empty_cell_params, 1) : ' '; } else { $o.= $this->Application->ParseBlock($block_params, 1); @@ -1334,6 +1343,7 @@ if ($temp_tables && $modified) { $block_params = $this->prepareTagParams($params); $block_params['name'] = $this->SelectParam($params, 'render_as,name'); + $block_params['edit_mode'] = $temp_tables ? 1 : 0; return $this->Application->ParseBlock($block_params); } $this->Application->RemoveVar($top_prefix.'_modified');