2 /*********************************************************************************
3 * SugarCRM Community Edition is a customer relationship management program developed by
4 * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc.
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.
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
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
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.
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.
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 ********************************************************************************/
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(
43 'value' => '{$APP.LBL_EDIT_BUTTON_LABEL}',
44 'htmlOptions' => array(
45 'title' => '{$APP.LBL_EDIT_BUTTON_TITLE}',
46 'accessKey' => '{$APP.LBL_EDIT_BUTTON_KEY}',
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',
52 'template' => '{if $DISPLAY_EDIT}[CONTENT]{/if}',
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(
59 'value' => '{$APP.LBL_DUPLICATE_BUTTON_LABEL}',
60 'htmlOptions' => array(
61 'title' => '{$APP.LBL_DUPLICATE_BUTTON_TITLE}',
62 'accessKey' => '{$APP.LBL_DUPLICATE_BUTTON_KEY}',
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'
68 'template' => '{if $DISPLAY_DUPLICATE}[CONTENT]{/if}'
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(
76 'value' => '{$APP.LBL_DELETE_BUTTON_LABEL}',
77 'htmlOptions' => array(
78 'title' => '{$APP.LBL_DELETE_BUTTON_LABEL}',
79 'accessKey' => '{$APP.LBL_DELETE_BUTTON_LABEL}',
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}',
83 'id' => 'delete_button',
85 'template' => '{if $DISPLAY_DELETE}[CONTENT]{/if}'
92 array('label' => '10', 'field' => '30'),
93 array('label' => '10', 'field' => '30')
104 'name' => 'first_name',
105 'customCode' => '{$fields.full_name.value}',
106 'label' => 'LBL_NAME',
114 'label' => 'LBL_TITLE',
118 'name' => 'phone_work',
119 'label' => 'LBL_OFFICE_PHONE',
126 'name' => 'department',
127 'label' => 'LBL_DEPARTMENT',
131 'name' => 'phone_mobile',
132 'label' => 'LBL_MOBILE_PHONE',
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',
145 'name' => 'phone_other',
146 'label' => 'LBL_OTHER',
153 'name' => 'phone_fax',
154 'label' => 'LBL_FAX',
163 'name' => 'phone_home',
164 'label' => 'LBL_HOME_PHONE',
171 'name' => 'messenger_type',
172 'label' => 'LBL_MESSENGER_TYPE',
179 'name' => 'messenger_id',
180 'label' => 'LBL_MESSENGER_ID',
187 'name' => 'address_country',
188 'customCode' => '{$fields.address_street.value}<br>{$fields.address_city.value} {$fields.address_state.value} {$fields.address_postalcode.value}<br>{$fields.address_country.value}',
189 'label' => 'LBL_ADDRESS',
196 'name' => 'description',
197 'label' => 'LBL_NOTES',
203 'label' => 'LBL_EMAIL',