Hi,
I would like to add more than one subpanel in account view with a duplicated module, but when i installed a new duplicated module, it erased account subpanel without keep the original account subpanel :-/
it seems to replaced few arrays of the original subpanel but I changed every word in duplicated declaration![]()
i don't know what i have to modify, if someone could help me please![]()
Thanks in advance,
Alexandre A.
here are the definition of original and duplicated module for account subpanel:
Module InvPostes
accounts_invpostevardefs.php
accountlayout_invpostedefs.phpPHP Code:$dictionary['Account']['fields']['invpostes'] = array (
'name' => 'invpostes',
'type' => 'link',
'relationship' => 'account_invposte',
'module' => 'InvPostes',
'source'=>'non-db',
'vname'=>'LBL_INVPOSTE_SUBPANEL_TITLE',
);
accounts_invposteMetaData.phpPHP Code:$layout_defs['Accounts']['subpanel_setup']['invpostes'] = array(
'order' => 120,
'module' => 'InvPostes',
'subpanel_name' => 'ForAccount',
'get_subpanel_data' => 'invpostes',
//'add_subpanel_data' => 'account_id',
'title_key' => 'LBL_INVPOSTE_SUBPANEL_TITLE',
'refresh_page'=>1,
'sort_order' => 'desc',
'sort_by' => 'name',
'top_buttons' => array(
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'InvPostes'),
),
);
Module InvServeursPHP Code:$dictionary['accounts_invpostes'] = array (
'table' => 'accounts_invpostes',
'fields' => array (
array('name' =>'id', 'type' =>'char', 'len'=>'36', 'required'=>true, 'default'=>'')
, array('name' =>'account_id', 'type' =>'char', 'len'=>'36')
, array('name' =>'invposte_id', 'type' =>'char', 'len'=>'36')
, array ('name' => 'date_modified','type' => 'datetime')
, array('name' =>'deleted', 'type' =>'bool', 'len'=>'1', 'required'=>true, 'default'=>'0')
),
'indices' => array (
array('name' =>'accounts_invpostespk', 'type' =>'primary', 'fields'=>array('id')),
array('name' =>'accounts_idx', 'type' =>'index', 'fields'=>array('account_id')),
array('name' =>'invposte_idx', 'type' =>'index', 'fields'=>array('invposte_id')),
array('name' =>'acc_invp', 'type' =>'alternate_key', 'fields'=>array('account_id','invposte_id'))
),
'relationships' => array (
'accounts_invpostes' =>
array(
'lhs_module'=> 'Accounts',
'lhs_table'=> 'accounts',
'lhs_key' => 'id',
'rhs_module'=> 'InvPostes',
'rhs_table'=> 'invpostes_table',
'rhs_key' => 'client_id',
'relationship_type'=>'many-to-many',
'join_table'=> 'accounts_invpostes',
'join_key_lhs'=>'account_id',
'join_key_rhs'=>'invposte_id'))
);
accounts_invserveurvardefs.php
accountlayout_invserveurdefs.phpPHP Code:$dictionary['Account']['fields']['invserveurs'] = array (
'name' => 'invserveurs',
'type' => 'link',
'relationship' => 'account_invserveur',
'module' => 'InvServeurs',
'source'=>'non-db',
'vname'=>'LBL_INVSERVEUR_SUBPANEL_TITLE',
);
accounts_invserveurMetaData.phpPHP Code:$layout_defs['Accounts']['subpanel_setup']['invserveurs'] = array(
'order' => 120,
'module' => 'InvServeurs',
'subpanel_name' => 'ForAccount',
'get_subpanel_data' => 'invserveurs',
//'add_subpanel_data' => 'account_id',
'title_key' => 'LBL_INVSERVEUR_SUBPANEL_TITLE',
'refresh_page'=>1,
'sort_order' => 'desc',
'sort_by' => 'name',
'top_buttons' => array(
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'InvServeurs'),
),
);
PHP Code:$dictionary['accounts_invserveurs'] = array (
'table' => 'accounts_invserveurs',
'fields' => array (
array('name' =>'id', 'type' =>'char', 'len'=>'36', 'required'=>true, 'default'=>'')
, array('name' =>'account_id', 'type' =>'char', 'len'=>'36')
, array('name' =>'invserveur_id', 'type' =>'char', 'len'=>'36')
, array ('name' => 'date_modified','type' => 'datetime')
, array('name' =>'deleted', 'type' =>'bool', 'len'=>'1', 'required'=>true, 'default'=>'0')
),
'indices' => array (
array('name' =>'accounts_invserveurspk', 'type' =>'primary', 'fields'=>array('id')),
array('name' =>'accounts_idx', 'type' =>'index', 'fields'=>array('account_id')),
array('name' =>'invserveur_idx', 'type' =>'index', 'fields'=>array('invserveur_id')),
array('name' =>'acc_invp', 'type' =>'alternate_key', 'fields'=>array('account_id','invserveur_id'))
),
'relationships' => array (
'accounts_invserveurs' =>
array(
'lhs_module'=> 'Accounts',
'lhs_table'=> 'accounts',
'lhs_key' => 'id',
'rhs_module'=> 'InvServeurs',
'rhs_table'=> 'invserveurs_table',
'rhs_key' => 'client_id',
'relationship_type'=>'many-to-many',
'join_table'=> 'accounts_invserveurs',
'join_key_lhs'=>'account_id',
'join_key_rhs'=>'invserveur_id'))
);


LinkBack URL
About LinkBacks




Reply With Quote
Bookmarks