Hi
Well, I also wanted to modify the Targets sub-panel that is present in TargetLists in order to view the column 'Account Name' in the list.
So I looked at the the Prospectlists subpaneldefs file [/modules/ProspectLists/metadata/subpaneldefs.php] and noticed that with user and account subpanels definitions, the 'subpanel_name' was equal to 'ForProspectLists' and not 'default ' as was the case for the other subpanels.
I therefore created a 'ForProspectLists' of my own, based on the original Prospects 'default' version - simply adding an account field definition to the mix.
Here's the modified [/modules/ProspectLists/metadata/subpaneldefs.php]
Code:
'subpanel_setup' => array(
'prospects' => array(
'order' => 10,
'sort_by' => 'last_name',
'sort_order' => 'asc',
'module' => 'Prospects',
'subpanel_name' => 'ForProspectLists',
'get_subpanel_data' => 'prospects',
'title_key' => 'LBL_PROSPECTS_SUBPANEL_TITLE',
'top_buttons' => array(
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
array('widget_class'=>'SubPanelTopSelectButton','mode'=>'MultiSelect'),
(...)
Here's the [/modules/Prospects/metadata/subpanels/ForProspectLists.php]
Code:
$subpanel_layout = array(
'top_buttons' => array(
array('widget_class'=>'SubPanelTopCreateButton'),
array('widget_class'=>'SubPanelTopSelectButton'),
),
'where' => '',
'list_fields'=> array(
'first_name' => array(
'usage' => 'query_only',
),
'last_name' => array(
'usage' => 'query_only',
),
'full_name'=>array(
'vname' => 'LBL_LIST_NAME',
'widget_class' => 'SubPanelDetailViewLink',
'width' => '25%',
'sort_by' => 'last_name',
),
'title'=>array(
'vname' => 'LBL_LIST_TITLE',
'width' => '17%',
),
'account_name'=>array (
'type' => 'varchar',
'label' => 'LBL_ACCOUNT_NAME',
'width' => '25%',
'default' => true,
),
'email1'=>array(
'vname' => 'LBL_LIST_EMAIL_ADDRESS',
'width' => '15%',
'widget_class' => 'SubPanelEmailLink',
),
'phone_work'=>array(
'vname' => 'LBL_LIST_PHONE',
'width' => '10%',
),
'edit_button'=>array(
'vname' => 'LBL_EDIT_BUTTON',
'widget_class' => 'SubPanelEditButton',
'module' => 'Contacts',
'width' => '4%',
),
'remove_button'=>array(
'vname' => 'LBL_REMOVE',
'widget_class' => 'SubPanelRemoveButton',
'module' => 'Contacts',
'width' => '4%',
),
),
); The only issue of course is that this modification isn't upgrade safe.
If someone with more experience could point us in the right direction then this could become quite a useful update.
yann
Bookmarks