]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Campaigns/metadata/detailviewdefs.php
Release 6.5.0
[Github/sugarcrm.git] / modules / Campaigns / 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['Campaigns']['DetailView'] = array(
38 'templateMeta' => array('form' => array(
39                                         'hidden'=>array('<input type="hidden" name="mode" value="">'),
40                                         'buttons' =>
41                                             array('EDIT', 'DUPLICATE', 'DELETE',
42                                             array('customCode'=>'<input title="{$MOD.LBL_TEST_BUTTON_TITLE}"  class="button" onclick="this.form.return_module.value=\'Campaigns\'; this.form.return_action.value=\'TrackDetailView\';this.form.action.value=\'Schedule\';this.form.mode.value=\'test\';SUGAR.ajaxUI.submitForm(this.form);" type="{$ADD_BUTTON_STATE}" name="button" id="send_test_button" value="{$MOD.LBL_TEST_BUTTON_LABEL}">',
43                                                 //Bug#51778: The custom code will be replaced with sugar_html. customCode will be deplicated.
44                                                 'sugar_html' => array(
45                                                     'type' => 'input',
46                                                     'value' => '{$MOD.LBL_TEST_BUTTON_LABEL}',
47                                                     'htmlOptions' => array(
48                                                         'type' => '{$ADD_BUTTON_STATE}',
49                                                         'title' => '{$MOD.LBL_TEST_BUTTON_TITLE}',
50                                                         'class' => 'button',
51                                                         'onclick' => 'this.form = document.getElementById(\'formDetailView\'); this.form.return_module.value=\'Campaigns\'; this.form.return_action.value=\'TrackDetailView\';this.form.action.value=\'Schedule\';this.form.mode.value=\'test\';SUGAR.ajaxUI.submitForm(this.form);',
52                                                         'name' => 'button',
53                                                         'id' => 'send_test_button',
54                                                     ),
55                                                 ),
56                                             ),
57                                             array('customCode'=>'<input title="{$MOD.LBL_QUEUE_BUTTON_TITLE}" class="button" onclick="this.form.return_module.value=\'Campaigns\'; this.form.return_action.value=\'TrackDetailView\';this.form.action.value=\'Schedule\';SUGAR.ajaxUI.submitForm(this.form);" type="{$ADD_BUTTON_STATE}" name="button" id="send_emails_button" value="{$MOD.LBL_QUEUE_BUTTON_LABEL}">',
58                                                 //Bug#51778: The custom code will be replaced with sugar_html. customCode will be deplicated.
59                                                 'sugar_html' => array(
60                                                     'type' => 'input',
61                                                     'value' => '{$MOD.LBL_QUEUE_BUTTON_LABEL}',
62                                                     'htmlOptions' => array(
63                                                         'type' => '{$ADD_BUTTON_STATE}',
64                                                         'title' => '{$MOD.LBL_QUEUE_BUTTON_TITLE}',
65                                                         'class' => 'button',
66                                                         'onclick' => 'this.form.return_module.value=\'Campaigns\'; this.form.return_action.value=\'TrackDetailView\';this.form.action.value=\'Schedule\';SUGAR.ajaxUI.submitForm(this.form);',
67                                                         'name' => 'button',
68                                                         'id' => 'send_emails_button',
69                                                     ),
70                                                 ),
71                                             ),
72                                             array('customCode'=>'<input title="{$APP.LBL_MAILMERGE}" class="button" onclick="this.form.return_module.value=\'Campaigns\'; this.form.return_action.value=\'TrackDetailView\';this.form.action.value=\'MailMerge\';SUGAR.ajaxUI.submitForm(this.form);" type="submit" name="button" id="mail_merge_button" value="{$APP.LBL_MAILMERGE}">',
73                                                 //Bug#51778: The custom code will be replaced with sugar_html. customCode will be deplicated.
74                                                 'sugar_html' => array(
75                                                     'type' => 'submit',
76                                                     'value' => '{$APP.LBL_MAILMERGE}',
77                                                     'htmlOptions' => array(
78                                                         'title' => '{$APP.LBL_MAILMERGE}',
79                                                         'class' => 'button',
80                                                         'onclick' => 'this.form.return_module.value=\'Campaigns\'; this.form.return_action.value=\'TrackDetailView\';this.form.action.value=\'MailMerge\';SUGAR.ajaxUI.submitForm(this.form);',
81                                                         'name' => 'button',
82                                                         'id' => 'mail_merge_button',
83                                                     ),
84                                                 ),
85                                             ),
86                                             array('customCode'=>'<input title="{$MOD.LBL_MARK_AS_SENT}" class="button" onclick="this.form.return_module.value=\'Campaigns\'; this.form.return_action.value=\'TrackDetailView\';this.form.action.value=\'DetailView\';this.form.mode.value=\'set_target\';SUGAR.ajaxUI.submitForm(this.form);" type="{$TARGET_BUTTON_STATE}" name="button" id="mark_as_sent_button" value="{$MOD.LBL_MARK_AS_SENT}">',
87                                                 //Bug#51778: The custom code will be replaced with sugar_html. customCode will be deplicated.
88                                                 'sugar_html' => array(
89                                                     'type' => 'input',
90                                                     'value' => '{$MOD.LBL_MARK_AS_SENT}',
91                                                     'htmlOptions' => array(
92                                                         'type' => '{$TARGET_BUTTON_STATE}',
93                                                         'title' => '{$MOD.LBL_MARK_AS_SENT}',
94                                                         'class' => 'button',
95                                                         'onclick' => 'this.form.return_module.value=\'Campaigns\'; this.form.return_action.value=\'TrackDetailView\';this.form.action.value=\'DetailView\';this.form.mode.value=\'set_target\';SUGAR.ajaxUI.submitForm(this.form);',
96                                                         'name' => 'button',
97                                                         'id' => 'mark_as_sent_button',
98                                                     ),
99                                                 ),
100
101                                             ),
102                                             array('customCode'=>'<script>{$MSG_SCRIPT}</script>'),
103                                         ),
104                                         'links' => array('<input type="button" class="button" onclick="javascript:window.location=\'index.php?module=Campaigns&action=WizardHome&record={$fields.id.value}\';" name="button" id="launch_wizard_button" value="{$MOD.LBL_TO_WIZARD_TITLE}" />',
105                                                                          '<input type="button" class="button" onclick="javascript:window.location=\'index.php?module=Campaigns&action=TrackDetailView&record={$fields.id.value}\';" name="button" id="view_status_button" value="{$MOD.LBL_TRACK_BUTTON_LABEL}" />',
106                                                                          '<input id="viewRoiButtonId" type="button" class="button" onclick="javascript:window.location=\'index.php?module=Campaigns&action=RoiDetailView&record={$fields.id.value}\';" name="button" id="view_roi_button" value="{$MOD.LBL_TRACK_ROI_BUTTON_LABEL}" />',
107
108                                                      ),
109                         ),
110                         'maxColumns' => '2',
111                         'widths' => array(
112                                         array('label' => '10', 'field' => '30'),
113                                         array('label' => '10', 'field' => '30')
114                                         ),
115                        
116                         ),
117 'panels' =>array (
118   'lbl_campaign_information'=> array(
119           array (
120             'name',
121             array (
122               'name' => 'status',
123               'label' => 'LBL_CAMPAIGN_STATUS',
124             ),
125           ),
126         
127           array (
128         
129             array (
130               'name' => 'start_date',
131               'label' => 'LBL_CAMPAIGN_START_DATE',
132             ),
133                 'campaign_type',
134           ),
135         
136           array (
137                 array (
138               'name' => 'end_date',
139               'label' => 'LBL_CAMPAIGN_END_DATE',
140             ),
141             array(
142                 'name' => 'frequency',
143                 'customCode' => '{if $fields.campaign_type.value == "NewsLetter"}<div style=\'none\' id=\'freq_field\'>{$fields.frequency.value}</div>{/if}&nbsp;',
144                 'customLabel' => '{if $fields.campaign_type.value == "NewsLetter"}<div style=\'none\' id=\'freq_label\'>{$MOD.LBL_CAMPAIGN_FREQUENCY}</div>{/if}&nbsp;'
145           ),
146           ),
147           
148           array (
149                 array (
150               'name' => 'impressions',
151               'label' => 'LBL_CAMPAIGN_IMPRESSIONS',
152             ),
153           ),
154         
155           array (
156         
157             array (
158               'name' => 'budget',
159               'label' => '{$MOD.LBL_CAMPAIGN_BUDGET} ({$CURRENCY})',
160             ),
161             array (
162               'name' => 'expected_cost',
163               'label' => '{$MOD.LBL_CAMPAIGN_EXPECTED_COST} ({$CURRENCY})',
164             ),
165           ),
166         
167           array (
168                 array (
169               'name' => 'actual_cost',
170               'label' => '{$MOD.LBL_CAMPAIGN_ACTUAL_COST} ({$CURRENCY})',
171             ),
172             array (
173               'name' => 'expected_revenue',
174               'label' => '{$MOD.LBL_CAMPAIGN_EXPECTED_REVENUE} ({$CURRENCY})',
175             ),
176           ),
177         
178           array (
179         
180             array (
181               'name' => 'objective',
182               'label' => 'LBL_CAMPAIGN_OBJECTIVE',
183             ),
184           ),
185         
186           array (
187         
188             array (
189               'name' => 'content',
190               'label' => 'LBL_CAMPAIGN_CONTENT',
191             ),
192           ),
193   ),
194   
195   'LBL_PANEL_ASSIGNMENT' => array(
196         array (
197           array (
198             'name' => 'assigned_user_name',
199             'label' => 'LBL_ASSIGNED_TO',
200           ),
201           array (
202             'name' => 'date_modified',
203             'label' => 'LBL_DATE_MODIFIED',
204             'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
205           ),
206         ),
207         array (
208           array (
209             'name' => 'date_entered',
210             'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
211           ),
212         ),        
213   ),
214 )
215
216 );