init
This commit is contained in:
98
include/SugarObjects/templates/file/File.php
Executable file
98
include/SugarObjects/templates/file/File.php
Executable file
@@ -0,0 +1,98 @@
|
||||
<?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/SugarObjects/templates/basic/Basic.php');
|
||||
require_once('include/upload_file.php');
|
||||
require_once('include/formbase.php');
|
||||
class File extends Basic{
|
||||
function File(){
|
||||
parent::SugarBean();
|
||||
}
|
||||
|
||||
//Must overwrite the save operation for uploaded file.
|
||||
var $file_url;
|
||||
var $file_url_noimage;
|
||||
function save($check_notify=false){
|
||||
if (!empty($this->uploadfile))
|
||||
$this->filename = $this->uploadfile;
|
||||
return parent::save($check_notify);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function fill_in_additional_detail_fields(){
|
||||
|
||||
global $theme;
|
||||
global $current_language;
|
||||
global $timedate;
|
||||
global $app_list_strings;
|
||||
$this->uploadfile = $this->filename;
|
||||
$mod_strings = return_module_language($current_language, $this->object_name);
|
||||
global $img_name;
|
||||
global $img_name_bare;
|
||||
if (!$this->file_ext) {
|
||||
$img_name = SugarThemeRegistry::current()->getImageURL(strtolower($this->file_ext)."_image_inline.gif");
|
||||
$img_name_bare = strtolower($this->file_ext)."_image_inline";
|
||||
}
|
||||
//set default file name.
|
||||
if (!empty ($img_name) && file_exists($img_name)) {
|
||||
$img_name = $img_name_bare;
|
||||
} else {
|
||||
$img_name = "def_image_inline"; //todo change the default image.
|
||||
}
|
||||
$this->file_url_noimage = basename(UploadFile :: get_url($this->filename, $this->id));
|
||||
if(!empty($this->status_id)) {
|
||||
$this->status = $app_list_strings['document_status_dom'][$this->status_id];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// need to override to have a name field created for this class
|
||||
function retrieve($id = -1, $encode=true) {
|
||||
$ret_val = parent::retrieve($id, $encode);
|
||||
$this->_create_proper_name_field();
|
||||
return $ret_val;
|
||||
}
|
||||
|
||||
|
||||
function _create_proper_name_field() {
|
||||
global $locale;
|
||||
$this->name = $this->document_name;
|
||||
}
|
||||
}
|
||||
?>
|
||||
70
include/SugarObjects/templates/file/controller.php
Executable file
70
include/SugarObjects/templates/file/controller.php
Executable file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/upload_file.php');
|
||||
require_once('include/formbase.php');
|
||||
class FileController extends SugarController{
|
||||
|
||||
function action_save(){
|
||||
$move=false;
|
||||
$file = new File();
|
||||
$file = populateFromPost('', $file);
|
||||
$upload_file = new UploadFile('uploadfile');
|
||||
$return_id ='';
|
||||
if (isset($_FILES['uploadfile']) && $upload_file->confirm_upload())
|
||||
{
|
||||
$file->filename = $upload_file->get_stored_file_name();
|
||||
$file->file_mime_type = $upload_file->mime_type;
|
||||
$file->file_ext = $upload_file->file_ext;
|
||||
$move=true;
|
||||
}
|
||||
$return_id = $file->save();
|
||||
if ($move) {
|
||||
$upload_file->final_move($file->id);
|
||||
}
|
||||
handleRedirect($return_id, $this->object_name);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
71
include/SugarObjects/templates/file/language/application/en_us.lang.php
Executable file
71
include/SugarObjects/templates/file/language/application/en_us.lang.php
Executable file
@@ -0,0 +1,71 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$app_list_strings = array (
|
||||
strtolower($object_name).'_category_dom' =>
|
||||
array (
|
||||
'' => '',
|
||||
'Marketing' => 'Marketing',
|
||||
'Knowledege Base' => 'Knowledge Base',
|
||||
'Sales' => 'Sales',
|
||||
),
|
||||
|
||||
strtolower($object_name).'_subcategory_dom' =>
|
||||
array (
|
||||
'' => '',
|
||||
'Marketing Collateral' => 'Marketing Collateral',
|
||||
'Product Brochures' => 'Product Brochures',
|
||||
'FAQ' => 'FAQ',
|
||||
),
|
||||
|
||||
strtolower($object_name).'_status_dom' =>
|
||||
array (
|
||||
'Active' => 'Active',
|
||||
'Draft' => 'Draft',
|
||||
'FAQ' => 'FAQ',
|
||||
'Expired' => 'Expired',
|
||||
'Under Review' => 'Under Review',
|
||||
'Pending' => 'Pending',
|
||||
),
|
||||
);
|
||||
?>
|
||||
121
include/SugarObjects/templates/file/language/en_us.lang.php
Executable file
121
include/SugarObjects/templates/file/language/en_us.lang.php
Executable file
@@ -0,0 +1,121 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
//module
|
||||
'LBL_MODULE_NAME' => 'Documents',
|
||||
'LBL_MODULE_TITLE' => 'Documents: Home',
|
||||
'LNK_NEW_DOCUMENT' => 'Create Document',
|
||||
'LNK_DOCUMENT_LIST'=> 'Documents List',
|
||||
'LBL_SEARCH_FORM_TITLE'=> 'Document Search',
|
||||
//vardef labels
|
||||
'LBL_DOCUMENT_ID' => 'Document ID',
|
||||
'LBL_NAME' => 'Document Name',
|
||||
'LBL_DESCRIPTION' => 'Description',
|
||||
'LBL_CATEGORY' => 'Category',
|
||||
'LBL_SUBCATEGORY' => 'Sub Category',
|
||||
'LBL_STATUS' => 'Status',
|
||||
'LBL_IS_TEMPLATE'=>'Is a Template',
|
||||
'LBL_TEMPLATE_TYPE'=>'Document Type',
|
||||
'LBL_REVISION_NAME' => 'Revision Number',
|
||||
'LBL_MIME' => 'Mime Type',
|
||||
'LBL_REVISION' => 'Revision',
|
||||
'LBL_DOCUMENT' => 'Related Document',
|
||||
'LBL_LATEST_REVISION' => 'Latest Revision',
|
||||
'LBL_CHANGE_LOG'=> 'Change Log',
|
||||
'LBL_ACTIVE_DATE'=> 'Publish Date',
|
||||
'LBL_EXPIRATION_DATE' => 'Expiration Date',
|
||||
'LBL_FILE_EXTENSION' => 'File Extension',
|
||||
|
||||
'LBL_CAT_OR_SUBCAT_UNSPEC'=>'Unspecified',
|
||||
//quick search
|
||||
'LBL_NEW_FORM_TITLE' => 'New Document',
|
||||
//document edit and detail view
|
||||
'LBL_DOC_NAME' => 'Document Name:',
|
||||
'LBL_FILENAME' => 'File Name:',
|
||||
'LBL_DOC_VERSION' => 'Revision:',
|
||||
'LBL_CATEGORY_VALUE' => 'Category:',
|
||||
'LBL_SUBCATEGORY_VALUE'=> 'Sub Category:',
|
||||
'LBL_DOC_STATUS'=> 'Status:',
|
||||
'LBL_DET_TEMPLATE_TYPE'=>'Document Type:',
|
||||
'LBL_DOC_DESCRIPTION'=>'Description:',
|
||||
'LBL_DOC_ACTIVE_DATE'=> 'Publish Date:',
|
||||
'LBL_DOC_EXP_DATE'=> 'Expiration Date:',
|
||||
|
||||
//document list view.
|
||||
'LBL_LIST_FORM_TITLE' => 'Document List',
|
||||
'LBL_LIST_DOCUMENT' => 'Document',
|
||||
'LBL_LIST_CATEGORY' => 'Category',
|
||||
'LBL_LIST_SUBCATEGORY' => 'Sub Category',
|
||||
'LBL_LIST_REVISION' => 'Revision',
|
||||
'LBL_LIST_LAST_REV_CREATOR' => 'Published By',
|
||||
'LBL_LIST_LAST_REV_DATE' => 'Revision Date',
|
||||
'LBL_LIST_VIEW_DOCUMENT'=>'View',
|
||||
'LBL_LIST_DOWNLOAD'=> 'Download',
|
||||
'LBL_LIST_ACTIVE_DATE' => 'Publish Date',
|
||||
'LBL_LIST_EXP_DATE' => 'Expiration Date',
|
||||
'LBL_LIST_STATUS'=>'Status',
|
||||
|
||||
//document search form.
|
||||
'LBL_SF_DOCUMENT' => 'Document Name:',
|
||||
'LBL_SF_CATEGORY' => 'Category:',
|
||||
'LBL_SF_SUBCATEGORY'=> 'Sub Category:',
|
||||
'LBL_SF_ACTIVE_DATE' => 'Publish Date:',
|
||||
'LBL_SF_EXP_DATE'=> 'Expiration Date:',
|
||||
|
||||
'DEF_CREATE_LOG' => 'Document Created',
|
||||
|
||||
//error messages
|
||||
'ERR_DOC_NAME'=>'Document Name',
|
||||
'ERR_DOC_ACTIVE_DATE'=>'Publish Date',
|
||||
'ERR_DOC_EXP_DATE'=> 'Expiration Date',
|
||||
'ERR_FILENAME'=> 'File Name',
|
||||
|
||||
'LBL_TREE_TITLE' => 'Documents',
|
||||
//sub-panel vardefs.
|
||||
'LBL_LIST_DOCUMENT_NAME'=>'Document Name',
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
56
include/SugarObjects/templates/file/metadata/SearchFields.php
Executable file
56
include/SugarObjects/templates/file/metadata/SearchFields.php
Executable file
@@ -0,0 +1,56 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$searchFields['<module_name>'] =
|
||||
array (
|
||||
'document_name' => array( 'query_type'=>'default'),
|
||||
'category_id'=> array('query_type'=>'default', 'options' => 'document_category_dom', 'template_var' => 'CATEGORY_OPTIONS'),
|
||||
'subcategory_id'=> array('query_type'=>'default', 'options' => 'document_subcategory_dom', 'template_var' => 'SUBCATEGORY_OPTIONS'),
|
||||
'active_date'=> array('query_type'=>'default'),
|
||||
'exp_date'=> array('query_type'=>'default'),
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
|
||||
|
||||
59
include/SugarObjects/templates/file/metadata/dashletviewdefs.php
Executable file
59
include/SugarObjects/templates/file/metadata/dashletviewdefs.php
Executable file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
global $current_user;
|
||||
|
||||
$dashletData['<module_name>Dashlet']['searchFields'] = array('date_entered' => array('default' => ''),
|
||||
'date_modified' => array('default' => ''),
|
||||
'assigned_user_id' => array('type' => 'assigned_user_name',
|
||||
'default' => $current_user->name));
|
||||
$dashletData['<module_name>Dashlet']['columns'] = array( 'document_name' => array('width' => '40',
|
||||
'label' => 'LBL_NAME',
|
||||
'link' => true,
|
||||
'default' => true),
|
||||
'date_entered' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_ENTERED',
|
||||
'default' => true),
|
||||
'date_modified' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_MODIFIED'),
|
||||
'created_by' => array('width' => '8',
|
||||
'label' => 'LBL_CREATED'),
|
||||
'assigned_user_name' => array('width' => '8',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER'),
|
||||
);
|
||||
99
include/SugarObjects/templates/file/metadata/detailviewdefs.php
Executable file
99
include/SugarObjects/templates/file/metadata/detailviewdefs.php
Executable file
@@ -0,0 +1,99 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$module_name = '<module_name>';
|
||||
$_object_name = '<_object_name>';
|
||||
$viewdefs[$module_name]['DetailView'] = array(
|
||||
'templateMeta' => array('maxColumns' => '2',
|
||||
'form' => array(),
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30')
|
||||
),
|
||||
),
|
||||
'panels' =>array (
|
||||
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'document_name',
|
||||
'label' => 'LBL_DOC_NAME',
|
||||
),
|
||||
array (
|
||||
'name' => 'uploadfile',
|
||||
'displayParams' => array('link'=>'uploadfile', 'id'=>'id'),
|
||||
),
|
||||
|
||||
|
||||
),
|
||||
array (
|
||||
'category_id',
|
||||
'subcategory_id',
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
'status',
|
||||
|
||||
),
|
||||
array (
|
||||
'active_date',
|
||||
'exp_date',
|
||||
),
|
||||
|
||||
array (
|
||||
array('name'=>'assigned_user_name', 'label'=>'LBL_ASSIGNED_TO'),
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'description',
|
||||
'label' => 'LBL_DOC_DESCRIPTION',
|
||||
),
|
||||
),
|
||||
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
105
include/SugarObjects/templates/file/metadata/editviewdefs.php
Executable file
105
include/SugarObjects/templates/file/metadata/editviewdefs.php
Executable file
@@ -0,0 +1,105 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$module_name = '<module_name>';
|
||||
|
||||
$viewdefs[$module_name]['EditView'] = array(
|
||||
'templateMeta' => array('form' => array('enctype'=>'multipart/form-data',
|
||||
'hidden'=>array()),
|
||||
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30')
|
||||
),
|
||||
'javascript' =>
|
||||
'<script type="text/javascript" src="include/javascript/popup_parent_helper.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/jsolait/init.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/jsolait/lib/urllib.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/javascript/jsclass_base.js"></script>
|
||||
<script type="text/javascript" src="include/javascript/jsclass_async.js"></script>
|
||||
<script type="text/javascript" src="modules/Documents/documents.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>',
|
||||
),
|
||||
'panels' =>array (
|
||||
'default' =>
|
||||
array (
|
||||
|
||||
array (
|
||||
'document_name',
|
||||
array('name'=>'uploadfile',
|
||||
'customCode' => '{if $fields.id.value!=""}
|
||||
{assign var="type" value="hidden"}
|
||||
{else}
|
||||
{assign var="type" value="file"}
|
||||
{/if}
|
||||
<input name="uploadfile" type = {$type} size="30" maxlength="" onchange="setvalue(this);" value="{$fields.filename.value}">{$fields.filename.value}',
|
||||
'displayParams'=>array('required'=>true),
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
array (
|
||||
'category_id',
|
||||
'subcategory_id',
|
||||
),
|
||||
|
||||
array (
|
||||
'assigned_user_name',
|
||||
),
|
||||
|
||||
array (
|
||||
'active_date',
|
||||
'exp_date',
|
||||
),
|
||||
|
||||
array('status_id'),
|
||||
array (
|
||||
|
||||
array('name'=>'description'),
|
||||
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
85
include/SugarObjects/templates/file/metadata/listviewdefs.php
Executable file
85
include/SugarObjects/templates/file/metadata/listviewdefs.php
Executable 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".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$module_name = '<module_name>';
|
||||
$OBJECT_NAME = '<OBJECT_NAME>';
|
||||
$listViewDefs[$module_name] = array(
|
||||
|
||||
'DOCUMENT_NAME' => array(
|
||||
'width' => '40',
|
||||
'label' => 'LBL_NAME',
|
||||
'link' => true,
|
||||
'default' => true),
|
||||
'MODIFIED_BY_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_MODIFIED_USER',
|
||||
'module' => 'Users',
|
||||
'id' => 'USERS_ID',
|
||||
'default' => false,
|
||||
'sortable' => false,
|
||||
'related_fields' => array('modified_user_id')),
|
||||
'CATEGORY_ID' => array(
|
||||
'width' => '40',
|
||||
'label' => 'LBL_LIST_CATEGORY',
|
||||
'default' => true),
|
||||
'SUBCATEGORY_ID' => array(
|
||||
'width' => '40',
|
||||
'label' => 'LBL_LIST_SUBCATEGORY',
|
||||
'default' => true),
|
||||
'CREATED_BY_NAME' => array(
|
||||
'width' => '2',
|
||||
'label' => 'LBL_LIST_LAST_REV_CREATOR',
|
||||
'default' => true,
|
||||
'sortable' => false),
|
||||
|
||||
'ACTIVE_DATE' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_ACTIVE_DATE',
|
||||
'default' => true),
|
||||
'EXP_DATE' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_EXP_DATE',
|
||||
'default' => true),
|
||||
);
|
||||
?>
|
||||
|
||||
52
include/SugarObjects/templates/file/metadata/metafiles.php
Executable file
52
include/SugarObjects/templates/file/metadata/metafiles.php
Executable file
@@ -0,0 +1,52 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
$module_name = '<module_name>';
|
||||
$metafiles[$module_name] = array(
|
||||
'detailviewdefs' => 'modules/'.$module_name.'/metadata/detailviewdefs.php',
|
||||
'editviewdefs' => 'modules/'. $module_name. '/metadata/editviewdefs.php',
|
||||
'listviewdefs' => 'modules/'. $module_name. '/metadata/listviewdefs.php',
|
||||
'searchdefs' => 'modules/'. $module_name. '/metadata/searchdefs.php',
|
||||
'popupdefs' => 'modules/'. $module_name. '/metadata/popupdefs.php',
|
||||
'searchfields' => 'modules/'. $module_name. '/metadata/SearchFields.php',
|
||||
);
|
||||
?>
|
||||
95
include/SugarObjects/templates/file/metadata/quickcreatedefs.php
Executable file
95
include/SugarObjects/templates/file/metadata/quickcreatedefs.php
Executable file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-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".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$module_name = '<module_name>';
|
||||
|
||||
$viewdefs[$module_name]['QuickCreate'] = array(
|
||||
'templateMeta' => array('form' => array('enctype'=>'multipart/form-data',
|
||||
'hidden'=>array()),
|
||||
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30')
|
||||
),
|
||||
'javascript' =>
|
||||
'<script type="text/javascript" src="include/javascript/popup_parent_helper.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/jsolait/init.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/jsolait/lib/urllib.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/javascript/jsclass_base.js"></script>
|
||||
<script type="text/javascript" src="include/javascript/jsclass_async.js"></script>
|
||||
<script type="text/javascript" src="modules/Documents/documents.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>',
|
||||
),
|
||||
'panels' =>array (
|
||||
'default' =>
|
||||
array (
|
||||
array (
|
||||
'document_name',
|
||||
'assigned_user_name',
|
||||
),
|
||||
|
||||
array (
|
||||
array('name'=>'uploadfile',
|
||||
'customCode' => '{if $fields.id.value!=""}
|
||||
{assign var="type" value="hidden"}
|
||||
{else}
|
||||
{assign var="type" value="file"}
|
||||
{/if}
|
||||
<input name="uploadfile" type = {$type} size="30" maxlength="" onchange="setvalue(this);" value="{$fields.filename.value}">{$fields.filename.value}',
|
||||
'displayParams'=>array('required'=>true),
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
'category_id',
|
||||
'subcategory_id',
|
||||
),
|
||||
|
||||
array (
|
||||
array('name'=>'description', 'displayParams'=>array('rows'=>10, 'cols'=>120)),
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
64
include/SugarObjects/templates/file/metadata/searchdefs.php
Executable file
64
include/SugarObjects/templates/file/metadata/searchdefs.php
Executable file
@@ -0,0 +1,64 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$module_name='<module_name>';
|
||||
$searchdefs[$module_name] = array(
|
||||
'templateMeta' => array('maxColumns' => '3',
|
||||
'widths' => array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
'layout' => array(
|
||||
'basic_search' => array(
|
||||
'document_name',
|
||||
),
|
||||
'advanced_search' => array(
|
||||
'document_name',
|
||||
'category_id',
|
||||
'subcategory_id',
|
||||
'active_date',
|
||||
'exp_date',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
|
||||
|
||||
90
include/SugarObjects/templates/file/metadata/subpanels/default.php
Executable file
90
include/SugarObjects/templates/file/metadata/subpanels/default.php
Executable file
@@ -0,0 +1,90 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$module_name = '<module_name>';
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => $module_name,),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields'=> array(
|
||||
'object_image'=>array(
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
'image2'=>'attachment',
|
||||
'image2_url_field'=>array('id_field'=>'selected_revision_id','filename_field'=>'selected_revision_filename'),
|
||||
'attachment_image_only'=>true,
|
||||
|
||||
),
|
||||
'document_name'=> array(
|
||||
'name' => 'document_name',
|
||||
'vname' => 'LBL_LIST_DOCUMENT_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '45%',
|
||||
),
|
||||
|
||||
'active_date' =>
|
||||
array (
|
||||
'name' => 'active_date',
|
||||
'vname' => 'LBL_DOC_ACTIVE_DATE',
|
||||
'width' => '45%',
|
||||
),
|
||||
|
||||
'edit_button'=>array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => $module_name,
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => $module_name,
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
154
include/SugarObjects/templates/file/vardefs.php
Executable file
154
include/SugarObjects/templates/file/vardefs.php
Executable file
@@ -0,0 +1,154 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$vardefs=array(
|
||||
'fields' => array (
|
||||
|
||||
'document_name' =>
|
||||
array (
|
||||
'name' => 'document_name',
|
||||
'vname' => 'LBL_NAME',
|
||||
'type' => 'name',
|
||||
'dbType' => 'varchar',
|
||||
'len' => '255',
|
||||
'required'=>true
|
||||
),
|
||||
|
||||
'name'=>
|
||||
array(
|
||||
'name'=>'name',
|
||||
'source'=>'non-db',
|
||||
'type'=>'varchar'
|
||||
),
|
||||
|
||||
'filename' =>
|
||||
array (
|
||||
'name' => 'filename',
|
||||
'vname' => 'LBL_FILENAME',
|
||||
'type' => 'varchar',
|
||||
'required'=>true,
|
||||
'importable' => 'required',
|
||||
'len' => '255',
|
||||
),
|
||||
'file_ext' =>
|
||||
array (
|
||||
'name' => 'file_ext',
|
||||
'vname' => 'LBL_FILE_EXTENSION',
|
||||
'type' => 'varchar',
|
||||
'len' => '25',
|
||||
),
|
||||
'file_mime_type' =>
|
||||
array (
|
||||
'name' => 'file_mime_type',
|
||||
'vname' => 'LBL_MIME',
|
||||
'type' => 'varchar',
|
||||
'len' => '100',
|
||||
),
|
||||
|
||||
|
||||
'uploadfile' =>
|
||||
array (
|
||||
'name'=>'uploadfile',
|
||||
'vname' => 'LBL_FILENAME',
|
||||
'type' => 'file',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
|
||||
'active_date' =>
|
||||
array (
|
||||
'name' => 'active_date',
|
||||
'vname' => 'LBL_DOC_ACTIVE_DATE',
|
||||
'type' => 'date',
|
||||
'required'=>true,
|
||||
'importable' => 'required',
|
||||
),
|
||||
|
||||
'exp_date' =>
|
||||
array (
|
||||
'name' => 'exp_date',
|
||||
'vname' => 'LBL_DOC_EXP_DATE',
|
||||
'type' => 'date',
|
||||
),
|
||||
|
||||
'category_id' =>
|
||||
array (
|
||||
'name' => 'category_id',
|
||||
'vname' => 'LBL_SF_CATEGORY',
|
||||
'type' => 'enum',
|
||||
'len' => '25',
|
||||
'options' => 'document_category_dom',
|
||||
'reportable'=>false,
|
||||
),
|
||||
|
||||
'subcategory_id' =>
|
||||
array (
|
||||
'name' => 'subcategory_id',
|
||||
'vname' => 'LBL_SF_SUBCATEGORY',
|
||||
'type' => 'enum',
|
||||
'len' => '25',
|
||||
'options' => 'document_subcategory_dom',
|
||||
'reportable'=>false,
|
||||
),
|
||||
|
||||
'status_id' =>
|
||||
array (
|
||||
'name' => 'status_id',
|
||||
'vname' => 'LBL_DOC_STATUS',
|
||||
'type' => 'enum',
|
||||
'len' => '25',
|
||||
'options' => 'document_status_dom',
|
||||
'reportable'=>false,
|
||||
),
|
||||
|
||||
'status' =>
|
||||
array (
|
||||
'name' => 'status',
|
||||
'vname' => 'LBL_DOC_STATUS',
|
||||
'type' => 'varchar',
|
||||
'source' => 'non-db',
|
||||
'Comment' => 'Document status for Meta-Data framework',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
62
include/SugarObjects/templates/file/views/view.edit.php
Executable file
62
include/SugarObjects/templates/file/views/view.edit.php
Executable file
@@ -0,0 +1,62 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/MVC/View/views/view.edit.php');
|
||||
class <module_name>View extends ViewEdit{
|
||||
function <module_name>ViewEdit(){
|
||||
parent::ViewEdit();
|
||||
}
|
||||
function display(){
|
||||
if (isset($this->bean->id)) {
|
||||
$this->ss->assign("FILE_OR_HIDDEN", "hidden");
|
||||
if (empty($_REQUEST['isDuplicate']) || $_REQUEST['isDuplicate'] == 'false') {
|
||||
$this->ss->assign("DISABLED", "disabled");
|
||||
}
|
||||
} else {
|
||||
$this->ss->assign("FILE_OR_HIDDEN", "file");
|
||||
}
|
||||
parent::display();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user