init
This commit is contained in:
1147
include/MVC/View/SugarView.php
Normal file
1147
include/MVC/View/SugarView.php
Normal file
File diff suppressed because it is too large
Load Diff
247
include/MVC/View/ViewFactory.php
Normal file
247
include/MVC/View/ViewFactory.php
Normal file
@@ -0,0 +1,247 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
/**
|
||||
* ViewFactory
|
||||
*
|
||||
* View factory class. This file is used by the controller along with a view paramter to build the
|
||||
* requested view.
|
||||
*/
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
|
||||
class ViewFactory{
|
||||
/**
|
||||
* load the correct view
|
||||
* @param string $type View Type
|
||||
* @return valid view
|
||||
*/
|
||||
function loadView($type = 'default', $module, $bean = null, $view_object_map = array(), $target_module=''){
|
||||
$type = strtolower($type);
|
||||
|
||||
//first let's check if the module handles this view
|
||||
|
||||
$view = null;
|
||||
|
||||
$view = null;
|
||||
if(!empty($target_module)) {
|
||||
if(file_exists('custom/modules/'.$target_module.'/views/view.'.$type.'.php')){
|
||||
$view = ViewFactory::_buildFromFile('custom/modules/'.$target_module.'/views/view.'.$type.'.php', $bean, $view_object_map, $type, $target_module);
|
||||
}else if(file_exists('modules/'.$target_module.'/views/view.'.$type.'.php')){
|
||||
$view = ViewFactory::_buildFromFile('modules/'.$target_module.'/views/view.'.$type.'.php', $bean, $view_object_map, $type, $target_module);
|
||||
}
|
||||
}
|
||||
|
||||
if(!isset($view)) {
|
||||
if(file_exists('custom/modules/'.$module.'/views/view.'.$type.'.php')){
|
||||
$view = ViewFactory::_buildFromFile('custom/modules/'.$module.'/views/view.'.$type.'.php', $bean, $view_object_map, $type, $module);
|
||||
}else if(file_exists('modules/'.$module.'/views/view.'.$type.'.php')){
|
||||
$view = ViewFactory::_buildFromFile('modules/'.$module.'/views/view.'.$type.'.php', $bean, $view_object_map, $type, $module);
|
||||
}else if(file_exists('custom/include/MVC/View/views/view.'.$type.'.php')){
|
||||
$view = ViewFactory::_buildFromFile('custom/include/MVC/View/views/view.'.$type.'.php', $bean, $view_object_map, $type, $module);
|
||||
}else{
|
||||
//if the module does not handle this view, then check if Sugar handles it OOTB
|
||||
$file = 'include/MVC/View/views/view.'.$type.'.php';
|
||||
if(file_exists($file)){
|
||||
//it appears Sugar does have the proper logic for this file.
|
||||
$view = ViewFactory::_buildFromFile($file, $bean, $view_object_map, $type, $module);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Default to SugarView if still nothing found/built
|
||||
if (!isset($view))
|
||||
$view = new SugarView();
|
||||
ViewFactory::_loadConfig($view, $type);
|
||||
return $view;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the view_<view>_config.php file which holds options used by the view.
|
||||
*/
|
||||
function _loadConfig(&$view, $type){
|
||||
$view_config_custom = array();
|
||||
$view_config_module = array();
|
||||
$view_config_root_cstm = array();
|
||||
$view_config_root = array();
|
||||
$view_config_app = array();
|
||||
$config_file_name = 'view.'.$type.'.config.php';
|
||||
$view_config = sugar_cache_retrieve("VIEW_CONFIG_FILE_".$view->module."_TYPE_".$type);
|
||||
if(!$view_config){
|
||||
if(file_exists('custom/modules/'.$view->module.'/views/'.$config_file_name)){
|
||||
require_once('custom/modules/'.$view->module.'/views/'.$config_file_name);
|
||||
$view_config_custom = $view_config;
|
||||
}
|
||||
if(file_exists('modules/'.$view->module.'/views/'.$config_file_name)){
|
||||
require_once('modules/'.$view->module.'/views/'.$config_file_name);
|
||||
$view_config_module = $view_config;
|
||||
}
|
||||
if(file_exists('custom/include/MVC/View/views/'.$config_file_name)){
|
||||
require_once('custom/include/MVC/View/views/'.$config_file_name);
|
||||
$view_config_root_cstm = $view_config;
|
||||
}
|
||||
if(file_exists('include/MVC/View/views/'.$config_file_name)){
|
||||
require_once('include/MVC/View/views/'.$config_file_name);
|
||||
$view_config_root = $view_config;
|
||||
}
|
||||
if(file_exists('include/MVC/View/views/view.config.php')){
|
||||
require_once('include/MVC/View/views/view.config.php');
|
||||
$view_config_app = $view_config;
|
||||
}
|
||||
$view_config = array('actions' => array(), 'req_params' => array(),);
|
||||
|
||||
//actions
|
||||
if(!empty($view_config_app) && !empty($view_config_app['actions']))
|
||||
$view_config['actions'] = array_merge($view_config['actions'], $view_config_app['actions']);
|
||||
if(!empty($view_config_root) && !empty($view_config_root['actions']))
|
||||
$view_config['actions'] = array_merge($view_config['actions'], $view_config_root['actions']);
|
||||
if(!empty($view_config_root_cstm) && !empty($view_config_root_cstm['actions']))
|
||||
$view_config['actions'] = array_merge($view_config['actions'], $view_config_root_cstm['actions']);
|
||||
if(!empty($view_config_module) && !empty($view_config_module['actions']))
|
||||
$view_config['actions'] = array_merge($view_config['actions'], $view_config_module['actions']);
|
||||
if(!empty($view_config_custom) && !empty($view_config_custom['actions']))
|
||||
$view_config['actions'] = array_merge($view_config['actions'], $view_config_custom['actions']);
|
||||
|
||||
//req_params
|
||||
if(!empty($view_config_app) && !empty($view_config_app['req_params']))
|
||||
$view_config['req_params'] = array_merge($view_config['req_params'], $view_config_app['req_params']);
|
||||
if(!empty($view_config_root) && !empty($view_config_root['req_params']))
|
||||
$view_config['req_params'] = array_merge($view_config['req_params'], $view_config_root['req_params']);
|
||||
if(!empty($view_config_root_cstm) && !empty($view_config_root_cstm['req_params']))
|
||||
$view_config['req_params'] = array_merge($view_config['req_params'], $view_config_root_cstm['req_params']);
|
||||
if(!empty($view_config_module) && !empty($view_config_module['req_params']))
|
||||
$view_config['req_params'] = array_merge($view_config['req_params'], $view_config_module['req_params']);
|
||||
if(!empty($view_config_custom) && !empty($view_config_custom['req_params']))
|
||||
$view_config['req_params'] = array_merge($view_config['req_params'], $view_config_custom['req_params']);
|
||||
|
||||
sugar_cache_put("VIEW_CONFIG_FILE_".$view->module."_TYPE_".$type, $view_config);
|
||||
}
|
||||
$action = strtolower($view->action);
|
||||
$config = null;
|
||||
if(!empty($view_config['req_params'])){
|
||||
//try the params first
|
||||
foreach($view_config['req_params'] as $key => $value){
|
||||
if(!empty($_REQUEST[$key]) && $_REQUEST[$key] == "false") {
|
||||
$_REQUEST[$key] = false;
|
||||
}
|
||||
if(!empty($_REQUEST[$key])){
|
||||
|
||||
if(!is_array($value['param_value'])){
|
||||
if($value['param_value'] == $_REQUEST[$key]){
|
||||
$config = $value['config'];
|
||||
break;
|
||||
}
|
||||
}else{
|
||||
|
||||
foreach($value['param_value'] as $v){
|
||||
if($v == $_REQUEST[$key]){
|
||||
$config = $value['config'];
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if($config == null && !empty($view_config['actions']) && !empty($view_config['actions'][$action])){
|
||||
$config = $view_config['actions'][$action];
|
||||
}
|
||||
if($config != null)
|
||||
$view->options = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a private function which just helps the getView function generate the
|
||||
* proper view object
|
||||
*
|
||||
* @return a valid SugarView
|
||||
*/
|
||||
function _buildFromFile($file, &$bean, $view_object_map, $type, $module){
|
||||
require_once($file);
|
||||
//try ModuleViewType first then try ViewType if that fails then use SugarView
|
||||
$class = ucfirst($module).'View'.ucfirst($type);
|
||||
$customClass = 'Custom' . $class;
|
||||
|
||||
if(class_exists($customClass)){
|
||||
return ViewFactory::_buildClass($customClass, $bean, $view_object_map);
|
||||
}
|
||||
if(class_exists($class)){
|
||||
return ViewFactory::_buildClass($class, $bean, $view_object_map);
|
||||
}
|
||||
//Now try the next set of possibilites if it was none of the above
|
||||
$class = 'View'.ucfirst($type);
|
||||
$customClass = 'Custom' . $class;
|
||||
if(class_exists($customClass)){
|
||||
return ViewFactory::_buildClass($customClass, $bean, $view_object_map);
|
||||
}
|
||||
if(class_exists($class)){
|
||||
return ViewFactory::_buildClass($class, $bean, $view_object_map);
|
||||
}
|
||||
//Now check if there is a custom SugarView for generic handling
|
||||
if(file_exists('custom/include/MVC/View/SugarView.php')){
|
||||
require_once('custom/include/MVC/View/SugarView.php');
|
||||
if(class_exists('CustomSugarView')){
|
||||
return new CustomSugarView($bean, $view_object_map);
|
||||
}
|
||||
}
|
||||
//if all else fails return SugarView
|
||||
return new SugarView($bean, $view_object_map);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* instantiate the correct view and call init to pass on any obejcts we need to
|
||||
* from the controller.
|
||||
*
|
||||
* @param string class - the name of the class to instantiate
|
||||
* @param object bean = the bean to pass to the view
|
||||
* @param array view_object_map - the array which holds obejcts to pass between the
|
||||
* controller and the view.
|
||||
*
|
||||
* @return SugarView
|
||||
*/
|
||||
function _buildClass($class, $bean, $view_object_map){
|
||||
$view = new $class();
|
||||
$view->init($bean, $view_object_map);
|
||||
if($view instanceof SugarView){
|
||||
return $view;
|
||||
}else
|
||||
return new SugarView($bean, $view_object_map);
|
||||
}
|
||||
}
|
||||
?>
|
||||
68
include/MVC/View/tpls/Importvcard.tpl
Normal file
68
include/MVC/View/tpls/Importvcard.tpl
Normal file
@@ -0,0 +1,68 @@
|
||||
{*
|
||||
|
||||
/*********************************************************************************
|
||||
* 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".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
*}
|
||||
|
||||
<b>{$MOD.LBL_IMPORT_VCARDTEXT}</b>
|
||||
{literal}
|
||||
<script type="text/javascript" src="include/javascript/sugar_grp_yui_widgets.js"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function validate_vcard()
|
||||
{
|
||||
if (document.getElementById("vcard_file").value=="") {
|
||||
YAHOO.SUGAR.MessageBox.show({msg: '{/literal}{$ERROR_TEXT}{literal}'} );
|
||||
}
|
||||
else
|
||||
document.EditView.submit();
|
||||
}
|
||||
-->
|
||||
</script>
|
||||
{/literal}
|
||||
<form name="EditView" method="POST" ENCTYPE="multipart/form-data" action="index.php">
|
||||
<input type="hidden" name="max_file_size" value="30000">
|
||||
<input type='hidden' name='action' value='ImportVCardSave'>
|
||||
<input type='hidden' name='module' value='{$MODULE}'>
|
||||
<input type='hidden' name='from' value='ImportVCard'>
|
||||
|
||||
<input size="60" name="vcard" id="vcard_file" type="file" />
|
||||
<input class='button' type="button" onclick='validate_vcard()' value="{$APP.LBL_IMPORT_VCARD_BUTTON_LABEL}"
|
||||
title="{$APP.LBL_IMPORT_VCARD_BUTTON_TITLE}" accesskey="{$APP.LBL_IMPORT_VCARD_BUTTON_KEY}"/>
|
||||
</form>
|
||||
|
||||
41
include/MVC/View/tpls/modulelistmenu.tpl
Normal file
41
include/MVC/View/tpls/modulelistmenu.tpl
Normal file
@@ -0,0 +1,41 @@
|
||||
{*
|
||||
|
||||
/*********************************************************************************
|
||||
* 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".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
*}
|
||||
[{foreach from=$LAST_VIEWED item=item name=lastViewed}{ldelim}"text":"{$item.item_summary_short}","url": "{sugar_link module=$item.module_name action='DetailView' record=$item.item_id link_only=1}"{rdelim}{if !$smarty.foreach.lastViewed.last},{/if}{foreachelse}{ldelim} "text": "{$APP.NTC_NO_ITEMS_DISPLAY}"{rdelim}{/foreach}]
|
||||
54
include/MVC/View/views/view.ajax.php
Normal file
54
include/MVC/View/views/view.ajax.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?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/SugarView.php');
|
||||
require_once('include/MVC/Controller/SugarController.php');
|
||||
|
||||
class ViewAjax extends SugarView{
|
||||
function ViewAjax(){
|
||||
$this->options['show_title'] = false;
|
||||
$this->options['show_header'] = false;
|
||||
$this->options['show_footer'] = false;
|
||||
$this->options['show_javascript'] = false;
|
||||
$this->options['show_subpanels'] = false;
|
||||
$this->options['show_search'] = false;
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function display(){
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
67
include/MVC/View/views/view.classic.config.php
Normal file
67
include/MVC/View/views/view.classic.config.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
/*
|
||||
* Created on Apr 23, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
$view_config = array(
|
||||
'req_params' =>
|
||||
array(
|
||||
'print' => array('param_value' => true,
|
||||
'config' => array(
|
||||
'show_header' => true,
|
||||
'show_footer' => false,
|
||||
'view_print' => true,
|
||||
'show_title' => false,
|
||||
'show_subpanels' => false,
|
||||
'show_javascript' => true,
|
||||
'show_search' => false,)
|
||||
),
|
||||
'to_pdf' => array('param_value' => true,
|
||||
'config' => array(
|
||||
'show_all' => false
|
||||
),
|
||||
),
|
||||
'to_csv' => array('param_value' => true,
|
||||
'config' => array(
|
||||
'show_all' => false
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
58
include/MVC/View/views/view.classic.php
Normal file
58
include/MVC/View/views/view.classic.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?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/SugarView.php');
|
||||
require_once('include/MVC/Controller/SugarController.php');
|
||||
|
||||
class ViewClassic extends SugarView{
|
||||
function ViewClassic(){
|
||||
parent::SugarView();
|
||||
$this->type = $this->action;
|
||||
}
|
||||
|
||||
function display(){
|
||||
// Call SugarController::getActionFilename to handle case sensitive file names
|
||||
$file = SugarController::getActionFilename($this->action);
|
||||
if(file_exists('custom/modules/' . $this->module . '/'. $file . '.php')){
|
||||
$this->includeClassicFile('custom/modules/'. $this->module . '/'. $file . '.php');
|
||||
return true;
|
||||
}elseif(file_exists('modules/' . $this->module . '/'. $file . '.php')){
|
||||
$this->includeClassicFile('modules/'. $this->module . '/'. $file . '.php');
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
119
include/MVC/View/views/view.config.php
Normal file
119
include/MVC/View/views/view.config.php
Normal file
@@ -0,0 +1,119 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
/*
|
||||
* Created on Apr 23, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
$view_config = array(
|
||||
'actions' =>
|
||||
array(
|
||||
'ajaxformsave' => array(
|
||||
'show_all' => false
|
||||
),
|
||||
'popup' => array(
|
||||
'show_header' => false,
|
||||
'show_subpanels' => false,
|
||||
'show_search' => false,
|
||||
'show_footer' => false,
|
||||
'show_javascript' => true,
|
||||
),
|
||||
'authenticate' => array(
|
||||
'show_header' => false,
|
||||
'show_subpanels' => false,
|
||||
'show_search' => false,
|
||||
'show_footer' => false,
|
||||
'show_javascript' => true,
|
||||
),
|
||||
'subpanelcreates' => array(
|
||||
'show_header' => false,
|
||||
'show_subpanels' => false,
|
||||
'show_search' => false,
|
||||
'show_footer' => false,
|
||||
'show_javascript' => true,
|
||||
),
|
||||
),
|
||||
'req_params' =>
|
||||
array(
|
||||
'print' => array('param_value' => true,
|
||||
'config' => array(
|
||||
'show_header' => true,
|
||||
'show_footer' => false,
|
||||
'view_print' => true,
|
||||
'show_title' => false,
|
||||
'show_subpanels' => false,
|
||||
'show_javascript' => true,
|
||||
'show_search' => false,)
|
||||
),
|
||||
'action' => array('param_value' => array('Delete','Save'),
|
||||
'config' => array(
|
||||
'show_all' => false
|
||||
),
|
||||
),
|
||||
'to_pdf' => array('param_value' => true,
|
||||
'config' => array(
|
||||
'show_all' => false
|
||||
),
|
||||
),
|
||||
'to_csv' => array('param_value' => true,
|
||||
'config' => array(
|
||||
'show_all' => false
|
||||
),
|
||||
),
|
||||
'sugar_body_only' => array('param_value' => true,
|
||||
'config' => array(
|
||||
'show_all' => false
|
||||
),
|
||||
),
|
||||
'view' => array('param_value' => 'documentation',
|
||||
'config' => array(
|
||||
'show_all' => false
|
||||
),
|
||||
),
|
||||
'show_js' => array('param_value' => true,
|
||||
'config' => array(
|
||||
'show_header' => false,
|
||||
'show_footer' => false,
|
||||
'view_print' => false,
|
||||
'show_title' => false,
|
||||
'show_subpanels' => false,
|
||||
'show_javascript' => true,
|
||||
'show_search' => false,)
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
95
include/MVC/View/views/view.detail.php
Normal file
95
include/MVC/View/views/view.detail.php
Normal file
@@ -0,0 +1,95 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
/*
|
||||
* Created on Apr 13, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
require_once('include/DetailView/DetailView2.php');
|
||||
|
||||
class ViewDetail extends SugarView{
|
||||
var $type ='detail';
|
||||
var $dv;
|
||||
|
||||
function ViewDetail(){
|
||||
$this->options['show_subpanels'] = true;
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function preDisplay(){
|
||||
$metadataFile = null;
|
||||
$foundViewDefs = false;
|
||||
if(file_exists('custom/modules/' . $this->module . '/metadata/detailviewdefs.php')){
|
||||
$metadataFile = 'custom/modules/' . $this->module . '/metadata/detailviewdefs.php';
|
||||
$foundViewDefs = true;
|
||||
}else{
|
||||
if(file_exists('custom/modules/'.$this->module.'/metadata/metafiles.php')){
|
||||
require_once('custom/modules/'.$this->module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$this->module]['detailviewdefs'])){
|
||||
$metadataFile = $metafiles[$this->module]['detailviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}elseif(file_exists('modules/'.$this->module.'/metadata/metafiles.php')){
|
||||
require_once('modules/'.$this->module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$this->module]['detailviewdefs'])){
|
||||
$metadataFile = $metafiles[$this->module]['detailviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
$GLOBALS['log']->debug("metadatafile=". $metadataFile);
|
||||
if(!$foundViewDefs && file_exists('modules/'.$this->module.'/metadata/detailviewdefs.php')){
|
||||
$metadataFile = 'modules/'.$this->module.'/metadata/detailviewdefs.php';
|
||||
}
|
||||
|
||||
$this->dv = new DetailView2();
|
||||
$this->dv->ss =& $this->ss;
|
||||
$this->dv->setup($this->module, $this->bean, $metadataFile, 'include/DetailView/DetailView.tpl');
|
||||
}
|
||||
|
||||
function display(){
|
||||
//echo 'test';
|
||||
if(empty($this->bean->id)){
|
||||
global $app_strings;
|
||||
sugar_die($app_strings['ERROR_NO_RECORD']);
|
||||
|
||||
}
|
||||
$this->dv->process();
|
||||
echo $this->dv->display();
|
||||
}
|
||||
|
||||
}
|
||||
96
include/MVC/View/views/view.edit.php
Normal file
96
include/MVC/View/views/view.edit.php
Normal file
@@ -0,0 +1,96 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
/*
|
||||
* Created on Apr 13, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
require_once('include/EditView/EditView2.php');
|
||||
class ViewEdit extends SugarView{
|
||||
var $ev;
|
||||
var $type ='edit';
|
||||
var $useForSubpanel = false; //boolean variable to determine whether view can be used for subpanel creates
|
||||
var $useModuleQuickCreateTemplate = false; //boolean variable to determine whether or not SubpanelQuickCreate has a separate display function
|
||||
var $showTitle = true;
|
||||
|
||||
function ViewEdit(){
|
||||
parent::SugarView();
|
||||
echo $this->module;
|
||||
}
|
||||
|
||||
function preDisplay(){
|
||||
|
||||
$metadataFile = null;
|
||||
$foundViewDefs = false;
|
||||
if(file_exists('custom/modules/' . $this->module . '/metadata/editviewdefs.php')){
|
||||
$metadataFile = 'custom/modules/' . $this->module . '/metadata/editviewdefs.php';
|
||||
$foundViewDefs = true;
|
||||
}else{
|
||||
if(file_exists('custom/modules/'.$this->module.'/metadata/metafiles.php')){
|
||||
require_once('custom/modules/'.$this->module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$this->module]['editviewdefs'])){
|
||||
$metadataFile = $metafiles[$this->module]['editviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}elseif(file_exists('modules/'.$this->module.'/metadata/metafiles.php')){
|
||||
require_once('modules/'.$this->module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$this->module]['editviewdefs'])){
|
||||
$metadataFile = $metafiles[$this->module]['editviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
$GLOBALS['log']->debug("metadatafile=". $metadataFile);
|
||||
if(!$foundViewDefs && file_exists('modules/'.$this->module.'/metadata/editviewdefs.php')){
|
||||
$metadataFile = 'modules/'.$this->module.'/metadata/editviewdefs.php';
|
||||
}
|
||||
|
||||
|
||||
$this->ev = new EditView();
|
||||
$this->ev->ss =& $this->ss;
|
||||
$this->ev->setup($this->module, $this->bean, $metadataFile, 'include/EditView/EditView.tpl');
|
||||
|
||||
}
|
||||
|
||||
function display(){
|
||||
$this->ev->process();
|
||||
echo $this->ev->display($this->showTitle);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
48
include/MVC/View/views/view.html.php
Normal file
48
include/MVC/View/views/view.html.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?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/SugarView.php');
|
||||
|
||||
class ViewHtml extends SugarView{
|
||||
function ViewHtml(){
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function display(){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
77
include/MVC/View/views/view.importvcard.php
Normal file
77
include/MVC/View/views/view.importvcard.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<?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/vCard.php');
|
||||
|
||||
class ViewImportvcard extends SugarView
|
||||
{
|
||||
var $type = 'detail';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SugarView::display()
|
||||
*/
|
||||
public function display()
|
||||
{
|
||||
global $mod_strings, $app_strings, $app_list_strings;
|
||||
|
||||
$this->ss->assign("ERROR_TEXT", $app_strings['LBL_EMPTY_VCARD']);
|
||||
$this->ss->assign("HEADER", $app_strings['LBL_IMPORT_VCARD']);
|
||||
$this->ss->assign("MODULE", $_REQUEST['module']);
|
||||
|
||||
$middleText = "<a href='index.php?module={$_REQUEST['module']}&action=index'>{$mod_strings['LBL_MODULE_NAME']}</a><span class='pointer'>»</span>{$app_strings['LBL_IMPORT_VCARD_BUTTON_LABEL']}";
|
||||
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $middleText, true);
|
||||
|
||||
|
||||
if ( file_exists('custom/include/MVC/View/tpls/Importvcard.tpl') )
|
||||
$this->ss->display('custom/include/MVC/View/tpls/Importvcard.tpl');
|
||||
else
|
||||
$this->ss->display('include/MVC/View/tpls/Importvcard.tpl');
|
||||
}
|
||||
}
|
||||
?>
|
||||
69
include/MVC/View/views/view.importvcardsave.php
Normal file
69
include/MVC/View/views/view.importvcardsave.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?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/vCard.php');
|
||||
|
||||
class ViewImportvcardsave extends SugarView
|
||||
{
|
||||
var $type = 'detail';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SugarView::display()
|
||||
*/
|
||||
public function display()
|
||||
{
|
||||
if ( isset($_FILES['vcard']['tmp_name']) && isset($_FILES['vcard']['size']) > 0 ) {
|
||||
$vcard = new vCard();
|
||||
$record = $vcard->importVCard($_FILES['vcard']['tmp_name'],$_REQUEST['module']);
|
||||
SugarApplication::redirect("index.php?action=DetailView&module={$_REQUEST['module']}&record=$record");
|
||||
}
|
||||
else
|
||||
SugarApplication::redirect("index.php?action=Importvcard&module={$_REQUEST['module']}");
|
||||
}
|
||||
}
|
||||
?>
|
||||
64
include/MVC/View/views/view.json.php
Normal file
64
include/MVC/View/views/view.json.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
class ViewJson extends SugarView{
|
||||
var $type ='detail';
|
||||
function ViewJson(){
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function display(){
|
||||
global $beanList;
|
||||
$module = $GLOBALS['module'];
|
||||
$json = getJSONobj();
|
||||
$bean = $this->bean;
|
||||
$all_fields = array_merge($bean->column_fields,$bean->additional_column_fields);
|
||||
|
||||
$js_fields_arr = array();
|
||||
foreach($all_fields as $field) {
|
||||
if(isset($bean->$field)) {
|
||||
$bean->$field = from_html($bean->$field);
|
||||
$bean->$field = preg_replace('/\r\n/','<BR>',$bean->$field);
|
||||
$bean->$field = preg_replace('/\n/','<BR>',$bean->$field);
|
||||
$js_fields_arr[$field] = addslashes($bean->$field);
|
||||
}
|
||||
}
|
||||
$out = $json->encode($js_fields_arr, true);
|
||||
ob_clean();
|
||||
print($out);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
}
|
||||
?>
|
||||
303
include/MVC/View/views/view.list.php
Normal file
303
include/MVC/View/views/view.list.php
Normal file
@@ -0,0 +1,303 @@
|
||||
<?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/SugarView.php');
|
||||
|
||||
require_once('include/ListView/ListViewSmarty.php');
|
||||
|
||||
require_once('modules/MySettings/StoreQuery.php');
|
||||
class ViewList extends SugarView{
|
||||
var $type ='list';
|
||||
var $lv;
|
||||
var $searchForm;
|
||||
var $use_old_search;
|
||||
var $headers;
|
||||
var $seed;
|
||||
var $params;
|
||||
var $listViewDefs;
|
||||
var $storeQuery;
|
||||
var $where = '';
|
||||
function ViewList(){
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
|
||||
function oldSearch(){
|
||||
|
||||
}
|
||||
function newSearch(){
|
||||
|
||||
}
|
||||
|
||||
function listViewPrepare(){
|
||||
$module = $GLOBALS['module'];
|
||||
$metadataFile = null;
|
||||
$foundViewDefs = false;
|
||||
if(file_exists('custom/modules/' . $module. '/metadata/listviewdefs.php')){
|
||||
$metadataFile = 'custom/modules/' . $module . '/metadata/listviewdefs.php';
|
||||
$foundViewDefs = true;
|
||||
}else{
|
||||
if(file_exists('custom/modules/'.$module.'/metadata/metafiles.php')){
|
||||
require_once('custom/modules/'.$module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$module]['listviewdefs'])){
|
||||
$metadataFile = $metafiles[$module]['listviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}elseif(file_exists('modules/'.$module.'/metadata/metafiles.php')){
|
||||
require_once('modules/'.$module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$module]['listviewdefs'])){
|
||||
$metadataFile = $metafiles[$module]['listviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!$foundViewDefs && file_exists('modules/'.$module.'/metadata/listviewdefs.php')){
|
||||
$metadataFile = 'modules/'.$module.'/metadata/listviewdefs.php';
|
||||
}
|
||||
if( !file_exists($metadataFile) )
|
||||
sugar_die($GLOBALS['app_strings']['LBL_NO_ACTION'] );
|
||||
|
||||
require_once($metadataFile);
|
||||
$this->listViewDefs = $listViewDefs;
|
||||
|
||||
if(!empty($this->bean->object_name) && isset($_REQUEST[$module.'2_'.strtoupper($this->bean->object_name).'_offset'])) {//if you click the pagination button, it will poplate the search criteria here
|
||||
if(!empty($_REQUEST['current_query_by_page'])) {//The code support multi browser tabs pagination
|
||||
$blockVariables = array('mass', 'uid', 'massupdate', 'delete', 'merge', 'selectCount', 'request_data', 'current_query_by_page',$module.'2_'.strtoupper($this->bean->object_name).'_ORDER_BY' );
|
||||
if(isset($_REQUEST['lvso'])){
|
||||
$blockVariables[] = 'lvso';
|
||||
}
|
||||
$current_query_by_page = unserialize(base64_decode($_REQUEST['current_query_by_page']));
|
||||
foreach($current_query_by_page as $search_key=>$search_value) {
|
||||
if($search_key != $module.'2_'.strtoupper($this->bean->object_name).'_offset' && !in_array($search_key, $blockVariables)) {
|
||||
if (!is_array($search_value)) {
|
||||
$_REQUEST[$search_key] = $GLOBALS['db']->quoteForEmail($search_value);
|
||||
}
|
||||
else {
|
||||
foreach ($search_value as $key=>&$val) {
|
||||
$val = $GLOBALS['db']->quoteForEmail($val);
|
||||
}
|
||||
$_REQUEST[$search_key] = $search_value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_REQUEST['saved_search_select']) && $_REQUEST['saved_search_select']!='_none') {
|
||||
if(empty($_REQUEST['button']) && (empty($_REQUEST['clear_query']) || $_REQUEST['clear_query']!='true')) {
|
||||
$this->saved_search = loadBean('SavedSearch');
|
||||
$this->saved_search->retrieveSavedSearch($_REQUEST['saved_search_select']);
|
||||
$this->saved_search->populateRequest();
|
||||
}
|
||||
elseif(!empty($_REQUEST['button'])) { // click the search button, after retrieving from saved_search
|
||||
$_SESSION['LastSavedView'][$_REQUEST['module']] = '';
|
||||
unset($_REQUEST['saved_search_select']);
|
||||
unset($_REQUEST['saved_search_select_name']);
|
||||
}
|
||||
}
|
||||
$this->storeQuery = new StoreQuery();
|
||||
if(!isset($_REQUEST['query'])){
|
||||
$this->storeQuery->loadQuery($this->module);
|
||||
$this->storeQuery->populateRequest();
|
||||
}else{
|
||||
$this->storeQuery->saveFromRequest($this->module);
|
||||
}
|
||||
|
||||
$this->seed = $this->bean;
|
||||
|
||||
$displayColumns = array();
|
||||
if(!empty($_REQUEST['displayColumns'])) {
|
||||
foreach(explode('|', $_REQUEST['displayColumns']) as $num => $col) {
|
||||
if(!empty($this->listViewDefs[$module][$col]))
|
||||
$displayColumns[$col] = $this->listViewDefs[$module][$col];
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($this->listViewDefs[$module] as $col => $this->params) {
|
||||
if(!empty($this->params['default']) && $this->params['default'])
|
||||
$displayColumns[$col] = $this->params;
|
||||
}
|
||||
}
|
||||
$this->params = array('massupdate' => true);
|
||||
if(!empty($_REQUEST['orderBy'])) {
|
||||
$this->params['orderBy'] = $_REQUEST['orderBy'];
|
||||
$this->params['overrideOrder'] = true;
|
||||
if(!empty($_REQUEST['sortOrder'])) $this->params['sortOrder'] = $_REQUEST['sortOrder'];
|
||||
}
|
||||
$this->lv->displayColumns = $displayColumns;
|
||||
|
||||
$this->seed = $this->seed;
|
||||
$this->module = $module;
|
||||
|
||||
$this->prepareSearchForm();
|
||||
|
||||
if(isset($this->options['show_title']) && $this->options['show_title']) {
|
||||
$moduleName = isset($this->seed->module_dir) ? $this->seed->module_dir : $GLOBALS['mod_strings']['LBL_MODULE_NAME'];
|
||||
echo $this->getModuleTitle(true);
|
||||
}
|
||||
}
|
||||
|
||||
function listViewProcess(){
|
||||
$this->processSearchForm();
|
||||
$this->lv->searchColumns = $this->searchForm->searchColumns;
|
||||
|
||||
if(!$this->headers)
|
||||
return;
|
||||
|
||||
|
||||
if(empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false){
|
||||
$this->lv->ss->assign("SEARCH",true);
|
||||
$this->lv->setup($this->seed, 'include/ListView/ListViewGeneric.tpl', $this->where, $this->params);
|
||||
$savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : (' - ' . $_REQUEST['saved_search_select_name']);
|
||||
echo $this->lv->display();
|
||||
}
|
||||
}
|
||||
function prepareSearchForm(){
|
||||
$this->searchForm = null;
|
||||
|
||||
//search
|
||||
$view = 'basic_search';
|
||||
if(!empty($_REQUEST['search_form_view']) && $_REQUEST['search_form_view'] == 'advanced_search')
|
||||
$view = $_REQUEST['search_form_view'];
|
||||
$this->headers = true;
|
||||
if(!empty($_REQUEST['search_form_only']) && $_REQUEST['search_form_only'])
|
||||
$this->headers = false;
|
||||
elseif(!isset($_REQUEST['search_form']) || $_REQUEST['search_form'] != 'false') {
|
||||
if(isset($_REQUEST['searchFormTab']) && $_REQUEST['searchFormTab'] == 'advanced_search') {
|
||||
$view = 'advanced_search';
|
||||
}else {
|
||||
$view = 'basic_search';
|
||||
}
|
||||
}
|
||||
|
||||
$this->use_old_search = true;
|
||||
if ((file_exists('modules/' . $this->module . '/SearchForm.html')
|
||||
&& !file_exists('modules/' . $this->module . '/metadata/searchdefs.php'))
|
||||
|| (file_exists('custom/modules/' . $this->module . '/SearchForm.html')
|
||||
&& !file_exists('custom/modules/' . $this->module . '/metadata/searchdefs.php'))){
|
||||
require_once('include/SearchForm/SearchForm.php');
|
||||
$this->searchForm = new SearchForm($this->module, $this->seed);
|
||||
}else{
|
||||
$this->use_old_search = false;
|
||||
require_once('include/SearchForm/SearchForm2.php');
|
||||
|
||||
|
||||
/* if(!empty($metafiles[$this->module]['searchdefs']))
|
||||
require_once($metafiles[$this->module]['searchdefs']);
|
||||
elseif(file_exists('modules/'.$this->module.'/metadata/searchdefs.php'))
|
||||
require_once('modules/'.$this->module.'/metadata/searchdefs.php');
|
||||
*/
|
||||
|
||||
if (file_exists('custom/modules/'.$this->module.'/metadata/searchdefs.php'))
|
||||
{
|
||||
require_once('custom/modules/'.$this->module.'/metadata/searchdefs.php');
|
||||
}
|
||||
elseif (!empty($metafiles[$this->module]['searchdefs']))
|
||||
{
|
||||
require_once($metafiles[$this->module]['searchdefs']);
|
||||
}
|
||||
elseif (file_exists('modules/'.$this->module.'/metadata/searchdefs.php'))
|
||||
{
|
||||
require_once('modules/'.$this->module.'/metadata/searchdefs.php');
|
||||
}
|
||||
|
||||
|
||||
if(!empty($metafiles[$this->module]['searchfields']))
|
||||
require_once($metafiles[$this->module]['searchfields']);
|
||||
elseif(file_exists('modules/'.$this->module.'/metadata/SearchFields.php'))
|
||||
require_once('modules/'.$this->module.'/metadata/SearchFields.php');
|
||||
|
||||
if(file_exists('custom/modules/'.$this->module.'/metadata/SearchFields.php')){
|
||||
require_once('custom/modules/'.$this->module.'/metadata/SearchFields.php');
|
||||
}
|
||||
|
||||
|
||||
$this->searchForm = new SearchForm($this->seed, $this->module, $this->action);
|
||||
$this->searchForm->setup($searchdefs, $searchFields, 'include/SearchForm/tpls/SearchFormGeneric.tpl', $view, $this->listViewDefs);
|
||||
$this->searchForm->lv = $this->lv;
|
||||
}
|
||||
}
|
||||
function processSearchForm(){
|
||||
|
||||
if(isset($_REQUEST['query']))
|
||||
{
|
||||
// we have a query
|
||||
if(!empty($_SERVER['HTTP_REFERER']) && preg_match('/action=EditView/', $_SERVER['HTTP_REFERER'])) { // from EditView cancel
|
||||
$this->searchForm->populateFromArray($this->storeQuery->query);
|
||||
}
|
||||
else {
|
||||
$this->searchForm->populateFromRequest();
|
||||
}
|
||||
|
||||
$where_clauses = $this->searchForm->generateSearchWhere(true, $this->seed->module_dir);
|
||||
|
||||
if (count($where_clauses) > 0 )$this->where = '('. implode(' ) AND ( ', $where_clauses) . ')';
|
||||
global $current_user;
|
||||
if($current_user->id=='2e72f487-d92b-954e-f50c-528b10ce81c9'){
|
||||
var_dump($where_clauses );
|
||||
}
|
||||
$GLOBALS['log']->info("List View Where Clause: $this->where");
|
||||
}
|
||||
if($this->use_old_search){
|
||||
switch($view) {
|
||||
case 'basic_search':
|
||||
$this->searchForm->setup();
|
||||
$this->searchForm->displayBasic($this->headers);
|
||||
break;
|
||||
case 'advanced_search':
|
||||
$this->searchForm->setup();
|
||||
$this->searchForm->displayAdvanced($this->headers);
|
||||
break;
|
||||
case 'saved_views':
|
||||
echo $this->searchForm->displaySavedViews($this->listViewDefs, $this->lv, $this->headers);
|
||||
break;
|
||||
}
|
||||
}else{
|
||||
echo $this->searchForm->display($this->headers);
|
||||
}
|
||||
}
|
||||
function preDisplay(){
|
||||
$this->lv = new ListViewSmarty();
|
||||
}
|
||||
function display(){
|
||||
if(!$this->bean || !$this->bean->ACLAccess('list')){
|
||||
ACLController::displayNoAccess();
|
||||
} else {
|
||||
$this->listViewPrepare();
|
||||
$this->listViewProcess();
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
66
include/MVC/View/views/view.modulelistmenu.php
Normal file
66
include/MVC/View/views/view.modulelistmenu.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?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/SugarView.php');
|
||||
|
||||
class ViewModulelistmenu extends SugarView
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->options['show_title'] = false;
|
||||
$this->options['show_header'] = false;
|
||||
$this->options['show_footer'] = false;
|
||||
$this->options['show_javascript'] = false;
|
||||
$this->options['show_subpanels'] = false;
|
||||
$this->options['show_search'] = false;
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
public function display()
|
||||
{
|
||||
//last viewed
|
||||
$tracker = new Tracker();
|
||||
$history = $tracker->get_recently_viewed($GLOBALS['current_user']->id,$this->module);
|
||||
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');
|
||||
}
|
||||
}
|
||||
?>
|
||||
84
include/MVC/View/views/view.multiedit.php
Normal file
84
include/MVC/View/views/view.multiedit.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
/*
|
||||
* Created on Apr 13, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
require_once('include/EditView/EditView2.php');
|
||||
class ViewMultiedit extends SugarView{
|
||||
var $type ='edit';
|
||||
function ViewMultiedit(){
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function display(){
|
||||
global $beanList, $beanFiles;
|
||||
if($this->action == 'AjaxFormSave'){
|
||||
echo "<a href='index.php?action=DetailView&module=".$this->module."&record=".$this->bean->id."'>".$this->bean->id."</a>";
|
||||
}else{
|
||||
if(!empty($_REQUEST['modules'])){
|
||||
$js_array = 'Array(';
|
||||
|
||||
$count = count($_REQUEST['modules']);
|
||||
$index = 1;
|
||||
foreach($_REQUEST['modules'] as $module){
|
||||
$js_array .= "'form_".$module."'";
|
||||
if($index < $count)
|
||||
$js_array .= ',';
|
||||
$index++;
|
||||
}
|
||||
//$js_array = "Array(".implode(",", $js_array). ")";
|
||||
$js_array .= ');';
|
||||
echo "<script language='javascript'>var ajaxFormArray = new ".$js_array."</script>";
|
||||
if($count > 1)
|
||||
echo '<input type="button" class="button" value="Save All" id=\'ajaxsaveall\' onclick="return saveForms(\'Saving...\', \'Save Complete\');"/>';
|
||||
foreach($_REQUEST['modules'] as $module){
|
||||
$bean = $beanList[$module];
|
||||
require_once($beanFiles[$bean]);
|
||||
$GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], $module);
|
||||
$ev = new EditView($module);
|
||||
$ev->process();
|
||||
echo "<div id='multiedit_form_".$module."'>";
|
||||
echo $ev->display(true, true);
|
||||
echo "</div>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
48
include/MVC/View/views/view.noaccess.php
Normal file
48
include/MVC/View/views/view.noaccess.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?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/vCard.php');
|
||||
|
||||
class ViewNoaccess extends SugarView{
|
||||
var $type ='noaccess';
|
||||
function ViewNoaccess(){
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function display(){
|
||||
echo '<p class="error">Warning: You do not have permission to access this module.</p>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
167
include/MVC/View/views/view.popup.php
Normal file
167
include/MVC/View/views/view.popup.php
Normal file
@@ -0,0 +1,167 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
class ViewPopup extends SugarView{
|
||||
var $type ='list';
|
||||
function ViewPopup(){
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function display(){
|
||||
global $popupMeta, $mod_strings;
|
||||
|
||||
if(($this->bean instanceOf SugarBean) && !$this->bean->ACLAccess('list')){
|
||||
ACLController::displayNoAccess();
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['metadata']) && strpos($_REQUEST['metadata'], "..") !== false)
|
||||
die("Directory navigation attack denied.");
|
||||
if(!empty($_REQUEST['metadata']) && $_REQUEST['metadata'] != 'undefined' && file_exists('modules/' . $this->module . '/metadata/' . $_REQUEST['metadata'] . '.php')) // if custom metadata is requested
|
||||
require_once('modules/' . $this->module . '/metadata/' . $_REQUEST['metadata'] . '.php');
|
||||
elseif(file_exists('custom/modules/' . $this->module . '/metadata/popupdefs.php'))
|
||||
require_once('custom/modules/' . $this->module . '/metadata/popupdefs.php');
|
||||
elseif(file_exists('modules/' . $this->module . '/metadata/popupdefs.php'))
|
||||
require_once('modules/' . $this->module . '/metadata/popupdefs.php');
|
||||
|
||||
if(!empty($popupMeta) && !empty($popupMeta['listviewdefs'])){
|
||||
if(is_array($popupMeta['listviewdefs'])){
|
||||
//if we have an array, then we are not going to include a file, but rather the
|
||||
//listviewdefs will be defined directly in the popupdefs file
|
||||
$listViewDefs[$this->module] = $popupMeta['listviewdefs'];
|
||||
}else{
|
||||
//otherwise include the file
|
||||
require_once($popupMeta['listviewdefs']);
|
||||
}
|
||||
}elseif(file_exists('custom/modules/' . $this->module . '/metadata/listviewdefs.php')){
|
||||
require_once('custom/modules/' . $this->module . '/metadata/listviewdefs.php');
|
||||
}elseif(file_exists('modules/' . $this->module . '/metadata/listviewdefs.php')){
|
||||
require_once('modules/' . $this->module . '/metadata/listviewdefs.php');
|
||||
}
|
||||
|
||||
//check for searchdefs as well
|
||||
if(empty($searchdefs) && file_exists('custom/modules/'.$this->module.'/metadata/searchdefs.php')){
|
||||
require_once('custom/modules/'.$this->module.'/metadata/searchdefs.php');
|
||||
}elseif(!empty($popupMeta) && !empty($popupMeta['searchdefs'])){
|
||||
if(is_array($popupMeta['searchdefs'])){
|
||||
//if we have an array, then we are not going to include a file, but rather the
|
||||
//searchdefs will be defined directly in the popupdefs file
|
||||
$searchdefs[$this->module]['layout']['advanced_search'] = $popupMeta['searchdefs'];
|
||||
}else{
|
||||
//otherwise include the file
|
||||
require_once($popupMeta['searchdefs']);
|
||||
}
|
||||
}else if(empty($searchdefs) && file_exists('modules/'.$this->module.'/metadata/searchdefs.php')){
|
||||
require_once('modules/'.$this->module.'/metadata/searchdefs.php');
|
||||
}
|
||||
|
||||
if(!empty($this->bean) && isset($_REQUEST[$this->module.'2_'.strtoupper($this->bean->object_name).'_offset'])) {//if you click the pagination button, it will poplate the search criteria here
|
||||
if(!empty($_REQUEST['current_query_by_page'])) {
|
||||
$blockVariables = array('mass', 'uid', 'massupdate', 'delete', 'merge', 'selectCount', 'lvso', 'sortOrder', 'orderBy', 'request_data', 'current_query_by_page');
|
||||
$current_query_by_page = unserialize(base64_decode($_REQUEST['current_query_by_page']));
|
||||
foreach($current_query_by_page as $search_key=>$search_value) {
|
||||
if($search_key != $this->module.'2_'.strtoupper($this->bean->object_name).'_offset' && !in_array($search_key, $blockVariables)) {
|
||||
if (!is_array($search_value)) {
|
||||
$_REQUEST[$search_key] = $GLOBALS['db']->quoteForEmail($search_value);
|
||||
}
|
||||
else {
|
||||
foreach ($search_value as $key=>&$val) {
|
||||
$val = $GLOBALS['db']->quoteForEmail($val);
|
||||
}
|
||||
$_REQUEST[$search_key] = $search_value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($listViewDefs) && !empty($searchdefs)){
|
||||
require_once('include/Popups/PopupSmarty.php');
|
||||
$displayColumns = array();
|
||||
$filter_fields = array();
|
||||
$popup = new PopupSmarty($this->bean, $this->module);
|
||||
foreach($listViewDefs[$this->module] as $col => $params) {
|
||||
$filter_fields[strtolower($col)] = true;
|
||||
if(!empty($params['related_fields'])) {
|
||||
foreach($params['related_fields'] as $field) {
|
||||
//id column is added by query construction function. This addition creates duplicates
|
||||
//and causes issues in oracle. #10165
|
||||
if ($field != 'id') {
|
||||
$filter_fields[$field] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty($params['default']) && $params['default'])
|
||||
$displayColumns[$col] = $params;
|
||||
}
|
||||
$popup->displayColumns = $displayColumns;
|
||||
$popup->filter_fields = $filter_fields;
|
||||
$popup->mergeDisplayColumns = true;
|
||||
//check to see if popupdes contains searchdefs
|
||||
$popup->_popupMeta = $popupMeta;
|
||||
$popup->listviewdefs = $listViewDefs;
|
||||
$popup->searchdefs = $searchdefs;
|
||||
|
||||
if(isset($_REQUEST['query'])){
|
||||
$popup->searchForm->populateFromRequest();
|
||||
}
|
||||
|
||||
$massUpdateData = '';
|
||||
if(isset($_REQUEST['mass'])) {
|
||||
foreach(array_unique($_REQUEST['mass']) as $record) {
|
||||
$massUpdateData .= "<input style='display: none' checked type='checkbox' name='mass[]' value='$record'>\n";
|
||||
}
|
||||
}
|
||||
$popup->massUpdateData = $massUpdateData;
|
||||
|
||||
$popup->setup('include/Popups/tpls/PopupGeneric.tpl');
|
||||
|
||||
insert_popup_header();
|
||||
echo $popup->display();
|
||||
|
||||
}else{
|
||||
if(file_exists('modules/' . $this->module . '/Popup_picker.php')){
|
||||
require_once('modules/' . $this->module . '/Popup_picker.php');
|
||||
}else{
|
||||
require_once('include/Popups/Popup_picker.php');
|
||||
}
|
||||
|
||||
$popup = new Popup_Picker();
|
||||
$popup->_hide_clear_button = true;
|
||||
echo $popup->process_page();
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
67
include/MVC/View/views/view.quick.php
Normal file
67
include/MVC/View/views/view.quick.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
/*
|
||||
* Created on Apr 13, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
require_once('include/MVC/View/views/view.detail.php');
|
||||
|
||||
class ViewQuick extends ViewDetail{
|
||||
var $type ='detail';
|
||||
|
||||
function ViewQuick(){
|
||||
parent::SugarView();
|
||||
$this->options['show_subpanels'] = false;
|
||||
$this->options['show_title'] = false;
|
||||
$this->options['show_header'] = false;
|
||||
$this->options['show_footer'] = false;
|
||||
$this->options['show_javascript'] = false;
|
||||
}
|
||||
|
||||
function display(){
|
||||
$this->dv->showVCRControl = false;
|
||||
$this->dv->th->ss->assign('hideHeader', true);
|
||||
if(empty($this->bean->id)){
|
||||
global $app_strings;
|
||||
sugar_die($app_strings['ERROR_NO_RECORD']);
|
||||
}
|
||||
$this->dv->process();
|
||||
ob_clean();
|
||||
echo json_encode(array('title'=> $this->bean->name, 'url'=>'index.php?module=' . $this->bean->module_dir . '&action=DetailView&record=' . $this->bean->id ,'html'=> $this->dv->display(false)));
|
||||
}
|
||||
}
|
||||
158
include/MVC/View/views/view.quickcreate.php
Normal file
158
include/MVC/View/views/view.quickcreate.php
Normal file
@@ -0,0 +1,158 @@
|
||||
<?php
|
||||
//FILE SUGARCRM flav=pro || flav=sales
|
||||
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/MVC/View/views/view.ajax.php');
|
||||
require_once('include/EditView/EditView2.php');
|
||||
|
||||
class ViewQuickcreate extends ViewAjax
|
||||
{
|
||||
private $_isDCForm = false;
|
||||
/**
|
||||
* @see SugarView::preDisplay()
|
||||
*/
|
||||
public function preDisplay()
|
||||
{
|
||||
if(!empty($_REQUEST['source_module']) && $_REQUEST['source_module'] != 'undefined' && !empty($_REQUEST['record'])) {
|
||||
$this->bean = loadBean($_REQUEST['source_module']);
|
||||
if ( $this->bean instanceOf SugarBean
|
||||
&& !in_array($this->bean->object_name,array('EmailMan')) ) {
|
||||
$this->bean->retrieve($_REQUEST['record']);
|
||||
if(!empty($this->bean->id))$_REQUEST['parent_id'] = $this->bean->id;
|
||||
if(!empty($this->bean->module_dir))$_REQUEST['parent_type'] = $this->bean->module_dir;
|
||||
if(!empty($this->bean->name))$_REQUEST['parent_name'] = $this->bean->name;
|
||||
if(!empty($this->bean->id))$_REQUEST['return_id'] = $this->bean->id;
|
||||
if(!empty($this->bean->module_dir))$_REQUEST['return_module'] = $this->bean->module_dir;
|
||||
|
||||
//Now preload any related fields
|
||||
if(isset($_REQUEST['module'])) {
|
||||
$target_bean = loadBean($_REQUEST['module']);
|
||||
foreach($target_bean->field_defs as $fields) {
|
||||
if($fields['type'] == 'relate' && isset($fields['module']) && $fields['module'] == $_REQUEST['source_module'] && isset($fields['rname'])) {
|
||||
$rel_name = $fields['rname'];
|
||||
if(isset($this->bean->$rel_name)) {
|
||||
$_REQUEST[$fields['name']] = $this->bean->$rel_name;
|
||||
}
|
||||
if(!empty($_REQUEST['record']) && !empty($fields['id_name'])) {
|
||||
$_REQUEST[$fields['id_name']] = $_REQUEST['record'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->_isDCForm = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SugarView::display()
|
||||
*/
|
||||
public function display()
|
||||
{
|
||||
$view = (!empty($_REQUEST['target_view']))?$_REQUEST['target_view']: 'QuickCreate';
|
||||
$module = $_REQUEST['module'];
|
||||
|
||||
// locate the best viewdefs to use: 1. custom/module/quickcreatedefs.php 2. module/quickcreatedefs.php 3. custom/module/editviewdefs.php 4. module/editviewdefs.php
|
||||
$base = 'modules/' . $module . '/metadata/';
|
||||
$source = 'custom/' . $base . strtolower($view) . 'defs.php';
|
||||
if (!file_exists( $source))
|
||||
{
|
||||
$source = $base . strtolower($view) . 'defs.php';
|
||||
if (!file_exists($source))
|
||||
{
|
||||
//if our view does not exist default to EditView
|
||||
$view = 'EditView';
|
||||
$source = 'custom/' . $base . 'editviewdefs.php';
|
||||
if (!file_exists($source))
|
||||
{
|
||||
$source = $base . 'editviewdefs.php';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$ev = new EditView();
|
||||
$ev->view = $view;
|
||||
$ev->ss = new Sugar_Smarty();
|
||||
|
||||
$ev->ss->assign('isDCForm', $this->_isDCForm);
|
||||
//$_REQUEST['return_action'] = 'SubPanelViewer';
|
||||
$ev->setup($module, null, $source);
|
||||
$ev->showSectionPanelsTitles = false;
|
||||
$ev->defs['templateMeta']['form']['headerTpl'] = 'include/EditView/header.tpl';
|
||||
$ev->defs['templateMeta']['form']['footerTpl'] = 'include/EditView/footer.tpl';
|
||||
$ev->defs['templateMeta']['form']['buttons'] = array('DCMENUSAVE', 'DCMENUCANCEL', 'DCMENUFULLFORM');
|
||||
$ev->defs['templateMeta']['form']['button_location'] = 'bottom';
|
||||
$ev->defs['templateMeta']['form']['hidden'] = '<input type="hidden" name="is_ajax_call" value="1" />';
|
||||
$ev->defs['templateMeta']['form']['hidden'] .= '<input type="hidden" name="from_dcmenu" value="1" />';
|
||||
$defaultProcess = true;
|
||||
if(file_exists('modules/'.$module.'/views/view.edit.php')) {
|
||||
include('modules/'.$module.'/views/view.edit.php');
|
||||
$c = $module . 'ViewEdit';
|
||||
|
||||
if(class_exists($c)) {
|
||||
$view = new $c;
|
||||
if($view->useForSubpanel) {
|
||||
$defaultProcess = false;
|
||||
|
||||
//Check if we shold use the module's QuickCreate.tpl file
|
||||
if($view->useModuleQuickCreateTemplate && file_exists('modules/'.$module.'/tpls/QuickCreate.tpl')) {
|
||||
$ev->defs['templateMeta']['form']['headerTpl'] = 'modules/'.$module.'/tpls/QuickCreate.tpl';
|
||||
}
|
||||
|
||||
$view->ev = & $ev;
|
||||
$view->ss = & $ev->ss;
|
||||
$class = $GLOBALS['beanList'][$module];
|
||||
if(!empty($GLOBALS['beanFiles'][$class])){
|
||||
require_once($GLOBALS['beanFiles'][$class]);
|
||||
$bean = new $class();
|
||||
$view->bean = $bean;
|
||||
}
|
||||
$view->ev->formName = 'form_DC'.$view->ev->view .'_'.$module;
|
||||
$view->showTitle = false; // Do not show title since this is for subpanel
|
||||
$view->display();
|
||||
}
|
||||
}
|
||||
} //if
|
||||
|
||||
if($defaultProcess) {
|
||||
$form_name = 'form_DC'.$ev->view .'_'.$module;
|
||||
$ev->formName = $form_name;
|
||||
$ev->process(true, $form_name);
|
||||
echo $ev->display(false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
48
include/MVC/View/views/view.serialized.php
Normal file
48
include/MVC/View/views/view.serialized.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
class ViewSerialized extends SugarView{
|
||||
var $type ='detail';
|
||||
function ViewSerialized(){
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function display(){
|
||||
ob_clean();
|
||||
echo serialize($this->bean->toArray());
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
}
|
||||
?>
|
||||
55
include/MVC/View/views/view.sugarpdf.config.php
Normal file
55
include/MVC/View/views/view.sugarpdf.config.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
|
||||
$view_config = array(
|
||||
'actions' => array(
|
||||
'sugarpdf' => array(
|
||||
'show_header' => false,
|
||||
'show_subpanels' => false,
|
||||
'show_search' => false,
|
||||
'show_footer' => false,
|
||||
'show_javascript' => false,
|
||||
),
|
||||
),
|
||||
'req_params' => array(
|
||||
'to_pdf' => array(
|
||||
'param_value' => true,
|
||||
'config' => array('show_all' => false),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
85
include/MVC/View/views/view.sugarpdf.php
Normal file
85
include/MVC/View/views/view.sugarpdf.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?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/Sugarpdf/SugarpdfFactory.php');
|
||||
|
||||
class ViewSugarpdf extends SugarView{
|
||||
|
||||
var $type ='sugarpdf';
|
||||
/**
|
||||
* It is set by the "sugarpdf" request parameter and it is use by SugarpdfFactory to load the good sugarpdf class.
|
||||
* @var String
|
||||
*/
|
||||
var $sugarpdf='default';
|
||||
/**
|
||||
* The sugarpdf object (Include the TCPDF object).
|
||||
* The atributs of this object are destroy in the output method.
|
||||
* @var Sugarpdf object
|
||||
*/
|
||||
var $sugarpdfBean=NULL;
|
||||
|
||||
|
||||
function ViewSugarpdf(){
|
||||
parent::SugarView();
|
||||
if (isset($_REQUEST["sugarpdf"]))
|
||||
$this->sugarpdf = $_REQUEST["sugarpdf"];
|
||||
else
|
||||
header('Location:index.php?module='.$_REQUEST['module'].'&action=DetailView&record='.$_REQUEST['record']);
|
||||
}
|
||||
|
||||
function preDisplay(){
|
||||
$this->sugarpdfBean = SugarpdfFactory::loadSugarpdf($this->sugarpdf, $this->module, $this->bean, $this->view_object_map);
|
||||
|
||||
// ACL control
|
||||
if(!empty($this->bean) && !$this->bean->ACLAccess($this->sugarpdfBean->aclAction)){
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
|
||||
if(isset($this->errors)){
|
||||
$this->sugarpdfBean->errors = $this->errors;
|
||||
}
|
||||
}
|
||||
|
||||
function display(){
|
||||
$this->sugarpdfBean->process();
|
||||
$this->sugarpdfBean->Output($this->sugarpdfBean->fileName,'I');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
66
include/MVC/View/views/view.vcard.php
Normal file
66
include/MVC/View/views/view.vcard.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?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/vCard.php');
|
||||
|
||||
class ViewVcard extends SugarView
|
||||
{
|
||||
var $type ='detail';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SugarView::display()
|
||||
*/
|
||||
public function display()
|
||||
{
|
||||
$vcard = new vCard();
|
||||
$vcard->loadContact($this->bean->id, $this->module);
|
||||
$vcard->saveVCard();
|
||||
}
|
||||
}
|
||||
?>
|
||||
46
include/MVC/View/views/view.xml.php
Normal file
46
include/MVC/View/views/view.xml.php
Normal 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".
|
||||
********************************************************************************/
|
||||
class ViewXML extends SugarView{
|
||||
var $type ='detail';
|
||||
function ViewXML(){
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function display(){
|
||||
echo 'Not implemented';
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user