2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
4 * SugarCRM is a customer relationship management program developed by
5 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
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.
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
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
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.
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.
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 ********************************************************************************/
41 $layout_defs['History'] = array(
42 // default subpanel provided by this SugarBean
43 'default_subpanel_define' => array(
44 'subpanel_title' => 'LBL_DEFAULT_SUBPANEL_TITLE',
45 'top_buttons' => array(
46 array('widget_class' => 'SubPanelTopCreateNoteButton'),
47 array('widget_class' => 'SubPanelTopArchiveEmailButton'),
48 array('widget_class' => 'SubPanelTopSummaryButton'),
51 //TODO try and merge with the activities
52 'list_fields' => array(
57 'widget_class' => 'SubPanelIcon',
58 'module' => 'Meetings',
63 'vname' => 'LBL_LIST_SUBJECT',
64 'widget_class' => 'SubPanelDetailViewLink',
69 'vname' => 'LBL_LIST_STATUS',
73 'name' => 'contact_name',
74 'module' => 'Contacts',
75 'widget_class' => 'SubPanelDetailViewLink',
76 'target_record_key' => 'contact_id',
77 'target_module' => 'Contacts',
78 'vname' => 'LBL_LIST_CONTACT',
82 'name' => 'parent_name',
83 'module' => 'Meetings',
84 'vname' => 'LBL_LIST_RELATED_TO',
88 'name' => 'date_modified',
89 //'db_alias_to' => 'the_date',
90 'vname' => 'LBL_LIST_LAST_MODIFIED',
95 'widget_class' => 'SubPanelEditButton',
96 'module' => 'Meetings',
101 'widget_class' => 'SubPanelRemoveButton',
102 'linked_field' => 'meetings',
103 'module' => 'Meetings',
107 'where' => "(meetings.status='Held' OR meetings.status='Not Held')",
108 'order_by' => 'meetings.date_modified',
114 'widget_class' => 'SubPanelIcon',
115 'module' => 'Emails',
120 'vname' => 'LBL_LIST_SUBJECT',
121 'widget_class' => 'SubPanelDetailViewLink',
126 'vname' => 'LBL_LIST_STATUS',
130 'name' => 'contact_name',
131 'module' => 'Contacts',
132 'widget_class' => 'SubPanelDetailViewLink',
133 'target_record_key' => 'contact_id',
134 'target_module' => 'Contacts',
135 'vname' => 'LBL_LIST_CONTACT',
139 'name' => 'parent_name',
140 'module' => 'Emails',
141 'vname' => 'LBL_LIST_RELATED_TO',
145 'name' => 'date_modified',
146 //'db_alias_to' => 'the_date',
147 'vname' => 'LBL_LIST_LAST_MODIFIED',
152 'widget_class' => 'SubPanelEditButton',
153 'module' => 'Emails',
158 'widget_class' => 'SubPanelRemoveButton',
159 'linked_field' => 'emails',
160 'module' => 'Emails',
164 'where' => "(emails.status='sent')",
165 'order_by' => 'emails.date_modified',
171 'widget_class' => 'SubPanelIcon',
177 'vname' => 'LBL_LIST_SUBJECT',
178 'widget_class' => 'SubPanelDetailViewLink',
181 array( // this column does not exist on
183 'vname' => 'LBL_LIST_STATUS',
187 'name' => 'contact_name',
188 'module' => 'Contacts',
189 'widget_class' => 'SubPanelDetailViewLink',
190 'target_record_key' => 'contact_id',
191 'target_module' => 'Contacts',
192 'vname' => 'LBL_LIST_CONTACT',
196 'name' => 'parent_name',
198 'vname' => 'LBL_LIST_RELATED_TO',
202 'name' => 'date_modified',
203 //'db_alias_to' => 'the_date',
204 'vname' => 'LBL_LIST_LAST_MODIFIED',
209 'widget_class' => 'SubPanelEditButton',
215 'widget_class' => 'SubPanelRemoveButton',
216 'linked_field' => 'notes',
222 'order_by' => 'notes.date_modified',
228 'widget_class' => 'SubPanelIcon',
234 'vname' => 'LBL_LIST_SUBJECT',
235 'widget_class' => 'SubPanelDetailViewLink',
240 'vname' => 'LBL_LIST_STATUS',
244 'name' => 'contact_name',
245 'module' => 'Contacts',
246 'widget_class' => 'SubPanelDetailViewLink',
247 'target_record_key' => 'contact_id',
248 'target_module' => 'Contacts',
249 'vname' => 'LBL_LIST_CONTACT',
253 'name' => 'parent_name',
255 'vname' => 'LBL_LIST_RELATED_TO',
259 'name' => 'date_modified',
260 //'db_alias_to' => 'the_date',
261 'vname' => 'LBL_LIST_LAST_MODIFIED',
266 'widget_class' => 'SubPanelEditButton',
272 'widget_class' => 'SubPanelRemoveButton',
273 'linked_field' => 'tasks',
278 'where' => "(tasks.status='Completed' OR tasks.status='Deferred')",
279 'order_by' => 'tasks.date_start',
285 'widget_class' => 'SubPanelIcon',
291 'vname' => 'LBL_LIST_SUBJECT',
292 'widget_class' => 'SubPanelDetailViewLink',
297 'vname' => 'LBL_LIST_STATUS',
301 'name' => 'contact_name',
302 'module' => 'Contacts',
303 'widget_class' => 'SubPanelDetailViewLink',
304 'target_record_key' => 'contact_id',
305 'target_module' => 'Contacts',
306 'vname' => 'LBL_LIST_CONTACT',
310 'name' => 'parent_name',
311 'module' => 'Meetings',
312 'vname' => 'LBL_LIST_RELATED_TO',
316 'name' => 'date_modified',
317 //'db_alias_to' => 'the_date',
318 'vname' => 'LBL_LIST_LAST_MODIFIED',
323 'widget_class' => 'SubPanelEditButton',
329 'widget_class' => 'SubPanelRemoveButton',
330 'linked_field' => 'calls',
335 'where' => "(calls.status='Held' OR calls.status='Not Held')",
336 'order_by' => 'calls.date_modified',