mirror of
https://github.com/salesagility/SuiteCRM.git
synced 2025-03-13 04:53:21 +00:00
Fix #2559 - Collection sub-panel filter
This commit is contained in:
parent
171c3e6b7b
commit
a6ef86f2f8
7 changed files with 273 additions and 218 deletions
include/SubPanel
modules
Calls/language
Emails
|
@ -5,7 +5,7 @@
|
|||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2017 SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* 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
|
||||
|
@ -56,13 +56,13 @@ if (!defined('sugarEntry') || !sugarEntry) {
|
|||
class aSubPanel
|
||||
{
|
||||
|
||||
var $name ;
|
||||
var $_instance_properties ;
|
||||
public $name ;
|
||||
public $_instance_properties ;
|
||||
|
||||
var $mod_strings ;
|
||||
var $panel_definition ;
|
||||
var $sub_subpanels ;
|
||||
var $parent_bean ;
|
||||
public $mod_strings ;
|
||||
public $panel_definition ;
|
||||
public $sub_subpanels ;
|
||||
public $parent_bean ;
|
||||
|
||||
/**
|
||||
* Can we display this subpanel?
|
||||
|
@ -72,20 +72,19 @@ class aSubPanel
|
|||
*
|
||||
* @var bool
|
||||
*/
|
||||
var $canDisplay = true;
|
||||
public $canDisplay = true;
|
||||
|
||||
//module's table name and column fields.
|
||||
var $table_name ;
|
||||
var $db_fields ;
|
||||
var $bean_name ;
|
||||
var $template_instance ;
|
||||
public $table_name ;
|
||||
public $db_fields ;
|
||||
public $bean_name ;
|
||||
public $template_instance ;
|
||||
|
||||
var $search_query;
|
||||
var $base_collection_list = array();
|
||||
public $search_query;
|
||||
public $base_collection_list = array();
|
||||
|
||||
function __construct ($name , $instance_properties , $parent_bean , $reload = false , $original_only = false, $search_query = '', $collections = array() ){
|
||||
|
||||
$this->_instance_properties = $instance_properties ;
|
||||
public function __construct ($name , $instance_properties , $parent_bean , $reload = false , $original_only = false,
|
||||
$search_query = '', $collections = array() ){
|
||||
|
||||
if (isset($instance_properties['collection_list'])) {
|
||||
$this->base_collection_list = $instance_properties['collection_list'];
|
||||
|
@ -98,6 +97,9 @@ class aSubPanel
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->_instance_properties = $instance_properties ;
|
||||
|
||||
$this->search_query = '';
|
||||
if ((!isset($instance_properties['type']) || $instance_properties['type'] != 'collection')) {
|
||||
$this->search_query = $this->buildSearchQuery($this->_instance_properties['module']);
|
||||
|
@ -139,8 +141,8 @@ class aSubPanel
|
|||
|
||||
if (! $original_only && isset ( $this->_instance_properties [ 'override_subpanel_name' ] ) && file_exists ( 'custom/modules/' . $this->_instance_properties [ 'module' ] . '/metadata/subpanels/' . $this->_instance_properties [ 'override_subpanel_name' ] . '.php' ))
|
||||
{
|
||||
$cust_def_path = 'custom/modules/' . $this->_instance_properties [ 'module' ] . '/metadata/subpanels/' . $this->_instance_properties [ 'override_subpanel_name' ] . '.php' ;
|
||||
require ($cust_def_path) ;
|
||||
$custom_def_path = 'custom/modules/' . $this->_instance_properties [ 'module' ] . '/metadata/subpanels/' . $this->_instance_properties [ 'override_subpanel_name' ] . '.php' ;
|
||||
require ($custom_def_path) ;
|
||||
$loaded = true;
|
||||
}
|
||||
|
||||
|
@ -256,7 +258,8 @@ class aSubPanel
|
|||
}
|
||||
|
||||
// permissions. hide SubPanelTopComposeEmailButton from activities if email module is disabled.
|
||||
//only email is being tested becuase other submodules in activites/history such as notes, tasks, meetings and calls cannot be disabled.
|
||||
//only email is being tested because other submodules in activites/history such as notes, tasks, meetings
|
||||
// and calls cannot be disabled.
|
||||
//as of today these are the only 2 sub-panels that use the union clause.
|
||||
$mod_name = $this->get_module_name () ;
|
||||
if ($mod_name == 'Activities' || $mod_name == 'History')
|
||||
|
@ -423,7 +426,7 @@ class aSubPanel
|
|||
$index++;
|
||||
if (!isset($display_fields[$def['vname']]))
|
||||
{
|
||||
if(sizeof($display_fields) > $index)
|
||||
if(count($display_fields) > $index)
|
||||
{
|
||||
//Try to insert the new field in an order that makes sense
|
||||
$start = array_slice($display_fields, 0, $index);
|
||||
|
@ -639,9 +642,10 @@ class SubPanelDefinitions
|
|||
/**
|
||||
* Enter description here...
|
||||
*
|
||||
* @param BEAN $focus - this is the bean you want to get the data from
|
||||
* @param STRING $layout_def_key - if you wish to use a layout_def defined in the default metadata/subpaneldefs.php that is not keyed off of $bean->module_dir pass in the key here
|
||||
* @param ARRAY $layout_def_override - if you wish to override the default loaded layout defs you pass them in here.
|
||||
* @param SugarBean $focus - this is the bean you want to get the data from
|
||||
* @param string $layout_def_key - if you wish to use a layout_def defined in the default metadata/subpaneldefs.php
|
||||
* that is not keyed off of $bean->module_dir pass in the key here
|
||||
* @param array $layout_def_override - if you wish to override the default loaded layout defs you pass them in here.
|
||||
* @return SubPanelDefinitions
|
||||
*/
|
||||
function __construct ( $focus , $layout_def_key = '' , $layout_def_override = '' )
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by Salesagility Ltd.
|
||||
* Copyright (C) 2011 - 2016 Salesagility Ltd.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* 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
|
||||
|
@ -16,7 +16,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
|||
*
|
||||
* 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
|
||||
* 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
|
||||
|
@ -34,30 +34,27 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
|||
* 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 and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
|
||||
global $beanList;
|
||||
global $beanFiles;
|
||||
|
||||
|
||||
if(empty($_REQUEST['module']))
|
||||
{
|
||||
die("'module' was not defined");
|
||||
if (empty($_REQUEST['module'])) {
|
||||
die("'module' was not defined");
|
||||
}
|
||||
|
||||
if(empty($_REQUEST['record']))
|
||||
{
|
||||
die("'record' was not defined");
|
||||
if (empty($_REQUEST['record'])) {
|
||||
die("'record' was not defined");
|
||||
}
|
||||
|
||||
if(!isset($beanList[$_REQUEST['module']]))
|
||||
{
|
||||
die("'".$_REQUEST['module']."' is not defined in \$beanList");
|
||||
if (!isset($beanList[$_REQUEST['module']])) {
|
||||
die("'" . $_REQUEST['module'] . "' is not defined in \$beanList");
|
||||
}
|
||||
|
||||
if (!isset($_REQUEST['subpanel'])) {
|
||||
|
@ -70,37 +67,30 @@ $module = $_REQUEST['module'];
|
|||
|
||||
$collection = array();
|
||||
|
||||
if(isset($_REQUEST['collection_basic']) && $_REQUEST['collection_basic'][0] != 'null'){
|
||||
$_REQUEST['collection_basic'] = explode(',',$_REQUEST['collection_basic'][0]);
|
||||
if (isset($_REQUEST['collection_basic']) && $_REQUEST['collection_basic'][0] !== 'null') {
|
||||
$_REQUEST['collection_basic'] = explode(',', $_REQUEST['collection_basic'][0]);
|
||||
$collection = $_REQUEST['collection_basic'];
|
||||
}
|
||||
|
||||
if(empty($_REQUEST['inline']))
|
||||
{
|
||||
insert_popup_header($theme);
|
||||
if (empty($_REQUEST['inline'])) {
|
||||
insert_popup_header();
|
||||
}
|
||||
|
||||
//require_once('include/SubPanel/SubPanelDefinitions.php');
|
||||
//require_once($beanFiles[$beanList[$_REQUEST['module']]]);
|
||||
//$focus=new $beanList[$_REQUEST['module']];
|
||||
//$focus->retrieve($record);
|
||||
|
||||
include('include/SubPanel/SubPanel.php');
|
||||
include 'include/SubPanel/SubPanel.php';
|
||||
$layout_def_key = '';
|
||||
if(!empty($_REQUEST['layout_def_key'])){
|
||||
$layout_def_key = $_REQUEST['layout_def_key'];
|
||||
if (!empty($_REQUEST['layout_def_key'])) {
|
||||
$layout_def_key = $_REQUEST['layout_def_key'];
|
||||
}
|
||||
require_once ('include/SubPanel/SubPanelDefinitions.php') ;
|
||||
require_once 'include/SubPanel/SubPanelDefinitions.php';
|
||||
// retrieve the definitions for all the available subpanels for this module from the subpanel
|
||||
$bean = BeanFactory::getBean($module);
|
||||
$spd = new SubPanelDefinitions ( $bean ) ;
|
||||
$aSubPanelObject = $spd->load_subpanel ( $subpanel ) ;
|
||||
|
||||
$spd = new SubPanelDefinitions ($bean);
|
||||
$aSubPanelObject = $spd->load_subpanel($subpanel, false, false, '', $collection);
|
||||
|
||||
$subpanel_object = new SubPanel($module, $record, $subpanel, $aSubPanelObject, $layout_def_key, $collection);
|
||||
$subpanel_object->setTemplateFile('include/SubPanel/tpls/SubPanelDynamic.tpl');
|
||||
|
||||
echo (empty($_REQUEST['inline']))?$subpanel_object->get_buttons():'' ;
|
||||
echo empty($_REQUEST['inline']) ? $subpanel_object->get_buttons() : '';
|
||||
|
||||
$subpanel_object->display();
|
||||
|
||||
|
@ -109,8 +99,7 @@ if (!isset($_SESSION['isMobile'])) {
|
|||
echo $jsAlerts->getScript();
|
||||
}
|
||||
|
||||
if(empty($_REQUEST['inline']))
|
||||
{
|
||||
insert_popup_footer($theme);
|
||||
if (empty($_REQUEST['inline'])) {
|
||||
insert_popup_footer();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by Salesagility Ltd.
|
||||
* Copyright (C) 2011 - 2016 Salesagility Ltd.
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* 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
|
||||
|
@ -16,7 +16,7 @@ if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
|||
*
|
||||
* 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
|
||||
* 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
|
||||
|
@ -34,16 +34,14 @@ if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
|||
* 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 and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
********************************************************************************/
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
|
||||
/*********************************************************************************
|
||||
* 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_BLANK' => ' ',
|
||||
|
@ -182,8 +180,7 @@ $mod_strings = array(
|
|||
'LBL_SAVE' => 'Save',
|
||||
|
||||
'LBL_CALLS_RESCHEDULE' => 'Calls Reschedule',
|
||||
|
||||
'LBL_LIST_STATUS'=>'Status',
|
||||
'LBL_LIST_DATE_MODIFIED'=>'Date Modified',
|
||||
'LBL_LIST_DUE_DATE'=>'Due Date',
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
|
|
|
@ -387,5 +387,7 @@ $mod_strings = array (
|
|||
|
||||
'LBL_MAILBOX_ID' => 'Mailbox ID',
|
||||
'LBL_PARENT_ID' => 'Parent ID',
|
||||
|
||||
'LBL_LIST_DATE_MODIFIED' => 'Last Modified',
|
||||
);
|
||||
|
||||
|
|
86
modules/Emails/metadata/SearchFields.php
Executable file
86
modules/Emails/metadata/SearchFields.php
Executable file
|
@ -0,0 +1,86 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* 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 and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
|
||||
$module_name = 'Emails';
|
||||
$searchFields[$module_name] = array(
|
||||
'name' => array('query_type' => 'default'),
|
||||
'current_user_only' => array(
|
||||
'query_type' => 'default',
|
||||
'db_field' => array('assigned_user_id'),
|
||||
'my_items' => true,
|
||||
'vname' => 'LBL_CURRENT_USER_FILTER',
|
||||
'type' => 'bool',
|
||||
),
|
||||
'assigned_user_id' => array('query_type' => 'default'),
|
||||
'category_id' => array(
|
||||
'query_type' => 'default',
|
||||
'options' => 'email_category_dom',
|
||||
'template_var' => 'CATEGORY_OPTIONS',
|
||||
),
|
||||
|
||||
//Range Search Support
|
||||
'range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
|
||||
'start_range_date_entered' => array(
|
||||
'query_type' => 'default',
|
||||
'enable_range_search' => true,
|
||||
'is_date_field' => true,
|
||||
),
|
||||
'end_range_date_entered' => array(
|
||||
'query_type' => 'default',
|
||||
'enable_range_search' => true,
|
||||
'is_date_field' => true,
|
||||
),
|
||||
'range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
|
||||
'start_range_date_modified' => array(
|
||||
'query_type' => 'default',
|
||||
'enable_range_search' => true,
|
||||
'is_date_field' => true,
|
||||
),
|
||||
'end_range_date_modified' => array(
|
||||
'query_type' => 'default',
|
||||
'enable_range_search' => true,
|
||||
'is_date_field' => true,
|
||||
),
|
||||
//Range Search Support
|
||||
);
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by Salesagility Ltd.
|
||||
* Copyright (C) 2011 - 2014 Salesagility Ltd.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* 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
|
||||
|
@ -16,7 +16,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
|||
*
|
||||
* 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
|
||||
* 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
|
||||
|
@ -34,93 +34,96 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
|||
* 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 and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
********************************************************************************/
|
||||
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
|
||||
$subpanel_layout = array(
|
||||
'where' => "",
|
||||
'where' => '',
|
||||
|
||||
|
||||
'fill_in_additional_fields' => true,
|
||||
'list_fields' => array(
|
||||
'object_image'=>array(
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
),
|
||||
'name' => array(
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
'parent_info' => true
|
||||
),
|
||||
'status' => array(
|
||||
'vname' => 'LBL_LIST_STATUS',
|
||||
'width' => '15%',
|
||||
),
|
||||
'reply_to_status' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true,
|
||||
),
|
||||
'contact_name'=>array(
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'contact_id',
|
||||
'target_module' => 'Contacts',
|
||||
'module' => 'Contacts',
|
||||
'vname' => 'LBL_LIST_CONTACT',
|
||||
'width' => '11%',
|
||||
'sortable' => false,
|
||||
'force_exists' => true,
|
||||
'fill_in_additional_fields' => true,
|
||||
'list_fields' => array(
|
||||
'object_image' => array(
|
||||
'vname' => 'LBL_OBJECT_IMAGE',
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
),
|
||||
'contact_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
'name' => array(
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
'parent_info' => true,
|
||||
),
|
||||
'contact_name_owner'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
'status' => array(
|
||||
'vname' => 'LBL_LIST_STATUS',
|
||||
'width' => '15%',
|
||||
),
|
||||
'contact_name_mod'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
'reply_to_status' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true,
|
||||
),
|
||||
'parent_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
'contact_name' => array(
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'contact_id',
|
||||
'target_module' => 'Contacts',
|
||||
'module' => 'Contacts',
|
||||
'vname' => 'LBL_LIST_CONTACT',
|
||||
'width' => '11%',
|
||||
'sortable' => false,
|
||||
'force_exists' => true,
|
||||
),
|
||||
'parent_type'=>array(
|
||||
'usage'=>'query_only',
|
||||
'force_exists'=>true
|
||||
'contact_id' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true,
|
||||
),
|
||||
'contact_name_owner' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true,
|
||||
),
|
||||
'contact_name_mod' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true,
|
||||
),
|
||||
'parent_id' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true,
|
||||
),
|
||||
'parent_type' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true,
|
||||
),
|
||||
'date_modified' => array(
|
||||
'vname' => 'LBL_LIST_DATE_MODIFIED',
|
||||
'width' => '10%',
|
||||
),
|
||||
'date_entered' => array(
|
||||
'vname' => 'LBL_LIST_DATE_ENTERED',
|
||||
'width' => '10%',
|
||||
),
|
||||
'assigned_user_name' => array(
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'assigned_user_id',
|
||||
'target_module' => 'Employees',
|
||||
),
|
||||
'edit_button' => array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'date_modified' => array(
|
||||
'width' => '10%',
|
||||
),
|
||||
'date_entered' => array(
|
||||
'width' => '10%',
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'target_record_key' => 'assigned_user_id',
|
||||
'target_module' => 'Employees',
|
||||
),
|
||||
'edit_button' => array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'remove_button' => array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'width' => '2%',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
'filename' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true
|
||||
),
|
||||
), // end list_fields
|
||||
'filename' => array(
|
||||
'usage' => 'query_only',
|
||||
'force_exists' => true,
|
||||
),
|
||||
), // end list_fields
|
||||
);
|
||||
?>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
/**
|
||||
*
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by Salesagility Ltd.
|
||||
* Copyright (C) 2011 - 2016 Salesagility Ltd.
|
||||
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
|
||||
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
|
||||
*
|
||||
* 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
|
||||
|
@ -16,7 +16,7 @@ if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
|||
*
|
||||
* 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
|
||||
* 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
|
||||
|
@ -34,10 +34,13 @@ if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
|||
* 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 and "Supercharged by SuiteCRM" logo. If the display of the logos is not
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
********************************************************************************/
|
||||
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
|
||||
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
|
||||
$dictionary['Email'] = array(
|
||||
'table' => 'emails',
|
||||
|
@ -58,6 +61,9 @@ $dictionary['Email'] = array(
|
|||
'type' => 'datetime',
|
||||
'required' => true,
|
||||
'comment' => 'Date record created',
|
||||
'enable_range_search' => true,
|
||||
'options' => 'date_range_search_dom',
|
||||
'inline_edit' => false,
|
||||
),
|
||||
'date_modified' => array(
|
||||
'name' => 'date_modified',
|
||||
|
@ -65,6 +71,9 @@ $dictionary['Email'] = array(
|
|||
'type' => 'datetime',
|
||||
'required' => true,
|
||||
'comment' => 'Date record last modified',
|
||||
'enable_range_search' => true,
|
||||
'options' => 'date_range_search_dom',
|
||||
'inline_edit' => false,
|
||||
),
|
||||
'assigned_user_id' => array(
|
||||
'name' => 'assigned_user_id',
|
||||
|
@ -114,41 +123,6 @@ $dictionary['Email'] = array(
|
|||
'reportable' => false,
|
||||
'comment' => 'Record deletion indicator',
|
||||
),
|
||||
/**
|
||||
* DEPRECATED FOR 5.0
|
||||
* 'from_addr' => array (
|
||||
* 'name' => 'from_addr',
|
||||
* 'vname' => 'LBL_FROM',
|
||||
* 'type' => 'id',
|
||||
* 'comment' => 'Email address of the person sending the email',
|
||||
* ),
|
||||
* 'reply_to_addr' => array (
|
||||
* 'name' => 'reply_to_addr',
|
||||
* 'vname' => 'LBL_REPLY_TO_ADDRESS',
|
||||
* 'type' => 'id',
|
||||
* 'comment' => 'Email address of person indicated in the Reply-to email field',
|
||||
* ),
|
||||
* 'to_addrs' => array (
|
||||
* 'name' => 'to_addrs',
|
||||
* 'vname' => 'LBL_TO',
|
||||
* 'type' => 'id',
|
||||
* 'comment' => 'Email address(es) of person(s) to receive the email',
|
||||
* ),
|
||||
* 'cc_addrs' => array (
|
||||
* 'name' => 'cc_addrs',
|
||||
* 'vname' => 'LBL_CC',
|
||||
* 'type' => 'id',
|
||||
* 'comment' => 'Email address(es) of person(s) to receive a carbon copy of the email',
|
||||
* ),
|
||||
* 'bcc_addrs' => array (
|
||||
* 'name' => 'bcc_addrs',
|
||||
* 'vname' => 'LBL_BCC',
|
||||
* 'type' => 'id',
|
||||
* 'comment' => 'Email address(es) of person(s) to receive a blind carbon copy of the email',
|
||||
* ),
|
||||
*/
|
||||
|
||||
|
||||
'from_addr_name' => array(
|
||||
'name' => 'from_addr_name',
|
||||
'type' => 'varchar',
|
||||
|
@ -201,7 +175,6 @@ $dictionary['Email'] = array(
|
|||
'name' => 'date_sent',
|
||||
'vname' => 'LBL_DATE_SENT',
|
||||
'type' => 'datetime',
|
||||
'type' => 'datetime',
|
||||
),
|
||||
'message_id' => array(
|
||||
'name' => 'message_id',
|
||||
|
@ -462,7 +435,7 @@ $dictionary['Email'] = array(
|
|||
'rhs_module' => 'Emails',
|
||||
'rhs_table' => 'emails',
|
||||
'rhs_key' => 'assigned_user_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
'relationship_type' => 'one-to-many',
|
||||
),
|
||||
'emails_modified_user' => array(
|
||||
'lhs_module' => 'Users',
|
||||
|
@ -471,7 +444,7 @@ $dictionary['Email'] = array(
|
|||
'rhs_module' => 'Emails',
|
||||
'rhs_table' => 'emails',
|
||||
'rhs_key' => 'modified_user_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
'relationship_type' => 'one-to-many',
|
||||
),
|
||||
'emails_created_by' => array(
|
||||
'lhs_module' => 'Users',
|
||||
|
@ -480,7 +453,7 @@ $dictionary['Email'] = array(
|
|||
'rhs_module' => 'Emails',
|
||||
'rhs_table' => 'emails',
|
||||
'rhs_key' => 'created_by',
|
||||
'relationship_type' => 'one-to-many'
|
||||
'relationship_type' => 'one-to-many',
|
||||
),
|
||||
'emails_notes_rel' => array(
|
||||
'lhs_module' => 'Emails',
|
||||
|
@ -567,25 +540,26 @@ $dictionary['Email'] = array(
|
|||
array(
|
||||
'name' => 'idx_email_name',
|
||||
'type' => 'index',
|
||||
'fields' => array('name')
|
||||
'fields' => array('name'),
|
||||
),
|
||||
array(
|
||||
'name' => 'idx_message_id',
|
||||
'type' => 'index',
|
||||
'fields' => array('message_id')
|
||||
'fields' => array('message_id'),
|
||||
),
|
||||
array(
|
||||
'name' => 'idx_email_parent_id',
|
||||
'type' => 'index',
|
||||
'fields' => array('parent_id')
|
||||
'fields' => array('parent_id'),
|
||||
),
|
||||
array(
|
||||
'name' => 'idx_email_assigned',
|
||||
'type' => 'index',
|
||||
'fields' => array('assigned_user_id', 'type', 'status')
|
||||
'fields' => array('assigned_user_id', 'type', 'status'),
|
||||
),
|
||||
) // end indices
|
||||
);
|
||||
|
||||
VardefManager::createVardef('Emails', 'Email', array('security_groups',
|
||||
VardefManager::createVardef('Emails', 'Email', array(
|
||||
'security_groups',
|
||||
));
|
||||
|
|
Loading…
Reference in a new issue