]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Opportunities/metadata/subpaneldefs.php
Release 6.5.0
[Github/sugarcrm.git] / modules / Opportunities / 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['Opportunities'] = array(
42         // list of what Subpanels to show in the DetailView
43         'subpanel_setup' => array(
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                         'module'=>'Activities',
52
53                         'top_buttons' => array(
54                                 array('widget_class' => 'SubPanelTopCreateTaskButton'),
55                                 array('widget_class' => 'SubPanelTopScheduleMeetingButton'),
56                                 array('widget_class' => 'SubPanelTopScheduleCallButton'),
57                                 array('widget_class' => 'SubPanelTopComposeEmailButton'),
58                         ),
59
60                         'collection_list' => array(
61                                 'meetings' => array(
62                                         'module' => 'Meetings',
63                                         'subpanel_name' => 'ForActivities',
64                                         'get_subpanel_data' => 'meetings',
65                                 ),
66                                 'tasks' => array(
67                                         'module' => 'Tasks',
68                                         'subpanel_name' => 'ForActivities',
69                                         'get_subpanel_data' => 'tasks',
70                                 ),
71                                 'calls' => array(
72                                         'module' => 'Calls',
73                                         'subpanel_name' => 'ForActivities',
74                                         'get_subpanel_data' => 'calls',
75                                 ),
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                         'module'=>'History',
87
88                         'top_buttons' => array(
89                         array('widget_class' => 'SubPanelTopCreateNoteButton'),
90                         array('widget_class' => 'SubPanelTopArchiveEmailButton'),
91             array('widget_class' => 'SubPanelTopSummaryButton'),
92                         ),
93
94                         'collection_list' => array(
95                                 'meetings' => array(
96                                         'module' => 'Meetings',
97                                         'subpanel_name' => 'ForHistory',
98                                         'get_subpanel_data' => 'meetings',
99                                 ),
100                                 'tasks' => array(
101                                         'module' => 'Tasks',
102                                         'subpanel_name' => 'ForHistory',
103                                         'get_subpanel_data' => 'tasks',
104                                 ),
105                                 'calls' => array(
106                                         'module' => 'Calls',
107                                         'subpanel_name' => 'ForHistory',
108                                         'get_subpanel_data' => 'calls',
109                                 ),
110                                 'notes' => array(
111                                         'module' => 'Notes',
112                                         'subpanel_name' => 'ForHistory',
113                                         'get_subpanel_data' => 'notes',
114                                 ),
115                                 'emails' => array(
116                                         'module' => 'Emails',
117                                         'subpanel_name' => 'ForUnlinkedEmailHistory',
118                         'get_subpanel_data' => 'function:get_emails_by_assign_or_link',
119                                 'function_parameters' => array('import_function_file' => 'include/utils.php', 'link' => 'contacts'),
120                     'generate_select'=>true,
121                                 ),
122                         )
123                 ),
124         'documents' => array(
125             'order' => 25,
126             'module' => 'Documents',
127             'subpanel_name' => 'default',
128             'sort_order' => 'asc',
129             'sort_by' => 'id',
130             'title_key' => 'LBL_DOCUMENTS_SUBPANEL_TITLE',
131             'get_subpanel_data' => 'documents',
132             'top_buttons' =>
133             array (
134                 0 =>
135                 array (
136                     'widget_class' => 'SubPanelTopButtonQuickCreate',
137                     ),
138                 1 =>
139                 array (
140                     'widget_class' => 'SubPanelTopSelectButton',
141                     'mode' => 'MultiSelect',
142                     ),
143                 ),
144         ),
145         'leads' => array(
146                         'order' => 50,
147                         'module' => 'Leads',
148                         'sort_order' => 'asc',
149                         'sort_by' => 'last_name, first_name',
150                         'subpanel_name' => 'default',
151                         'get_subpanel_data' => 'leads',
152                         'add_subpanel_data' => 'lead_id',
153                         'title_key' => 'LBL_LEADS_SUBPANEL_TITLE',
154                         'top_buttons' => array(
155                                 array('widget_class' => 'SubPanelTopCreateLeadNameButton'),
156                                 array('widget_class' => 'SubPanelTopSelectButton',
157                                         'popup_module' => 'Opportunities',
158                                         'mode' => 'MultiSelect',
159                                 ),
160                         ),
161                 ),
162         'contacts' => array(
163                         'order' => 30,
164                         'module' => 'Contacts',
165                         'sort_order' => 'asc',
166                         'sort_by' => 'last_name, first_name',
167                         'subpanel_name' => 'ForOpportunities',
168                         'get_subpanel_data' => 'contacts',
169                         'add_subpanel_data' => 'contact_id',
170                         'title_key' => 'LBL_CONTACTS_SUBPANEL_TITLE',
171                         'top_buttons' => array(
172                                 array('widget_class' => 'SubPanelTopCreateAccountNameButton'),
173                                 array('widget_class' => 'SubPanelTopSelectButton',
174                                         'popup_module' => 'Opportunities',
175                                         'mode' => 'MultiSelect',
176                                         'initial_filter_fields' => array('account_id' => 'account_id', 'account_name' => 'account_name'),
177                                 ),
178                         ),
179                 ),
180
181         'project' => array(
182                         'order' => 70,
183                         'module' => 'Project',
184                         'get_subpanel_data' => 'project',
185                         'sort_order' => 'asc',
186                         'sort_by' => 'name',
187                         'subpanel_name' => 'default',
188                         'title_key' => 'LBL_PROJECTS_SUBPANEL_TITLE',
189                         'top_buttons' => array(
190                                 array('widget_class' => 'SubPanelTopButtonQuickCreate'),
191                                 array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
192                         ),
193                 ),
194
195         ),
196 );
197 ?>