Add php files
This commit is contained in:
206
modules/EcmCustomLists/EcmCustomList.php
Executable file
206
modules/EcmCustomLists/EcmCustomList.php
Executable file
@@ -0,0 +1,206 @@
|
||||
<?php
|
||||
if (! defined ( 'sugarEntry' ) || ! sugarEntry)
|
||||
die ( 'Not A Valid Entry Point' );
|
||||
/**
|
||||
* *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc.
|
||||
* Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* ******************************************************************************
|
||||
*/
|
||||
/**
|
||||
* *******************************************************************************
|
||||
*
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
* ******************************************************************************
|
||||
*/
|
||||
|
||||
require_once ('data/SugarBean.php');
|
||||
require_once ('include/utils.php');
|
||||
|
||||
// Task is used to store customer information.
|
||||
class EcmCustomList extends SugarBean {
|
||||
var $field_name_map;
|
||||
|
||||
// Stored fields
|
||||
var $id;
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
var $assigned_user_id;
|
||||
var $modified_user_id;
|
||||
var $created_by;
|
||||
var $created_by_name;
|
||||
var $modified_by_name;
|
||||
var $description;
|
||||
var $name;
|
||||
var $assigned_user_name;
|
||||
var $table_name = "ecmcustomlists";
|
||||
var $object_name = "EcmCustomLists";
|
||||
var $module_dir = 'EcmCustomLists';
|
||||
var $importable = false;
|
||||
// This is used to retrieve related fields from form posts.
|
||||
var $additional_column_fields = Array (
|
||||
'assigned_user_name',
|
||||
'assigned_user_id'
|
||||
);
|
||||
function EcmCustomList() {
|
||||
parent::SugarBean ();
|
||||
}
|
||||
var $new_schema = true;
|
||||
function get_summary_text() {
|
||||
return "$this->name";
|
||||
}
|
||||
function create_list_query($order_by, $where, $show_deleted = 0) {
|
||||
$custom_join = $this->custom_fields->getJOIN ();
|
||||
$query = "SELECT ";
|
||||
|
||||
$query .= "
|
||||
$this->table_name.*,
|
||||
users.user_name as assigned_user_name";
|
||||
|
||||
if ($custom_join) {
|
||||
$query .= $custom_join ['select'];
|
||||
}
|
||||
$query .= " FROM ecmcustomlists ";
|
||||
|
||||
$query .= " LEFT JOIN users
|
||||
ON ecmcustomlists.assigned_user_id=users.id ";
|
||||
if ($custom_join) {
|
||||
$query .= $custom_join ['join'];
|
||||
}
|
||||
$where_auto = '1=1';
|
||||
if ($show_deleted == 0) {
|
||||
$where_auto = " ecmcustomlists.deleted=0 ";
|
||||
} else if ($show_deleted == 1) {
|
||||
$where_auto = "$this->table_name.deleted=1";
|
||||
}
|
||||
|
||||
if ($where != "")
|
||||
$query .= "where $where AND " . $where_auto;
|
||||
else
|
||||
$query .= "where " . $where_auto;
|
||||
|
||||
if ($order_by != "")
|
||||
$query .= " ORDER BY " . $this->process_order_by ( $order_by, null );
|
||||
else
|
||||
$query .= " ORDER BY tasks.name";
|
||||
return $query;
|
||||
}
|
||||
function create_export_query(&$order_by, &$where) {
|
||||
$custom_join = $this->custom_fields->getJOIN ( true, true );
|
||||
{
|
||||
$query = 'SELECT ecmcustomlists.*';
|
||||
|
||||
if ($custom_join) {
|
||||
$query .= $custom_join ['select'];
|
||||
}
|
||||
$query .= ' FROM ecmcustomlists ';
|
||||
$where_auto = "ecmcustomlists.deleted=0";
|
||||
}
|
||||
|
||||
if ($custom_join) {
|
||||
$query .= $custom_join ['join'];
|
||||
}
|
||||
|
||||
if ($where != "")
|
||||
$query .= "where $where AND " . $where_auto;
|
||||
else
|
||||
$query .= "where " . $where_auto;
|
||||
|
||||
if ($order_by != "")
|
||||
$query .= " ORDER BY " . $this->process_order_by ( $order_by, null );
|
||||
else
|
||||
$query .= " ORDER BY ecmcustomlists.name";
|
||||
return $query;
|
||||
}
|
||||
function fill_in_additional_list_fields() {
|
||||
}
|
||||
function fill_in_additional_detail_fields() {
|
||||
parent::fill_in_additional_detail_fields ();
|
||||
global $app_strings;
|
||||
}
|
||||
function get_list_view_data() {
|
||||
global $action, $currentModule, $focus, $current_module_strings, $app_list_strings, $image_path, $timedate;
|
||||
|
||||
return array ();
|
||||
}
|
||||
function bean_implements($interface) {
|
||||
switch ($interface) {
|
||||
case 'ACL' :
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function listviewACLHelper() {
|
||||
$array_assign = parent::listviewACLHelper ();
|
||||
$is_owner = false;
|
||||
if (! empty ( $this->parent_name )) {
|
||||
if (! empty ( $this->parent_name_owner )) {
|
||||
global $current_user;
|
||||
$is_owner = $current_user->id == $this->parent_name_owner;
|
||||
}
|
||||
}
|
||||
|
||||
if (! ACLController::moduleSupportsACL ( $this->parent_type ) || ACLController::checkAccess ( $this->parent_type, 'view', $is_owner )) {
|
||||
$array_assign ['PARENT'] = 'a';
|
||||
} else {
|
||||
$array_assign ['PARENT'] = 'span';
|
||||
}
|
||||
$is_owner = false;
|
||||
if (! empty ( $this->contact_name )) {
|
||||
if (! empty ( $this->contact_name_owner )) {
|
||||
global $current_user;
|
||||
$is_owner = $current_user->id == $this->contact_name_owner;
|
||||
}
|
||||
}
|
||||
|
||||
if (ACLController::checkAccess ( 'Contacts', 'view', $is_owner )) {
|
||||
$array_assign ['CONTACT'] = 'a';
|
||||
} else {
|
||||
$array_assign ['CONTACT'] = 'span';
|
||||
}
|
||||
|
||||
return $array_assign;
|
||||
}
|
||||
function save($check_notify = FALSE) {
|
||||
global $current_user;
|
||||
|
||||
$return_id = parent::save ( $check_notify );
|
||||
|
||||
return $return_id;
|
||||
}
|
||||
}
|
||||
?>
|
||||
56
modules/EcmCustomLists/Menu.php
Executable file
56
modules/EcmCustomLists/Menu.php
Executable file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
//2008-10-08, Dawid Karlowicz, Section1
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
global $mod_strings;
|
||||
|
||||
|
||||
//if(ACLController::checkAccess('Tasks', 'edit', true))
|
||||
$module_menu[]=Array("index.php?module=EcmCustomLists&action=EditView&return_module=EcmCustomLists&return_action=DetailView", $mod_strings['LNK_NEW_TASK'],"CreateTasks");
|
||||
//if(ACLController::checkAccess('Tasks', 'list', true)
|
||||
$module_menu[]=Array("index.php?module=EcmCustomLists&action=index&return_module=EcmCustomLists&return_action=DetailView", $mod_strings['LNK_TASK_LIST'],"Tasks");
|
||||
|
||||
?>
|
||||
72
modules/EcmCustomLists/field_arrays.php
Executable file
72
modules/EcmCustomLists/field_arrays.php
Executable file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
if (! defined ( 'sugarEntry' ) || ! sugarEntry)
|
||||
die ( 'Not A Valid Entry Point' );
|
||||
/**
|
||||
* *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc.
|
||||
* Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* ******************************************************************************
|
||||
*/
|
||||
/**
|
||||
* *******************************************************************************
|
||||
*
|
||||
* Description: Contains field arrays that are used for caching
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
* ******************************************************************************
|
||||
*/
|
||||
$fields_array ['EcmCustomLists'] = array (
|
||||
'column_fields' => Array (
|
||||
"id",
|
||||
"date_entered",
|
||||
"date_modified",
|
||||
"assigned_user_id",
|
||||
"modified_user_id",
|
||||
"created_by",
|
||||
"description",
|
||||
"name",
|
||||
),
|
||||
'list_fields' => Array (
|
||||
'id',
|
||||
'name',
|
||||
'assigned_user_name',
|
||||
'assigned_user_id',
|
||||
)
|
||||
,
|
||||
'required_fields' => array (
|
||||
'name' => 1
|
||||
)
|
||||
);
|
||||
?>
|
||||
43
modules/EcmCustomLists/metadata/SearchFields.php
Executable file
43
modules/EcmCustomLists/metadata/SearchFields.php
Executable file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$searchFields['EcmCustomLists'] =
|
||||
array (
|
||||
'name' => array( 'query_type'=>'default'),
|
||||
'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true),
|
||||
'assigned_user_id'=> array('query_type'=>'default'),
|
||||
);
|
||||
?>
|
||||
87
modules/EcmCustomLists/metadata/detailviewdefs.php
Executable file
87
modules/EcmCustomLists/metadata/detailviewdefs.php
Executable file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$viewdefs ['EcmCustomLists'] ['DetailView'] = array (
|
||||
'templateMeta' => array (
|
||||
'form' => array (
|
||||
'buttons' => array (
|
||||
'EDIT'
|
||||
)
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array (
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
),
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
)
|
||||
)
|
||||
),
|
||||
'panels' => array (
|
||||
array (
|
||||
array (
|
||||
'name' => 'name',
|
||||
'label' => 'LBL_SUBJECT'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'assigned_user_name',
|
||||
'label' => 'LBL_ASSIGNED_TO'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'created_by_name',
|
||||
'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
|
||||
'label' => 'LBL_DATE_ENTERED'
|
||||
),
|
||||
array (
|
||||
'name' => 'modified_by_name',
|
||||
'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
|
||||
'label' => 'LBL_DATE_MODIFIED'
|
||||
)
|
||||
),
|
||||
|
||||
array (
|
||||
'description'
|
||||
)
|
||||
)
|
||||
)
|
||||
;
|
||||
?>
|
||||
84
modules/EcmCustomLists/metadata/editviewdefs.php
Executable file
84
modules/EcmCustomLists/metadata/editviewdefs.php
Executable file
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$viewdefs ['EcmuCustomLists'] ['EditView'] = array (
|
||||
'templateMeta' => array (
|
||||
'form' => array (
|
||||
'buttons' => array (
|
||||
'SAVE',
|
||||
'CANCEL'
|
||||
)
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array (
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
),
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
)
|
||||
)
|
||||
),
|
||||
'panels' => array (
|
||||
'default' => array (
|
||||
array (
|
||||
array (
|
||||
'name' => 'name',
|
||||
'displayParams' => array (
|
||||
'required' => true
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
array (
|
||||
'assigned_user_name'
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'description',
|
||||
'displayParams' => array (
|
||||
'rows' => 8,
|
||||
'cols' => 60
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
);
|
||||
?>
|
||||
51
modules/EcmCustomLists/metadata/listviewdefs.php
Executable file
51
modules/EcmCustomLists/metadata/listviewdefs.php
Executable file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$listViewDefs['Tasks'] = array(
|
||||
'NAME' => array(
|
||||
'width' => '30',
|
||||
'label' => 'LBL_LIST_SUBJECT',
|
||||
'link' => true,
|
||||
'default' => true),
|
||||
'ASSIGNED_USER_NAME' => array(
|
||||
'width' => '2',
|
||||
'label' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
'default' => true),
|
||||
);
|
||||
?>
|
||||
74
modules/EcmCustomLists/metadata/searchdefs.php
Executable file
74
modules/EcmCustomLists/metadata/searchdefs.php
Executable file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$searchdefs ['EcmCustomLists'] = array (
|
||||
'templateMeta' => array (
|
||||
'maxColumns' => '3',
|
||||
'widths' => array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
)
|
||||
),
|
||||
'layout' => array (
|
||||
'basic_search' => array (
|
||||
'name',
|
||||
array (
|
||||
'name' => 'current_user_only',
|
||||
'label' => 'LBL_CURRENT_USER_FILTER',
|
||||
'type' => 'bool'
|
||||
),
|
||||
array (
|
||||
'name' => 'assigned_user_id',
|
||||
'type' => 'enum',
|
||||
'label' => 'LBL_ASSIGNED_TO'
|
||||
)
|
||||
),
|
||||
'advanced_search' => array (
|
||||
'name',
|
||||
array (
|
||||
'name' => 'current_user_only',
|
||||
'label' => 'LBL_CURRENT_USER_FILTER',
|
||||
'type' => 'bool'
|
||||
),
|
||||
array (
|
||||
'name' => 'assigned_user_id',
|
||||
'type' => 'enum',
|
||||
'label' => 'LBL_ASSIGNED_TO',
|
||||
'options' => 'task_users_dom'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
?>
|
||||
109
modules/EcmCustomLists/vardefs.php
Executable file
109
modules/EcmCustomLists/vardefs.php
Executable file
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
if (! defined ( 'sugarEntry' ) || ! sugarEntry)
|
||||
die ( 'Not A Valid Entry Point' );
|
||||
/**
|
||||
* *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc.
|
||||
* Copyright (C) 2004 - 2009 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* ******************************************************************************
|
||||
*/
|
||||
$dictionary ['EcmCustomLists'] = array (
|
||||
'table' => 'ecmcustomlists',
|
||||
'fields' => array (
|
||||
'name' => array (
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_SUBJECT',
|
||||
'dbType' => 'varchar',
|
||||
'type' => 'name',
|
||||
'len' => '50',
|
||||
'importable' => 'required',
|
||||
'required' => true
|
||||
)
|
||||
),
|
||||
'relationships' => array (
|
||||
'ecmcustomlists_assigned_user' => array (
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmCustomLists',
|
||||
'rhs_table' => 'ecmcustomlists',
|
||||
'rhs_key' => 'assigned_user_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
|
||||
'ecmcustomlists_modified_user' => array (
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmCustomLists',
|
||||
'rhs_table' => 'ecmcustomlists',
|
||||
'rhs_key' => 'modified_user_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
|
||||
'ecmcustomlists_created_by' => array (
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmCustomLists',
|
||||
'rhs_table' => 'ecmcustomlists',
|
||||
'rhs_key' => 'created_by',
|
||||
'relationship_type' => 'one-to-many'
|
||||
)
|
||||
),
|
||||
'indices' => array (
|
||||
array (
|
||||
'name' => 'idx_csl_name',
|
||||
'type' => 'index',
|
||||
'fields' => array (
|
||||
'name'
|
||||
)
|
||||
),
|
||||
array (
|
||||
'name' => 'idx_csl_assigned',
|
||||
'type' => 'index',
|
||||
'fields' => array (
|
||||
'assigned_user_id'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
// This enables optimistic locking for Saves From EditView
|
||||
'optimistic_locking' => true
|
||||
);
|
||||
VardefManager::createVardef ( 'EcmCustomLists', 'EcmCustomList', array (
|
||||
'default',
|
||||
'assignable'
|
||||
) );
|
||||
?>
|
||||
Reference in New Issue
Block a user