]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Contacts/metadata/subpaneldefs.php
Release 6.5.0
[Github/sugarcrm.git] / modules / Contacts / 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-2012 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
41 $layout_defs['Contacts'] = array(
42         // list of what Subpanels to show in the DetailView
43                 'subpanel_setup' => array(
44
45                 'activities' => array(
46                         'order' => 10,
47                         'sort_order' => 'desc',
48                         'sort_by' => 'date_start',
49                         'title_key' => 'LBL_ACTIVITIES_SUBPANEL_TITLE',
50                         'type' => 'collection',
51                         'subpanel_name' => 'activities',   //this values is not associated with a physical file.
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                         'collection_list' => array(
61                                 'tasks' => array(
62                                         'module' => 'Tasks',
63                                         'subpanel_name' => 'ForActivities',
64                                         'get_subpanel_data' => 'tasks',
65                                 ),
66                 'tasks_parent' => array(
67                     'module' => 'Tasks',
68                     'subpanel_name' => 'ForActivities',
69                     'get_subpanel_data' => 'tasks_parent',
70                 ),
71                 'meetings' => array(
72                     'module' => 'Meetings',
73                     'subpanel_name' => 'ForActivities',
74                     'get_subpanel_data' => 'meetings',
75                 ),
76                                 'calls' => array(
77                                         'module' => 'Calls',
78                                         'subpanel_name' => 'ForActivities',
79                                         'get_subpanel_data' => 'calls',
80                                 ),
81                         )
82                 ),
83
84                 'history' => array(
85                         'order' => 20,
86                         'sort_order' => 'desc',
87                         'sort_by' => 'date_entered',
88                         'title_key' => 'LBL_HISTORY_SUBPANEL_TITLE',
89                         'type' => 'collection',
90                         'subpanel_name' => 'history',   //this values is not associated with a physical file.
91                         'module'=>'History',
92
93                         'top_buttons' => array(
94                         array('widget_class' => 'SubPanelTopCreateNoteButton'),
95                         array('widget_class' => 'SubPanelTopArchiveEmailButton'),
96             array('widget_class' => 'SubPanelTopSummaryButton'),
97                         ),
98
99                         'collection_list' => array(
100                 'tasks' => array(
101                     'module' => 'Tasks',
102                     'subpanel_name' => 'ForHistory',
103                     'get_subpanel_data' => 'tasks',
104                 ),
105                 'tasks_parent' => array(
106                     'module' => 'Tasks',
107                     'subpanel_name' => 'ForHistory',
108                     'get_subpanel_data' => 'tasks_parent',
109                 ),
110                                 'meetings' => array(
111                                         'module' => 'Meetings',
112                                         'subpanel_name' => 'ForHistory',
113                                         'get_subpanel_data' => 'meetings',
114                                 ),
115                                 'calls' => array(
116                                         'module' => 'Calls',
117                                         'subpanel_name' => 'ForHistory',
118                                         'get_subpanel_data' => 'calls',
119                                 ),
120                                 'notes' => array(
121                                         'module' => 'Notes',
122                                         'subpanel_name' => 'ForHistory',
123                                         'get_subpanel_data' => 'notes',
124                                 ),
125                                 'emails' => array(
126                                         'module' => 'Emails',
127                                         'subpanel_name' => 'ForHistory',
128                                         'get_subpanel_data' => 'emails',
129                                 ),
130                                 'linkedemails' => array(
131                         'module' => 'Emails',
132                         'subpanel_name' => 'ForUnlinkedEmailHistory',
133                         'get_subpanel_data' => 'function:get_unlinked_email_query',
134                         'generate_select'=>true,
135                         'function_parameters' => array('return_as_array'=>'true'),
136                         ),
137                         )
138                 ),
139                 'documents' => array(
140             'order' => 25,
141             'module' => 'Documents',
142             'subpanel_name' => 'default',
143             'sort_order' => 'asc',
144             'sort_by' => 'id',
145             'title_key' => 'LBL_DOCUMENTS_SUBPANEL_TITLE',
146             'get_subpanel_data' => 'documents',
147             'top_buttons' =>
148             array (
149                 0 =>
150                 array (
151                     'widget_class' => 'SubPanelTopButtonQuickCreate',
152                     ),
153                 1 =>
154                 array (
155                     'widget_class' => 'SubPanelTopSelectButton',
156                     'mode' => 'MultiSelect',
157                     ),
158                 ),
159         ),
160                 'leads' => array(
161                         'order' => 60,
162                         'module' => 'Leads',
163                         'sort_order' => 'asc',
164                         'sort_by' => 'last_name, first_name',
165                         'subpanel_name' => 'default',
166                         'get_subpanel_data' => 'leads',
167                         'add_subpanel_data' => 'lead_id',
168                         'title_key' => 'LBL_LEADS_SUBPANEL_TITLE',
169                         'top_buttons' => array(
170                                 array('widget_class' => 'SubPanelTopCreateLeadNameButton'),
171                                 array('widget_class' => 'SubPanelTopSelectButton',
172                                         'popup_module' => 'Opportunities',
173                                         'mode' => 'MultiSelect',
174                                 ),
175                         ),
176                 ),
177                 'opportunities' => array(
178                         'order' => 30,
179                         'module' => 'Opportunities',
180                         'sort_order' => 'desc',
181                         'sort_by' => 'date_closed',
182                         'subpanel_name' => 'default',
183                         'get_subpanel_data' => 'opportunities',
184                         'add_subpanel_data' => 'opportunity_id',
185                         'title_key' => 'LBL_OPPORTUNITIES_SUBPANEL_TITLE',
186                         'top_buttons' => array(
187                                 array('widget_class' => 'SubPanelTopButtonQuickCreate'),
188                                 array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
189                         ),
190                 ),
191                 'cases' => array(
192                         'order' => 80,
193                         'sort_order' => 'desc',
194                         'sort_by' => 'case_number',
195                         'module' => 'Cases',
196                         'subpanel_name' => 'default',
197                         'get_subpanel_data' => 'cases',
198                         'add_subpanel_data' => 'case_id',
199                         'title_key' => 'LBL_CASES_SUBPANEL_TITLE',
200                         'top_buttons' => array(
201                                 array('widget_class' => 'SubPanelTopButtonQuickCreate'),
202                                 array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
203                         ),
204                 ),
205                 'bugs' => array(
206                         'order' => 90,
207                         'module' => 'Bugs',
208                         'sort_order' => 'desc',
209                         'sort_by' => 'bug_number',
210                         'subpanel_name' => 'default',
211                         'get_subpanel_data' => 'bugs',
212                         'add_subpanel_data' => 'bug_id',
213                         'title_key' => 'LBL_BUGS_SUBPANEL_TITLE',
214                         'top_buttons' => array(
215                                 array('widget_class' => 'SubPanelTopButtonQuickCreate'),
216                                 array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
217                         ),
218                 ),
219                 'contacts' => array(
220                         'order' => 100,
221                         'module' => 'Contacts',
222                         'sort_order' => 'asc',
223                         'sort_by' => 'last_name, first_name',
224                         'subpanel_name' => 'ForContacts',
225                         'get_subpanel_data' => 'direct_reports',
226                         'add_subpanel_data' => 'contact_id',
227                         'title_key' => 'LBL_DIRECT_REPORTS_SUBPANEL_TITLE',
228                         'top_buttons' => array(
229                                 array('widget_class' => 'SubPanelTopButtonQuickCreate'),
230                                 array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
231                         ),
232                 ),
233                 'project' => array(
234                         'order' => 110,
235                         'module' => 'Project',
236                         'sort_order' => 'asc',
237                         'sort_by' => 'name',
238                         'get_subpanel_data' => 'project',
239                         'subpanel_name' => 'default',
240                         'title_key' => 'LBL_PROJECTS_SUBPANEL_TITLE',
241                         'top_buttons' => array(
242                                 array('widget_class' => 'SubPanelTopButtonQuickCreate'),
243                                 array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect'),
244                         ),
245                 ),
246         'campaigns' => array(
247                         'order' => 70,
248                         'module' => 'CampaignLog',
249                         'sort_order' => 'desc',
250                         'sort_by' => 'activity_date',
251                         'get_subpanel_data'=>'campaigns',
252                         'subpanel_name' => 'ForTargets',
253                         'title_key' => 'LBL_CAMPAIGN_LIST_SUBPANEL_TITLE',
254                 ),
255         ),
256 );
257 ?>