Add php files

This commit is contained in:
2025-05-12 15:44:39 +00:00
parent c951760058
commit 82d5804ac4
9534 changed files with 2638137 additions and 0 deletions

View File

@@ -0,0 +1,95 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/**
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
*/
global $current_user;
$dashletData['MyTasksDashlet']['searchFields'] = array('priority' => array('default' => ''),
'status' => array('default' => array('Not Started', 'In Progress', 'Pending Input')),
'date_entered' => array('default' => ''),
'date_start' => array('default' => ''),
'date_due' => array('default' => ''),
'assigned_user_id' => array('type' => 'assigned_user_name',
'default' => $current_user->name));
$dashletData['MyTasksDashlet']['columns'] = array('set_complete' => array('width' => '1',
'label' => 'LBL_LIST_CLOSE',
'default' => true,
'sortable' => false),
'name' => array('width' => '40',
'label' => 'LBL_SUBJECT',
'link' => true,
'default' => true),
'priority' => array('width' => '10',
'label' => 'LBL_PRIORITY',
'default' => true),
'date_start' => array('width' => '15',
'label' => 'LBL_START_DATE',
'default' => true),
'time_start' => array('width' => '15',
'label' => 'LBL_START_TIME',
'default' => false),
'status' => array('width' => '8',
'label' => 'LBL_STATUS'),
'date_due' => array('width' => '15',
'label' => 'LBL_DUE_DATE',
'default' => true),
'date_entered' => array('width' => '15',
'label' => 'LBL_DATE_ENTERED'),
'date_modified' => array('width' => '15',
'label' => 'LBL_DATE_MODIFIED'),
'created_by' => array('width' => '8',
'label' => $app_strings['LBL_CREATED'],
'sortable' => false),
'assigned_user_name' => array('width' => '8',
'label' => 'LBL_LIST_ASSIGNED_USER'),
'contact_name' => array('width' => '8',
'label' => 'LBL_LIST_CONTACT'),
);
?>

View File

@@ -0,0 +1,46 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/**
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
*/
global $app_strings;
$dashletMeta['MyTasksDashlet'] = array('module' => 'Tasks',
'title' => translate('LBL_LIST_MY_TASKS', 'Tasks'),
'description' => 'A customizable view into Tasks',
'category' => 'Module Views');
?>

View File

@@ -0,0 +1,60 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/**
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
*/
require_once('include/Dashlets/DashletGeneric.php');
require_once('modules/Tasks/Task.php');
class MyTasksDashlet extends DashletGeneric {
function MyTasksDashlet($id, $def = null) {
global $current_user, $app_strings;
require('modules/Tasks/Dashlets/MyTasksDashlet/MyTasksDashlet.data.php');
parent::DashletGeneric($id, $def);
if(empty($def['title'])) $this->title = translate('LBL_LIST_MY_TASKS', 'Tasks');
$this->searchFields = $dashletData['MyTasksDashlet']['searchFields'];
$this->columns = $dashletData['MyTasksDashlet']['columns'];
$this->seedBean = new Task();
}
}
?>

View File

@@ -0,0 +1,95 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/**
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
*/
global $current_user;
$dashletData['MyTasksDashlet2']['searchFields'] = array('priority' => array('default' => ''),
'status' => array('default' => array('Not Started', 'In Progress', 'Pending Input')),
'date_entered' => array('default' => ''),
'date_start' => array('default' => ''),
'date_due' => array('default' => ''),
'assigned_user_id' => array('type' => 'assigned_user_name',
'default' => $current_user->name));
$dashletData['MyTasksDashlet2']['columns'] = array('set_complete' => array('width' => '1',
'label' => 'LBL_LIST_CLOSE',
'default' => true,
'sortable' => false),
'name' => array('width' => '40',
'label' => 'LBL_SUBJECT',
'link' => true,
'default' => true),
'priority' => array('width' => '10',
'label' => 'LBL_PRIORITY',
'default' => true),
'date_start' => array('width' => '15',
'label' => 'LBL_START_DATE',
'default' => true),
'time_start' => array('width' => '15',
'label' => 'LBL_START_TIME',
'default' => false),
'status' => array('width' => '8',
'label' => 'LBL_STATUS'),
'date_due' => array('width' => '15',
'label' => 'LBL_DUE_DATE',
'default' => true),
'date_entered' => array('width' => '15',
'label' => 'LBL_DATE_ENTERED'),
'date_modified' => array('width' => '15',
'label' => 'LBL_DATE_MODIFIED'),
'created_by' => array('width' => '8',
'label' => $app_strings['LBL_CREATED'],
'sortable' => false),
'assigned_user_name' => array('width' => '8',
'label' => 'LBL_LIST_ASSIGNED_USER'),
'contact_name' => array('width' => '8',
'label' => 'LBL_LIST_CONTACT'),
);
?>

View File

@@ -0,0 +1,46 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/**
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
*/
global $app_strings;
$dashletMeta['MyTasksDashlet2'] = array('module' => 'Tasks',
'title' => 'test2',
'description' => 'A customizable view into Tasks',
'category' => 'Module Views');
?>

View File

@@ -0,0 +1,60 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/**
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
*/
require_once('include/Dashlets/DashletGeneric.php');
require_once('modules/Tasks/Task.php');
class MyTasksDashlet2 extends DashletGeneric {
function MyTasksDashlet2($id, $def = null) {
global $current_user, $app_strings;
require('modules/Tasks/Dashlets/MyTasksDashlet/MyTasksDashlet.data.php');
parent::DashletGeneric($id, $def);
if(empty($def['title'])) $this->title = 'test2';
$this->searchFields = $dashletData['MyTasksDashlet2']['searchFields'];
$this->columns = $dashletData['MyTasksDashlet2']['columns'];
$this->seedBean = new Task();
}
}
?>

37
modules/Tasks/Forms.php Executable file
View File

@@ -0,0 +1,37 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
require_once('include/EditView/SideQuickCreate.php');

75
modules/Tasks/Menu.php Executable file
View File

@@ -0,0 +1,75 @@
<?php
//2008-10-08, Dawid Karlowicz, Section1
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: TODO To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
global $mod_strings;
//<Section1>
//Before
/*
if(ACLController::checkAccess('Calls', 'edit', true))$module_menu[]=Array("index.php?module=Calls&action=EditView&return_module=Calls&return_action=DetailView", $mod_strings['LNK_NEW_CALL'],"CreateCalls");
if(ACLController::checkAccess('Meetings', 'edit', true))$module_menu[]=Array("index.php?module=Meetings&action=EditView&return_module=Meetings&return_action=DetailView", $mod_strings['LNK_NEW_MEETING'],"CreateMeetings");
if(ACLController::checkAccess('Tasks', 'edit', true))$module_menu[]=Array("index.php?module=Tasks&action=EditView&return_module=Tasks&return_action=DetailView", $mod_strings['LNK_NEW_TASK'],"CreateTasks");
if(ACLController::checkAccess('Notes', 'edit', true))$module_menu[]=Array("index.php?module=Notes&action=EditView&return_module=Notes&return_action=DetailView", $mod_strings['LNK_NEW_NOTE'],"CreateNotes");
if(ACLController::checkAccess('Emails', 'edit', true))$module_menu[]=Array("index.php?module=Emails&action=Compose", $mod_strings['LNK_NEW_EMAIL'],"CreateEmails");
if(ACLController::checkAccess('Calls', 'list', true))$module_menu[]=Array("index.php?module=Calls&action=index&return_module=Calls&return_action=DetailView", $mod_strings['LNK_CALL_LIST'],"Calls");
if(ACLController::checkAccess('Meetings', 'list', true))$module_menu[]=Array("index.php?module=Meetings&action=index&return_module=Meetings&return_action=DetailView", $mod_strings['LNK_MEETING_LIST'],"Meetings");
if(ACLController::checkAccess('Tasks', 'list', true))$module_menu[]=Array("index.php?module=Tasks&action=index&return_module=Tasks&return_action=DetailView", $mod_strings['LNK_TASK_LIST'],"Tasks");
if(ACLController::checkAccess('Notes', 'list', true))$module_menu[]=Array("index.php?module=Notes&action=index&return_module=Notes&return_action=DetailView", $mod_strings['LNK_NOTE_LIST'],"Notes");
if(ACLController::checkAccess('Emails', 'list', true))$module_menu[]=Array("index.php?module=Emails&action=index&return_module=Emails&return_action=DetailView", $mod_strings['LNK_EMAIL_LIST'],"Emails");
if(ACLController::checkAccess('Calendar', 'list', true))$module_menu[]=Array("index.php?module=Calendar&action=index&view=day", $mod_strings['LNK_VIEW_CALENDAR'],"Calendar");
if(ACLController::checkAccess('Tasks','list', true)) $module_menu[] = Array('#', '<span style="display: none">wp_shortcut_fill_0</span>', '');
*/
//After
//if(ACLController::checkAccess('Tasks', 'edit', true))
$module_menu[]=Array("index.php?module=Tasks&action=EditView&return_module=Tasks&return_action=DetailView", $mod_strings['LNK_NEW_TASK'],"CreateTasks");
//if(ACLController::checkAccess('Tasks', 'list', true)
$module_menu[]=Array("index.php?module=Tasks&action=index&return_module=Tasks&return_action=DetailView", $mod_strings['LNK_TASK_LIST'],"Tasks");
//if(ACLController::checkAccess('Tasks','list', true))
$module_menu[] = Array('#', '<span style="display: none">wp_shortcut_fill_0</span>', '');
//</Section1>
?>

88
modules/Tasks/MyTasks.php Executable file
View File

@@ -0,0 +1,88 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
require_once('XTemplate/xtpl.php');
require_once('modules/Tasks/Task.php');
require_once('include/ListView/ListView.php');
global $app_strings;
global $app_list_strings;
global $current_language, $current_user;
$current_module_strings = return_module_language($current_language, 'Tasks');
$today = gmdate($GLOBALS['timedate']->get_db_date_time_format());
// Break down the date, add a day, and print it back out again
list($date_tmp,$time_tmp) = explode(' ',$today);
$date = explode('-',$date_tmp);
$time = explode(':',$time_tmp);
$tomorrow = gmdate($GLOBALS['timedate']->get_db_date_time_format(),gmmktime($time[0],$time[1],$time[2],$date[1],($date[2]+1),$date[0]));
$ListView = new ListView();
$seedTasks = new Task();
if ($seedTasks->db->dbType=='mysql') {
$format=array("'%Y-%m-%d'");
$where = "tasks.assigned_user_id='". $current_user->id ."' and (tasks.status is NULL or (tasks.status!='Completed' and tasks.status!='Deferred')) ";
$where .= "and (tasks.date_start is NULL or ";
$where .= " CONCAT(".db_convert("tasks.date_start","date_format",$format).", CONCAT(' ',". db_convert("tasks.time_start","time_format",$format)." )) <=". "'".$tomorrow."')";
}
else if ($seedTasks->db->dbType=='mssql')
{
$where = "tasks.assigned_user_id='". $current_user->id ."' and (tasks.status is NULL or (tasks.status!='Completed' and tasks.status!='Deferred')) ";
$where .= "and (tasks.date_start is NULL or ";
$where .= db_convert("tasks.date_start","date_format") . ' + ' . db_convert("tasks.time_start","time_format") . " <=". "'".$tomorrow."')";
}
else if ($seedTasks->db->dbType=='oci8')
{
$format=array("'YYYY-MM-DD'");
$where = "tasks.assigned_user_id='". $current_user->id ."' and (tasks.status is NULL or (tasks.status!='Completed' and tasks.status!='Deferred')) ";
$where .= "and (tasks.date_start is NULL or ";
$where .= " CONCAT(".db_convert("tasks.date_start","date_format",$format).", CONCAT(' ',". db_convert("tasks.time_start","time_format",$format)." )) <=". "'".$tomorrow."')";
}
$ListView->initNewXTemplate( 'modules/Tasks/MyTasks.html',$current_module_strings);
$header_text = '';
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
$header_text = "&nbsp;<a href='index.php?action=index&module=DynamicLayout&from_action=MyTasks&from_module=Tasks'>".get_image($image_path."EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>";
}
$ListView->setHeaderTitle($current_module_strings['LBL_LIST_MY_TASKS'].$header_text);
$ListView->setQuery($where, "", "date_due,priority desc", "TASK");
$ListView->processListView($seedTasks, "main", "TASK");
?>

159
modules/Tasks/Save.php Executable file
View File

@@ -0,0 +1,159 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: Saves an Account record and then redirects the browser to the
* defined return URL.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
require_once('modules/Tasks/Task.php');
$focus = new Task();
if (!isset($prefix)) $prefix='';
global $timedate;
$time_format = $timedate->get_user_time_format();
$time_separator = ":";
if(preg_match('/\d+([^\d])\d+([^\d]*)/s', $time_format, $match)) {
$time_separator = $match[1];
}
if(!empty($_POST[$prefix.'due_meridiem'])) {
$_POST[$prefix.'time_due'] = $timedate->merge_time_meridiem($_POST[$prefix.'time_due'],$timedate->get_time_format(true), $_POST[$prefix.'due_meridiem']);
}
if(!empty($_POST[$prefix.'start_meridiem'])) {
$_POST[$prefix.'time_start'] = $timedate->merge_time_meridiem($_POST[$prefix.'time_start'],$timedate->get_time_format(true), $_POST[$prefix.'start_meridiem']);
}
if(isset($_POST[$prefix.'time_due']) && !empty($_POST[$prefix.'time_due'])) {
$_POST[$prefix.'date_due'] = $_POST[$prefix.'date_due'] . ' ' . $_POST[$prefix.'time_due'];
}
if(isset($_POST[$prefix.'time_start']) && !empty($_POST[$prefix.'time_start'])) {
$_POST[$prefix.'date_start'] = $_POST[$prefix.'date_start'] . ' ' . $_POST[$prefix.'time_start'];
}
if(isset($_POST[$prefix.'time_reminder']) && !empty($_POST[$prefix.'time_reminder'])) {
$_POST[$prefix.'date_reminder'] = $_POST[$prefix.'date_reminder'] . ' ' . $_POST[$prefix.'time_reminder'];
}
require_once('include/formbase.php');
$focus = populateFromPost('', $focus);
//echo '<br><br>'; die('koniec');
if(!$focus->ACLAccess('Save')){
ACLController::displayNoAccess(true);
sugar_cleanup(true);
}
if (isCloseAndCreateNewPressed()) $focus->status = 'Completed';
if (!isset($_POST['date_due_flag'])) $focus->date_due_flag = 0;
if (!isset($_POST['date_start_flag'])) $focus->date_start_flag = 0;
//if only the time is passed in, without a date, then string length will be 7
if (isset($_REQUEST['date_due']) && strlen(trim($_REQUEST['date_due']))<8 ){
//no date set, so clear out field, and set the rest flag to true
$focus->date_due_flag = 1;
$focus->date_due = '';
}
//if only the time is passed in, without a date, then string length will be 7
if (isset($_REQUEST['date_start']) && strlen(trim($_REQUEST['date_start']))<8){
//no date set, so clear out field, and set the rest flag to true
$focus->date_start_flag = 1;
$focus->date_start = '';
}
if (isset($_REQUEST['date_reminder']) && strlen(trim($_REQUEST['date_reminder']))<8){
//no date set, so clear out field, and set the rest flag to true
$focus->date_reminder_flag = 1;
$focus->date_reminder = '';
}
///////////////////////////////////////////////////////////////////////////////
//// INBOUND EMAIL HANDLING
///////////////////////////////////////////////////////////////////////////////
if(isset($_REQUEST['inbound_email_id']) && !empty($_REQUEST['inbound_email_id'])) {
// fake this case like it's already saved.
$focus->save();
require_once('modules/Emails/Email.php');
$email = new Email();
$email->retrieve($_REQUEST['inbound_email_id']);
$email->parent_type = 'Tasks';
$email->parent_id = $focus->id;
$email->assigned_user_id = $current_user->id;
$email->status = 'read';
$email->save();
$email->load_relationship('tasks');
$email->tasks->add($focus->id);
header("Location: index.php?&module=Emails&action=EditView&type=out&inbound_email_id=".$_REQUEST['inbound_email_id']."&parent_id=".$email->parent_id."&parent_type=".$email->parent_type.'&start='.$_REQUEST['start'].'&assigned_user_id='.$current_user->id);
exit();
}
//// END INBOUND EMAIL HANDLING
///////////////////////////////////////////////////////////////////////////////
// avoid undefined index
if (!isset($GLOBALS['check_notify'])) {
$GLOBALS['check_notify'] = false;
}
$focus->date_start = $_POST['date_start'];
$focus->date_due = $_POST['date_due'];
$focus->date_reminder = $_POST['date_reminder'];
$focus->save($GLOBALS['check_notify']);
$return_id = $focus->id;
//<Section1>
//Before
/*
handleRedirect($return_id,'Tasks');
*/
//After
if(isset($_REQUEST['save_and_create_work_item']))
header("Location: index.php?module=EcmWorkItems&action=EditView&out_module=Tasks&out_id=".$return_id);
else
handleRedirect($return_id,'Tasks');
//</Section1>
?>

761
modules/Tasks/Task.php Executable file
View File

@@ -0,0 +1,761 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: TODO: To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
require_once('data/SugarBean.php');
require_once('include/utils.php');
// Task is used to store customer information.
class Task extends SugarBean {
var $field_name_map;
// Stored fields
var $id;
var $date_entered;
var $date_modified;
var $assigned_user_id;
//var $assigned_user_id2;
var $modified_user_id;
var $created_by;
var $created_by_name;
var $modified_by_name;
var $description;
var $name;
var $status;
var $date_due_flag;
var $date_due;
var $time_due;
var $date_start_flag;
var $date_start;
var $time_start;
var $priority;
var $parent_type;
var $parent_id;
var $contact_id;
var $google_calendar_task;
var $parent_name;
var $contact_name;
var $contact_phone;
var $contact_email;
var $assigned_user_name;
//var $assigned_user_name2;
var $default_task_name_values = array('Assemble catalogs', 'Make travel arrangements', 'Send a letter', 'Send contract', 'Send fax', 'Send a follow-up letter', 'Send literature', 'Send proposal', 'Send quote', 'Call to schedule meeting', 'Setup evaluation', 'Get demo feedback', 'Arrange introduction', 'Escalate support request', 'Close out support request', 'Ship product', 'Arrange reference call', 'Schedule training', 'Send local user group information', 'Add to mailing list');
var $table_name = "tasks";
var $object_name = "Task";
var $module_dir = 'Tasks';
var $importable = true;
// This is used to retrieve related fields from form posts.
var $additional_column_fields = Array('assigned_user_name', 'assigned_user_id','assigned_user_name2', 'assigned_user_id2', 'contact_name', 'contact_phone', 'contact_email', 'parent_name');
function Task() {
parent::SugarBean();
}
var $new_schema = true;
function get_summary_text()
{
return "$this->name";
}
function create_list_query($order_by, $where, $show_deleted = 0)
{
$custom_join = $this->custom_fields->getJOIN();
$query = "SELECT ";
$query .= "
$this->table_name.*,
contacts.first_name,
contacts.last_name,
contacts.assigned_user_id contact_name_owner,
users.user_name as assigned_user_name";
if($custom_join){
$query .= $custom_join['select'];
}
$query .= " FROM tasks ";
$query .= "LEFT JOIN contacts
ON tasks.contact_id=contacts.id";
$query .= " LEFT JOIN users
ON tasks.assigned_user_id=users.id ";
if($custom_join){
$query .= $custom_join['join'];
}
$where_auto = '1=1';
if($show_deleted == 0){
$where_auto = " tasks.deleted=0
AND ( contacts.deleted IS NULL OR contacts.deleted=0) ";
}else if($show_deleted == 1){
$where_auto = "$this->table_name.deleted=1";
}
//GROUP BY tasks.id";
if($where != "")
$query .= "where $where AND ".$where_auto;
else
$query .= "where ".$where_auto;
if($order_by != "")
$query .= " ORDER BY ". $this->process_order_by($order_by, null);
else
$query .= " ORDER BY tasks.name";
return $query;
}
function create_export_query(&$order_by, &$where)
{
$contact_required = ereg("contacts", $where);
$custom_join = $this->custom_fields->getJOIN(true, true);
if($contact_required)
{
$query = "SELECT tasks.*, contacts.first_name, contacts.last_name";
if($custom_join){
$query .= $custom_join['select'];
}
$query .= " FROM contacts, tasks ";
$where_auto = "tasks.contact_id = contacts.id AND tasks.deleted=0 AND contacts.deleted=0";
}
else
{
$query = 'SELECT tasks.*';
if($custom_join){
$query .= $custom_join['select'];
}
$query .= ' FROM tasks ';
$where_auto = "tasks.deleted=0";
}
if($custom_join){
$query .= $custom_join['join'];
}
if($where != "")
$query .= "where $where AND ".$where_auto;
else
$query .= "where ".$where_auto;
if($order_by != "")
$query .= " ORDER BY ". $this->process_order_by($order_by, null);
else
$query .= " ORDER BY tasks.name";
return $query;
}
function fill_in_additional_list_fields()
{
//echo $this->assigned_user_id2.'lol';
//global $app_strings, $focus;
//if(!empty($this->field_defs['created_by'])) {
//$this->created_by_name = get_assigned_user_name($this->field_defs['created_by']);
//print_r($this);
//echo $focus->created_by;
//$this->created_by_name = $this->field_defs['created_by'];
//}/*
$query="SELECT assigned_user_id2 FROM tasks WHERE id='$this->id'";
$result = $this->db->query($query,true," Error filling in additional detail fields: ");
$row = $this->db->fetchByAssoc($result);
if(!empty($row['assigned_user_id2']))
{
$this->assigned_user_id2= $row['assigned_user_id2'];
$query2="SELECT first_name,last_name FROM users WHERE id='$this->assigned_user_id2'";
$result2 = $this->db->query($query2,true," Error filling in additional detail fields: ");
$row2 = $this->db->fetchByAssoc($result2);
if(!empty($row2['last_name'])){
$this->assigned_user_name2=$row2['first_name'].' '.$row2['last_name'];
}
} else {
$this->assigned_user_name2= null;
}
}
function fill_in_additional_detail_fields()
{
parent::fill_in_additional_detail_fields();
global $app_strings;
if (isset($this->contact_id)) {
require_once("modules/Contacts/Contact.php");
$contact = new Contact();
$contact->retrieve($this->contact_id);
if($contact->id != "") {
$this->contact_name = $contact->full_name;
$this->contact_name_owner = $contact->assigned_user_id;
$this->contact_name_mod = 'Contacts';
$this->contact_phone = $contact->phone_work;
$this->contact_email = $contact->emailAddress->getPrimaryAddress($contact);
} else {
$this->contact_name_mod = '';
$this->contact_name_owner = '';
$this->contact_name='';
$this->contact_email = '';
$this->contact_id='';
}
}
$this->fill_in_additional_parent_fields();
}
function fill_in_additional_parent_fields()
{
$this->parent_name = '';
global $app_strings, $beanFiles, $beanList;
if ( ! isset($beanList[$this->parent_type]))
{
$this->parent_name = '';
return;
}
$beanType = $beanList[$this->parent_type];
require_once($beanFiles[$beanType]);
$parent = new $beanType();
if (is_subclass_of($parent, 'Person')) {
$query = "SELECT first_name, last_name, assigned_user_id parent_name_owner from $parent->table_name where id = '$this->parent_id'";
}
else {
$query = "SELECT name ";
if(isset($parent->field_defs['assigned_user_id'])){
$query .= " , assigned_user_id parent_name_owner ";
}else{
$query .= " , created_by parent_name_owner ";
}
$query .= " from $parent->table_name where id = '$this->parent_id'";
}
$result = $this->db->query($query,true," Error filling in additional detail fields: ");
// Get the id and the name.
$row = $this->db->fetchByAssoc($result);
if ($row && !empty($row['parent_name_owner'])){
$this->parent_name_owner = $row['parent_name_owner'];
$this->parent_name_mod = $this->parent_type;
}
if (is_subclass_of($parent, 'Person') and $row != null)
{
$this->parent_name = '';
if ($row['first_name'] != '') $this->parent_name .= stripslashes($row['first_name']). ' ';
if ($row['last_name'] != '') $this->parent_name .= stripslashes($row['last_name']);
}
elseif($row != null)
{
$this->parent_name = stripslashes($row['name']);
}
else {
$this->parent_name = '';
}
}
function get_list_view_data(){
global $action, $currentModule, $focus, $current_module_strings, $app_list_strings, $image_path, $timedate;
$today = $timedate->handle_offset(date($GLOBALS['timedate']->get_db_date_time_format(), time()), $timedate->dbDayFormat, true);
$task_fields = $this->get_list_view_array();
$task_fields['TIME_DUE'] = $timedate->to_display_time($timedate->to_db_time($task_fields['DATE_DUE']));
$task_fields['DATE_DUE'] = $timedate->to_display_date($timedate->to_db($task_fields['DATE_DUE']));
$date_due = $task_fields['DATE_DUE'];
if (!empty($this->priority))
$task_fields['PRIORITY'] = $app_list_strings['task_priority_dom'][$this->priority];
if (isset($this->parent_type))
$task_fields['PARENT_MODULE'] = $this->parent_type;
if ($this->status != "Completed" && $this->status != "Deferred" ) {
$task_fields['SET_COMPLETE'] = "<a href='index.php?return_module=$currentModule&return_action=".(($action=="DynamicAction")?"index":$action)."&return_id=" . ((!empty($focus->id)) ? $focus->id : "") . "&action=EditView&module=Tasks&record={$this->id}&status=made'>".get_image($image_path."close_inline","alt='Close' border='0'")."</a>";
}
$dd = $timedate->to_db_date($date_due, false);
if ($dd < $today){
$task_fields['DATE_DUE']= "<font class='overdueTask'>".$date_due."</font>";
}else if( $dd == $today ){
$task_fields['DATE_DUE'] = "<font class='todaysTask'>".$date_due."</font>";
}else{
$task_fields['DATE_DUE'] = "<font class='futureTask'>".$date_due."</font>";
}
require_once('include/generic/SugarWidgets/SugarWidgetSubPanelAdditionalDetailsLink.php');
$arr = array();
$swspadl = new SugarWidgetSubPanelAdditionalDetailsLink($arr);
$arr = array( 'module' => 'Tasks', 'fields' => array ( 'ID' => $this->id ) );
$task_fields['AD'] = $swspadl->displayList($arr);
$task_fields['CONTACT_NAME']= $this->contact_name; //return_name($task_fields,"FIRST_NAME","LAST_NAME");
$task_fields['TITLE'] = '';
if (!empty($task_fields['CONTACT_NAME'])) {
$task_fields['TITLE'] .= $current_module_strings['LBL_LIST_CONTACT'].": ".$task_fields['CONTACT_NAME'];
}
if (!empty($this->parent_name)) {
$task_fields['TITLE'] .= "\n".$app_list_strings['record_type_display_notes'][$this->parent_type].": ".$this->parent_name;
$task_fields['PARENT_NAME']=$this->parent_name;
}if($this->date_start!=''){
$task_fields['DATE_START']=date('d.m.Y h:i',strtotime($this->date_start));
} else {
$task_fields['DATE_START']='brak';
}
if($this->date_reminder!='' && $this->date_reminder!='1999-12-31 23:00:00'){
// echo "data: ".strlen($this->date_reminder);
$task_fields['DATE_REMINDER']=date('d.m.Y h:i',strtotime($this->date_reminder));
}else {
$task_fields['DATE_REMINDER']='brak';
}
$user = new User();
$this->retrieve($this->id);
$user->retrieve($this->created_by);
$task_fields['CREATED_BY_NAME'] = $user->full_name;
unset($user);
$task_fields['ASSIGNED_USER_NAME'] = '<a href="index.php?module=Employees&offset=3&stamp=1384944281033836900&return_module=Employees&action=DetailView&record='.$task_fields['ASSIGNED_USER_ID'].'">'.$task_fields['ASSIGNED_USER_NAME'].'</a><br><a href="index.php?module=Employees&offset=3&stamp=1384944281033836900&return_module=Employees&action=DetailView&record='.$task_fields['ASSIGNED_USER_ID2'].'">'.$task_fields['ASSIGNED_USER_NAME2'].'</a>';
return $task_fields;
}
function set_notification_body($xtpl, $task)
{
global $app_list_strings;
global $timedate;
$notifyUser = $task->current_notify_user;
$prefDate = User::getUserDateTimePreferences($notifyUser);
$xtpl->assign("TASK_SUBJECT", $task->name);
//MFH #13507
$xtpl->assign("TASK_PRIORITY", (isset($task->priority)?$app_list_strings['task_priority_dom'][$task->priority]:""));
$xtpl->assign("TASK_DUEDATE", $timedate->to_display_date_time($task->date_due . " " . $task->time_due,true,true,$notifyUser)." ".$prefDate['userGmt']);
$xtpl->assign("TASK_STATUS", (isset($task->status)?$app_list_strings['task_status_dom'][$task->status]:""));
$xtpl->assign("TASK_DESCRIPTION", $task->description);
return $xtpl;
}
function bean_implements($interface){
switch($interface){
case 'ACL':return true;
}
return false;
}
function listviewACLHelper(){
$array_assign = parent::listviewACLHelper();
$is_owner = false;
if(!empty($this->parent_name)){
if(!empty($this->parent_name_owner)){
global $current_user;
$is_owner = $current_user->id == $this->parent_name_owner;
}
}
if(!ACLController::moduleSupportsACL($this->parent_type) || ACLController::checkAccess($this->parent_type, 'view', $is_owner)){
$array_assign['PARENT'] = 'a';
}else{
$array_assign['PARENT'] = 'span';
}
$is_owner = false;
if(!empty($this->contact_name)){
if(!empty($this->contact_name_owner)){
global $current_user;
$is_owner = $current_user->id == $this->contact_name_owner;
}
}
if( ACLController::checkAccess('Contacts', 'view', $is_owner)){
$array_assign['CONTACT'] = 'a';
}else{
$array_assign['CONTACT'] = 'span';
}
return $array_assign;
}
//<Section1>
//Before
/*
function save($check_notify = FALSE)
{
if (empty($this->status) ) {
$mod_strings = return_module_language($GLOBALS['current_language'], $this->module_dir);
$this->status = $mod_strings['LBL_DEFAULT_STATUS'];
}
return parent::save($check_notify);
}
*/
//After
function save($check_notify = FALSE){
global $current_user;
if (empty($this->status) ) {
$mod_strings = return_module_language($GLOBALS['current_language'], $this->module_dir);
$this->status = $mod_strings['LBL_DEFAULT_STATUS'];
}
if(is_array($this->fetched_row)) {
if($this->fetched_row['status'] != $this->status) {
if($this->fetched_row['status'] == "In Progress" && $this->status == "In Review") {
require_once('modules/Users/User.php');
$user = new User();
$user->retrieve($this->created_by);
$this->send_to_user($user);
}
if($this->fetched_row['status'] == "In Review" && $this->status == "Completed" && $current_user->id != $this->assigned_user_id) {
require_once('modules/Users/User.php');
$user = new User();
$user->retrieve($this->assigned_user_id);
$this->send_to_user($user);
}
}
}
echo $_POST['date_reminder_hours'];
//die();
echo 'ds: '.$this->date_start.'<br><br>';
//die("nie zapisuj");
if ($this->assigned_user_id == 'f1963700-4249-2022-1022-4e393326a7b4' )
$this->google_calendar_task = $this->addGoogleCalendarTask();
if($_POST['reminder_type_google']==4){
include_once 'include/ECM/EcmGoogleServices/EcmGoogleService.php';
$go=new EcmGoogleService();
if($go!=false){
if($go->checkLogin()==true){
if($this->google_calendar_task!=''){
$this->google_calendar_task=$go->updateEvent($this->google_calendar_task,$this->name,$this->description,$this->date_start,$this->date_start,$this->date_end,$this->date_end,$this->date_reminder);
} else {
// insert
$this->google_calendar_task=$go->addEvent($this->name,$this->description,$this->date_start,$this->date_start,$this->date_end,$this->date_end,$this->date_reminder);
}
}
}
} else {
// delete
include_once 'include/ECM/EcmGoogleServices/EcmGoogleService.php';
if($this->google_calendar_task!=''){
$go=new EcmGoogleService();
if($go!=false){
if($go->checkLogin()==true){
$go->deleteEvent($this->google_calendar_task);
$this->google_calendar_task='';
}
}
}
}
$this->telephones=implode(',',$_REQUEST['telephones']);
$this->emails=implode(',',$_REQUEST['emails']);
$this->reminder_type = $_POST['reminder_type_sms']+$_POST['reminder_type_email']+$_POST['reminder_type_google'];
$return_id = parent::save($check_notify);
//add event to google calendar
return $return_id;
}
function send_to_user($notify_user) {
require_once("modules/Administration/Administration.php");
$admin = new Administration();
$admin->retrieveSettings();
$sendNotifications = false;
if ($admin->settings['notify_on'])
{
$GLOBALS['log']->info("Notifications: user assignment has changed, checking if user receives notifications");
$sendNotifications = true;
}
elseif(isset($_REQUEST['send_invites']) && $_REQUEST['send_invites'] == 1)
{
// cn: bug 5795 Send Invites failing for Contacts
$sendNotifications = true;
}
else
{
$GLOBALS['log']->info("Notifications: not sending e-mail, notify_on is set to OFF");
}
if($sendNotifications == true) $this->send_assignment_notifications__($notify_user, $admin);
}
function send_assignment_notifications__($notify_user, $admin)
{
global $current_user;
if(($this->object_name == 'Meeting' || $this->object_name == 'Call') || $notify_user->receive_notifications) {
$sendToEmail = $notify_user->emailAddress->getPrimaryAddress($notify_user);
if(empty($sendToEmail)) {
$GLOBALS['log']->warn("Notifications: no e-mail address set for user {$notify_user->user_name}, cancelling send");
} else {
$notify_mail = $this->create_notification_email__($notify_user);
$notify_mail->setMailerForSystem();
if(empty($admin->settings['notify_send_from_assigning_user'])) {
$notify_mail->From = $admin->settings['notify_fromaddress'];
$notify_mail->FromName = (empty($admin->settings['notify_fromname'])) ? "" : $admin->settings['notify_fromname'];
} else {
// Send notifications from the current user's e-mail (ifset)
$fromAddress = $current_user->emailAddress->getReplyToAddress($current_user);
$fromAddress = !empty($fromAddress) ? $fromAddress : $admin->settings['notify_fromaddress'];
$notify_mail->From = $fromAddress;
$from_name = !empty($admin->settings['notify_fromname']) ? $admin->settings['notify_fromname'] : "";
if($current_user->getPreference('mail_fromname') != '') {
$from_name = $current_user->getPreference('mail_fromname');
}
$notify_mail->FromName = $from_name;
}
if(!$notify_mail->Send()) {
$GLOBALS['log']->warn("Notifications: error sending e-mail (method: {$notify_mail->Mailer}), (error: {$notify_mail->ErrorInfo})");
} else {
$GLOBALS['log']->info("Notifications: e-mail successfully sent");
}
}
}
}
function create_notification_email__($notify_user) {
global $sugar_version;
global $sugar_config;
global $app_list_strings;
global $current_user;
global $locale;
require_once("XTemplate/xtpl.php");
require_once("include/SugarPHPMailer.php");
$notify_address = $notify_user->emailAddress->getPrimaryAddress($notify_user);
$notify_name = $notify_user->full_name;
$GLOBALS['log']->debug("Notifications: user has e-mail defined");
$notify_mail = new SugarPHPMailer();
$notify_mail->AddAddress($notify_address, $notify_name);
if(empty($_SESSION['authenticated_user_language'])) {
$current_language = $sugar_config['default_language'];
} else {
$current_language = $_SESSION['authenticated_user_language'];
}
$xtpl = new XTemplate("include/language/{$current_language}.notify_template.html");
$template_name = 'Task';
$this->current_notify_user = $notify_user;
if(in_array('set_notification_body', get_class_methods($this))) {
$xtpl = $this->set_notification_body($xtpl, $this);
} else {
$xtpl->assign("OBJECT", $this->object_name);
$template_name = "Default";
}
$xtpl->assign("ASSIGNED_USER", $this->new_assigned_user_name);
$xtpl->assign("ASSIGNER", $current_user->name);
$port = '';
if(isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443) {
$port = $_SERVER['SERVER_PORT'];
}
$httpHost = $_SERVER['HTTP_HOST'];
if($colon = strpos($httpHost, ':')) {
$httpHost = substr($httpHost, 0, $colon);
}
$parsedSiteUrl = parse_url($sugar_config['site_url']);
$host = ($parsedSiteUrl['host'] != $httpHost) ? $httpHost : $parsedSiteUrl['host'];
if(!isset($parsedSiteUrl['port'])) {
$parsedSiteUrl['port'] = 80;
}
$port = ($parsedSiteUrl['port'] != 80) ? ":".$parsedSiteUrl['port'] : '';
$path = !empty($parsedSiteUrl['path']) ? $parsedSiteUrl['path'] : "";
$cleanUrl = "{$parsedSiteUrl['scheme']}://{$host}{$port}{$path}";
if(eregi("localhost",$cleanUrl))$cleanUrl=str_replace("localhost","localhost:8080/vserver/e5crm.more7.com/www",$cleanUrl);
$xtpl->assign("URL", $cleanUrl."/index.php?module={$this->module_dir}&action=DetailView&record={$this->id}");
$xtpl->assign("SUGAR", "Sugar v{$sugar_version}");
$xtpl->assign("WHO_CHANGE", $current_user->full_name);
$xtpl->parse($template_name);
$xtpl->parse($template_name . "_Subject");
$notify_mail->Body = from_html(trim($xtpl->text($template_name)));
$notify_mail->Subject = from_html($xtpl->text($template_name . "_Subject"));
// cn: bug 8568 encode notify email in User's outbound email encoding
$notify_mail->prepForOutbound();
return $notify_mail;
}
function addGoogleCalendarTask() {
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Calendar');
Zend_Loader::loadClass('Zend_Http_Client');
// connect to service
$gcal = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;
$user = "mz@e5.pl";
$pass = "3x4z8123";
$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $gcal);
$gcal = new Zend_Gdata_Calendar($client);
//date
$start_time = array();
$start_time[] = intval(substr($this->date_start, 11,2));
$start_time[] = intval(substr($this->date_start, 14,2));
$start_time[] = intval(substr($this->date_start, 0,2));
$start_time[] = intval(substr($this->date_start, 3,2));
$start_time[] = intval(substr($this->date_start, 6,4));
$start = date(DATE_ATOM, mktime($start_time[0],$start_time[1],0,$start_time[2],$start_time[3],$start_time[4]));
$end_time = array();
$end_time[] = intval(substr($this->date_due, 11,2));
$end_time[] = intval(substr($this->date_due, 14,2));
$end_time[] = intval(substr($this->date_due, 0,2));
$end_time[] = intval(substr($this->date_due, 3,2));
$end_time[] = intval(substr($this->date_due, 6,4));
$end = date(DATE_ATOM, mktime($end_time[0],$end_time[1],0,$end_time[2],$end_time[3],$end_time[4]));
//create description
$description = $this->description;
if ($this->parent_id && $this->parent_id!='') {
//get parent informations
$p = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("SELECT * FROM ".strtolower($this->parent_type)." WHERE id='".$this->parent_id."'"));
global $app_strings;
$description.=" ".$app_strings['LBL_'.strtoupper($this->parent_type)].': '.$p['name'];
//create where
$where = $p['billing_address_city'].', '.$p['billing_address_street'];
}
// save to server
try {
$event = $gcal->newEventEntry();
$event->title = $gcal->newTitle($this->name);
$event->content =$gcal->newContent($description);
$when = $gcal->newWhen();
$when->startTime = $start;
$when->endTime = $end;
$event->when = array($when);
$event->where = array($gcal->newWhere($where));
$new_task = $gcal->insertEvent($event);
$google_calendar_task = $new_task->getEditLink()->href;
//save gct_id
//$GLOBALS['db'] -> query("UPDATE tasks SET google_calendar_task='".$google_calendar_task."' WHERE id='".$this->id."'");
} catch (Zend_Gdata_App_Exception $e) {
echo "Error: " . $e->getResponse();
} catch (Exception $e) {
echo "Error:" . $e->getResponse();
}
return $google_calendar_task;
}
//</Section1>
}
?>

View File

@@ -0,0 +1,97 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
require_once('include/EditView/QuickCreate.php');
require_once('modules/Tasks/Task.php');
require_once('include/javascript/javascript.php');
class TasksQuickCreate extends QuickCreate {
var $javascript;
function process() {
global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
$mod_strings = return_module_language($current_language, 'Tasks');
parent::process();
$this->ss->assign("PRIORITY_OPTIONS", get_select_options_with_id($app_list_strings['task_priority_dom'], $app_list_strings['task_priority_default']));
$this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['task_status_dom'], $app_list_strings['task_status_default']));
$this->ss->assign("TIME_FORMAT", '('. $timedate->get_user_time_format().')');
$focus = new Task();
$time_start_hour = intval(substr($focus->time_start, 0, 2));
$time_start_minutes = substr($focus->time_start, 3, 5);
if($time_start_minutes > 45) {
$time_start_hour += 1;
}
$time_pref = $timedate->get_time_format();
if (strpos($time_pref, 'a')) {
if(!isset($focus->meridiem_am_values)) {
$focus->meridiem_am_values = array('am'=>'am', 'pm'=>'pm');
}
$this->ss->assign("TIME_MERIDIEM", get_select_options_with_id($focus->meridiem_am_values, $time_start_hour < 12 ? 'am' : 'pm'));
} else if(strpos($time_pref, 'A')) {
if(!isset($focus->meridiem_AM_values)) {
$focus->meridiem_AM_values = array('AM'=>'AM', 'PM'=>'PM');
}
$this->ss->assign("TIME_MERIDIEM", get_select_options_with_id($focus->meridiem_AM_values, $time_start_hour < 12 ? 'AM' : 'PM'));
} //if-else
$this->ss->assign("USER_DATEFORMAT", '('. $timedate->get_user_date_format().')');
$this->ss->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
if($this->viaAJAX) { // override for ajax call
$this->ss->assign('saveOnclick', "onclick='if(check_form(\"tasksQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"activities\"); else return false;'");
$this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_activities\")';");
}
$this->ss->assign('viaAJAX', $this->viaAJAX);
$this->javascript = new javascript();
$this->javascript->setFormName('tasksQuickCreate');
$focus = new Task();
$this->javascript->setSugarBean($focus);
$this->javascript->addAllFields('');
$this->ss->assign('additionalScripts', $this->javascript->getScript(false));
}
}
?>

View File

@@ -0,0 +1,5 @@
<?php
global $app_strings;
var_dump($app_strings);
return;
?>

76
modules/Tasks/field_arrays.php Executable file
View File

@@ -0,0 +1,76 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: Contains field arrays that are used for caching
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
$fields_array['Task'] = array ('column_fields' =>Array("id"
, "date_entered"
, "date_modified"
, "assigned_user_id"
, "assigned_user_id2"
, "modified_user_id"
, "created_by"
,'email1'
, "description"
, "name"
, "status"
, "date_due"
, "time_due"
, "date_start_flag"
, "date_start"
, "time_start"
, "priority"
, "date_due_flag"
, "parent_type"
, "parent_id"
, "contact_id"
),
'list_fields' => Array('id', 'status', 'name', 'email1','parent_type', 'parent_name', 'parent_id', 'date_due', 'contact_id', 'contact_name', 'assigned_user_name', 'assigned_user_id','assigned_user_name2', 'assigned_user_id2','first_name','last_name','time_due', 'priority'
),
'required_fields' => array('name'=>1),
);
?>

View File

@@ -0,0 +1,119 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: Defines the English language pack for the base application.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
$mod_strings = array (
'LBL_MODULE_NAME' => 'Tasks',
'LBL_TASK' => 'Tasks: ',
'LBL_MODULE_TITLE' => ' Tasks: Home',
'LBL_SEARCH_FORM_TITLE' => ' Task Search',
'LBL_LIST_FORM_TITLE' => ' Task List',
'LBL_NEW_FORM_TITLE' => ' Create Task',
'LBL_NEW_FORM_SUBJECT' => 'Subject:',
'LBL_NEW_FORM_DUE_DATE' => 'Due Date:',
'LBL_NEW_FORM_DUE_TIME' => 'Due Time:',
'LBL_NEW_TIME_FORMAT' => '(24:00)',
'LBL_LIST_CLOSE' => 'Close',
'LBL_LIST_SUBJECT' => 'Subject',
'LBL_LIST_CONTACT' => 'Contact',
'LBL_LIST_PRIORITY' => 'Priority',
'LBL_LIST_RELATED_TO' => 'Related to',
'LBL_LIST_DUE_DATE' => 'Due Date',
'LBL_LIST_DUE_TIME' => 'Due Time',
'LBL_SUBJECT' => 'Subject:',
'LBL_STATUS' => 'Status:',
'LBL_DUE_DATE' => 'Due Date:',
'LBL_DUE_TIME' => 'Due Time:',
'LBL_PRIORITY' => 'Priority:',
'LBL_COLON' => ':',
'LBL_DUE_DATE_AND_TIME' => 'Due Date & Time:',
'LBL_START_DATE_AND_TIME' => 'Start Date & Time:',
'LBL_START_DATE' => 'Start Date:',
'LBL_LIST_START_DATE' => 'Start Date',
'LBL_START_TIME' => 'Start Time:',
'LBL_LIST_START_TIME' => 'Start Time',
'DATE_FORMAT' => '(yyyy-mm-dd)',
'LBL_NONE' => 'None',
'LBL_CONTACT' => 'Contact:',
'LBL_EMAIL_ADDRESS' => 'Email Address:',
'LBL_PHONE' => 'Phone:',
'LBL_EMAIL' => 'Email:',
'LBL_DESCRIPTION_INFORMATION' => 'Description Information',
'LBL_DESCRIPTION' => 'Description:',
'LBL_NAME' => 'Name:',
'LBL_CONTACT_NAME' => 'Contact Name ',
'LBL_LIST_COMPLETE' => 'Complete:',
'LBL_LIST_STATUS' => 'Status',
'LBL_DATE_DUE_FLAG' => 'No Due Date',
'LBL_DATE_START_FLAG' => 'No Start Date',
'ERR_DELETE_RECORD' => 'You must specify a record number to delete the contact.',
'ERR_INVALID_HOUR' => 'Please enter an hour between 0 and 24',
'LBL_DEFAULT_STATUS' => 'Not Started',
'LBL_DEFAULT_PRIORITY' => 'Medium',
'LBL_LIST_MY_TASKS' => 'My Open Tasks',
'LNK_NEW_CALL' => 'Schedule Call',
'LNK_NEW_MEETING' => 'Schedule Meeting',
'LNK_NEW_TASK' => 'Create Task',
'LNK_NEW_NOTE' => 'Create Note or Attachment',
'LNK_NEW_EMAIL' => 'Archive Email',
'LNK_CALL_LIST' => 'Calls',
'LNK_MEETING_LIST' => 'Meetings',
'LNK_TASK_LIST' => 'Tasks',
'LNK_NOTE_LIST' => 'Notes',
'LNK_EMAIL_LIST' => 'Emails',
'LNK_VIEW_CALENDAR' => 'Today',
'LBL_CONTACT_FIRST_NAME'=>'Contact First Name',
'LBL_CONTACT_LAST_NAME'=>'Contact Last Name',
'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned User',
'LBL_ASSIGNED_TO_NAME'=>'Assigned to:',
'LBL_LIST_DATE_MODIFIED' => 'Date Modified',
'LBL_CONTACT_ID' => 'Contact ID:',
'LBL_PARENT_ID' => 'Parent ID:',
'LBL_CONTACT_PHONE' => 'Contact Phone:',
'LBL_PARENT_NAME' => 'Parent Type:',
'LBL_CREATED_BY_NAME' => 'Created by',
);
?>

View File

@@ -0,0 +1,119 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: Defines the English language pack for the base application.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
$mod_strings = array (
'LBL_MODULE_NAME' => 'Aufgaben',
'LBL_TASK' => 'Aufgaben:',
'LBL_MODULE_TITLE' => 'Aufgaben: Home',
'LBL_SEARCH_FORM_TITLE' => 'Aufgaben Suche',
'LBL_LIST_FORM_TITLE' => 'Aufgaben Liste',
'LBL_NEW_FORM_TITLE' => 'Neue Aufgabe',
'LBL_NEW_FORM_SUBJECT' => 'Betreff:',
'LBL_NEW_FORM_DUE_DATE' => 'Fällig am:',
'LBL_NEW_FORM_DUE_TIME' => 'Fällig um:',
'LBL_NEW_TIME_FORMAT' => '(24:00)',
'LBL_LIST_CLOSE' => 'Schließen',
'LBL_LIST_SUBJECT' => 'Betreff',
'LBL_LIST_CONTACT' => 'Kontakt',
'LBL_LIST_PRIORITY' => 'Priorität',
'LBL_LIST_RELATED_TO' => 'Gehört zu',
'LBL_LIST_DUE_DATE' => 'Fällig am',
'LBL_LIST_DUE_TIME' => 'Fällig um:',
'LBL_SUBJECT' => 'Betreff:',
'LBL_STATUS' => 'Status:',
'LBL_DUE_DATE' => 'Fällig am:',
'LBL_DUE_TIME' => 'Fällig um:',
'LBL_PRIORITY' => 'Priorität:',
'LBL_COLON' => ':',
'LBL_DUE_DATE_AND_TIME' => 'Erledigen bis:',
'LBL_START_DATE_AND_TIME' => 'Startdatum und -zeit:',
'LBL_START_DATE' => 'Startdatum:',
'LBL_LIST_START_DATE' => 'Startdatum',
'LBL_START_TIME' => 'Beginn:',
'LBL_LIST_START_TIME' => 'Startzeit',
'DATE_FORMAT' => '(jjjj-mm-tt)',
'LBL_NONE' => 'Kein(e)',
'LBL_CONTACT' => 'Kontakt:',
'LBL_EMAIL_ADDRESS' => 'E-Mail Adresse:',
'LBL_PHONE' => 'Telefon:',
'LBL_EMAIL' => 'E-Mail:',
'LBL_DESCRIPTION_INFORMATION' => 'Beschreibungsinformation',
'LBL_DESCRIPTION' => 'Beschreibung:',
'LBL_NAME' => 'Name:',
'LBL_CONTACT_NAME' => 'Kontakt:',
'LBL_LIST_COMPLETE' => 'Abgeschlossen:',
'LBL_LIST_STATUS' => 'Status',
'LBL_DATE_DUE_FLAG' => 'Kein Fälligkeitsdatum',
'LBL_DATE_START_FLAG' => 'Kein Startdatum',
'ERR_DELETE_RECORD' => 'Die Nummer eines Eintrages muss angegeben werden um einen Kontakt zu löschen!',
'ERR_INVALID_HOUR' => 'Bitte geben Sie eine Stunde zwischen 0 Uhr und 24 Uhr ein',
'LBL_DEFAULT_STATUS' => 'Nicht begonnen',
'LBL_DEFAULT_PRIORITY' => 'Mittel',
'LBL_LIST_MY_TASKS' => 'Meine offenen Aufgaben',
'LNK_NEW_CALL' => 'Neuer Anruf',
'LNK_NEW_MEETING' => 'Neues Meeting',
'LNK_NEW_TASK' => 'Neue Aufgabe',
'LNK_NEW_NOTE' => 'Neue Notiz oder Anlage',
'LNK_NEW_EMAIL' => 'E-Mail archivieren',
'LNK_CALL_LIST' => 'Anrufe',
'LNK_MEETING_LIST' => 'Meetings',
'LNK_TASK_LIST' => 'Aufgaben',
'LNK_NOTE_LIST' => 'Notizen',
'LNK_EMAIL_LIST' => 'E-Mails',
'LNK_VIEW_CALENDAR' => 'Heute',
'LBL_CONTACT_FIRST_NAME'=>'Kontakt Vorname',
'LBL_CONTACT_LAST_NAME'=>'Kontakt Nachname',
'LBL_LIST_ASSIGNED_TO_NAME' => 'Zugew. Benutzer',
'LBL_ASSIGNED_TO_NAME'=>'Zugewiesen an:',
'LBL_LIST_DATE_MODIFIED' => 'Geändert am',
'LBL_CONTACT_ID' => 'Kontakt ID:',
'LBL_PARENT_ID' => 'Eltern ID:',
'LBL_CONTACT_PHONE' => 'Telefon Kontaktperson:',
'LBL_PARENT_NAME' => 'Eltern-Typ:',
'LBL_CREATED_BY_NAME' => 'Created by',
);
?>

View File

@@ -0,0 +1,109 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version
* 1.1.3 ("License"); You may not use this file except in compliance with the
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* All copies of the Covered Code must include on each user interface screen:
* (i) the "Powered by SugarCRM" logo and
* (ii) the SugarCRM copyright notice
* in the same form as they appear in the distribution. See full license for
* requirements.
*
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) 2004-2005 SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
/*********************************************************************************
* pl_pl.lang.php,v for SugarCRM 4.5.1-->>
* Translator: Krzysztof Morawski
* All Rights Reserved.
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
* Contributor(s): ______________________________________..
********************************************************************************/
$mod_strings = array (
'LBL_MODULE_NAME' => 'Zadania',
'LBL_TASK' => 'Zadania: ',
'LBL_PARENT_NAME'=>'Kontrahent',
'LBL_MODULE_TITLE' => ' Zadania: Strona główna',
'LBL_SEARCH_FORM_TITLE' => ' Wyszukaj',
'LBL_LIST_FORM_TITLE' => ' Lista zadań',
'LBL_NEW_FORM_TITLE' => ' Dodaj zadanie',
'LBL_NEW_FORM_SUBJECT' => 'Temat:',
'LBL_NEW_FORM_DUE_DATE' => 'Data zakończenia:',
'LBL_NEW_FORM_DUE_TIME' => 'Data zakończenia',
'LBL_NEW_TIME_FORMAT' => '(24:00)',
'LBL_LIST_CLOSE' => 'Zamknij',
'LBL_LIST_SUBJECT' => 'Temat',
'LBL_LIST_CONTACT' => 'Osoba Kontaktowa',
'LBL_LIST_PRIORITY' => 'Priorytet',
'LBL_LIST_RELATED_TO' => 'Związane z',
'LBL_LIST_DUE_DATE' => 'Data zakończenia',
'LBL_LIST_DUE_TIME' => 'Data zakończenia',
'LBL_SUBJECT' => 'Temat:',
'LBL_STATUS' => 'Status:',
'LBL_DUE_DATE' => 'Termin zakończenia:',
'LBL_DUE_TIME' => 'Data zakończenia:',
'LBL_PRIORITY' => 'Priorytet:',
'LBL_COLON' => ':',
'LBL_DUE_DATE_AND_TIME' => 'Data i czas zakończenia:',
'LBL_START_DATE_AND_TIME' => 'Data i czas rozpoczęcia:',
'LBL_START_DATE' => 'Termin rozpoczęcia:',
'LBL_LIST_START_DATE' => 'Data Rozpoczęcia',
'LBL_START_TIME' => 'Czas rozpoczęcia:',
'LBL_LIST_START_TIME' => 'Czas Rozpoczęcia',
'DATE_FORMAT' => '(rrrr-mm-dd)',
'LBL_NONE' => 'brak',
'LBL_TELEPHONES'=>'Telefony:',
'LBL_EMAILS'=>'Emaile:',
'LBL_CONTACT' => 'Osoba kont.:',
'LBL_EMAIL_ADDRESS' => 'Adres email:',
'LBL_REMINDER_OPTIONS'=>'Powtarzaj co:',
'LBL_PHONE' => 'Tel.:',
'LBL_EMAIL' => 'E-mail:',
'LBL_DESCRIPTION_INFORMATION' => 'Informacje o Zadaniu',
'LBL_DESCRIPTION' => 'Opis:',
'LBL_NAME' => 'Nazwa:',
'LBL_CONTACT_NAME' => 'Osoba Kontaktowa: ',
'LBL_LIST_COMPLETE' => 'Zakończ:',
'LBL_LIST_STATUS' => 'Status:',
'LBL_DATE_DUE_FLAG' => 'Brak terminu zakończenia',
'LBL_LIST_DATE_MODIFIED' => 'Data Modyfikacji',
'LBL_DATE_START_FLAG' => 'Brak daty rozpoczęcia',
'ERR_DELETE_RECORD' => 'Wskaż rekord, który chcesz usunąć.',
'ERR_INVALID_HOUR' => 'Wpisz proszę godzinę pomiędzy 0 a 24',
'LBL_DEFAULT_STATUS' => 'Nie rozpoczęte',
'LBL_DEFAULT_PRIORITY' => 'Średni',
'LBL_LIST_MY_TASKS' => 'Moje rozpoczęte zadania',
'LNK_NEW_CALL' => 'Dodaj Rozmowę tel.',
'LNK_NEW_MEETING' => 'Dodaj Spotkanie',
'LNK_NEW_TASK' => 'Dodaj Zadanie',
'LNK_NEW_NOTE' => 'Dodaj Notatkę',
'LNK_NEW_EMAIL' => 'Dodaj Email',
'LNK_CALL_LIST' => 'Lista Rozmów tel.',
'LNK_MEETING_LIST' => 'Lista Spotkań',
'LNK_TASK_LIST' => 'Lista Zadań',
'LNK_NOTE_LIST' => 'Lista Notatek',
'LNK_EMAIL_LIST' => 'Lista E-maili',
'LNK_VIEW_CALENDAR' => 'Dziś:',
'LBL_CONTACT_FIRST_NAME'=>'Nazwisko Osoby Kontaktowej',
'LBL_CONTACT_LAST_NAME'=>'Imię Osoby Kontaktowej', 'LBL_LIST_ASSIGNED_TO_NAME' => 'Przydzielony Użytkownik',
'LBL_ASSIGNED_TO_NAME'=>'Przydzielone do:',
'LBL_REMINDER_TYPE'=>'Przypomnienie',
'LBL_DATE_REMINDER'=>'Termin przypomnienia',
'LBL_CREATED_BY_NAME' => 'Utworzony przez',
);
?>

View File

@@ -0,0 +1,45 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
$searchFields['Tasks'] =
array (
'name' => array( 'query_type'=>'default'),
'contact_name' => array( 'query_type'=>'default','db_field'=>array('contacts.first_name','contacts.last_name')),
'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true),
'assigned_user_id'=> array('query_type'=>'default'),
'status'=> array('query_type'=>'default', 'options' => 'task_status_dom', 'template_var' => 'STATUS_FILTER')
);
?>

View File

@@ -0,0 +1,73 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
*********************************************************************************/
function additionalDetailsTask($fields) {
static $mod_strings;
global $app_list_strings;
if(empty($mod_strings)) {
global $current_language;
$mod_strings = return_module_language($current_language, 'Tasks');
}
$overlib_string = '<div style="overflow:auto; height:100px; max-height:100px;">';
if(!empty($fields['DATE_START'])) $overlib_string .= '<b>'. $mod_strings['LBL_START_DATE_AND_TIME'] . '</b> ' . $fields['DATE_START'] . '<br>';
if(!empty($fields['PRIORITY'])) $overlib_string .= '<b>'. $mod_strings['LBL_PRIORITY'] . '</b> ' . $fields['PRIORITY'] . '<br>';
if(!empty($fields['STATUS'])) $overlib_string .= '<b>'. $mod_strings['LBL_STATUS'] . '</b> ' . $fields['STATUS'] . '<br>';
if(!empty($fields['DESCRIPTION'])) {
$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . $fields['DESCRIPTION'];
if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
}
$overlib_string .= '</div>';
$editLink = "index.php?action=EditView&module=Tasks&record={$fields['ID']}";
$viewLink = "index.php?action=DetailView&module=Tasks&record={$fields['ID']}";
$return_module = empty($_REQUEST['module']) ? 'Tasks' : $_REQUEST['module'];
$return_action = empty($_REQUEST['action']) ? 'ListView' : $_REQUEST['action'];
$editLink .= "&return_module=$return_module&return_action=$return_action";
$viewLink .= "&return_module=$return_module&return_action=$return_action";
return array('fieldToAddTo' => 'NAME',
'string' => $overlib_string,
'editLink' => $editLink,
'viewLink' => $viewLink);
}
?>

View File

@@ -0,0 +1,153 @@
<?php
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
$viewdefs['Tasks']['DetailView'] = array(
'templateMeta' => array('form' => array('buttons'=>array('EDIT', 'DUPLICATE', 'DELETE',)),
'maxColumns' => '2',
'widths' => array(
array('label' => '10', 'field' => '30'),
array('label' => '10', 'field' => '30')
),
),
'panels' =>array (
array (
array (
'name' => 'name',
'label' => 'LBL_SUBJECT',
),
'status',
),
array (
'date_start',
array (
'name' => 'parent_name'
),
),
array (
'date_due',
array (
'name' => 'contact_name',
'label' => 'LBL_CONTACT',
),
),
array (
'date_reminder',
array('label'=>'LBL_REMINDER_TYPE','customCode' =>
'SMS:<input type="checkbox" id="reminder_type_sms" name="reminder_type_sms" value="1" {if $fields.reminder_type.value=="5" || $fields.reminder_type.value=="3" || $fields.reminder_type.value=="1"}checked{/if} tabindex="109">
&nbsp;Email:<input type="checkbox" id="reminder_type_email" {if $fields.reminder_type.value=="6" || $fields.reminder_type.value=="3" || $fields.reminder_type.value=="2"}checked{/if} name="reminder_type_email" value="2" title="" tabindex="109">
&nbsp;Google:<input type="checkbox" id="reminder_type_google" name="reminder_type_google" value="4" {if $fields.reminder_type.value=="5" || $fields.reminder_type.value=="6" || $fields.reminder_type.value=="4"}checked{/if} tabindex="109">
')
),
array (
array (
'name' => 'assigned_user_name',
'label' => 'LBL_ASSIGNED_TO',
),
'priority',
),
array (
array (
'name' => 'created_by_name',
'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
'label' => 'LBL_DATE_ENTERED',
),
array (
'name' => 'modified_by_name',
'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
'label' => 'LBL_DATE_MODIFIED',
),
),
array (
'description',
array('label'=>'LBL_REMINDER_OPTIONS','customCode' =>
'{$fields.remider_interval.value} {if $fields.remider_interval_type.value=="d"}dni{/if}
{if $fields.remider_interval_type.value=="m"}miesięcy{/if}
{if $fields.remider_interval_type.value=="y"}lat{/if}
')
),
array(
array(
'name' => 'items_list_panel',
'hideLabel' => false,
'label'=>'LBL_TELEPHONES',
'customCode' =>"
{include file='modules/Tasks/tpls/telephonedetailview.tpl'}",
/*
<input type="hidden" name="websites_list" id="websites_list" value=\'{$WEBSITES_LIST}\'>
<div style="width:30%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="itemsTableDIV2">
</div><br>', */
),
array(
'name' => 'items_list_panel',
'hideLabel' => false,
'label'=>'LBL_EMAILS',
'customCode' =>"
{include file='modules/Tasks/tpls/emaildetailview.tpl'}",
/*
<input type="hidden" name="websites_list" id="websites_list" value=\'{$WEBSITES_LIST}\'>
<div style="width:30%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="itemsTableDIV2">
</div><br>', */
)
),
)
);
?>

View File

@@ -0,0 +1,164 @@
<?php
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
$viewdefs['Tasks']['EditView'] = array(
'templateMeta' => array('form' => array('hidden'=>array('<input type="hidden" name="isSaveAndNew" value="false">'),
'buttons' =>array('SAVE', 'CANCEL',
array('customCode'=>'{if $fields.status.value != "Completed"}' .
'<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" ' .
'accessKey="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_KEY}" ' .
'class="button" ' .
'onclick="document.getElementById(\'status\').value=\'Completed\'; this.form.action.value=\'Save\'; this.form.return_module.value=\'Tasks\'; this.form.isDuplicate.value=true; this.form.isSaveAndNew.value=true; this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'; return check_form(\'EditView\');" ' .
'type="submit" name="button" ' .
'value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}')),
),
'maxColumns' => '2',
'widths' => array(
array('label' => '10', 'field' => '30'),
array('label' => '10', 'field' => '30')
),
),
'panels' =>array (
'default' =>
array (
array (
array('name'=>'name', 'displayParams'=>array('required'=>true)),
array('name'=>'status', 'displayParams'=>array('required'=>true)),
),
array (
array('name'=>'date_start',
'type'=>'datetimecombo',
'displayParams'=>array('showNoneCheckbox'=>true, 'showFormats'=>true)
),
array (
'name' => 'parent_name',
'tabIndex' => '1',
'displayParams' => array(
'required' => true,
'size' => 45
)
),
),
array (
array('name'=>'date_due',
'type'=>'datetimecombo',
'displayParams'=>array('showNoneCheckbox'=>true, 'showFormats'=>true)
),
array (
'name' => 'contact_name',
'tabIndex' => '1',
'displayParams' => array (
'size' => 45,
'field_to_name_array' => array(
'id'=>'contact_id',
'name'=>'contact_name',
),
'initial_filter' => "&account_id=\" + document.getElementById(\"parent_id\").value + \"",
'additionalFields' => array(
'parent_id' => 'parent_id',
),
),
),
),
array (
array('name'=>'date_reminder',
'type'=>'datetimecombo',
'displayParams'=>array('showNoneCheckbox'=>true, 'showFormats'=>true)
),
array('name'=>'priority', 'displayParams'=>array('required'=>true)),
),
array (
'assigned_user_name',
array('label'=>'LBL_REMINDER_TYPE','customCode' =>
'SMS:<input type="checkbox" id="reminder_type_sms" name="reminder_type_sms" value="1" {if $fields.reminder_type.value=="5" || $fields.reminder_type.value=="3" || $fields.reminder_type.value=="1"}checked{/if} tabindex="109">
&nbsp;Email:<input type="checkbox" id="reminder_type_email" {if $fields.reminder_type.value=="6" || $fields.reminder_type.value=="3" || $fields.reminder_type.value=="2"}checked{/if} name="reminder_type_email" value="2" title="" tabindex="109">
&nbsp;{if $g_check==1}Google:<input type="checkbox" id="reminder_type_google" name="reminder_type_google" value="4" {if $fields.reminder_type.value=="5" || $fields.reminder_type.value=="6" || $fields.reminder_type.value=="4"}checked{/if} tabindex="109">{/if}
')
),
array (
array('name'=>'description', 'displayParams'=>array('rows'=>8, 'cols'=>60)),
array('label'=>'LBL_REMINDER_OPTIONS','customCode' =>
'<input type="hidden" id="record_id" name="record_id" value="{$fields.record_id.value}"><input type="hidden" id="record_type" name="record_type" value="{$fields.record_type.value}"><input tabindex="115" type="number" min="0" id="remider_interval" name="remider_interval" style="width: 40px; height: 18px;" value="{$fields.remider_interval.value}"> <select name="remider_interval_type">
<option value="d"{if $fields.remider_interval_type.value=="d"} selected="selected"{/if}>dni</option><option value="m"{if $fields.remider_interval_type.value=="m"} selected="selected"{/if}>miesięcy</option><option value="y"{if $fields.remider_interval_type.value=="y"} selected="selected"{/if}>lat</option></select>'
)
),
array(
array(
'name' => 'items_list_panel',
'hideLabel' => false,
'label'=>'LBL_TELEPHONES',
'customCode' =>"
{include file='modules/Tasks/tpls/telephoneeditview.tpl'}",
/*
<input type="hidden" name="websites_list" id="websites_list" value=\'{$WEBSITES_LIST}\'>
<div style="width:30%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="itemsTableDIV2">
</div><br>', */
),
array(
'name' => 'items_list_panel',
'hideLabel' => false,
'label'=>'LBL_EMAILS',
'customCode' =>"
{include file='modules/Tasks/tpls/emaileditview.tpl'}",
/*
<input type="hidden" name="websites_list" id="websites_list" value=\'{$WEBSITES_LIST}\'>
<div style="width:30%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="itemsTableDIV2">
</div><br>', */
)
),
),
)
);
?>

View File

@@ -0,0 +1,92 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/**
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
*/
$listViewDefs['Tasks'] = array(
'SET_COMPLETE' => array(
'width' => '1',
'label' => 'LBL_LIST_CLOSE',
'link' => true,
'sortable' => false,
'default' => true,
'related_fields' => array('status')),
'NAME' => array(
'width' => '20',
'label' => 'LBL_LIST_SUBJECT',
'link' => true,
'default' => true),
'PARENT_NAME' => array(
'width' => '20',
'label' => 'Kontrahent',
'link' => false,
'default' => true
),
'DATE_START' => array(
'width' => '15',
'label' => 'Termin rozpoczęcia',
'link' => false,
'default' => true),
'DATE_REMINDER' => array(
'width' => '15',
'label' => 'Termin przypomnienia',
'link' => false,
'default' => true),
'STATUS' => array(
'width' => '10',
'label' => 'LBL_LIST_STATUS',
'link' => false,
'default' => true),
'PRIORITY' => array(
'width' => '10',
'label' => 'LBL_LIST_PRIORITY',
'link' => false,
'default' => true),
'ASSIGNED_USER_NAME' => array(
'width' => '2',
'label' => 'Użytkownik',
'default' => true),
);
?>

View File

@@ -0,0 +1,55 @@
<?php
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
$searchdefs['Tasks'] = array(
'templateMeta' => array(
'maxColumns' => '3',
'widths' => array('label' => '10', 'field' => '30'),
),
'layout' => array(
'basic_search' => array(
'name',
'parent_name',
'date_start',
array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', //'function' => array('name' => 'get_user_array', 'params' => array(false))
'options' => 'task_users_dom'
),
'status',
),
),
);
?>

View File

@@ -0,0 +1,74 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
$viewdefs['Tasks']['SideQuickCreate'] = array(
'templateMeta' => array('form'=>array('buttons'=>array('SAVE'),
'headerTpl'=>'include/EditView/header.tpl',
'footerTpl'=>'include/EditView/footer.tpl',
'button_location'=>'bottom',
),
'maxColumns' => '1',
'panelClass'=>'none',
'labelsOnTop'=>true,
'widths' => array(
array('label' => '10', 'field' => '30'),
),
),
'panels' =>array (
'DEFAULT' =>
array (
array (
array('name'=>'name', 'displayParams'=>array('required'=>true, 'size'=>20)),
),
array (
array('name'=>'date_due'),
),
array (
array('name'=>'priority','displayParams'=>array('required'=>true)),
),
array (
array('name'=>'assigned_user_name', 'displayParams'=>array('required'=>true, 'size'=>11, 'selectOnly'=>true)),
),
),
)
);
?>

View File

@@ -0,0 +1,65 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/**
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
*/
$GLOBALS['studioDefs']['Tasks'] = array(
'LBL_DETAILVIEW'=>array(
'template'=>'xtpl',
'template_file'=>'modules/Tasks/DetailView.html',
'php_file'=>'modules/Tasks/DetailView.php',
'type'=>'DetailView',
),
'LBL_EDITVIEW'=>array(
'template'=>'xtpl',
'template_file'=>'modules/Tasks/EditView.html',
'php_file'=>'modules/Tasks/EditView.php',
'type'=>'EditView',
),
'LBL_LISTVIEW'=>array(
'template'=>'listview',
'meta_file'=>'modules/Tasks/listviewdefs.php',
'type'=>'ListView',
),
'LBL_SEARCHFORM'=>array(
'template'=>'xtpl',
'template_file'=>'modules/Tasks/SearchForm.html',
'php_file'=>'modules/Tasks/ListView.php',
'type'=>'SearchForm',
),
);

View File

@@ -0,0 +1,112 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/**
* Subpanel Layout definition for Accounts
*
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
*/
$subpanel_layout = array(
//Removed button because this layout def is a component of
//the activities sub-panel.
'where' => "(tasks.status='planned')",
'list_fields' => array(
'AD' => array (
'widget_class' => 'SubPanelAdditionalDetailsLink',
'vname' => '&nbsp;',
'sortable' => false,
'width' => 0,
),
'object_image'=>array(
'vname' => 'LBL_OBJECT_IMAGE',
'widget_class' => 'SubPanelIcon',
'width' => '2%',
),
'close_button'=>array(
'widget_class' => 'SubPanelCloseButton',
'vname' => 'LBL_LIST_CLOSE',
'width' => '6%',
'sortable'=>false,
),
'name'=>array(
'vname' => 'LBL_LIST_SUBJECT',
'widget_class' => 'SubPanelDetailViewLink',
'width' => '30%',
),
'status'=>array(
'widget_class' => 'SubPanelActivitiesStatusField',
'vname' => 'LBL_LIST_STATUS',
'width' => '15%',
),
'contact_name'=>array(
'widget_class' => 'SubPanelDetailViewLink',
'target_record_key' => 'contact_id',
'target_module' => 'Contacts',
'module' => 'Contacts',
'vname' => 'LBL_LIST_CONTACT',
'width' => '11%',
),
'date_due'=>array(
'vname' => 'LBL_LIST_DUE_DATE',
'width' => '10%',
'alias' => 'date_start',
'sort_by' => 'date_start',
),
'assigned_user_name' => array (
'name' => 'assigned_user_name',
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
),
'edit_button'=>array(
'vname' => 'LBL_EDIT_BUTTON',
'widget_class' => 'SubPanelEditButton',
'width' => '2%',
),
'remove_button'=>array(
'vname' => 'LBL_REMOVE',
'widget_class' => 'SubPanelRemoveButton',
'width' => '2%',
),
'time_due'=>array(
'usage'=>'query_only',
'alias' => 'time_start'
) ,
),
);
?>

View File

@@ -0,0 +1,109 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/**
* Subpanel Layout definition for Accounts
*
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
*/
$subpanel_layout = array(
//Removed button because this layout def is a component of
//the activities sub-panel.
'where' => "",
'list_fields' => array(
'object_image'=>array(
'vname' => 'LBL_OBJECT_IMAGE',
'widget_class' => 'SubPanelIcon',
'width' => '2%',
),
'name'=>array(
'vname' => 'LBL_LIST_SUBJECT',
'widget_class' => 'SubPanelDetailViewLink',
'width' => '30%',
),
'status'=>array(
'widget_class' => 'SubPanelActivitiesStatusField',
'vname' => 'LBL_LIST_STATUS',
'width' => '15%',
),
'contact_name'=>array(
'widget_class' => 'SubPanelDetailViewLink',
'target_record_key' => 'contact_id',
'target_module' => 'Contacts',
'module' => 'Contacts',
'vname' => 'LBL_LIST_CONTACT',
'width' => '11%',
),
'parent_name'=>array(
'vname' => 'LBL_LIST_RELATED_TO',
'width' => '22%',
'target_record_key' => 'parent_id',
'target_module_key'=>'parent_type',
'widget_class' => 'SubPanelDetailViewLink',
'sortable'=>false,
),
'date_modified'=>array(
'vname' => 'LBL_LIST_DATE_MODIFIED',
'width' => '10%',
),
'edit_button'=>array(
'vname' => 'LBL_EDIT_BUTTON',
'widget_class' => 'SubPanelEditButton',
'width' => '2%',
),
'remove_button'=>array(
'vname' => 'LBL_REMOVE',
'widget_class' => 'SubPanelRemoveButton',
'width' => '2%',
),
'parent_id'=>array(
'usage'=>'query_only',
),
'parent_type'=>array(
'usage'=>'query_only',
),
'filename'=>array(
'usage'=>'query_only',
'force_exists'=>true
),
),
);
?>

View File

@@ -0,0 +1,106 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/**
* Subpanel Layout definition for Accounts
*
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
*/
$subpanel_layout = array(
//Removed button because this layout def is a component of
//the activities sub-panel.
'where' => "(tasks.status='made' OR tasks.status='canceled')",
'list_fields' => array(
'AD' => array (
'widget_class' => 'SubPanelAdditionalDetailsLink',
'vname' => '&nbsp;',
'sortable' => false,
'width' => 0,
),
'object_image'=>array(
'vname' => 'LBL_OBJECT_IMAGE',
'widget_class' => 'SubPanelIcon',
'width' => '2%',
),
'name'=>array(
'vname' => 'LBL_LIST_SUBJECT',
'widget_class' => 'SubPanelDetailViewLink',
'width' => '30%',
),
'status'=>array(
'widget_class' => 'SubPanelActivitiesStatusField',
'vname' => 'LBL_LIST_STATUS',
'width' => '15%',
),
'contact_name'=>array(
'widget_class' => 'SubPanelDetailViewLink',
'target_record_key' => 'contact_id',
'target_module' => 'Contacts',
'module' => 'Contacts',
'vname' => 'LBL_LIST_CONTACT',
'width' => '11%',
),
'date_modified'=>array(
'vname' => 'LBL_LIST_DATE_MODIFIED',
'width' => '10%',
),
'assigned_user_name' => array (
'name' => 'assigned_user_name',
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
),
'edit_button'=>array(
'vname' => 'LBL_EDIT_BUTTON',
'widget_class' => 'SubPanelEditButton',
'width' => '2%',
),
'remove_button'=>array(
'vname' => 'LBL_REMOVE',
'widget_class' => 'SubPanelRemoveButton',
'width' => '2%',
),
'filename'=>array(
'usage'=>'query_only',
'force_exists'=>true
),
),
);
?>

View File

@@ -0,0 +1,116 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/**
* Subpanel Layout definition for Accounts
*
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
*/
$subpanel_layout = array(
//Removed button because this layout def is a component of
//the activities sub-panel.
'top_buttons' => array(
array (
'widget_class'=>'SubPanelTopCreateButton',
),
array (
'widget_class'=>'SubPanelTopSelectButton', 'popup_module' => 'Tasks'
),
),
'list_fields' => array(
'object_image'=>array(
'vname' => 'LBL_OBJECT_IMAGE',
'widget_class' => 'SubPanelIcon',
'width' => '2%',
),
'name'=>array(
'vname' => 'LBL_LIST_SUBJECT',
'widget_class' => 'SubPanelDetailViewLink',
'width' => '30%',
),
'status'=>array(
'widget_class' => 'SubPanelActivitiesStatusField',
'vname' => 'LBL_LIST_STATUS',
'width' => '15%',
),
'contact_name'=>array(
'widget_class' => 'SubPanelDetailViewLink',
'target_record_key' => 'contact_id',
'target_module' => 'Contacts',
'module' => 'Contacts',
'vname' => 'LBL_LIST_CONTACT',
'width' => '11%',
),
'parent_name'=>array(
'vname' => 'LBL_LIST_RELATED_TO',
'width' => '22%',
'target_record_key' => 'parent_id',
'target_module_key'=>'parent_type',
'widget_class' => 'SubPanelDetailViewLink',
'sortable'=>false,
),
'date_modified'=>array(
'vname' => 'LBL_LIST_DATE_MODIFIED',
'width' => '10%',
),
'edit_button'=>array(
'vname' => 'LBL_EDIT_BUTTON',
'widget_class' => 'SubPanelEditButton',
'width' => '2%',
),
'remove_button'=>array(
'vname' => 'LBL_REMOVE',
'widget_class' => 'SubPanelRemoveButton',
'width' => '2%',
),
'parent_id'=>array(
'usage'=>'query_only',
),
'parent_type'=>array(
'usage'=>'query_only',
),
'filename'=>array(
'usage'=>'query_only',
'force_exists'=>true
),
),
);
?>

486
modules/Tasks/vardefs.php Executable file
View File

@@ -0,0 +1,486 @@
<?php
if (! defined ( 'sugarEntry' ) || ! sugarEntry)
die ( 'Not A Valid Entry Point' );
/**
* *******************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc.
* Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
* ******************************************************************************
*/
$dictionary ['Task'] = array (
'table' => 'tasks',
'fields' => array (
'name' => array (
'name' => 'name',
'vname' => 'LBL_SUBJECT',
'dbType' => 'varchar',
'type' => 'name',
'len' => '50',
'importable' => 'required',
'required' => true
),
'google_calendar_task' => array (
'name' => 'google_calendar_task',
'type' => 'varchar',
'len' => '255'
),
'status' => array (
'name' => 'status',
'vname' => 'LBL_STATUS',
'type' => 'enum',
'options' => 'activity_status_dom',
'len' => 45
),
'date_due_flag' => array (
'name' => 'date_due_flag',
'vname' => 'LBL_DATE_DUE_FLAG',
'type' => 'bool',
'default' => 1,
'group' => 'date_due'
),
'date_due' => array (
'name' => 'date_due',
'vname' => 'LBL_DUE_DATE',
'type' => 'datetime',
'group' => 'date_due'
),
'time_due' => array (
'name' => 'time_due',
'vname' => 'LBL_DUE_TIME',
'type' => 'datetime',
// 'db_concat_fields'=> array(0=>'date_due'),
'source' => 'non-db',
'importable' => 'false',
'massupdate' => false
),
'date_due_field' => array (
'name' => 'date_due_field',
'group' => 'date_due',
'vname' => 'LBL_DUE_DATE_AND_TIME',
'type' => 'datetimecombo',
'date' => 'date_due',
'time' => 'time_due',
'date_readonly' => 'date_due_readonly',
'time_readonly' => 'time_due_readonly',
'noneCheckbox' => true,
'noneCheckboxJavascript' => 'onClick="set_date_due_values(this.form);"',
'checkboxId' => 'date_due_flag',
'checked' => 'date_due_checked',
'meridian' => 'date_due_meridian',
'showFormats' => true,
'source' => 'non-db',
'comment' => 'Used for meta-data framework',
'importable' => 'false'
),
'date_start_flag' => array (
'name' => 'date_start_flag',
'vname' => 'LBL_DATE_START_FLAG',
'type' => 'bool',
'group' => 'date_start',
'default' => 1
),
'date_start' => array (
'name' => 'date_start',
'vname' => 'LBL_START_DATE',
'type' => 'datetime',
'group' => 'date_start',
'required'=>true,
),
'date_start_field' => array (
'group' => 'date_start',
'name' => 'date_start_field',
'vname' => 'LBL_DUE_DATE_AND_TIME',
'type' => 'datetimecombo',
'date' => 'date_start',
'time' => 'time_start',
'date_readonly' => 'date_start_readonly',
'time_readonly' => 'time_start_readonly',
'noneCheckbox' => true,
'noneCheckboxJavascript' => 'onClick="set_date_start_values(this.form);"',
'checkboxId' => 'date_start_flag',
'checked' => 'date_start_checked',
'meridian' => 'date_start_meridian',
'showFormats' => true,
'source' => 'non-db',
'comment' => 'Used for meta-data framework'
),
'telephones' => array (
'name' => 'telephones',
'vname' => 'LBL_SUBJECT',
'dbType' => 'text',
'type' => 'text',
'required' => false
),
'emails' => array (
'name' => 'emails',
'vname' => 'LBL_SUBJECT',
'dbType' => 'text',
'type' => 'text',
'required' => false
),
'parent_name' => array (
'name' => 'parent_name',
'id_name' => 'parent_id',
'vname' => 'LBL_PARENT_NAME',
'type' => 'relate',
'group' => 'parent_name',
'dbtype' => 'varchar',
'len' => '255',
'module' => 'Accounts',
'massupdate' => false,
'required' => false
),
'parent_id' => array (
'name' => 'parent_id',
'type' => 'id',
'module' => 'Accounts',
'vname' => 'LBL_PARENT_ID',
'group' => 'parent_name',
'massupdate' => false,
'reportable' => false,
'required' => false
),
'contact_id' => array (
'name' => 'contact_id',
'rname' => 'name',
'id_name' => 'contact_id',
'vname' => 'LBL_CONTACT_ID',
'group' => 'contact_name',
'type' => 'relate',
'table' => 'contacts',
'reportable' => true,
'Importable' => false,
'isnull' => 'false',
'dbType' => 'id',
'audited' => false,
'duplicate_merge' => 'disabled',
'massupdate' => false
),
'contact_name' => array (
'name' => 'contact_name',
'vname' => 'LBL_CONTACT_NAME',
'type' => 'relate',
'reportable' => false,
'source' => 'non-db',
'table' => 'contacts',
'id_name' => 'contact_id',
'module' => 'Contacts',
'duplicate_merge' => 'disabled',
'massupdate' => false,
'other_data' => array (
'from_relation' => array (
'module' => 'Accounts',
'rel_name' => 'contacts',
'rel_bean_name' => 'Contact',
'field_id_name' => 'parent_id',
'field_name' => 'parent_name',
'field_id_value' => ''
)
),
'initial_filter_fields' => array (
'account_name' => 'parent_name'
)
),
'date_reminder_flag' => array (
'name' => 'date_reminder_flag',
'vname' => 'LBL_DATE_REMINDER',
'type' => 'bool',
'group' => 'date_reminder',
'default' => 1
),
'date_reminder' => array (
'name' => 'date_reminder',
'vname' => 'LBL_DATE_REMINDER',
'type' => 'datetime',
'group' => 'date_reminder'
),
'date_reminder_field' => array (
'group' => 'date_reminder',
'name' => 'date_reminder_field',
'vname' => 'LBL_DUE_DATE_AND_TIME',
'type' => 'datetimecombo',
'date' => 'date_reminder',
'time' => 'time_start',
'date_readonly' => 'date_reminder_readonly',
'time_readonly' => 'time_start_readonly',
'noneCheckbox' => true,
'noneCheckboxJavascript' => 'onClick="set_date_reminder_values(this.form);"',
'checkboxId' => 'date_reminder_flag',
'checked' => 'date_reminder_checked',
'meridian' => 'date_reminder_meridian',
'showFormats' => true,
'source' => 'non-db',
'comment' => 'Used for meta-data framework'
),
'reminder_type' => array (
'name' => 'reminder_type',
'vname' => 'LBL_REMINDER_TYPE',
'type' => 'enum',
'default'=>'0',
#'options' => 'reminder_type_dom',
'len' => 25
),
'remider_interval' => array (
'name' => 'remider_interval',
'vname' => 'LBL_REMINDER_TYPE',
'type' => 'enum',
'default'=>'0',
#'options' => 'reminder_type_dom',
'len' => 25
),
'remider_interval_type' => array (
'name' => 'remider_interval_type',
'vname' => 'LBL_REMINDER_TYPE',
'type' => 'enum',
'default'=>'0',
#'options' => 'reminder_type_dom',
'len' => 25
),
'contact_id' => array (
'name' => 'contact_id',
'type' => 'id',
'group' => 'contact_name',
'reportable' => false,
'vname' => 'LBL_CONTACT_ID'
),
'record_id' => array (
'name' => 'record_id',
'type' => 'varchar',
'reportable' => false,
'vname' => 'LBL_CONTACT_ID'
),
'record_type' => array (
'name' => 'record_type',
'type' => 'varchar',
'reportable' => false,
'vname' => 'LBL_CONTACT_ID'
),
'contact_name' => array (
'name' => 'contact_name',
'rname' => 'last_name',
'db_concat_fields' => array (
0 => 'first_name',
1 => 'last_name'
),
'source' => 'non-db',
'len' => '510',
'group' => 'contact_name',
'vname' => 'LBL_CONTACT_NAME',
'reportable' => false,
'id_name' => 'contact_id',
'join_name' => 'contacts',
'type' => 'relate',
'module' => 'Contacts',
'link' => 'contacts',
'table' => 'contacts'
),
'assigned_user_id2' => array (
'name' => 'assigned_user_id2',
'type' => 'id',
'group' => 'assigned_user_id2',
'reportable' => false,
'vname' => 'LBL_ASSIGNED_USER_ID'
),
'assigned_user_name2' => array (
'name' => 'assigned_user_name2',
'rname' => 'full_name',
'db_concat_fields' => array (
0 => 'first_name',
1 => 'last_name'
),
'source' => 'non-db',
'len' => '510',
'group' => 'assigned_user_name2',
'vname' => 'LBL_CONTACT_NAME',
'reportable' => false,
'id_name' => 'assigned_user_id2',
'join_name' => 'users',
'type' => 'relate',
'module' => 'Users',
'link' => 'users',
'table' => 'users'
),
'contact_phone' => array (
'name' => 'contact_phone',
'type' => 'phone',
'source' => 'non-db',
'vname' => 'LBL_CONTACT_PHONE'
),
'contact_email' => array (
'name' => 'contact_email',
'type' => 'varchar',
'vname' => 'LBL_EMAIL_ADDRESS',
'source' => 'non-db'
),
'priority' => array (
'name' => 'priority',
'vname' => 'LBL_PRIORITY',
'type' => 'enum',
'options' => 'task_priority_dom',
'len' => 25
),
'contacts' => array (
'name' => 'contacts',
'type' => 'link',
'relationship' => 'contact_tasks',
'source' => 'non-db',
'side' => 'right',
'vname' => 'LBL_CONTACT'
),
'accounts' => array (
'name' => 'accounts',
'type' => 'link',
'relationship' => 'account_tasks',
'source' => 'non-db',
'vname' => 'LBL_ACCOUNT'
),
'opportunities' => array (
'name' => 'opportunities',
'type' => 'link',
'relationship' => 'opportunity_tasks',
'source' => 'non-db',
'vname' => 'LBL_TASKS'
)
),
'relationships' => array (
'tasks_assigned_user' => array (
'lhs_module' => 'Users',
'lhs_table' => 'users',
'lhs_key' => 'id',
'rhs_module' => 'Tasks',
'rhs_table' => 'tasks',
'rhs_key' => 'assigned_user_id',
'relationship_type' => 'one-to-many'
),
'tasks_assigned_user2' => array (
'lhs_module' => 'Users',
'lhs_table' => 'users',
'lhs_key' => 'id',
'rhs_module' => 'Tasks',
'rhs_table' => 'tasks',
'rhs_key' => 'assigned_user_id',
'relationship_type' => 'one-to-many'
),
'tasks_modified_user' => array (
'lhs_module' => 'Users',
'lhs_table' => 'users',
'lhs_key' => 'id',
'rhs_module' => 'Tasks',
'rhs_table' => 'tasks',
'rhs_key' => 'modified_user_id',
'relationship_type' => 'one-to-many'
),
'tasks_created_by' => array (
'lhs_module' => 'Users',
'lhs_table' => 'users',
'lhs_key' => 'id',
'rhs_module' => 'Tasks',
'rhs_table' => 'tasks',
'rhs_key' => 'created_by',
'relationship_type' => 'one-to-many'
)
)
,
'indices' => array (
array (
'name' => 'idx_tsk_name',
'type' => 'index',
'fields' => array (
'name'
)
),
array (
'name' => 'idx_task_con_del',
'type' => 'index',
'fields' => array (
'contact_id',
'deleted'
)
),
array (
'name' => 'idx_task_par_del',
'type' => 'index',
'fields' => array (
'parent_id',
'parent_type',
'deleted'
)
),
array (
'name' => 'idx_task_assigned',
'type' => 'index',
'fields' => array (
'assigned_user_id'
)
),
array (
'name' => 'idx_task_assigned',
'type' => 'index',
'fields' => array (
'assigned_user_id2'
)
)
)
,
// This enables optimistic locking for Saves From EditView
'optimistic_locking' => true
);
VardefManager::createVardef ( 'Tasks', 'Task', array (
'default',
'assignable'
)
);
?>

View File

@@ -0,0 +1,74 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM Community Edition is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
require_once('include/MVC/View/views/view.detail.php');
class TasksViewDetail extends ViewDetail {
function TasksViewDetail(){
parent::ViewDetail();
}
/**
* display
* Override the display method to support customization for the buttons that display
* a popup and allow you to copy the account's address into the selected contacts.
* The custom_code_billing and custom_code_register Smarty variables are found in
* include/SugarFields/Fields/Address/DetailView.tpl (default). If it's a English U.S.
* locale then it'll use file include/SugarFields/Fields/Address/en_us.DetailView.tpl.
*/
function display(){
global $mod_strings;
//add mz
$this->dv->process();
$this->ss->assign('EMAIL_LIST',explode(',',$this->bean->emails));
$this->ss->assign('TELEPHONE_LIST',explode(',',$this->bean->telephones));
if(empty($this->bean->id)){
global $app_strings;
sugar_die($app_strings['ERROR_NO_RECORD']);
}
echo $this->dv->display();
}
}
?>

View File

@@ -0,0 +1,102 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
* Description: This file is used to override the default Meta-data EditView behavior
* to provide customization specific to the Tasks module.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
require_once('include/json_config.php');
require_once('include/MVC/View/views/view.edit.php');
include_once 'include/ECM/EcmGoogleServices/EcmGoogleService.php';
class TasksViewEdit extends ViewEdit {
function TasksViewEdit(){
parent::ViewEdit();
}
/**
* preDisplay
* Override preDisplay to check for presence of 'status' in $_REQUEST
* This is to support the "Close And Create New" operation.
*/
function preDisplay() {
if($_REQUEST['module'] != 'Tasks' && isset($_REQUEST['status']) && empty($_REQUEST['status'])) {
$this->bean->status = '';
} //if
if(!empty($_REQUEST['status']) && ($_REQUEST['status'] == 'made')) {
$this->bean->status = 'made';
}
parent::preDisplay();
}
function display() {
global $current_user;
echo '<script type="text/javascript" src="modules/Tasks/javascript/EditView.js"></script>';
if($this->ev->isDuplicate){
$this->bean->status = $GLOBALS['mod_strings']['LBL_DEFAULT_STATUS'];
} //if
if($this->bean->id!=''){
$this->ss->assign('emails_LIST',json_encode(explode(',',$this->bean->emails)));
$this->ss->assign('telephones_LIST',json_encode(explode(',',$this->bean->telephones)));
} else {
$this->bean->date_start=date('d.m.Y H:00');
$this->bean->date_reminder=date('d.m.Y H:00');
$this->bean->reminder_type=3;
$this->ss->assign('emails_LIST',json_encode(explode(',',$current_user->email1)));
$this->ss->assign('telephones_LIST',json_encode(explode(',',$current_user->phone_other)));
}
$go=new EcmGoogleService();
if($go!=false){
if($go->checkLogin()==true){
$this->ss->assign('g_check', '1');
} else {
$this->ss->assign('g_check', '0');
}
}
parent::display();
}
}
?>