]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Accounts/metadata/subpaneldefs.php
Release 6.2.0
[Github/sugarcrm.git] / modules / Accounts / metadata / subpaneldefs.php
1 <?php
2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
4  * SugarCRM Community Edition is a customer relationship management program developed by
5  * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
6  * 
7  * This program is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU Affero General Public License version 3 as published by the
9  * Free Software Foundation with the addition of the following permission added
10  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
11  * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
12  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13  * 
14  * This program is distributed in the hope that it will be useful, but WITHOUT
15  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
17  * details.
18  * 
19  * You should have received a copy of the GNU Affero General Public License along with
20  * this program; if not, see http://www.gnu.org/licenses or write to the Free
21  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22  * 02110-1301 USA.
23  * 
24  * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
25  * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26  * 
27  * The interactive user interfaces in modified source and object code versions
28  * of this program must display Appropriate Legal Notices, as required under
29  * Section 5 of the GNU Affero General Public License version 3.
30  * 
31  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
32  * these Appropriate Legal Notices must retain the display of the "Powered by
33  * SugarCRM" logo. If the display of the logo is not reasonably feasible for
34  * technical reasons, the Appropriate Legal Notices must display the words
35  * "Powered by SugarCRM".
36  ********************************************************************************/
37
38
39
40 $layout_defs['Accounts'] = array(
41         // list of what Subpanels to show in the DetailView 
42         'subpanel_setup' => array(
43
44                 'activities' => array(
45                         'order' => 10,
46                         'sort_order' => 'desc',
47                         'sort_by' => 'date_start',
48                         'title_key' => 'LBL_ACTIVITIES_SUBPANEL_TITLE',
49                         'type' => 'collection',
50                         'subpanel_name' => 'activities',   //this values is not associated with a physical file.
51                         'header_definition_from_subpanel'=> 'meetings',
52                         'module'=>'Activities',
53                         
54                         'top_buttons' => array(
55                                 array('widget_class' => 'SubPanelTopCreateTaskButton'),
56                                 array('widget_class' => 'SubPanelTopScheduleMeetingButton'),
57                                 array('widget_class' => 'SubPanelTopScheduleCallButton'),
58                                 array('widget_class' => 'SubPanelTopComposeEmailButton'),
59                         ),      
60                                         
61                         'collection_list' => array(     
62                                 'tasks' => array(
63                                         'module' => 'Tasks',
64                                         'subpanel_name' => 'ForActivities',
65                                         'get_subpanel_data' => 'tasks',
66                                 ),
67                 'meetings' => array(
68                     'module' => 'Meetings',
69                     'subpanel_name' => 'ForActivities',
70                     'get_subpanel_data' => 'meetings',
71                 ),
72                                 'calls' => array(
73                                         'module' => 'Calls',
74                                         'subpanel_name' => 'ForActivities',
75                                         'get_subpanel_data' => 'calls',
76                                 ),
77                         )                       
78                 ),
79                 'history' => array(
80                         'order' => 20,
81                         'sort_order' => 'desc',
82                         'sort_by' => 'date_entered',
83                         'title_key' => 'LBL_HISTORY_SUBPANEL_TITLE',
84                         'type' => 'collection',
85                         'subpanel_name' => 'history',   //this values is not associated with a physical file.
86                         'header_definition_from_subpanel'=> 'meetings',
87                         'module'=>'History',
88                         
89                         'top_buttons' => array(
90                                 array('widget_class' => 'SubPanelTopCreateNoteButton'),
91                                 array('widget_class' => 'SubPanelTopArchiveEmailButton'),
92                 array('widget_class' => 'SubPanelTopSummaryButton'),
93                         ),      
94                                         
95                         'collection_list' => array(     
96                                 'tasks' => array(
97                                         'module' => 'Tasks',
98                                         'subpanel_name' => 'ForHistory',
99                                         'get_subpanel_data' => 'tasks',
100                                 ),
101                 'meetings' => array(
102                     'module' => 'Meetings',
103                     'subpanel_name' => 'ForHistory',
104                     'get_subpanel_data' => 'meetings',
105                 ),
106                                 'calls' => array(
107                                         'module' => 'Calls',
108                                         'subpanel_name' => 'ForHistory',
109                                         'get_subpanel_data' => 'calls',
110                                 ),
111                                 'notes' => array(
112                                         'module' => 'Notes',
113                                         'subpanel_name' => 'ForHistory',
114                                         'get_subpanel_data' => 'notes',
115                                 ),      
116                                 'emails' => array(
117                                         'module' => 'Emails',
118                                         'subpanel_name' => 'ForHistory',
119                                         'get_subpanel_data' => 'emails',
120                                 ),      
121                                 'linkedemails' => array(
122                         'module' => 'Emails',
123                         'subpanel_name' => 'ForUnlinkedEmailHistory',
124                         'get_subpanel_data' => 'function:get_unlinked_email_query',
125                         'generate_select'=>true,
126                         'function_parameters' => array('return_as_array'=>'true'),
127                         ),          
128                         )                       
129                 ),
130         'documents' => array(
131             'order' => 25,
132             'module' => 'Documents',
133             'subpanel_name' => 'default',
134             'sort_order' => 'asc',
135             'sort_by' => 'id',
136             'title_key' => 'LBL_DOCUMENTS_SUBPANEL_TITLE',
137             'get_subpanel_data' => 'documents',
138             'top_buttons' => 
139             array (
140                 0 => 
141                 array (
142                     'widget_class' => 'SubPanelTopButtonQuickCreate',
143                     ),
144                 1 => 
145                 array (
146                     'widget_class' => 'SubPanelTopSelectButton',
147                     'mode' => 'MultiSelect',
148                     ),
149                 ),
150         ),
151                 'contacts' => array(
152                         'order' => 30,
153                         'module' => 'Contacts',
154                         'sort_order' => 'asc',
155                         'sort_by' => 'last_name, first_name',
156                         'subpanel_name' => 'ForAccounts',
157                         'get_subpanel_data' => 'contacts',
158                         'add_subpanel_data' => 'contact_id',
159                         'title_key' => 'LBL_CONTACTS_SUBPANEL_TITLE',
160                         'top_buttons' => array(
161                                 array('widget_class' => 'SubPanelTopCreateAccountNameButton'),
162                                 array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
163                         ),
164
165                 ),              
166                 'opportunities' => array(
167                         'order' => 40,
168                         'module' => 'Opportunities',
169                         'subpanel_name' => 'ForAccounts',
170                         'sort_order' => 'desc',
171                         'sort_by' => 'date_closed',
172                         'get_subpanel_data' => 'opportunities',
173                         'add_subpanel_data' => 'opportunity_id',
174                         'title_key' => 'LBL_OPPORTUNITIES_SUBPANEL_TITLE',
175                         'top_buttons' => array(
176                                 array('widget_class' => 'SubPanelTopButtonQuickCreate')
177                         ),
178                 ),
179                 'leads' => array(
180                         'order' => 80,
181                         'module' => 'Leads',
182                         'sort_order' => 'asc',
183                         'sort_by' => 'last_name, first_name',
184                         'subpanel_name' => 'default',
185                         'get_subpanel_data' => 'leads',
186                         'add_subpanel_data' => 'lead_id',
187                         'title_key' => 'LBL_LEADS_SUBPANEL_TITLE',
188                         'top_buttons' => array(
189                                 array('widget_class' => 'SubPanelTopCreateLeadNameButton'),
190                                 array('widget_class' => 'SubPanelTopSelectButton',
191                                         'popup_module' => 'Opportunities',
192                                         'mode' => 'MultiSelect', 
193                                 ),
194                         ),
195                         
196                 ),
197                 'cases' => array(
198                         'order' => 100,
199                         'sort_order' => 'desc',
200                         'sort_by' => 'case_number',
201                         'module' => 'Cases',
202                         'subpanel_name' => 'ForAccounts',
203                         'get_subpanel_data' => 'cases',
204                         'add_subpanel_data' => 'case_id',
205                         'title_key' => 'LBL_CASES_SUBPANEL_TITLE',
206                         'top_buttons' => array(
207                                 array('widget_class' => 'SubPanelTopButtonQuickCreate'),
208                                 array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
209                         ),
210                 ),
211                 'accounts' => array(
212                         'order' => 90,
213                         'sort_order' => 'asc',
214                         'sort_by' => 'name',
215                         'module' => 'Accounts',
216                         'subpanel_name' => 'default',
217                         'get_subpanel_data' => 'members',
218                         'add_subpanel_data' => 'member_id',
219                         'title_key' => 'LBL_MEMBER_ORG_SUBPANEL_TITLE',
220                         'top_buttons' => array(
221                                 array('widget_class' => 'SubPanelTopButtonQuickCreate'),
222                                 array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
223                         ),
224                 ),
225                 'bugs' => array(
226                         'order' => 110,
227                         'sort_order' => 'desc',
228                         'sort_by' => 'bug_number',
229                         'module' => 'Bugs',
230                         'subpanel_name' => 'default',
231                         'get_subpanel_data' => 'bugs',
232                         'add_subpanel_data' => 'bug_id',
233                         'title_key' => 'LBL_BUGS_SUBPANEL_TITLE',
234                         'top_buttons' => array(
235                                 array('widget_class' => 'SubPanelTopButtonQuickCreate'),
236                                 array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
237                         ),
238                 ),
239                 'project' => array(
240                         'order' => 120,
241                         'sort_order' => 'asc',
242                         'sort_by' => 'name',
243                         'module' => 'Project',
244                         'subpanel_name' => 'default',
245                         'get_subpanel_data' => 'project',
246                         'add_subpanel_data' => 'project_id',
247                         'title_key' => 'LBL_PROJECTS_SUBPANEL_TITLE',
248                         'top_buttons' => array(
249                                 array('widget_class' => 'SubPanelTopButtonQuickCreate'),
250                                 array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect'),
251                         ),
252                 ),
253         'campaigns' => array(
254                         'order' => 70,
255                         'module' => 'CampaignLog',
256                         'sort_order' => 'desc',
257                         'sort_by' => 'activity_date',
258                         'get_subpanel_data'=>'campaigns',
259                         'subpanel_name' => 'ForTargets',
260                         'title_key' => 'LBL_CAMPAIGNS', 
261                 ),              
262         ),
263 );
264 ?>