]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/History/metadata/subpaneldefs.php
Release 6.5.0
[Github/sugarcrm.git] / modules / History / 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['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'),
49                 ),
50                 
51 //TODO try and merge with the activities                
52                 'list_fields' => array(
53                         'Meetings' => array(
54                                 'columns' => array(
55                                         array(
56                                                 'name' => 'nothing',
57                                                 'widget_class' => 'SubPanelIcon',
58                                                 'module' => 'Meetings',
59                                                 'width' => '2%',
60                                         ),
61                                         array(
62                                                 'name' => 'name',
63                                                 'vname' => 'LBL_LIST_SUBJECT',
64                                                 'widget_class' => 'SubPanelDetailViewLink',
65                                                 'width' => '28%',
66                                         ),
67                                         array(
68                                                 'name' => 'status',
69                                                 'vname' => 'LBL_LIST_STATUS',
70                                                 'width' => '10%',
71                                         ),
72                                         array(
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',
79                                                 'width' => '20%',
80                                         ),
81                                         array(
82                                                 'name' => 'parent_name',
83                                                 'module' => 'Meetings',
84                                                 'vname' => 'LBL_LIST_RELATED_TO',
85                                                 'width' => '22%',
86                                         ),
87                                         array(
88                                                 'name' => 'date_modified',
89                                                 //'db_alias_to' => 'the_date',
90                                                 'vname' => 'LBL_LIST_LAST_MODIFIED',
91                                                 'width' => '10%',
92                                         ),
93                                         array(
94                                                 'name' => 'nothing',
95                                                 'widget_class' => 'SubPanelEditButton',
96                                                 'module' => 'Meetings',
97                                                 'width' => '4%',
98                                         ),
99                                         array(
100                                                 'name' => 'nothing',
101                                                 'widget_class' => 'SubPanelRemoveButton',
102                                                 'linked_field' => 'meetings',
103                                                 'module' => 'Meetings',
104                                                 'width' => '4%',
105                                         ),
106                                 ),
107                                 'where' => "(meetings.status='Held' OR meetings.status='Not Held')",
108                                 'order_by' => 'meetings.date_modified',
109                         ),
110                         'Emails' => array(
111                                 'columns' => array(
112                                         array(
113                                                 'name' => 'nothing',
114                                                 'widget_class' => 'SubPanelIcon',
115                                                 'module' => 'Emails',
116                                                 'width' => '2%',
117                                         ),
118                                         array(
119                                                 'name' => 'name',
120                                                 'vname' => 'LBL_LIST_SUBJECT',
121                                                 'widget_class' => 'SubPanelDetailViewLink',
122                                                 'width' => '28%',
123                                         ),
124                                         array(
125                                                 'name' => 'status',
126                                                 'vname' => 'LBL_LIST_STATUS',
127                                                 'width' => '10%',       
128                                         ),
129                                         array(
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',
136                                                 'width' => '20%',
137                                         ),
138                                         array(
139                                                 'name' => 'parent_name',
140                                                 'module' => 'Emails',
141                                                 'vname' => 'LBL_LIST_RELATED_TO',
142                                                 'width' => '22%',
143                                         ),
144                                         array(
145                                                 'name' => 'date_modified',
146                                                 //'db_alias_to' => 'the_date',
147                                                 'vname' => 'LBL_LIST_LAST_MODIFIED',
148                                                 'width' => '10%',
149                                         ),
150                                         array(
151                                                 'name' => 'nothing',
152                                                 'widget_class' => 'SubPanelEditButton',
153                                                 'module' => 'Emails',
154                                                 'width' => '4%',
155                                         ),
156                                         array(
157                                                 'name' => 'nothing',
158                                                 'widget_class' => 'SubPanelRemoveButton',
159                                                 'linked_field' => 'emails',
160                                                 'module' => 'Emails',
161                                                 'width' => '4%',
162                                         ),
163                                 ),
164                                 'where' => "(emails.status='sent')",
165                                 'order_by' => 'emails.date_modified',
166                         ),
167                         'Notes' => array(
168                                 'columns' => array(
169                                         array(
170                                                 'name' => 'nothing',
171                                                 'widget_class' => 'SubPanelIcon',
172                                                 'module' => 'Notes',
173                                                 'width' => '2%',
174                                         ),
175                                         array(
176                                                 'name' => 'name',
177                                                 'vname' => 'LBL_LIST_SUBJECT',
178                                                 'widget_class' => 'SubPanelDetailViewLink',
179                                                 'width' => '28%',
180                                         ),
181                                         array( // this column does not exist on 
182                                                 'name' => 'status',
183                                                 'vname' => 'LBL_LIST_STATUS',
184                                                 'width' => '10%',
185                                         ),
186                                         array(
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',
193                                                 'width' => '20%',
194                                         ),
195                                         array(
196                                                 'name' => 'parent_name',
197                                                 'module' => 'Notes',
198                                                 'vname' => 'LBL_LIST_RELATED_TO',
199                                                 'width' => '22%',
200                                         ),
201                                         array(
202                                                 'name' => 'date_modified',
203                                                 //'db_alias_to' => 'the_date',
204                                                 'vname' => 'LBL_LIST_LAST_MODIFIED',
205                                                 'width' => '10%',
206                                         ),
207                                         array(
208                                                 'name' => 'nothing',
209                                                 'widget_class' => 'SubPanelEditButton',
210                                                 'module' => 'Notes',
211                                                 'width' => '4%',
212                                         ),
213                                         array(
214                                                 'name' => 'nothing',
215                                                 'widget_class' => 'SubPanelRemoveButton',
216                                                 'linked_field' => 'notes',
217                                                 'module' => 'Notes',
218                                                 'width' => '4%',
219                                         ),
220                                 ),
221                                 'where' => '',
222                                 'order_by' => 'notes.date_modified',
223                         ),
224                         'Tasks' => array(
225                                 'columns' => array(
226                                         array(
227                                                 'name' => 'nothing',
228                                                 'widget_class' => 'SubPanelIcon',
229                                                 'module' => 'Tasks',
230                                                 'width' => '2%',
231                                         ),
232                                         array(
233                                                 'name' => 'name',
234                                                 'vname' => 'LBL_LIST_SUBJECT',
235                                                 'widget_class' => 'SubPanelDetailViewLink',
236                                                 'width' => '28%',
237                                         ),
238                                         array(
239                                                 'name' => 'status',
240                                                 'vname' => 'LBL_LIST_STATUS',
241                                                 'width' => '10%',
242                                         ),
243                                         array(
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',
250                                                 'width' => '20%',
251                                         ),
252                                         array(
253                                                 'name' => 'parent_name',
254                                                 'module' => 'Tasks',
255                                                 'vname' => 'LBL_LIST_RELATED_TO',
256                                                 'width' => '22%',
257                                         ),
258                                         array(
259                                                 'name' => 'date_modified',
260                                                 //'db_alias_to' => 'the_date',
261                                                 'vname' => 'LBL_LIST_LAST_MODIFIED',
262                                                 'width' => '10%',
263                                         ),
264                                         array(
265                                                 'name' => 'nothing',
266                                                 'widget_class' => 'SubPanelEditButton',
267                                                 'module' => 'Tasks',
268                                                 'width' => '4%',
269                                         ),
270                                         array(
271                                                 'name' => 'nothing',
272                                                 'widget_class' => 'SubPanelRemoveButton',
273                                                 'linked_field' => 'tasks',
274                                                 'module' => 'Tasks',
275                                                 'width' => '4%',
276                                         ),
277                                 ),
278                                 'where' => "(tasks.status='Completed' OR tasks.status='Deferred')",
279                                 'order_by' => 'tasks.date_start',
280                         ),
281                         'Calls' => array(
282                                 'columns' => array(
283                                         array(
284                                                 'name' => 'nothing',
285                                                 'widget_class' => 'SubPanelIcon',
286                                                 'module' => 'Calls',
287                                                 'width' => '2%',
288                                         ),
289                                         array(
290                                                 'name' => 'name',
291                                                 'vname' => 'LBL_LIST_SUBJECT',
292                                                 'widget_class' => 'SubPanelDetailViewLink',
293                                                 'width' => '28%',
294                                         ),
295                                         array(
296                                                 'name' => 'status',
297                                                 'vname' => 'LBL_LIST_STATUS',
298                                                 'width' => '10%',
299                                         ),
300                                         array(
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',
307                                                 'width' => '20%',
308                                         ),
309                                         array(
310                                                 'name' => 'parent_name',
311                                                 'module' => 'Meetings',
312                                                 'vname' => 'LBL_LIST_RELATED_TO',
313                                                 'width' => '22%',
314                                         ),
315                                         array(
316                                                 'name' => 'date_modified',
317                                                 //'db_alias_to' => 'the_date',
318                                                 'vname' => 'LBL_LIST_LAST_MODIFIED',
319                                                 'width' => '10%',
320                                         ),
321                                         array(
322                                                 'name' => 'nothing',
323                                                 'widget_class' => 'SubPanelEditButton',
324                                                 'module' => 'Calls',
325                                                 'width' => '4%',
326                                         ),
327                                         array(
328                                                 'name' => 'nothing',
329                                                 'widget_class' => 'SubPanelRemoveButton',
330                                                 'linked_field' => 'calls',
331                                                 'module' => 'Calls',
332                                                 'width' => '4%',
333                                         ),
334                                 ),
335                                 'where' => "(calls.status='Held' OR calls.status='Not Held')",
336                                 'order_by' => 'calls.date_modified',
337                         ),
338                 ),
339         ),
340 );
341 ?>