]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Employees/metadata/detailviewdefs.php
Release 6.5.0
[Github/sugarcrm.git] / modules / Employees / metadata / detailviewdefs.php
1 <?php
2 /*********************************************************************************
3  * SugarCRM Community Edition is a customer relationship management program developed by
4  * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc.
5  * 
6  * This program is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License version 3 as published by the
8  * Free Software Foundation with the addition of the following permission added
9  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10  * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
12  * 
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
16  * details.
17  * 
18  * You should have received a copy of the GNU Affero General Public License along with
19  * this program; if not, see http://www.gnu.org/licenses or write to the Free
20  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301 USA.
22  * 
23  * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24  * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
25  * 
26  * The interactive user interfaces in modified source and object code versions
27  * of this program must display Appropriate Legal Notices, as required under
28  * Section 5 of the GNU Affero General Public License version 3.
29  * 
30  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31  * these Appropriate Legal Notices must retain the display of the "Powered by
32  * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33  * technical reasons, the Appropriate Legal Notices must display the words
34  * "Powered by SugarCRM".
35  ********************************************************************************/
36
37 $viewdefs['Employees']['DetailView'] = array(
38 'templateMeta' => array('form' => array('buttons'=>array(
39     array('customCode'=>'{if $DISPLAY_EDIT}<input title="{$APP.LBL_EDIT_BUTTON_TITLE}" accessKey="{$APP.LBL_EDIT_BUTTON_KEY}" class="button" onclick="this.form.return_module.value=\'{$module}\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$id}\'; this.form.action.value=\'EditView\'" type="submit" name="Edit" id="edit_button" value="{$APP.LBL_EDIT_BUTTON_LABEL}">{/if}',
40         //Bug#51778: The custom code will be replaced with sugar_html. customCode will be deplicated.
41         'sugar_html' => array(
42             'type' => 'submit',
43             'value' => '{$APP.LBL_EDIT_BUTTON_LABEL}',
44             'htmlOptions' => array(
45                 'title' => '{$APP.LBL_EDIT_BUTTON_TITLE}',
46                 'accessKey' => '{$APP.LBL_EDIT_BUTTON_KEY}',
47                 'class' => 'button',
48                 'onclick' => 'this.form.return_module.value=\'{$module}\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$id}\'; this.form.action.value=\'EditView\';',
49                 'id' => 'edit_button',
50                 'name' => 'Edit'
51             ),
52             'template' => '{if $DISPLAY_EDIT}[CONTENT]{/if}',
53         ),
54     ),
55     array('customCode'=>'{if $DISPLAY_DUPLICATE}<input title="{$APP.LBL_DUPLICATE_BUTTON_TITLE}" accessKey="{$APP.LBL_DUPLICATE_BUTTON_KEY}" class="button" onclick="this.form.return_module.value=\'{$module}\'     ; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$id}\'; this.form.isDuplicate.value=true; this.form.action.value=\'EditView\'" type="submit" name="Duplicate" value="{$APP.LBL_DUPLICATE_BUTTON_LABEL}" id="duplicate_button">{/if}',
56         //Bug#51778: The custom code will be replaced with sugar_html. customCode will be deplicated.
57         'sugar_html' => array(
58             'type' => 'submit',
59             'value' => '{$APP.LBL_DUPLICATE_BUTTON_LABEL}',
60             'htmlOptions' => array(
61                 'title' => '{$APP.LBL_DUPLICATE_BUTTON_TITLE}',
62                 'accessKey' => '{$APP.LBL_DUPLICATE_BUTTON_KEY}',
63                 'class' => 'button',
64                 'onclick' => 'this.form.return_module.value=\'{$module}\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$id}\'; this.form.isDuplicate.value=true; this.form.action.value=\'EditView\';',
65                 'name' => 'Duplicate',
66                 'id' => 'duplicate_button'
67             ),
68             'template' => '{if $DISPLAY_DUPLICATE}[CONTENT]{/if}'
69         ),
70     ),
71     
72     array('customCode'=>'{if $DISPLAY_DELETE}<input title="{$APP.LBL_DELETE_BUTTON_LABEL}" accessKey="{$APP.LBL_DELETE_BUTTON_LABEL}" class="button" onclick="if( confirm(\'{$DELETE_WARNING}\') ) {ldelim} this.form.return_module.value=\'{$module}\'; this.form.return_action.value=\'index\'; this.form.return_id.value=\'{$id}\'; this.form.action.value=\'delete\'; this.form.submit();{rdelim}" type="button" name="Delete" value="{$APP.LBL_DELETE_BUTTON_LABEL}" id="delete_button">{/if}',
73         //Bug#51778: The custom code will be replaced with sugar_html. customCode will be deplicated.
74         'sugar_html' => array(
75             'type' => 'button',
76             'value' => '{$APP.LBL_DELETE_BUTTON_LABEL}',
77                 'htmlOptions' => array(
78                     'title' => '{$APP.LBL_DELETE_BUTTON_LABEL}',
79                     'accessKey' => '{$APP.LBL_DELETE_BUTTON_LABEL}',
80                     'class' => 'button',
81                     'onclick' => 'if( confirm(\'{$DELETE_WARNING}\') ) {ldelim} this.form.return_module.value=\'{$module}\'; this.form.return_action.value=\'index\'; this.form.return_id.value=\'{$id}\'; this.form.action.value=\'delete\'; this.form.submit();{rdelim}',
82                     'name' => 'Delete',
83                     'id' => 'delete_button',
84                 ),
85             'template' => '{if $DISPLAY_DELETE}[CONTENT]{/if}'
86         ),
87     ),
88                                                          )
89                         ),
90                         'maxColumns' => '2', 
91                         'widths' => array(
92                                         array('label' => '10', 'field' => '30'), 
93                                         array('label' => '10', 'field' => '30')
94                                         ),
95                         ),
96 'panels' =>array (
97
98   array (
99         'employee_status',
100   ),
101   
102   array (
103     array (
104       'name' => 'first_name',
105       'customCode' => '{$fields.full_name.value}',
106       'label' => 'LBL_NAME',
107     ),
108   ),
109   
110   array (
111     
112     array (
113       'name' => 'title',
114       'label' => 'LBL_TITLE',
115     ),
116     
117     array (
118       'name' => 'phone_work',
119       'label' => 'LBL_OFFICE_PHONE',
120     ),
121   ),
122   
123   array (
124     
125     array (
126       'name' => 'department',
127       'label' => 'LBL_DEPARTMENT',
128     ),
129     
130     array (
131       'name' => 'phone_mobile',
132       'label' => 'LBL_MOBILE_PHONE',
133     ),
134   ),
135   
136   array (
137     
138     array (
139       'name' => 'reports_to_name',
140       'customCode' => '<a href="index.php?module=Employees&action=DetailView&record={$fields.reports_to_id.value}">{$fields.reports_to_name.value}</a>',
141       'label' => 'LBL_REPORTS_TO_NAME',
142     ),
143     
144     array (
145       'name' => 'phone_other',
146       'label' => 'LBL_OTHER',
147     ),
148   ),
149   
150   array (
151     '',
152     array (
153       'name' => 'phone_fax',
154       'label' => 'LBL_FAX',
155     ),
156   ),
157   
158   array (
159     
160     '',
161     
162     array (
163       'name' => 'phone_home',
164       'label' => 'LBL_HOME_PHONE',
165     ),
166   ),
167   
168   array (
169     
170     array (
171       'name' => 'messenger_type',
172       'label' => 'LBL_MESSENGER_TYPE',
173     ),
174   ),
175   
176   array (
177     
178     array (
179       'name' => 'messenger_id',
180       'label' => 'LBL_MESSENGER_ID',
181     ),
182   ),
183   
184   array (
185     
186     array (
187       'name' => 'address_country',
188       'customCode' => '{$fields.address_street.value}<br>{$fields.address_city.value} {$fields.address_state.value}&nbsp;&nbsp;{$fields.address_postalcode.value}<br>{$fields.address_country.value}',
189       'label' => 'LBL_ADDRESS',
190     ),
191   ),
192   
193   array (
194     
195     array (
196       'name' => 'description',
197       'label' => 'LBL_NOTES',
198     ),
199   ),
200   array(
201   array (
202       'name' => 'email1',
203       'label' => 'LBL_EMAIL',
204     ),
205   ),
206
207 )
208
209
210    
211 );
212 ?>