Add php files
This commit is contained in:
36
modules/Activities/Forms.php
Executable file
36
modules/Activities/Forms.php
Executable file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 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('modules/Calendar/Forms.php');
|
||||
61
modules/Activities/Menu.php
Executable file
61
modules/Activities/Menu.php
Executable file
@@ -0,0 +1,61 @@
|
||||
<?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-2010 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".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
global $mod_strings, $app_strings;
|
||||
global $mod_strings;
|
||||
//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('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('Calendar', 'list', true))$module_menu[]=Array("index.php?module=Calendar&action=index&view=day", $mod_strings['LNK_VIEW_CALENDAR'],"Calendar");
|
||||
//if(ACLController::checkAccess('Calls', 'import', true))$module_menu[]=Array("index.php?module=Import&action=Step1&import_module=Calls&return_module=Calls&return_action=index", $mod_strings['LNK_IMPORT_CALLS'],"Import", 'Calls');
|
||||
//if(ACLController::checkAccess('Meetings', 'import', true))$module_menu[]=Array("index.php?module=Import&action=Step1&import_module=Meetings&return_module=Meetings&return_action=index", $mod_strings['LNK_IMPORT_MEETINGS'],"Import", 'Meetings');
|
||||
//if(ACLController::checkAccess('Tasks', 'import', true))$module_menu[]=Array("index.php?module=Import&action=Step1&import_module=Tasks&return_module=Tasks&return_action=index", $mod_strings['LNK_IMPORT_TASKS'],"Import", 'Tasks');
|
||||
//if(ACLController::checkAccess('Notes', 'import', true))$module_menu[]=Array("index.php?module=Import&action=Step1&import_module=Notes&return_module=Notes&return_action=index", $mod_strings['LNK_IMPORT_NOTES'],"Import", 'Notes');
|
||||
?>
|
||||
341
modules/Activities/OpenListView.php
Executable file
341
modules/Activities/OpenListView.php
Executable file
@@ -0,0 +1,341 @@
|
||||
<?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-2010 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('modules/Activities/config.php');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
require_once('include/json_config.php');
|
||||
$json_config = new json_config();
|
||||
|
||||
// cn:
|
||||
global $currentModule, $theme, $focus, $action, $open_status;
|
||||
global $app_strings;
|
||||
global $current_language;
|
||||
global $odd_bg;
|
||||
global $even_bg;
|
||||
global $hilite_bg;
|
||||
global $click_bg;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
$focus_meetings_list = array();
|
||||
$focus_calls_list = array();
|
||||
$focus_tasks_list = array();
|
||||
global $timedate;
|
||||
//we don't want the parent module's string file, but rather the string file specifc to this subpanel
|
||||
$current_module_strings = return_module_language($current_language, 'Activities');
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// START LOGIC
|
||||
if (empty($_REQUEST['appointment_filter'])) {
|
||||
if ($current_user->getPreference('appointment_filter') == '') {
|
||||
$appointment_filter = 'today';
|
||||
} else {
|
||||
$appointment_filter = $current_user->getPreference('appointment_filter');
|
||||
}
|
||||
} else {
|
||||
$appointment_filter = $_REQUEST['appointment_filter'];
|
||||
$current_user->setPreference('appointment_filter', $_REQUEST['appointment_filter']);
|
||||
}
|
||||
|
||||
if ($appointment_filter == 'last this_month') {
|
||||
$next_month = strftime("%B %Y", strtotime("+1 month"));
|
||||
$first_day = strftime("%d %B %Y", strtotime("1 $next_month"));
|
||||
$appt_filter = strftime("%d %B %Y", strtotime("-1 day", strtotime($first_day)));
|
||||
} elseif ($appointment_filter == 'last next_month') {
|
||||
$next_month = strftime("%B %Y", strtotime("+2 month"));
|
||||
$first_day = strftime("%d %B %Y", strtotime("1 $next_month"));
|
||||
$appt_filter = strftime("%d %B %Y", strtotime("-1 day", strtotime($first_day)));
|
||||
$GLOBALS['log']->debug("next_month is '$next_month'; first_day is '$first_day';");
|
||||
} else {
|
||||
$appt_filter = $appointment_filter;
|
||||
}
|
||||
|
||||
$gm_later = gmdate($GLOBALS['timedate']->get_db_date_time_format(), strtotime($appt_filter));
|
||||
$later = $timedate->handle_offset($gm_later, $timedate->dbDayFormat, true);
|
||||
$db_later = $timedate->handle_offset($gm_later, $timedate->dbDayFormat, true);
|
||||
$laterWhere = $timedate->handleOffsetMax($later, $timedate->dbDayFormat, false);
|
||||
|
||||
$GLOBALS['log']->debug("appt_filter is '$appt_filter'; later is '$later'");
|
||||
|
||||
if(ACLController::checkAccess('Meetings', 'list', true)){
|
||||
$meeting = new Meeting();
|
||||
$where = '(';
|
||||
$or = false;
|
||||
foreach ($open_status as $status) {
|
||||
if ($or) $where .= ' OR ';
|
||||
$or = true;
|
||||
$where .= " meetings.status = '$status' ";
|
||||
}
|
||||
$where .= ") ";
|
||||
$where .= " AND meetings_users.user_id='$current_user->id' ";
|
||||
$where .= " AND meetings_users.accept_status != 'decline'";
|
||||
|
||||
// allow for differences between MySQL and Oracle 9
|
||||
if($sugar_config["dbconfig"]["db_type"] == "mysql") {
|
||||
$where .= " HAVING datetime <= '".$laterWhere["date"]." ".$laterWhere["time"]."' ";
|
||||
} elseif ($sugar_config["dbconfig"]["db_type"] == "oci8") {
|
||||
}
|
||||
else if ($sugar_config["dbconfig"]["db_type"] == "mssql")
|
||||
{
|
||||
$where .= " AND meetings.date_start + ' ' + meetings.time_start <= '".$laterWhere["date"]." ".$laterWhere["time"]."' ";
|
||||
}
|
||||
else {
|
||||
$GLOBALS['log']->fatal("No database type identified.");
|
||||
}
|
||||
|
||||
$meeting->disable_row_level_security = true;
|
||||
$focus_meetings_list = $meeting->get_full_list("time_start", $where);
|
||||
}
|
||||
|
||||
if(ACLController::checkAccess('Calls', 'list', true)) {
|
||||
$call = new Call();
|
||||
$where = '(';
|
||||
$or = false;
|
||||
|
||||
foreach ($open_status as $status) {
|
||||
if ($or) $where .= ' OR ';
|
||||
$or = true;
|
||||
$where .= " calls.status = '$status' ";
|
||||
}
|
||||
|
||||
$where .= ") ";
|
||||
$where .= " AND calls_users.user_id='$current_user->id' ";
|
||||
$where .= " AND calls_users.accept_status != 'decline'";
|
||||
|
||||
// allow for differences between MySQL and Oracle 9
|
||||
if($sugar_config["dbconfig"]["db_type"] == "mysql") {
|
||||
$where .= " HAVING datetime <= '".$laterWhere["date"]." ".$laterWhere["time"]."' ";
|
||||
} elseif ($sugar_config["dbconfig"]["db_type"] == "oci8") {
|
||||
}else if ($sugar_config["dbconfig"]["db_type"] == "mssql")
|
||||
{
|
||||
//add condition for MS Sql server.
|
||||
$where .= " AND calls.date_start + ' ' + calls.time_start <= '".$laterWhere["date"]." ".$laterWhere["time"]."' ";
|
||||
} else {
|
||||
$GLOBALS['log']->fatal("No database type identified.");
|
||||
}
|
||||
|
||||
$call->disable_row_level_security = true;
|
||||
$focus_calls_list = $call->get_full_list("time_start", $where);
|
||||
}
|
||||
|
||||
$open_activity_list = array();
|
||||
if(count($focus_meetings_list)>0) {
|
||||
foreach ($focus_meetings_list as $meeting) {
|
||||
$td = $timedate->merge_date_time(from_db_convert($meeting->date_start,'date'),from_db_convert($meeting->time_start, 'time'));
|
||||
$tag = 'span';
|
||||
|
||||
if($meeting->ACLAccess('view', $meeting->isOwner($current_user->id))){
|
||||
$tag = 'a';
|
||||
}
|
||||
|
||||
$open_activity_list[] = array(
|
||||
'name' => $meeting->name,
|
||||
'id' => $meeting->id,
|
||||
'type' => 'Meeting',
|
||||
'module' => 'Meetings',
|
||||
'status' => $meeting->status,
|
||||
'parent_id' => $meeting->parent_id,
|
||||
'parent_type' => $meeting->parent_type,
|
||||
'parent_name' => $meeting->parent_name,
|
||||
'contact_id' => $meeting->contact_id,
|
||||
'contact_name' => $meeting->contact_name,
|
||||
'normal_date_start' => $meeting->date_start,
|
||||
'date_start' => $timedate->to_display_date($td),
|
||||
'normal_time_start' => $meeting->time_start,
|
||||
'time_start' => $timedate->to_display_time($td,true),
|
||||
'required' => $meeting->required,
|
||||
'accept_status' => $meeting->accept_status,
|
||||
'tag' => $tag,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (count($focus_calls_list)>0) {
|
||||
foreach ($focus_calls_list as $call) {
|
||||
|
||||
$td = $timedate->merge_date_time(from_db_convert($call->date_start,'date'),from_db_convert($call->time_start, 'time'));
|
||||
$tag = 'span';
|
||||
|
||||
if($call->ACLAccess('view', $call->isOwner($current_user->id))) {
|
||||
$tag = 'a';
|
||||
}
|
||||
|
||||
$open_activity_list[] = array(
|
||||
'name' => $call->name,
|
||||
'id' => $call->id,
|
||||
'type' => 'Call',
|
||||
'module' => 'Calls',
|
||||
'status' => $call->status,
|
||||
'parent_id' => $call->parent_id,
|
||||
'parent_type' => $call->parent_type,
|
||||
'parent_name' => $call->parent_name,
|
||||
'contact_id' => $call->contact_id,
|
||||
'contact_name' => $call->contact_name,
|
||||
'date_start' => $timedate->to_display_date($td),
|
||||
'normal_date_start' => $call->date_start,
|
||||
'normal_time_start' => $call->time_start,
|
||||
'time_start' => $timedate->to_display_time($td,true),
|
||||
'required' => $call->required,
|
||||
'accept_status' => $call->accept_status,
|
||||
'tag' => $tag,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// START OUTPUT
|
||||
|
||||
$xtpl=new XTemplate ('modules/Activities/OpenListView.html');
|
||||
$xtpl->assign("MOD", $current_module_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
$xtpl->assign('JSON_CONFIG_JAVASCRIPT', $json_config->get_static_json_server());
|
||||
$xtpl->assign("SUGAR_VERSION", $sugar_version);
|
||||
$xtpl->assign("JS_CUSTOM_VERSION", $sugar_config['js_custom_version']);
|
||||
|
||||
// Stick the form header out there.
|
||||
$filter = get_select_options_with_id($current_module_strings['appointment_filter_dom'], $appointment_filter );
|
||||
echo "<form method='POST' action='index.php'>\n";
|
||||
echo "<input type='hidden' name='module' value='Home'>\n";
|
||||
echo "<input type='hidden' name='action' value='index'>\n";
|
||||
$day_filter = "<select name='appointment_filter' language='JavaScript' onchange='this.form.submit();'>$filter</select>";
|
||||
|
||||
echo get_form_header($current_module_strings['LBL_UPCOMING'], $current_module_strings['LBL_TODAY'].$day_filter.' ('.$timedate->to_display_date($later, false).') ', false);
|
||||
echo "</form>\n";
|
||||
|
||||
$xtpl->assign("RETURN_URL", "&return_module=$currentModule&return_action=DetailView&return_id=" . ((is_object($focus) && ! empty($focus->id)) ? $focus->id : ""));
|
||||
|
||||
$oddRow = true;
|
||||
if(count($open_activity_list) > 0) {
|
||||
$open_activity_list = array_csort($open_activity_list, 'normal_date_start', 'normal_time_start', SORT_ASC);
|
||||
}
|
||||
|
||||
$today = $timedate->handle_offset('today', $timedate->dbDayFormat.' '.$timedate->dbTimeFormat, false);
|
||||
$todayOffset = $timedate->handleOffsetMax('today', $timedate->dbDayFormat.' '.$timedate->dbTimeFormat, true);
|
||||
|
||||
foreach($open_activity_list as $activity) {
|
||||
$concatActDate = $activity['normal_date_start'].' '.$activity['normal_time_start'];
|
||||
|
||||
if($concatActDate < $today) {
|
||||
$time = "<font class='overdueTask'>".$activity['date_start'].' '.$activity['time_start']."</font>";
|
||||
} elseif(($concatActDate >= $todayOffset['min']) && ($concatActDate <= $todayOffset['max'])) {
|
||||
$time = "<font class='todaysTask'>".$activity['date_start'].' '.$activity['time_start']."</font>";
|
||||
} else {
|
||||
$time = "<font class='futureTask'>".$activity['date_start'].' '.$activity['time_start']."</font>";
|
||||
}
|
||||
|
||||
$activity_fields = array(
|
||||
'ID' => $activity['id'],
|
||||
'NAME' => $activity['name'],
|
||||
'TYPE' => $activity['type'],
|
||||
'MODULE' => $activity['module'],
|
||||
'STATUS' => $activity['status'],
|
||||
'CONTACT_NAME' => $activity['contact_name'],
|
||||
'CONTACT_ID' => $activity['contact_id'],
|
||||
'PARENT_TYPE' => $activity['parent_type'],
|
||||
'PARENT_NAME' => $activity['parent_name'],
|
||||
'PARENT_ID' => $activity['parent_id'],
|
||||
'TIME' => $time,
|
||||
'TAG' => $activity['tag'],
|
||||
);
|
||||
|
||||
switch ($activity['parent_type']) {
|
||||
case 'Accounts':
|
||||
$activity_fields['PARENT_MODULE'] = 'Accounts';
|
||||
break;
|
||||
case 'Cases':
|
||||
$activity_fields['PARENT_MODULE'] = 'Cases';
|
||||
break;
|
||||
case 'Opportunities':
|
||||
$activity_fields['PARENT_MODULE'] = 'Opportunities';
|
||||
break;
|
||||
case 'Quotes':
|
||||
$activity_fields['PARENT_MODULE'] = 'Quotes';
|
||||
break;
|
||||
}
|
||||
switch ($activity['type']) {
|
||||
case 'Call':
|
||||
$activity_fields['SET_COMPLETE'] = "<a href='index.php?return_module=$currentModule&return_action=$action&return_id=" . ((is_object($focus) && ! empty($focus->id)) ? $focus->id : "")."&action=EditView&module=Calls&status=Held&record=".$activity['id']."&status=Held'>".SugarThemeRegistry::current()->getImage("close_inline","title=".translate('LBL_LIST_CLOSE','Activities')." border='0'")."</a>";
|
||||
break;
|
||||
case 'Meeting':
|
||||
$activity_fields['SET_COMPLETE'] = "<a href='index.php?return_module=$currentModule&return_action=$action&return_id=" . ((is_object($focus) && ! empty($focus->id)) ? $focus->id : "")."&action=EditView&module=Meetings&status=Held&record=".$activity['id']."&status=Held'>".SugarThemeRegistry::current()->getImage("close_inline","title=".translate('LBL_LIST_CLOSE','Activities')." border='0'")."</a>";
|
||||
break;
|
||||
}
|
||||
|
||||
if (! empty($activity['accept_status'])) {
|
||||
if ( $activity['accept_status'] == 'none') {
|
||||
$activity_fields['SET_ACCEPT_LINKS'] = "<div id=\"accept".$activity['id']."\"><a title=\"".$app_list_strings['dom_meeting_accept_options']['accept']."\" href=\"javascript:setAcceptStatus('".$activity_fields['MODULE']."','".$activity['id']."','accept');\">". SugarThemeRegistry::current()->getImage("accept_inline","title='".$app_list_strings['dom_meeting_accept_options']['accept']."' border='0'"). "</a> <a title=\"".$app_list_strings['dom_meeting_accept_options']['tentative']."\" href=\"javascript:setAcceptStatus('".$activity_fields['MODULE']."','".$activity['id']."','tentative');\">".SugarThemeRegistry::current()->getImage("tentative_inline","alt='".$app_list_strings['dom_meeting_accept_options']['tentative']."' border='0'")."</a> <a title=\"".$app_list_strings['dom_meeting_accept_options']['decline']."\" href=\"javascript:setAcceptStatus('".$activity_fields['MODULE']."','".$activity['id']."','decline');\">".SugarThemeRegistry::current()->getImage("decline_inline","alt='".$app_list_strings['dom_meeting_accept_options']['decline']."' border='0'")."</a></div>";
|
||||
} else {
|
||||
$activity_fields['SET_ACCEPT_LINKS'] = $app_list_strings['dom_meeting_accept_status'][$activity['accept_status']];
|
||||
}
|
||||
}
|
||||
|
||||
$activity_fields['TITLE'] = '';
|
||||
if (!empty($activity['contact_name'])) {
|
||||
$activity_fields['TITLE'] .= $current_module_strings['LBL_LIST_CONTACT'].": ".$activity['contact_name'];
|
||||
}
|
||||
if (!empty($activity['parent_name'])) {
|
||||
$activity_fields['TITLE'] .= "\n".$app_list_strings['record_type_display'][$activity['parent_type']].": ".$activity['parent_name'];
|
||||
}
|
||||
|
||||
$xtpl->assign("ACTIVITY_MODULE_PNG", SugarThemeRegistry::current()->getImage($activity_fields['MODULE'].'','border="0" alt="'.$activity_fields['NAME'].'"'));
|
||||
$xtpl->assign("ACTIVITY", $activity_fields);
|
||||
$xtpl->assign("BG_HILITE", $hilite_bg);
|
||||
$xtpl->assign("BG_CLICK", $click_bg);
|
||||
|
||||
if($oddRow) {
|
||||
$xtpl->assign("ROW_COLOR", 'oddListRow');
|
||||
$xtpl->assign("BG_COLOR", $odd_bg);
|
||||
} else {
|
||||
$xtpl->assign("ROW_COLOR", 'evenListRow');
|
||||
$xtpl->assign("BG_COLOR", $even_bg);
|
||||
}
|
||||
$oddRow = !$oddRow;
|
||||
$xtpl->parse("open_activity.row");
|
||||
} // END FOREACH()
|
||||
|
||||
$xtpl->parse("open_activity");
|
||||
if (count($open_activity_list)>0) $xtpl->out("open_activity");
|
||||
else echo "<i>".$current_module_strings['NTC_NONE_SCHEDULED']."</i>";
|
||||
?>
|
||||
448
modules/Activities/Popup_picker.php
Executable file
448
modules/Activities/Popup_picker.php
Executable file
@@ -0,0 +1,448 @@
|
||||
<?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-2010 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/upload_file.php");
|
||||
|
||||
require_once('include/utils/db_utils.php');
|
||||
|
||||
global $currentModule;
|
||||
|
||||
global $focus;
|
||||
global $action;
|
||||
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
//we don't want the parent module's string file, but rather the string file specifc to this subpanel
|
||||
global $current_language,$beanList,$beanFiles;
|
||||
$current_module_strings = return_module_language($current_language, 'Activities');
|
||||
|
||||
// history_list is the means of passing data to a SubPanelView.
|
||||
$bean = $beanList[$_REQUEST['module_name']];
|
||||
require_once($beanFiles[$bean]);
|
||||
$focus = new $bean;
|
||||
|
||||
class Popup_Picker
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* sole constructor
|
||||
*/
|
||||
function Popup_Picker() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function process_page() {
|
||||
global $focus;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $currentModule;
|
||||
global $odd_bg;
|
||||
global $even_bg;
|
||||
|
||||
global $timedate;
|
||||
|
||||
|
||||
$history_list = array();
|
||||
|
||||
if(!empty($_REQUEST['record'])) {
|
||||
$result = $focus->retrieve($_REQUEST['record']);
|
||||
if($result == null)
|
||||
{
|
||||
sugar_die($app_strings['ERROR_NO_RECORD']);
|
||||
}
|
||||
}
|
||||
|
||||
$activitiesRels = array('tasks' => 'Task', 'meetings' => 'Meeting', 'calls' => 'Call', 'emails' => 'Email', 'notes' => 'Note');
|
||||
//Setup the arrays to store the linked records.
|
||||
foreach($activitiesRels as $relMod => $beanName) {
|
||||
$varname = "focus_" . $relMod . "_list";
|
||||
$$varname = array();
|
||||
}
|
||||
foreach($focus->get_linked_fields() as $field => $def) {
|
||||
if ($focus->load_relationship($field)) {
|
||||
$relTable = $focus->$field->getRelatedTableName();
|
||||
if (in_array($relTable, array_keys($activitiesRels)))
|
||||
{
|
||||
$varname = "focus_" . $relTable . "_list";
|
||||
$$varname = sugarArrayMerge($$varname, $focus->get_linked_beans($field,$activitiesRels[$relTable]));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($focus_tasks_list as $task) {
|
||||
$sort_date_time='';
|
||||
if ($task->date_due == '0000-00-00') {
|
||||
$date_due = '';
|
||||
}
|
||||
else {
|
||||
$date_due = $task->date_due;
|
||||
}
|
||||
if (!empty($task->date_due) and !empty($task->time_due)) {
|
||||
|
||||
$sort_date_time=$timedate->to_db_date_time($task->date_due,$task->time_due);
|
||||
$sort_date_time=implode(' ', $sort_date_time);
|
||||
// kbrill - Bug #16714
|
||||
//$sort_date_time=$timedate->handle_offset($sort_date_time,'Y-m-d H:i:s',true);
|
||||
}
|
||||
if ($task->status != "Not Started" && $task->status != "In Progress" && $task->status != "Pending Input") {
|
||||
$history_list[] = array('name' => $task->name,
|
||||
'id' => $task->id,
|
||||
'type' => "Task",
|
||||
'direction' => '',
|
||||
'module' => "Tasks",
|
||||
'status' => $task->status,
|
||||
'parent_id' => $task->parent_id,
|
||||
'parent_type' => $task->parent_type,
|
||||
'parent_name' => $task->parent_name,
|
||||
'contact_id' => $task->contact_id,
|
||||
'contact_name' => $task->contact_name,
|
||||
'date_modified' => $date_due,
|
||||
'description' => $this->getTaskDetails($task),
|
||||
'date_type' => $app_strings['DATA_TYPE_DUE'],
|
||||
'sort_value' => $sort_date_time
|
||||
);
|
||||
} else {
|
||||
$open_activity_list[] = array('name' => $task->name,
|
||||
'id' => $task->id,
|
||||
'type' => "Task",
|
||||
'direction' => '',
|
||||
'module' => "Tasks",
|
||||
'status' => $task->status,
|
||||
'parent_id' => $task->parent_id,
|
||||
'parent_type' => $task->parent_type,
|
||||
'parent_name' => $task->parent_name,
|
||||
'contact_id' => $task->contact_id,
|
||||
'contact_name' => $task->contact_name,
|
||||
'date_due' => $date_due,
|
||||
'description' => $this->getTaskDetails($task),
|
||||
'date_type' => $app_strings['DATA_TYPE_DUE']
|
||||
);
|
||||
}
|
||||
} // end Tasks
|
||||
|
||||
foreach ($focus_meetings_list as $meeting) {
|
||||
if ($meeting->status != "Planned") {
|
||||
$sort_date_time='';
|
||||
if (!empty($meeting->date_start) and !empty($meeting->time_start)) {
|
||||
$sort_date_time=$timedate->to_db_date_time($meeting->date_start,$meeting->time_start);
|
||||
$sort_date_time=implode(' ', $sort_date_time);
|
||||
// kbrill - Bug #16714
|
||||
//$sort_date_time=$timedate->handle_offset($sort_date_time,'Y-m-d H:i:s',true);
|
||||
}
|
||||
|
||||
|
||||
$history_list[] = array('name' => $meeting->name,
|
||||
'id' => $meeting->id,
|
||||
'type' => "Meeting",
|
||||
'direction' => '',
|
||||
'module' => "Meetings",
|
||||
'status' => $meeting->status,
|
||||
'parent_id' => $meeting->parent_id,
|
||||
'parent_type' => $meeting->parent_type,
|
||||
'parent_name' => $meeting->parent_name,
|
||||
'contact_id' => $meeting->contact_id,
|
||||
'contact_name' => $meeting->contact_name,
|
||||
'date_modified' => $meeting->date_start,
|
||||
'description' => $this->formatDescription($meeting->description),
|
||||
'date_type' => $app_strings['DATA_TYPE_START'],
|
||||
'sort_value' => $sort_date_time
|
||||
);
|
||||
} else {
|
||||
$open_activity_list[] = array('name' => $meeting->name,
|
||||
'id' => $meeting->id,
|
||||
'type' => "Meeting",
|
||||
'direction' => '',
|
||||
'module' => "Meetings",
|
||||
'status' => $meeting->status,
|
||||
'parent_id' => $meeting->parent_id,
|
||||
'parent_type' => $meeting->parent_type,
|
||||
'parent_name' => $meeting->parent_name,
|
||||
'contact_id' => $meeting->contact_id,
|
||||
'contact_name' => $meeting->contact_name,
|
||||
'date_due' => $meeting->date_start,
|
||||
'description' => $this->formatDescription($meeting->description),
|
||||
'date_type' => $app_strings['DATA_TYPE_START']
|
||||
);
|
||||
}
|
||||
} // end Meetings
|
||||
|
||||
foreach ($focus_calls_list as $call) {
|
||||
if ($call->status != "Planned") {
|
||||
$sort_date_time='';
|
||||
if (!empty($call->date_start) and !empty($call->time_start)) {
|
||||
$sort_date_time=$timedate->to_db_date_time($call->date_start,$call->time_start);
|
||||
$sort_date_time=implode(' ', $sort_date_time);
|
||||
// kbrill - Bug #16714
|
||||
//$sort_date_time=$timedate->handle_offset($sort_date_time,'Y-m-d H:i:s',true);
|
||||
}
|
||||
elseif(!empty($call->date_start) && empty($call->time_start))
|
||||
{
|
||||
//jc - Bug#19862
|
||||
//for some reason the calls module does not populate the time_start variable in
|
||||
//this case, so the date_start attribute contains the information we need
|
||||
//to determine where in the history this call belongs.
|
||||
//using swap_formats to get from the format '03/31/2008 09:45pm' to the format
|
||||
//'2008-03-31 09:45:00'
|
||||
$sort_date_time = $timedate->swap_formats($call->date_start, $timedate->get_date_time_format(), $timedate->get_db_date_time_format());
|
||||
}
|
||||
|
||||
$history_list[] = array('name' => $call->name,
|
||||
'id' => $call->id,
|
||||
'type' => "Call",
|
||||
'direction' => $call->direction,
|
||||
'module' => "Calls",
|
||||
'status' => $call->status,
|
||||
'parent_id' => $call->parent_id,
|
||||
'parent_type' => $call->parent_type,
|
||||
'parent_name' => $call->parent_name,
|
||||
'contact_id' => $call->contact_id,
|
||||
'contact_name' => $call->contact_name,
|
||||
'date_modified' => $call->date_start,
|
||||
'description' => $this->formatDescription($call->description),
|
||||
'date_type' => $app_strings['DATA_TYPE_START'],
|
||||
'sort_value' => $sort_date_time
|
||||
);
|
||||
} else {
|
||||
$open_activity_list[] = array('name' => $call->name,
|
||||
'id' => $call->id,
|
||||
'direction' => $call->direction,
|
||||
'type' => "Call",
|
||||
'module' => "Calls",
|
||||
'status' => $call->status,
|
||||
'parent_id' => $call->parent_id,
|
||||
'parent_type' => $call->parent_type,
|
||||
'parent_name' => $call->parent_name,
|
||||
'contact_id' => $call->contact_id,
|
||||
'contact_name' => $call->contact_name,
|
||||
'date_due' => $call->date_start,
|
||||
'description' => $this->formatDescription($call->description),
|
||||
'date_type' => $app_strings['DATA_TYPE_START']
|
||||
);
|
||||
}
|
||||
} // end Calls
|
||||
|
||||
foreach ($focus_emails_list as $email) {
|
||||
$sort_date_time='';
|
||||
if (!empty($email->date_start) and !empty($email->time_start)) {
|
||||
$sort_date_time=$timedate->to_db_date_time($email->date_start,$email->time_start);
|
||||
$sort_date_time=implode(' ', $sort_date_time);
|
||||
// kbrill - Bug #16714
|
||||
//$sort_date_time=$timedate->handle_offset($sort_date_time,'Y-m-d H:i:s',true);
|
||||
}
|
||||
|
||||
$history_list[] = array('name' => $email->name,
|
||||
'id' => $email->id,
|
||||
'type' => "Email",
|
||||
'direction' => '',
|
||||
'module' => "Emails",
|
||||
'status' => '',
|
||||
'parent_id' => $email->parent_id,
|
||||
'parent_type' => $email->parent_type,
|
||||
'parent_name' => $email->parent_name,
|
||||
'contact_id' => $email->contact_id,
|
||||
'contact_name' => $email->contact_name,
|
||||
'date_modified' => $email->date_start." ".$email->time_start,
|
||||
'description' => $this->getEmailDetails($email),
|
||||
'date_type' => $app_strings['DATA_TYPE_SENT'],
|
||||
'sort_value' => $sort_date_time
|
||||
);
|
||||
} //end Emails
|
||||
|
||||
foreach ($focus_notes_list as $note) {
|
||||
if (!empty($note->date_modified)) {
|
||||
$sort_date_time = $timedate->swap_formats($note->date_modified, $timedate->get_date_time_format(), $timedate->get_db_date_time_format());
|
||||
}
|
||||
|
||||
$history_list[] = array('name' => $note->name,
|
||||
'id' => $note->id,
|
||||
'type' => "Note",
|
||||
'direction' => '',
|
||||
'module' => "Notes",
|
||||
'status' => '',
|
||||
'parent_id' => $note->parent_id,
|
||||
'parent_type' => $note->parent_type,
|
||||
'parent_name' => $note->parent_name,
|
||||
'contact_id' => $note->contact_id,
|
||||
'contact_name' => $note->contact_name,
|
||||
'date_modified' => $note->date_modified,
|
||||
'description' => $this->formatDescription($note->description),
|
||||
'date_type' => $app_strings['DATA_TYPE_MODIFIED'],
|
||||
'sort_value' => $sort_date_time
|
||||
);
|
||||
if(!empty($note->filename)) {
|
||||
$count = count($history_list);
|
||||
$count--;
|
||||
$history_list[$count]['filename'] = $note->filename;
|
||||
$history_list[$count]['fileurl'] = UploadFile::get_url($note->filename,$note->id);
|
||||
}
|
||||
} // end Notes
|
||||
|
||||
$xtpl=new XTemplate ('modules/Activities/Popup_picker.html');
|
||||
|
||||
$xtpl->assign('MOD', $mod_strings);
|
||||
$xtpl->assign('APP', $app_strings);
|
||||
insert_popup_header();
|
||||
|
||||
//output header
|
||||
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr><td>";
|
||||
echo get_module_title($focus->module_dir, translate('LBL_MODULE_NAME', $focus->module_dir).": ".$focus->name, false);
|
||||
echo "</td><td align='right' class='moduleTitle'>";
|
||||
echo "<A href='javascript:print();' class='utilsLink'><img src='".SugarThemeRegistry::current()->getImageURL("print.gif")."' width='13' height='13' alt='".$app_strings['LNK_PRINT']."' border='0' align='absmiddle'></a> <A href='javascript:print();' class='utilsLink'>".$app_strings['LNK_PRINT']."</A>\n";
|
||||
echo "</td></tr></table>";
|
||||
|
||||
$oddRow = true;
|
||||
if (count($history_list) > 0) $history_list = array_csort($history_list, 'sort_value', SORT_DESC);
|
||||
foreach($history_list as $activity)
|
||||
{
|
||||
$activity_fields = array(
|
||||
'ID' => $activity['id'],
|
||||
'NAME' => $activity['name'],
|
||||
'MODULE' => $activity['module'],
|
||||
'CONTACT_NAME' => $activity['contact_name'],
|
||||
'CONTACT_ID' => $activity['contact_id'],
|
||||
'PARENT_TYPE' => $activity['parent_type'],
|
||||
'PARENT_NAME' => $activity['parent_name'],
|
||||
'PARENT_ID' => $activity['parent_id'],
|
||||
'DATE' => $activity['date_modified'],
|
||||
'DESCRIPTION' => $activity['description'],
|
||||
'DATE_TYPE' => $activity['date_type']
|
||||
);
|
||||
if (empty($activity['direction'])) {
|
||||
$activity_fields['TYPE'] = $app_list_strings['activity_dom'][$activity['type']];
|
||||
}
|
||||
else {
|
||||
$activity_fields['TYPE'] = $app_list_strings['call_direction_dom'][$activity['direction']].' '.$app_list_strings['activity_dom'][$activity['type']];
|
||||
}
|
||||
|
||||
switch ($activity['type']) {
|
||||
case 'Call':
|
||||
$activity_fields['STATUS'] = $app_list_strings['call_status_dom'][$activity['status']];
|
||||
break;
|
||||
case 'Meeting':
|
||||
$activity_fields['STATUS'] = $app_list_strings['meeting_status_dom'][$activity['status']];
|
||||
break;
|
||||
case 'Task':
|
||||
$activity_fields['STATUS'] = $app_list_strings['task_status_dom'][$activity['status']];
|
||||
break;
|
||||
}
|
||||
|
||||
if (isset($activity['location'])) $activity_fields['LOCATION'] = $activity['location'];
|
||||
if (isset($activity['filename'])) {
|
||||
$activity_fields['ATTACHMENT'] = "<a href='index.php?entryPoint=download&id=".$activity['id']."&type=Notes' target='_blank'>".SugarThemeRegistry::current()->getImage("attachment","alt='".$activity['filename']."' border='0' align='absmiddle'")."</a>";
|
||||
}
|
||||
|
||||
if (isset($activity['parent_type'])) $activity_fields['PARENT_MODULE'] = $activity['parent_type'];
|
||||
|
||||
$xtpl->assign("ACTIVITY", $activity_fields);
|
||||
$xtpl->assign("ACTIVITY_MODULE_PNG", SugarThemeRegistry::current()->getImage($activity_fields['MODULE'].'','border="0" alt="'.$activity_fields['NAME'].'"'));
|
||||
|
||||
if($oddRow)
|
||||
{
|
||||
//todo move to themes
|
||||
$xtpl->assign("ROW_COLOR", 'oddListRow');
|
||||
$xtpl->assign("BG_COLOR", $odd_bg);
|
||||
}
|
||||
else
|
||||
{
|
||||
//todo move to themes
|
||||
$xtpl->assign("ROW_COLOR", 'evenListRow');
|
||||
$xtpl->assign("BG_COLOR", $even_bg);
|
||||
}
|
||||
$oddRow = !$oddRow;
|
||||
|
||||
$xtpl->parse("history.row");
|
||||
// Put the rows in.
|
||||
}
|
||||
|
||||
$xtpl->parse("history");
|
||||
$xtpl->out("history");
|
||||
insert_popup_footer();
|
||||
}
|
||||
|
||||
function getEmailDetails($email){
|
||||
$details = "";
|
||||
|
||||
if(!empty($email->to_addrs)){
|
||||
$details .= "To: ".$email->to_addrs."<br>";
|
||||
}
|
||||
if(!empty($email->from_addr)){
|
||||
$details .= "From: ".$email->from_addr."<br>";
|
||||
}
|
||||
if(!empty($email->cc_addrs)){
|
||||
$details .= "CC: ".$email->cc_addrs."<br>";
|
||||
}
|
||||
if(!empty($email->from_addr) || !empty($email->cc_addrs) || !empty($email->to_addrs)){
|
||||
$details .= "<br>";
|
||||
}
|
||||
|
||||
// cn: bug 8433 - history does not distinguish b/t text/html emails
|
||||
$details .= empty($email->description_html)
|
||||
? $this->formatDescription($email->description)
|
||||
: $this->formatDescription(strip_tags(br2nl(from_html($email->description_html))));
|
||||
|
||||
return $details;
|
||||
}
|
||||
|
||||
function getTaskDetails($task){
|
||||
global $app_strings;
|
||||
|
||||
$details = "";
|
||||
if($task->date_start != '0000-00-00'){
|
||||
$details .= $app_strings['DATA_TYPE_START'].$task->date_start."<br>";
|
||||
}
|
||||
if(($task->date_start != '0000-00-00')){
|
||||
$details .= "<br>";
|
||||
}
|
||||
$details .= $this->formatDescription($task->description);
|
||||
|
||||
return $details;
|
||||
}
|
||||
|
||||
function formatDescription($description){
|
||||
return nl2br($description);
|
||||
}
|
||||
} // end of class Popup_Picker
|
||||
?>
|
||||
58
modules/Activities/SetAcceptStatus.php
Executable file
58
modules/Activities/SetAcceptStatus.php
Executable file
@@ -0,0 +1,58 @@
|
||||
<?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-2010 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".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
global $json,$current_user;
|
||||
|
||||
|
||||
if ($_REQUEST['object_type'] == "Meeting")
|
||||
{
|
||||
$focus = new Meeting();
|
||||
$focus->id = $_REQUEST['object_id'];
|
||||
$test = $focus->set_accept_status($current_user, $_REQUEST['accept_status']);
|
||||
}
|
||||
else if ($_REQUEST['object_type'] == "Call")
|
||||
{
|
||||
$focus = new Call();
|
||||
$focus->id = $_REQUEST['object_id'];
|
||||
$test = $focus->set_accept_status($current_user, $_REQUEST['accept_status']);
|
||||
}
|
||||
print 1;
|
||||
exit;
|
||||
?>
|
||||
455
modules/Activities/SubPanelView.php
Executable file
455
modules/Activities/SubPanelView.php
Executable file
@@ -0,0 +1,455 @@
|
||||
<?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-2010 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".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
require_once("include/upload_file.php");
|
||||
|
||||
global $currentModule;
|
||||
|
||||
global $theme;
|
||||
global $focus;
|
||||
global $action;
|
||||
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
//we don't want the parent module's string file, but rather the string file specifc to this subpanel
|
||||
global $current_language;
|
||||
$current_module_strings = return_module_language($current_language, 'Activities');
|
||||
global $timedate;
|
||||
|
||||
|
||||
|
||||
// history_list is the means of passing data to a SubPanelView.
|
||||
global $focus_tasks_list;
|
||||
global $focus_meetings_list;
|
||||
global $focus_calls_list;
|
||||
global $focus_emails_list;
|
||||
|
||||
$open_activity_list = Array();
|
||||
$history_list = Array();
|
||||
|
||||
foreach ($focus_tasks_list as $task) {
|
||||
if ($task->status != "Not Started" && $task->status != "In Progress" && $task->status != "Pending Input") {
|
||||
$history_list[] = Array('name' => $task->name,
|
||||
'id' => $task->id,
|
||||
'type' => "Task",
|
||||
'direction' => '',
|
||||
'module' => "Tasks",
|
||||
'status' => $task->status,
|
||||
'parent_id' => $task->parent_id,
|
||||
'parent_type' => $task->parent_type,
|
||||
'parent_name' => $task->parent_name,
|
||||
'contact_id' => $task->contact_id,
|
||||
'contact_name' => $task->contact_name,
|
||||
'date_modified' => $timedate->to_display_date($task->date_modified, true),
|
||||
);
|
||||
}
|
||||
else {
|
||||
if ($task->date_due == '0000-00-00') $date_due = '';
|
||||
else {
|
||||
$date_due = $task->date_due;
|
||||
|
||||
}
|
||||
$open_activity_list[] = Array('name' => $task->name,
|
||||
'id' => $task->id,
|
||||
'type' => "Task",
|
||||
'direction' => '',
|
||||
'module' => "Tasks",
|
||||
'status' => $task->status,
|
||||
'parent_id' => $task->parent_id,
|
||||
'parent_type' => $task->parent_type,
|
||||
'parent_name' => $task->parent_name,
|
||||
'contact_id' => $task->contact_id,
|
||||
'contact_name' => $task->contact_name,
|
||||
'date_due' => $date_due
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($focus_meetings_list as $meeting) {
|
||||
if ($meeting->status != "Planned") {
|
||||
$history_list[] = Array('name' => $meeting->name,
|
||||
'id' => $meeting->id,
|
||||
'type' => "Meeting",
|
||||
'direction' => '',
|
||||
'module' => "Meetings",
|
||||
'status' => $meeting->status,
|
||||
'parent_id' => $meeting->parent_id,
|
||||
'parent_type' => $meeting->parent_type,
|
||||
'parent_name' => $meeting->parent_name,
|
||||
'contact_id' => $meeting->contact_id,
|
||||
'contact_name' => $meeting->contact_name,
|
||||
'date_modified' => $meeting->date_modified
|
||||
);
|
||||
}
|
||||
else {
|
||||
$open_activity_list[] = Array('name' => $meeting->name,
|
||||
'id' => $meeting->id,
|
||||
'type' => "Meeting",
|
||||
'direction' => '',
|
||||
'module' => "Meetings",
|
||||
'status' => $meeting->status,
|
||||
'parent_id' => $meeting->parent_id,
|
||||
'parent_type' => $meeting->parent_type,
|
||||
'parent_name' => $meeting->parent_name,
|
||||
'contact_id' => $meeting->contact_id,
|
||||
'contact_name' => $meeting->contact_name,
|
||||
'date_due' => $meeting->date_start
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($focus_calls_list as $call) {
|
||||
if ($call->status != "Planned") {
|
||||
$history_list[] = Array('name' => $call->name,
|
||||
'id' => $call->id,
|
||||
'type' => "Call",
|
||||
'direction' => $call->direction,
|
||||
'module' => "Calls",
|
||||
'status' => $call->status,
|
||||
'parent_id' => $call->parent_id,
|
||||
'parent_type' => $call->parent_type,
|
||||
'parent_name' => $call->parent_name,
|
||||
'contact_id' => $call->contact_id,
|
||||
'contact_name' => $call->contact_name,
|
||||
'date_modified' => $call->date_modified
|
||||
);
|
||||
}
|
||||
else {
|
||||
$open_activity_list[] = Array('name' => $call->name,
|
||||
'id' => $call->id,
|
||||
'direction' => $call->direction,
|
||||
'type' => "Call",
|
||||
'module' => "Calls",
|
||||
'status' => $call->status,
|
||||
'parent_id' => $call->parent_id,
|
||||
'parent_type' => $call->parent_type,
|
||||
'parent_name' => $call->parent_name,
|
||||
'contact_id' => $call->contact_id,
|
||||
'contact_name' => $call->contact_name,
|
||||
'date_due' => $call->date_start
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($focus_emails_list as $email) {
|
||||
$history_list[] = Array('name' => $email->name,
|
||||
'id' => $email->id,
|
||||
'type' => "Email",
|
||||
'direction' => '',
|
||||
'module' => "Emails",
|
||||
'status' => '',
|
||||
'parent_id' => $email->parent_id,
|
||||
'parent_type' => $email->parent_type,
|
||||
'parent_name' => $email->parent_name,
|
||||
'contact_id' => $email->contact_id,
|
||||
'contact_name' => $email->contact_name,
|
||||
'date_modified' => $email->date_start." ".$email->time_start
|
||||
);
|
||||
}
|
||||
|
||||
foreach ($focus_notes_list as $note) {
|
||||
$history_list[] = Array('name' => $note->name,
|
||||
'id' => $note->id,
|
||||
'type' => "Note",
|
||||
'direction' => '',
|
||||
'module' => "Notes",
|
||||
'status' => '',
|
||||
'parent_id' => $note->parent_id,
|
||||
'parent_type' => $note->parent_type,
|
||||
'parent_name' => $note->parent_name,
|
||||
'contact_id' => $note->contact_id,
|
||||
'contact_name' => $note->contact_name,
|
||||
'date_modified' => $note->date_modified
|
||||
);
|
||||
if (!empty($note->filename))
|
||||
{
|
||||
$count = count($history_list);
|
||||
$count--;
|
||||
$history_list[$count]['filename'] = $note->filename;
|
||||
$history_list[$count]['fileurl'] = UploadFile::get_url($note->filename,$note->id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($currentModule == 'Contacts')
|
||||
{
|
||||
$xtpl=new XTemplate ('modules/Activities/SubPanelViewContacts.html');
|
||||
$xtpl->assign("CONTACT_ID", $focus->id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$xtpl=new XTemplate ('modules/Activities/SubPanelView.html');
|
||||
}
|
||||
|
||||
$xtpl->assign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline','align="absmiddle" alt="'.$app_strings['LNK_DELETE'].'" border="0"'));
|
||||
$xtpl->assign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline','align="absmiddle" alt="'.$app_strings['LNK_EDIT'].'" border="0"'));
|
||||
|
||||
$xtpl->assign("MOD", $current_module_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
|
||||
$button = "<form border='0' action='index.php' method='post' name='form' id='form'>\n";
|
||||
$button .= "<input type='hidden' name='module'>\n";
|
||||
$button .= "<input type='hidden' name='type'>\n";
|
||||
if ($currentModule == 'Accounts')
|
||||
{
|
||||
$button .= "<input type='hidden' name='parent_type' value='Accounts'>\n<input type='hidden' name='parent_id' value='$focus->id'>\n<input type='hidden' name='parent_name' value='$focus->name'>\n";
|
||||
}
|
||||
elseif ($currentModule == 'Opportunities')
|
||||
{
|
||||
$button .= "<input type='hidden' name='parent_type' value='Opportunities'>\n<input type='hidden' name='parent_id' value='$focus->id'>\n<input type='hidden' name='parent_name' value='$focus->name'>\n";
|
||||
}
|
||||
elseif ($currentModule == 'Cases')
|
||||
{
|
||||
$button .= "<input type='hidden' name='parent_type' value='Cases'>\n<input type='hidden' name='parent_id' value='$focus->id'>\n<input type='hidden' name='parent_name' value='$focus->name'>\n";
|
||||
}
|
||||
elseif ($currentModule == 'Contacts')
|
||||
{
|
||||
$button .= "<input type='hidden' name='contact_id' value='$focus->id'>\n<input type='hidden' name='contact_name' value='$focus->first_name $focus->last_name'>\n";
|
||||
$button .= "<input type='hidden' name='parent_type' value='Accounts'>\n<input type='hidden' name='parent_id' value='$focus->account_id'>\n<input type='hidden' name='parent_name' value='$focus->account_name'>\n";
|
||||
$button .= "<input type='hidden' name='to_email_addrs' value='$focus->email1'>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$button .= "<input type='hidden' name='parent_type' value='$currentModule'>\n<input type='hidden' name='parent_id' value='$focus->id'>\n<input type='hidden' name='parent_name' value='$focus->name'>\n";
|
||||
}
|
||||
|
||||
$button .= "<input type='hidden' name='return_module' value='".$currentModule."'>\n";
|
||||
$button .= "<input type='hidden' name='return_action' value='".$action."'>\n";
|
||||
$button .= "<input type='hidden' name='return_id' value='".$focus->id."'>\n";
|
||||
$button .= "<input type='hidden' name='type' value='out'>\n";
|
||||
$button .= "<input type='hidden' name='action'>\n";
|
||||
|
||||
if($currentModule != 'Project' && $currentModule != 'ProjectTask')
|
||||
{
|
||||
$button .= "<input title='".$current_module_strings['LBL_NEW_TASK_BUTTON_TITLE']."' accessKey='".$current_module_strings['LBL_NEW_TASK_BUTTON_KEY']."' class='button' onclick=\"this.form.action.value='EditView';this.form.module.value='Tasks'\" type='submit' name='button' value='".$current_module_strings['LBL_NEW_TASK_BUTTON_LABEL']."'>\n";
|
||||
}
|
||||
|
||||
$button .= "<input title='".$current_module_strings['LBL_SCHEDULE_MEETING_BUTTON_TITLE']."' accessKey='".$current_module_strings['LBL_SCHEDULE_MEETING_BUTTON_KEY']."' class='button' onclick=\"this.form.action.value='EditView';this.form.module.value='Meetings'\" type='submit' name='button' value='".$current_module_strings['LBL_SCHEDULE_MEETING_BUTTON_LABEL']."'>\n";
|
||||
|
||||
$button .= "<input title='".$current_module_strings['LBL_SCHEDULE_CALL_BUTTON_LABEL']."' accessKey='".$current_module_strings['LBL_SCHEDULE_CALL_BUTTON_KEY']."' class='button' onclick=\"this.form.action.value='EditView';this.form.module.value='Calls'\" type='submit' name='button' value='".$current_module_strings['LBL_SCHEDULE_CALL_BUTTON_LABEL']."'>\n";
|
||||
|
||||
$button .= "<input title='".$app_strings['LBL_COMPOSE_EMAIL_BUTTON_TITLE']."' accessKey='".$app_strings['LBL_COMPOSE_EMAIL_BUTTON_KEY']."' class='button' onclick=\"this.form.type.value='out';this.form.action.value='EditView';this.form.module.value='Emails';\" type='submit' name='button' value='".$app_strings['LBL_COMPOSE_EMAIL_BUTTON_LABEL']."'>\n";
|
||||
|
||||
$button .= "</form>\n";
|
||||
|
||||
// Stick the form header out there.
|
||||
echo get_form_header($current_module_strings['LBL_OPEN_ACTIVITIES'], $button, false);
|
||||
|
||||
$xtpl->assign("RETURN_URL", "&return_module=$currentModule&return_action=DetailView&return_id=$focus->id");
|
||||
|
||||
$oddRow = true;
|
||||
if (count($open_activity_list) > 0) $open_activity_list = array_csort($open_activity_list, 'date_due', SORT_DESC);
|
||||
foreach($open_activity_list as $activity)
|
||||
{
|
||||
$activity_fields = array(
|
||||
'ID' => $activity['id'],
|
||||
'NAME' => $activity['name'],
|
||||
'MODULE' => $activity['module'],
|
||||
'CONTACT_NAME' => $activity['contact_name'],
|
||||
'CONTACT_ID' => $activity['contact_id'],
|
||||
'PARENT_TYPE' => $activity['parent_type'],
|
||||
'PARENT_NAME' => $activity['parent_name'],
|
||||
'PARENT_ID' => $activity['parent_id'],
|
||||
'DATE' => $activity['date_due']
|
||||
);
|
||||
|
||||
if (empty($activity['direction'])) {
|
||||
$activity_fields['TYPE'] = $app_list_strings['activity_dom'][$activity['type']];
|
||||
}
|
||||
else {
|
||||
$activity_fields['TYPE'] = $app_list_strings['call_direction_dom'][$activity['direction']].' '.$app_list_strings['activity_dom'][$activity['type']];
|
||||
}
|
||||
if (isset($activity['parent_type'])) $activity_fields['PARENT_MODULE'] = $activity['parent_type'];
|
||||
switch ($activity['type']) {
|
||||
case 'Call':
|
||||
$activity_fields['SET_COMPLETE'] = "<a href='index.php?return_module=$currentModule&return_action=$action&return_id=$focus->id&action=EditView&module=Calls&status=Held&record=".$activity['id']."&status=Held'>".SugarThemeRegistry::current()->getImage("close_inline","title=".translate('LBL_LIST_CLOSE','Activities')." border='0'")."</a>";
|
||||
$activity_fields['STATUS'] = $app_list_strings['call_status_dom'][$activity['status']];
|
||||
break;
|
||||
case 'Meeting':
|
||||
$activity_fields['SET_COMPLETE'] = "<a href='index.php?return_module=$currentModule&return_action=$action&return_id=$focus->id&action=EditView&module=Meetings&status=Held&record=".$activity['id']."&status=Held'>".SugarThemeRegistry::current()->getImage("close_inline","title=".translate('LBL_LIST_CLOSE','Activities')." border='0'")."</a>";
|
||||
$activity_fields['STATUS'] = $app_list_strings['meeting_status_dom'][$activity['status']];
|
||||
break;
|
||||
case 'Task':
|
||||
$activity_fields['SET_COMPLETE'] = "<a href='index.php?return_module=$currentModule&return_action=$action&return_id=$focus->id&action=EditView&module=Tasks&status=Completed&record=".$activity['id']."&status=Completed'>".SugarThemeRegistry::current()->getImage("close_inline","title=".translate('LBL_LIST_CLOSE','Activities')." border='0'")."</a>";
|
||||
$activity_fields['STATUS'] = $app_list_strings['task_status_dom'][$activity['status']];
|
||||
break;
|
||||
}
|
||||
|
||||
global $odd_bg;
|
||||
global $even_bg;
|
||||
global $hilite_bg;
|
||||
global $click_bg;
|
||||
$xtpl->assign("BG_HILITE", $hilite_bg);
|
||||
$xtpl->assign("BG_CLICK", $click_bg);
|
||||
$xtpl->assign("ACTIVITY_MODULE_PNG", SugarThemeRegistry::current()->getImage($activity_fields['MODULE'].'','border="0" alt="'.$activity_fields['NAME'].'"'));
|
||||
$xtpl->assign("ACTIVITY", $activity_fields);
|
||||
|
||||
if($oddRow)
|
||||
{
|
||||
//todo move to themes
|
||||
$xtpl->assign("ROW_COLOR", 'oddListRow');
|
||||
$xtpl->assign("BG_COLOR", $odd_bg);
|
||||
}
|
||||
else
|
||||
{
|
||||
//todo move to themes
|
||||
$xtpl->assign("ROW_COLOR", 'evenListRow');
|
||||
$xtpl->assign("BG_COLOR", $even_bg);
|
||||
}
|
||||
$oddRow = !$oddRow;
|
||||
|
||||
$xtpl->parse("open_activity.row");
|
||||
// Put the rows in.
|
||||
}
|
||||
|
||||
$xtpl->parse("open_activity");
|
||||
$xtpl->out("open_activity");
|
||||
echo "<BR>";
|
||||
|
||||
|
||||
//requestdata
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(),
|
||||
);
|
||||
|
||||
$json = getJSONobj();
|
||||
$encoded_popup_request_data = $json->encode($popup_request_data);
|
||||
|
||||
$button = "<form border='0' action='index.php' method='post' name='form' id='form'>\n";
|
||||
$button .= "<input type='hidden' name='module'>\n";
|
||||
$button .= "<input type='hidden' name='type' value='archived'>\n";
|
||||
if ($currentModule == 'Accounts') $button .= "<input type='hidden' name='parent_type' value='Accounts'>\n<input type='hidden' name='parent_id' value='$focus->id'>\n<input type='hidden' name='parent_name' value='$focus->name'>\n";
|
||||
if ($currentModule == 'Opportunities') $button .= "<input type='hidden' name='parent_type' value='Opportunities'>\n<input type='hidden' name='parent_id' value='$focus->id'>\n<input type='hidden' name='parent_name' value='$focus->name'>\n";
|
||||
elseif ($currentModule == 'Cases') $button .= "<input type='hidden' name='parent_type' value='Cases'>\n<input type='hidden' name='parent_id' value='$focus->id'>\n<input type='hidden' name='parent_name' value='$focus->name'>\n";
|
||||
elseif ($currentModule == 'Contacts') {
|
||||
$button .= "<input type='hidden' name='contact_id' value='$focus->id'>\n<input type='hidden' name='contact_name' value='$focus->first_name $focus->last_name'>\n";
|
||||
$button .= "<input type='hidden' name='to_email_addrs' value='$focus->email1'>\n";
|
||||
$button .= "<input type='hidden' name='parent_type' value='Accounts'>\n<input type='hidden' name='parent_id' value='$focus->account_id'>\n<input type='hidden' name='parent_name' value='$focus->account_name'>\n";
|
||||
}else{
|
||||
$button .= "<input type='hidden' name='parent_type' value='$currentModule'>\n<input type='hidden' name='parent_id' value='$focus->id'>\n<input type='hidden' name='parent_name' value='$focus->name'>\n";
|
||||
}
|
||||
$button .= "<input type='hidden' name='return_module' value='".$currentModule."'>\n";
|
||||
$button .= "<input type='hidden' name='return_action' value='".$action."'>\n";
|
||||
$button .= "<input type='hidden' name='return_id' value='".$focus->id."'>\n";
|
||||
$button .= "<input type='hidden' name='action'>\n";
|
||||
$button .= "<input title='".$current_module_strings['LBL_NEW_NOTE_BUTTON_TITLE']."' accessKey='".$current_module_strings['LBL_NEW_NOTE_BUTTON_KEY']."' class='button' onclick=\"this.form.action.value='EditView';this.form.module.value='Notes'\" type='submit' name='button' value='".$current_module_strings['LBL_NEW_NOTE_BUTTON_LABEL']."'>\n";
|
||||
$button .= "<input title='".$current_module_strings['LBL_TRACK_EMAIL_BUTTON_TITLE']."' accessKey='".$current_module_strings['LBL_TRACK_EMAIL_BUTTON_KEY']."' class='button' onclick=\"this.form.type.value='archived';this.form.action.value='EditView';this.form.module.value='Emails'\" type='submit' name='button' value='".$current_module_strings['LBL_TRACK_EMAIL_BUTTON_LABEL']."'>\n";
|
||||
$button .= "<input title='".$current_module_strings['LBL_ACCUMULATED_HISTORY_BUTTON_TITLE']."' accessKey='".$current_module_strings['LBL_ACCUMULATED_HISTORY_BUTTON_KEY']."' class='button' type='button' onclick='open_popup(\"Activities\", \"600\", \"400\", \"&record=$focus->id&module_name=$currentModule\", true, false, $encoded_popup_request_data);' name='button' value='".$current_module_strings['LBL_ACCUMULATED_HISTORY_BUTTON_LABEL']."'>\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
// Stick the form header out there.
|
||||
echo get_form_header($current_module_strings['LBL_HISTORY'], $button, false);
|
||||
|
||||
$xtpl->assign("RETURN_URL", "&return_module=$currentModule&return_action=DetailView&return_id=$focus->id");
|
||||
|
||||
$oddRow = true;
|
||||
if (count($history_list) > 0) $history_list = array_csort($history_list, 'date_modified', SORT_DESC);
|
||||
foreach($history_list as $activity)
|
||||
{
|
||||
$activity_fields = array(
|
||||
'ID' => $activity['id'],
|
||||
'NAME' => $activity['name'],
|
||||
'MODULE' => $activity['module'],
|
||||
'CONTACT_NAME' => $activity['contact_name'],
|
||||
'CONTACT_ID' => $activity['contact_id'],
|
||||
'PARENT_TYPE' => $activity['parent_type'],
|
||||
'PARENT_NAME' => $activity['parent_name'],
|
||||
'PARENT_ID' => $activity['parent_id'],
|
||||
'DATE' => $activity['date_modified'],
|
||||
);
|
||||
if (empty($activity['direction'])) {
|
||||
$activity_fields['TYPE'] = $app_list_strings['activity_dom'][$activity['type']];
|
||||
}
|
||||
else {
|
||||
$activity_fields['TYPE'] = $app_list_strings['call_direction_dom'][$activity['direction']].' '.$app_list_strings['activity_dom'][$activity['type']];
|
||||
}
|
||||
|
||||
switch ($activity['type']) {
|
||||
case 'Call':
|
||||
$activity_fields['STATUS'] = $app_list_strings['call_status_dom'][$activity['status']];
|
||||
break;
|
||||
case 'Meeting':
|
||||
$activity_fields['STATUS'] = $app_list_strings['meeting_status_dom'][$activity['status']];
|
||||
break;
|
||||
case 'Task':
|
||||
$activity_fields['STATUS'] = $app_list_strings['task_status_dom'][$activity['status']];
|
||||
break;
|
||||
}
|
||||
|
||||
if (isset($activity['location'])) $activity_fields['LOCATION'] = $activity['location'];
|
||||
if (isset($activity['filename'])) {
|
||||
$activity_fields['ATTACHMENT'] = "<a href='".$activity['fileurl']."' target='_blank'>".SugarThemeRegistry::current()->getImage("attachment","alt='".$activity['filename']."' border='0' align='absmiddle'")."</a>";
|
||||
}
|
||||
|
||||
if (isset($activity['parent_type'])) $activity_fields['PARENT_MODULE'] = $activity['parent_type'];
|
||||
|
||||
$xtpl->assign("ACTIVITY", $activity_fields);
|
||||
$xtpl->assign("ACTIVITY_MODULE_PNG", SugarThemeRegistry::current()->getImage($activity_fields['MODULE'].'','border="0" alt="'.$activity_fields['NAME'].'"'));
|
||||
|
||||
if($oddRow)
|
||||
{
|
||||
//todo move to themes
|
||||
$xtpl->assign("ROW_COLOR", 'oddListRow');
|
||||
$xtpl->assign("BG_COLOR", $odd_bg);
|
||||
}
|
||||
else
|
||||
{
|
||||
//todo move to themes
|
||||
$xtpl->assign("ROW_COLOR", 'evenListRow');
|
||||
$xtpl->assign("BG_COLOR", $even_bg);
|
||||
}
|
||||
$oddRow = !$oddRow;
|
||||
|
||||
$xtpl->parse("history.row");
|
||||
// Put the rows in.
|
||||
}
|
||||
|
||||
$xtpl->parse("history");
|
||||
$xtpl->out("history");
|
||||
|
||||
?>
|
||||
45
modules/Activities/config.php
Executable file
45
modules/Activities/config.php
Executable 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-2010 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".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
//defines the call and meeting status. Values are keys, not translated strings
|
||||
$open_status[] = "Planned";
|
||||
|
||||
?>
|
||||
130
modules/Activities/language/en_us.lang.php
Executable file
130
modules/Activities/language/en_us.lang.php
Executable file
@@ -0,0 +1,130 @@
|
||||
<?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-2010 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".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* 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' => 'Activities',
|
||||
'LBL_MODULE_TITLE' => 'Activities: Home',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Activities Search',
|
||||
'LBL_LIST_FORM_TITLE' => 'Activities List',
|
||||
'LBL_LIST_SUBJECT' => 'Subject',
|
||||
'LBL_LIST_CONTACT' => 'Contact',
|
||||
'LBL_LIST_RELATED_TO' => 'Related to',
|
||||
'LBL_LIST_DATE' => 'Date',
|
||||
'LBL_LIST_TIME' => 'Start Time',
|
||||
'LBL_LIST_CLOSE' => 'Close',
|
||||
'LBL_SUBJECT' => 'Subject:',
|
||||
'LBL_STATUS' => 'Status:',
|
||||
'LBL_LOCATION' => 'Location:',
|
||||
'LBL_DATE_TIME' => 'Start Date & Time:',
|
||||
'LBL_DATE' => 'Start Date:',
|
||||
'LBL_TIME' => 'Start Time:',
|
||||
'LBL_DURATION' => 'Duration:',
|
||||
'LBL_DURATION_MINUTES' => 'Duration Minutes:',
|
||||
'LBL_HOURS_MINS' => '(hours/minutes)',
|
||||
'LBL_CONTACT_NAME' => 'Contact Name: ',
|
||||
'LBL_MEETING' => 'Meeting:',
|
||||
'LBL_DESCRIPTION_INFORMATION' => 'Description Information',
|
||||
'LBL_DESCRIPTION' => 'Description:',
|
||||
'LBL_COLON' => ':',
|
||||
'LBL_DEFAULT_STATUS' => 'Planned',
|
||||
'LNK_NEW_CALL' => 'Log Call',
|
||||
'LNK_NEW_MEETING' => 'Schedule Meeting',
|
||||
'LNK_NEW_TASK' => 'Create Task',
|
||||
'LNK_NEW_NOTE' => 'Create Note or Add Attachment',
|
||||
'LNK_NEW_EMAIL' => 'Create Archived Email',
|
||||
'LNK_CALL_LIST' => 'View Calls',
|
||||
'LNK_MEETING_LIST' => 'View Meetings',
|
||||
'LNK_TASK_LIST' => 'View Tasks',
|
||||
'LNK_NOTE_LIST' => 'View Notes',
|
||||
'LNK_EMAIL_LIST' => 'View Emails',
|
||||
'ERR_DELETE_RECORD' => 'You must specify a record number to delete the account.',
|
||||
'NTC_REMOVE_INVITEE' => 'Are you sure you want to remove this invitee from the meeting?',
|
||||
'LBL_INVITEE' => 'Invitees',
|
||||
'LBL_LIST_DIRECTION' => 'Direction',
|
||||
'LBL_DIRECTION' => 'Direction',
|
||||
'LNK_NEW_APPOINTMENT' => 'New Appointment',
|
||||
'LNK_VIEW_CALENDAR' => 'View Calendar',
|
||||
'LBL_OPEN_ACTIVITIES' => 'Open Activities',
|
||||
'LBL_HISTORY' => 'History',
|
||||
'LBL_UPCOMING' => 'My Upcoming Appointments',
|
||||
'LBL_TODAY' => 'through ',
|
||||
'LBL_NEW_TASK_BUTTON_TITLE' => 'Create Task [Alt+N]',
|
||||
'LBL_NEW_TASK_BUTTON_KEY' => 'N',
|
||||
'LBL_NEW_TASK_BUTTON_LABEL' => 'Create Task',
|
||||
'LBL_SCHEDULE_MEETING_BUTTON_TITLE' => 'Schedule Meeting [Alt+M]',
|
||||
'LBL_SCHEDULE_MEETING_BUTTON_KEY' => 'M',
|
||||
'LBL_SCHEDULE_MEETING_BUTTON_LABEL' => 'Schedule Meeting',
|
||||
'LBL_SCHEDULE_CALL_BUTTON_TITLE' => 'Log Call [Alt+C]',
|
||||
'LBL_SCHEDULE_CALL_BUTTON_KEY' => 'C',
|
||||
'LBL_SCHEDULE_CALL_BUTTON_LABEL' => 'Log Call',
|
||||
'LBL_NEW_NOTE_BUTTON_TITLE' => 'Create Note or Attachment [Alt+T]',
|
||||
'LBL_NEW_NOTE_BUTTON_KEY' => 'T',
|
||||
'LBL_NEW_NOTE_BUTTON_LABEL' => 'Create Note or Attachment',
|
||||
'LBL_TRACK_EMAIL_BUTTON_TITLE' => 'Archive Email [Alt+K]',
|
||||
'LBL_TRACK_EMAIL_BUTTON_KEY' => 'K',
|
||||
'LBL_TRACK_EMAIL_BUTTON_LABEL' => 'Archive Email',
|
||||
'LBL_LIST_STATUS' => 'Status',
|
||||
'LBL_LIST_DUE_DATE' => 'Due Date',
|
||||
'LBL_LIST_LAST_MODIFIED' => 'Last Modified',
|
||||
'NTC_NONE_SCHEDULED' => 'None scheduled.',
|
||||
'appointment_filter_dom' => array(
|
||||
'today' => 'today'
|
||||
,'tomorrow' => 'tomorrow'
|
||||
,'this Saturday' => 'this week'
|
||||
,'next Saturday' => 'next week'
|
||||
,'last this_month' => 'this month'
|
||||
,'last next_month' => 'next month'
|
||||
),
|
||||
'LNK_IMPORT_CALLS'=>'Import Calls',
|
||||
'LNK_IMPORT_MEETINGS'=>'Import Meetings',
|
||||
'LNK_IMPORT_TASKS'=>'Import Tasks',
|
||||
'LNK_IMPORT_NOTES'=>'Import Notes',
|
||||
'NTC_NONE'=>'None',
|
||||
'LBL_ACCEPT_THIS'=>'Accept?',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Open Activities',
|
||||
'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned User',
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
116
modules/Activities/language/pl_pl.lang.php
Executable file
116
modules/Activities/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,116 @@
|
||||
<?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.ext.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' => 'Działania',
|
||||
'LBL_MODULE_TITLE' => 'Działania: Strona główna',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Wyszukaj działania',
|
||||
'LBL_LIST_FORM_TITLE' => 'Lista działań',
|
||||
'LBL_LIST_SUBJECT' => 'Temat',
|
||||
'LBL_LIST_CONTACT' => 'Osoba kontaktowa',
|
||||
'LBL_LIST_RELATED_TO' => 'Przydzielone do',
|
||||
'LBL_LIST_DATE' => 'Data',
|
||||
'LBL_LIST_TIME' => 'Czas rozp.',
|
||||
'LBL_LIST_DATE_MODIFIED' => 'Data Modyfikacji',
|
||||
'LBL_LIST_CLOSE' => 'Zamknij',
|
||||
'LBL_SUBJECT' => 'Temat:',
|
||||
'LBL_STATUS' => 'Status:',
|
||||
'LBL_LOCATION' => 'Położenie:',
|
||||
'LBL_DATE_TIME' => 'Data i czas rozpoczęcia:',
|
||||
'LBL_DATE' => 'Data rozp.:',
|
||||
'LBL_TIME' => 'Czas rozp.:',
|
||||
'LBL_DURATION' => 'Czas trwania:',
|
||||
'LBL_DURATION_MINUTES' => 'Czas trwania (minuty):',
|
||||
'LBL_HOURS_MINS' => '(godziny/minuty)',
|
||||
'LBL_CONTACT_NAME' => 'Osoba kontaktowa: ',
|
||||
'LBL_MEETING' => 'Spotkanie:',
|
||||
'LBL_DESCRIPTION_INFORMATION' => 'Informacje dodatkowe',
|
||||
'LBL_DESCRIPTION' => 'Opis:',
|
||||
'LBL_COLON' => ':',
|
||||
'LBL_DEFAULT_STATUS' => 'Planowane',
|
||||
'LNK_NEW_CALL' => 'Dodaj rozmowę tel.',
|
||||
'LNK_NEW_MEETING' => 'Delegacja',
|
||||
'LNK_NEW_TASK' => 'Utwórz zadanie',
|
||||
'LNK_NEW_NOTE' => 'Napisz notatkę',
|
||||
'LNK_NEW_EMAIL' => 'Napiszj e-mail',
|
||||
'LNK_CALL_LIST' => 'Rozmowy tel.',
|
||||
'LNK_MEETING_LIST' => 'Spotkania',
|
||||
'LNK_TASK_LIST' => 'Zadania',
|
||||
'LNK_NOTE_LIST' => 'Notatki',
|
||||
'LNK_EMAIL_LIST' => 'Poczta',
|
||||
'ERR_DELETE_RECORD' => 'Określ rekord, który chcesz usunąć.',
|
||||
'NTC_REMOVE_INVITEE' => 'Czy na pewno chcesz usunąć uczestnika spotkania?',
|
||||
'LBL_INVITEE' => 'Uczestnicy',
|
||||
'LBL_LIST_DIRECTION' => 'Wytyczne',
|
||||
'LBL_DIRECTION' => 'Wytyczne',
|
||||
'LNK_NEW_APPOINTMENT' => 'Nowy termin spotkania',
|
||||
'LNK_VIEW_CALENDAR' => 'Dzisiaj',
|
||||
'LBL_OPEN_ACTIVITIES' => 'Bieżące działania',
|
||||
'LBL_HISTORY' => 'Historia',
|
||||
'LBL_UPCOMING' => 'Moje przyszłe działania',
|
||||
'LBL_TODAY' => 'w dniu: ',
|
||||
'LBL_NEW_TASK_BUTTON_TITLE' => 'Zadanie inne [Alt+N]',
|
||||
'LBL_NEW_TASK_BUTTON_KEY' => 'N',
|
||||
'LBL_NEW_TASK_BUTTON_LABEL' => 'Zadanie inne',
|
||||
'LBL_SCHEDULE_MEETING_BUTTON_TITLE' => 'Kalendarz spotkań [Alt+M]',
|
||||
'LBL_SCHEDULE_MEETING_BUTTON_KEY' => 'M',
|
||||
'LBL_SCHEDULE_MEETING_BUTTON_LABEL' => 'Kalendarz spotkań',
|
||||
'LBL_SCHEDULE_CALL_BUTTON_TITLE' => 'Kalendarz rozmów tel. [Alt+C]',
|
||||
'LBL_SCHEDULE_CALL_BUTTON_KEY' => 'C',
|
||||
'LBL_SCHEDULE_CALL_BUTTON_LABEL' => 'Kalendarz rozmów tel.',
|
||||
'LBL_NEW_NOTE_BUTTON_TITLE' => 'Dodaj notatkę [Alt+T]',
|
||||
'LBL_NEW_NOTE_BUTTON_KEY' => 'T',
|
||||
'LBL_NEW_NOTE_BUTTON_LABEL' => 'Dodaj notatkę',
|
||||
'LBL_TRACK_EMAIL_BUTTON_TITLE' => 'Archiwum e-mail [Alt+K]',
|
||||
'LBL_TRACK_EMAIL_BUTTON_KEY' => 'K',
|
||||
'LBL_TRACK_EMAIL_BUTTON_LABEL' => 'Archiwum e-mail',
|
||||
'LBL_LIST_STATUS' => 'Status',
|
||||
'LBL_LIST_DUE_DATE' => 'Data zakończenia',
|
||||
'LBL_LIST_LAST_MODIFIED' => 'Ostatnio modyfikowane',
|
||||
'NTC_NONE_SCHEDULED' => 'Kalendarz jest pusty.',
|
||||
'appointment_filter_dom' => array(
|
||||
'today' => 'dziś'
|
||||
,'tomorrow' => 'jutro'
|
||||
,'this Saturday' => 'w tym tygodniu'
|
||||
,'next Saturday' => 'w przyszłym tygodniu'
|
||||
,'last this_month' => 'w tym miesiącu'
|
||||
,'last next_month' => 'w przyszłym miesiącu'
|
||||
),
|
||||
'LNK_IMPORT_NOTES'=>'Import notatek',
|
||||
'NTC_NONE'=>'Nic',
|
||||
'LBL_ACCEPT_THIS'=>'Akceptujesz?',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Otwórz działania',
|
||||
'LBL_LIST_ASSIGNED_TO_NAME' => 'Przydzielony użytkownik',
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
251
modules/Activities/metadata/subpaneldefs.php
Executable file
251
modules/Activities/metadata/subpaneldefs.php
Executable file
@@ -0,0 +1,251 @@
|
||||
<?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-2010 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".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$layout_defs['Activities'] = array( // the key to the layout_defs must be the name of the module dir
|
||||
'default_subpanel_define' => array(
|
||||
'subpanel_title' => 'LBL_DEFAULT_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateTaskButton'),
|
||||
array('widget_class' => 'SubPanelTopScheduleMeetingButton'),
|
||||
array('widget_class' => 'SubPanelTopScheduleCallButton'),
|
||||
array('widget_class' => 'SubPanelTopComposeEmailButton'),
|
||||
),
|
||||
'list_fields' => array(
|
||||
'Meetings' => array(
|
||||
'columns' => array(
|
||||
array(
|
||||
//TODO remove name=nothing and make it safe
|
||||
//TODO update layout editor to match new file structure
|
||||
|
||||
'name' => 'nothing',
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'module' => 'Meetings',
|
||||
'width' => '2%',
|
||||
),
|
||||
array(
|
||||
'name' => 'nothing',
|
||||
'widget_class' => 'SubPanelCloseButton',
|
||||
'module' => 'Meetings',
|
||||
'vname' => 'LBL_LIST_CLOSE',
|
||||
'width' => '6%',
|
||||
),
|
||||
array(
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
),
|
||||
array(
|
||||
'name' => 'status',
|
||||
'widget_class' => 'SubPanelActivitiesStatusField',
|
||||
'vname' => 'LBL_LIST_STATUS',
|
||||
'width' => '15%',
|
||||
),
|
||||
array(
|
||||
'name' => 'contact_name',
|
||||
'module' => 'Contacts',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'contact_id',
|
||||
'target_module' => 'Contacts',
|
||||
'vname' => 'LBL_LIST_CONTACT',
|
||||
'width' => '11%',
|
||||
),
|
||||
array(
|
||||
'name' => 'parent_name',
|
||||
'module' => 'Meetings',
|
||||
'vname' => 'LBL_LIST_RELATED_TO',
|
||||
'width' => '22%',
|
||||
),
|
||||
array(
|
||||
'name' => 'date_start',
|
||||
//'db_alias_to' => 'the_date',
|
||||
'vname' => 'LBL_LIST_DUE_DATE',
|
||||
'width' => '10%',
|
||||
),
|
||||
array(
|
||||
'name' => 'nothing',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'Meetings',
|
||||
'width' => '2%',
|
||||
),
|
||||
array(
|
||||
'name' => 'nothing',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'linked_field' => 'meetings',
|
||||
'module' => 'Meetings',
|
||||
'width' => '2%',
|
||||
),
|
||||
),
|
||||
'where' => "(meetings.status='Planned')",
|
||||
'order_by' => 'meetings.date_start',
|
||||
),
|
||||
'Tasks' => array(
|
||||
'columns' => array(
|
||||
array(
|
||||
'name' => 'nothing',
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'module' => 'Tasks',
|
||||
'width' => '2%',
|
||||
),
|
||||
array(
|
||||
'name' => 'nothing',
|
||||
'widget_class' => 'SubPanelCloseButton',
|
||||
'module' => 'Tasks',
|
||||
'vname' => 'LBL_LIST_CLOSE',
|
||||
'width' => '6%',
|
||||
),
|
||||
array(
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
),
|
||||
array(
|
||||
'name' => 'status',
|
||||
'widget_class' => 'SubPanelActivitiesStatusField',
|
||||
'vname' => 'LBL_LIST_STATUS',
|
||||
'width' => '15%',
|
||||
),
|
||||
array(
|
||||
'name' => 'contact_name',
|
||||
'module' => 'Contacts',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'contact_id',
|
||||
'target_module' => 'Contacts',
|
||||
'vname' => 'LBL_LIST_CONTACT',
|
||||
'width' => '11%',
|
||||
),
|
||||
array(
|
||||
'name' => 'parent_name',
|
||||
'module' => 'Tasks',
|
||||
'vname' => 'LBL_LIST_RELATED_TO',
|
||||
'width' => '22%',
|
||||
),
|
||||
array(
|
||||
'name' => 'date_start',
|
||||
//'db_alias_to' => 'the_date',
|
||||
'vname' => 'LBL_LIST_DUE_DATE',
|
||||
'width' => '10%',
|
||||
),
|
||||
array(
|
||||
'name' => 'nothing',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'Tasks',
|
||||
'width' => '2%',
|
||||
),
|
||||
array(
|
||||
'name' => 'nothing',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'linked_field' => 'tasks',
|
||||
'module' => 'Tasks',
|
||||
'width' => '2%',
|
||||
),
|
||||
),
|
||||
'where' => "(tasks.status='Not Started' OR tasks.status='In Progress' OR tasks.status='Pending Input')",
|
||||
'order_by' => 'tasks.date_start',
|
||||
),
|
||||
'Calls' => array(
|
||||
'columns' => array(
|
||||
array(
|
||||
'name' => 'nothing',
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'module' => 'Calls',
|
||||
'width' => '2%',
|
||||
),
|
||||
array(
|
||||
'name' => 'nothing',
|
||||
'widget_class' => 'SubPanelCloseButton',
|
||||
'module' => 'Calls',
|
||||
'vname' => 'LBL_LIST_CLOSE',
|
||||
'width' => '6%',
|
||||
),
|
||||
array(
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
),
|
||||
array(
|
||||
'name' => 'status',
|
||||
'widget_class' => 'SubPanelActivitiesStatusField',
|
||||
'vname' => 'LBL_LIST_STATUS',
|
||||
'width' => '15%',
|
||||
),
|
||||
array(
|
||||
'name' => 'contact_name',
|
||||
'module' => 'Contacts',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'contact_id',
|
||||
'target_module' => 'Contacts',
|
||||
'vname' => 'LBL_LIST_CONTACT',
|
||||
'width' => '11%',
|
||||
),
|
||||
array(
|
||||
'name' => 'parent_name',
|
||||
'module' => 'Calls',
|
||||
'vname' => 'LBL_LIST_RELATED_TO',
|
||||
'width' => '20%',
|
||||
),
|
||||
array(
|
||||
'name' => 'date_start',
|
||||
//'db_alias_to' => 'the_date',
|
||||
'vname'=>'LBL_LIST_DUE_DATE',
|
||||
'width' => '22%',
|
||||
),
|
||||
array(
|
||||
'name' => 'nothing',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'Calls',
|
||||
'width' => '2%',
|
||||
),
|
||||
array(
|
||||
'name' => 'nothing',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'linked_field' => 'calls',
|
||||
'module' => 'Calls',
|
||||
'width' => '2%',
|
||||
),
|
||||
),
|
||||
'where' => "(calls.status='Planned')",
|
||||
'order_by' => 'calls.date_start',
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
46
modules/Activities/views/view.list.php
Executable file
46
modules/Activities/views/view.list.php
Executable file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 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.list.php');
|
||||
|
||||
class ActivitiesViewList extends ViewList
|
||||
{
|
||||
public function display()
|
||||
{
|
||||
$GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], 'Calendar');
|
||||
require_once('modules/Calendar/index.php');
|
||||
}
|
||||
}
|
||||
55
modules/Activities/views/view.modulelistmenu.php
Executable file
55
modules/Activities/views/view.modulelistmenu.php
Executable file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 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.modulelistmenu.php');
|
||||
|
||||
class ActivitiesViewModulelistmenu extends ViewModulelistmenu
|
||||
{
|
||||
public function display()
|
||||
{
|
||||
//last viewed
|
||||
$tracker = new Tracker();
|
||||
$history = $tracker->get_recently_viewed($GLOBALS['current_user']->id, array('Calls','Meetings','Tasks','Notes','Emails'));
|
||||
foreach ( $history as $key => $row ) {
|
||||
$history[$key]['item_summary_short'] = getTrackerSubstring($row['item_summary']);
|
||||
$history[$key]['image'] = SugarThemeRegistry::current()
|
||||
->getImage($row['module_name'],'border="0" align="absmiddle" alt="'.$row['item_summary'].'"');
|
||||
}
|
||||
$this->ss->assign('LAST_VIEWED',$history);
|
||||
|
||||
$this->ss->display('include/MVC/View/tpls/modulelistmenu.tpl');
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user