Open aureh12 opened 5 years ago
@Abuelodelanada this is similar to the PR you made recently...
Hi @pgorod
Yes it's similar to #8148 Do you know if it's going to be merged?
Not for this release, I am afraid. It's been too delayed by the problems with the installer, we just need to get it out the door asap...
Issue
HTML code that build subpanels does not give a type for each cell of the rows. Because of that, we cannot do anything for the display of the data. For example, we can not use CSS to Align Text Right the numbers in subpanels. (types: int: decimal, float, etc.)
Expected Behavior
It should be like in Listview, each TD cell in the table has a type. In Opportunities list, we can see that the cell for name has a type NAME and the cell for probability has a type INT.
<td align="left" valign="top" type="name" field="name" class=" "><b><a href="index.php?module=Opportunities&offset=1&stamp=1572592592045537500&return_module=Opportunities&action=DetailView&record=10d0dedd-6355-a12a-4718-566e925e1d15"> Lamp v2</a></b></td>
and<td align="left" valign="top" type="int" field="probability" class="hidden-xs hidden-sm "> 100</td>
Actual Behavior
The HML code for subpanels cells is very simple:
<td style="display: table-cell;">Test opportunity</td>
Possible Fix
add
$coltypes[$field_name]=$fieldType;
before$tmpField = SugarFieldHandler::getSugarField($fieldType, true);
and
add
$this->smartyTemplate->assign('COLTYPES', $coltypes);
before$this->smartyTemplate->assign('ROWS', $widget_contents);
replace
<td>{$cell}</td>
by<td type="{$COLTYPES.$colHeader}">{$cell}</td>
The result will be :
<td type="enum" style="display: table-cell;">Products</td>
Steps to Reproduce
Context
Your Environment