Hi,
I played around with the new Wireless solution (got the hand on a new IPhone 3G)
I wanted to add some additional information in the subpanels.
e.g. if you look up an account I wanted to show the start date in call subpanel.
But that wasn't possible from the start.
Reason was this code in /include/MVC/View/Views/view.wirelessdetail.php - line 87-92.
It's hardcoded that you can only view the name in all subpanels.PHP Code:foreach($subpanel_data['list'] as $data){
if ($count == $wl_list_max_entries_per_subpanel) continue;
$bean_subpanel_data[$subpanel][$data->id] = $data->name;
$count++;
}
I changed it to
to access every element of the $data array.PHP Code:foreach($subpanel_data['list'] as $data){
if ($count == $wl_list_max_entries_per_subpanel) continue;
//$bean_subpanel_data[$subpanel][$data->id] = $data->name;
$bean_subpanel_data[$subpanel][$data->id] = $data;
$count++;
}
To test the change I modified /include/SugarWireless/tpls/wirelessdetail.tpl:
Line #62
toPHP Code:{foreach from=$DATA item=NAME key=ID name="recordlist"}
{if $ID != 'count'}
<li class="{if $smarty.foreach.recordlist.index % 2 == 0}odd{else}even{/if}">
{assign var="module_image" value=$SUBPANEL}
{assign var="dotgif" value=".gif"}
<a href="index.php?module={$SUBPANEL}&record={$ID}&action=wirelessdetail">
<img border=0 src="{sugar_getimagepath file=$module_image$dotgif}">
{$NAME}
</a><br />
</li>
{/if}
{/foreach}
PHP Code:{foreach from=$DATA item=NAME key=ID name="recordlist"}
{if $ID != 'count'}
<li class="{if $smarty.foreach.recordlist.index % 2 == 0}odd{else}even{/if}">
{assign var="module_image" value=$SUBPANEL}
{assign var="dotgif" value=".gif"}
{if $SUBPANEL == "Calls"}
<a href="index.php?module={$SUBPANEL}&record={$ID}&action=wirelessdetail">
<img border=0 src="{sugar_getimagepath file=$module_image$dotgif}">
{$NAME->name}<br />{$NAME->date_start}, {$NAME->status}
</a><br />
{else}
<a href="index.php?module={$SUBPANEL}&record={$ID}&action=wirelessdetail">
<img border=0 src="{sugar_getimagepath file=$module_image$dotgif}">
{$NAME->name}
</a><br />
{/if}
</li>
{/if}
{/foreach}
Both changes are not upgrade save.
Cheers, Tom


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks