]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Users/metadata/subpaneldefs.php
Release 6.5.0
[Github/sugarcrm.git] / modules / Users / 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['Users'] = array(
42         // default subpanel provided by this SugarBean
43         'subpanel_setup' => array(
44         ),
45         'default_subpanel_define' => array(
46                 'subpanel_title' => 'LBL_DEFAULT_SUBPANEL_TITLE',
47                 'sort_by' => 'name',
48                 'sort_order' => 'asc',
49                 'top_buttons' => array(
50                         array('widget_class' => 'SubPanelTopCreateButton'),
51                         array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Users', 'mode' => 'MultiSelect'),
52                 ),
53                 'list_fields' => array(
54                         'Users' => array(
55                                 'columns' => array(
56                                         array(
57                                                 'name' => 'first_name',
58                                                 'usage' => 'query_only',
59                                         ),
60                                         array(
61                                                 'name' => 'last_name',
62                                                 'usage' => 'query_only',
63                                         ),
64                                         array(
65                                                 'name' => 'name',
66                                                 'vname' => 'LBL_LIST_NAME',
67                                                 'widget_class' => 'SubPanelDetailViewLink',
68                                                 'module' => 'Users',
69                                                 'width' => '25%',
70                                         ),
71                                         array(
72                                                 'name' => 'user_name',
73                                                 'vname' => 'LBL_LIST_USER_NAME',
74                                                 'width' => '25%',
75                                         ),
76                                         array(
77                                                 'name'=>'email1',
78                                                 'vname' => 'LBL_LIST_EMAIL',
79                                                 'width' => '25%',
80                                         ),
81                                         array (
82                                                 'name' => 'phone_work',
83                                                 'vname' => 'LBL_LIST_PHONE',
84                                                 'width' => '21%',
85                                         ),
86                                         array(
87                                                 'name' => 'nothing',
88                                                 'widget_class' => 'SubPanelRemoveButton',
89                                                 'module' => 'Users',
90                                                 'width' => '4%',
91                                                 'linked_field' => 'users',
92                                         ),
93                                 ),
94                         ),
95                 ),
96         ),
97 );
98 $layout_defs['UserRoles'] = array(
99         // sets up which panels to show, in which order, and with what linked_fields
100         'subpanel_setup' => array(
101         'aclroles' => array(
102                         'top_buttons' => array(array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'ACLRoles', 'mode' => 'MultiSelect'),),
103                         'order' => 20,
104                         'sort_by' => 'name',
105                         'sort_order' => 'asc',
106                         'module' => 'ACLRoles',
107                         'refresh_page'=>1,
108                         'subpanel_name' => 'default',
109                         'get_subpanel_data' => 'aclroles',
110                         'add_subpanel_data' => 'role_id',
111                         'title_key' => 'LBL_ROLES_SUBPANEL_TITLE',
112                 ),
113         ),
114         );
115 global $current_user;
116 if($current_user->isAdminForModule('Users')){
117         $layout_defs['UserRoles']['subpanel_setup']['aclroles']['subpanel_name'] = 'admin';
118 }else{
119         $layout_defs['UserRoles']['subpanel_setup']['aclroles']['top_buttons'] = array();
120 }
121
122 $layout_defs['UserEAPM'] = array(
123         'subpanel_setup' => array(
124         'eapm' => array(
125                         'order' => 30,
126                         'module' => 'EAPM',
127                         'sort_order' => 'asc',
128                         'sort_by' => 'name',
129                         'subpanel_name' => 'default',
130                         'get_subpanel_data' => 'eapm',
131                         'add_subpanel_data' => 'assigned_user_id',
132                         'title_key' => 'LBL_EAPM_SUBPANEL_TITLE',
133                         'top_buttons' => array(
134                                 array('widget_class' => 'SubPanelTopCreateButton'),
135                         ),
136                 ),
137
138     ),
139 );