]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Project/metadata/subpaneldefs.php
Release 6.5.0
[Github/sugarcrm.git] / modules / Project / 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
42 global $modules_exempt_from_availability_check;
43 $modules_exempt_from_availability_check = array('Holidays'=>'Holidays',
44                                                                                                 'Tasks'=>'Tasks',
45                                                                                                 'Calls'=>'Calls',
46                                                                                                 'Meetings'=>'Meetings',
47                                                                                                 'History'=>'History',
48                                                                                                 'Notes'=>'Notes',
49                                                                                                 'Emails'=>'Emails',
50                                                                                                 'ProjectTask'=>'ProjectTask',
51                                                                                                 'Users'=>'Users',
52                                                                                            );
53
54 $layout_defs['Project'] = array(
55         // list of what Subpanels to show in the DetailView
56         'subpanel_setup' => array(
57
58        'projecttask' => array(
59                         'order' => 20,
60                         'sort_order' => 'asc',
61                         'sort_by' => 'project_task_id',
62                         'module' => 'ProjectTask',
63                         'top_buttons' => array(
64                                 array('widget_class' => 'SubPanelTopCreateButton', ),
65                         ),
66                         'subpanel_name' => 'default',
67                         'title_key' => 'LBL_PROJECT_TASKS_SUBPANEL_TITLE',
68                         'get_subpanel_data' => 'projecttask',
69                 ),
70
71                 'activities' => array(
72                         'order' => 40,
73                         'sort_order' => 'desc',
74                         'sort_by' => 'date_start',
75                         'title_key' => 'LBL_ACTIVITIES_SUBPANEL_TITLE',
76                         'type' => 'collection',
77                         'subpanel_name' => 'activities',   //this values is not associated with a physical file.
78                         'module'=>'Activities',
79
80                         'top_buttons' => array(
81                                 array('widget_class' => 'SubPanelTopCreateTaskButton'),
82                                 array('widget_class' => 'SubPanelTopScheduleMeetingButton'),
83                                 array('widget_class' => 'SubPanelTopScheduleCallButton'),
84                                 array('widget_class' => 'SubPanelTopComposeEmailButton'),
85                         ),
86
87                         'collection_list' => array(
88                                 'meetings' => array(
89                                         'module' => 'Meetings',
90                                         'subpanel_name' => 'ForActivities',
91                                         'get_subpanel_data' => 'meetings',
92                                 ),
93                                 'tasks' => array(
94                                         'module' => 'Tasks',
95                                         'subpanel_name' => 'ForActivities',
96                                         'get_subpanel_data' => 'tasks',
97                                 ),
98                                 'calls' => array(
99                                         'module' => 'Calls',
100                                         'subpanel_name' => 'ForActivities',
101                                         'get_subpanel_data' => 'calls',
102                                 ),
103                         ),
104                 ),
105
106                 'history' => array(
107                         'order' => 50,
108                         'sort_order' => 'desc',
109                         'sort_by' => 'date_entered',
110                         'title_key' => 'LBL_HISTORY_SUBPANEL_TITLE',
111                         'type' => 'collection',
112                         'subpanel_name' => 'history',   //this values is not associated with a physical file.
113                         'module'=>'History',
114
115                         'top_buttons' => array(
116                         array('widget_class' => 'SubPanelTopCreateNoteButton'),
117                         array('widget_class' => 'SubPanelTopArchiveEmailButton'),
118             array('widget_class' => 'SubPanelTopSummaryButton'),
119                         ),
120
121                         'collection_list' => array(
122                                 'meetings' => array(
123                                         'module' => 'Meetings',
124                                         'subpanel_name' => 'ForHistory',
125                                         'get_subpanel_data' => 'meetings',
126                                 ),
127                                 'calls' => array(
128                                         'module' => 'Calls',
129                                         'subpanel_name' => 'ForHistory',
130                                         'get_subpanel_data' => 'calls',
131                                 ),
132                                 'tasks' => array(
133                                         'module' => 'Tasks',
134                                         'subpanel_name' => 'ForHistory',
135                                         'get_subpanel_data' => 'tasks',
136                                 ),
137                                 'notes' => array(
138                                         'module' => 'Notes',
139                                         'subpanel_name' => 'ForHistory',
140                                         'get_subpanel_data' => 'notes',
141                                 ),
142                                 'emails' => array(
143                                         'module' => 'Emails',
144                                         'subpanel_name' => 'ForHistory',
145                                         'get_subpanel_data' => 'emails',
146                                 ),
147                         )
148                 ),
149         'contacts' => array(
150             'top_buttons' => array(
151                             array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Contacts'),
152                  ),
153                         'order' => 60,
154                         'module' => 'Contacts',
155                         'sort_order' => 'asc',
156                         'sort_by' => 'last_name, first_name',
157                         'subpanel_name' => 'default',
158                         'get_subpanel_data' => 'contacts',
159                         'add_subpanel_data' => 'contact_id',
160                         'title_key' => 'LBL_CONTACTS_SUBPANEL_TITLE',
161                 ),
162
163       'accounts' => array(
164             'top_buttons' => array(
165                             array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Accounts'),
166                  ),
167                         'order' => 70,
168                         'module' => 'Accounts',
169                         'sort_order' => 'asc',
170                         'sort_by' => 'name',
171                         'subpanel_name' => 'default',
172                         'get_subpanel_data' => 'accounts',
173                         'add_subpanel_data' => 'account_id',
174                         'title_key' => 'LBL_ACCOUNTS_SUBPANEL_TITLE',
175                 ),
176                 'opportunities' => array(
177             'top_buttons' => array(
178                             array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Opportunities'),
179                  ),
180                         'order' => 80,
181                         'module' => 'Opportunities',
182                         'sort_order' => 'desc',
183                         'sort_by' => 'date_closed',
184                         'subpanel_name' => 'default',
185                         'get_subpanel_data' => 'opportunities',
186                         'add_subpanel_data' => 'opportunity_id',
187                         'title_key' => 'LBL_OPPORTUNITIES_SUBPANEL_TITLE',
188                 ),
189         'cases' => array(
190             'top_buttons' => array(
191                 array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Cases'),
192              ),
193             'order' => 110,
194             'module' => 'Cases',
195             'sort_order' => 'desc',
196             'sort_by' => 'case_number',
197             'subpanel_name' => 'default',
198             'get_subpanel_data' => 'cases',
199             'add_subpanel_data' => 'case_id',
200             'title_key' => 'LBL_CASES_SUBPANEL_TITLE',
201         ),
202         'bugs' => array(
203             'top_buttons' => array(
204                 array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Bugs'),
205              ),
206             'order' => 120,
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         ),
215    ),
216 );
217 $layout_defs['ProjectTemplates'] = array(
218         // list of what Subpanels to show in the DetailView
219         'subpanel_setup' => array(
220        'projecttask' => array(
221                         'top_buttons' => array(
222                                 array('widget_class' => 'SubPanelEditProjectTasksButton', ),
223                         ),
224                         'order' => 10,
225                         'sort_order' => 'desc',
226                         'sort_by' => 'id',
227                         'module' => 'ProjectTask',
228                         'subpanel_name' => 'default',
229                         'title_key' => 'LBL_PROJECT_TASKS_SUBPANEL_TITLE',
230                         'get_subpanel_data' => 'projecttask',
231                 ),
232
233         ),
234 );
235
236
237 ?>