init
This commit is contained in:
61
modules/EcmDocuments/metadata/SearchFields.php
Executable file
61
modules/EcmDocuments/metadata/SearchFields.php
Executable file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
$searchFields['EcmDocuments'] =
|
||||
array (
|
||||
'name' => array('query_type' => 'default'),
|
||||
'no' => array('query_type' => 'default'),
|
||||
'description' => array('query_type' => 'default'),
|
||||
'current_user_only'=> array('query_type' => 'default',
|
||||
'db_field' => array('assigned_user_id'),
|
||||
'my_items' => true
|
||||
),
|
||||
'assigned_user_id' => array('query_type' => 'default'),
|
||||
);
|
||||
?>
|
||||
81
modules/EcmDocuments/metadata/additionalDetails.php
Executable file
81
modules/EcmDocuments/metadata/additionalDetails.php
Executable file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/utils.php');
|
||||
|
||||
function additionalDetailsEcmDocument($fields) {
|
||||
static $mod_strings;
|
||||
global $app_strings;
|
||||
if(empty($mod_strings)) {
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, 'EcmDocuments');
|
||||
}
|
||||
|
||||
$overlib_string = '<div style="overflow:auto; height:100px; max-height:100px;">';
|
||||
|
||||
//BUILDER:START overlibstring
|
||||
if(!empty($fields['EKMT_DESCRIPTION'])){
|
||||
$overlib_string .= '<b>'. $mod_strings['LBL_EKMT_DESCRIPTION'] . '</b> <BR>' . $fields['EKMT_DESCRIPTION'];
|
||||
// if(strlen($fields['EKMT_DESCRIPTION']) > 300) $overlib_string .= '...';
|
||||
$overlib_string .= '<br>';
|
||||
}
|
||||
$overlib_string .= '</div>';
|
||||
|
||||
//BUILDER:END overlibstring
|
||||
|
||||
return array(
|
||||
'fieldToAddTo' => 'NAME',
|
||||
'string' => $overlib_string,
|
||||
'editLink' => "index.php?action=EditView&module=EcmDocuments&return_module=EcmDocuments&record={$fields['ID']}",
|
||||
'viewLink' => "index.php?action=DetailView&module=EcmDocuments&return_module=EcmDocuments&record={$fields['ID']}");
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
89
modules/EcmDocuments/metadata/listviewdefs.php
Executable file
89
modules/EcmDocuments/metadata/listviewdefs.php
Executable file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
require_once("modules/EcmDocuments/dirstree.php");
|
||||
|
||||
$listViewDefs['EcmDocuments'] = array(
|
||||
'NO' => array(
|
||||
'width' => '7',
|
||||
'default' => true,
|
||||
'customCode' => '<div id="no{$ID}"></div><script language="javascript">mintajaxget("modules/EcmDocuments/getlinkedpath.php?record={$ID}","no{$ID}");</script>',
|
||||
'label' => 'LBL_NO'),
|
||||
|
||||
'NAME' => array(
|
||||
'width' => '30',
|
||||
'customCode' => '<div id="name{$ID}"></div><script language="javascript">mintajaxget("modules/EcmDocuments/getlinkedpath.php?record={$ID}&names=1","name{$ID}");</script>',
|
||||
'label' => 'LBL_NAME',
|
||||
'link' => true,
|
||||
'default' => true),
|
||||
|
||||
'DESCRIPTION' => array(
|
||||
'width' => '10',
|
||||
//'default' => true,
|
||||
'label' => 'LBL_EKMT_DESCRIPTION'),
|
||||
|
||||
|
||||
'DATE_MODIFIED' => array(
|
||||
'width' => '5',
|
||||
'label' => 'LBL_DATE_MODIFIED'),
|
||||
'DATE_ENTERED' => array(
|
||||
'width' => '5',
|
||||
'label' => 'LBL_DATE_ENTERED'),
|
||||
'CREATED_BY_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_CREATED'),
|
||||
'ASSIGNED_USER_NAME' => array(
|
||||
'width' => '2',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER',
|
||||
'default' => true),
|
||||
'MODIFIED_USER_NAME' => array(
|
||||
'width' => '2',
|
||||
'label' => 'LBL_MODIFIED')
|
||||
);
|
||||
?>
|
||||
60
modules/EcmDocuments/metadata/popupdefs.php
Executable file
60
modules/EcmDocuments/metadata/popupdefs.php
Executable file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
$popupMeta = array(
|
||||
'moduleMain' => 'EcmDocument',
|
||||
'varName' => 'ECMDOCUMENT',
|
||||
'orderBy' => 'ecmdocuments.name',
|
||||
'whereClauses' => array(
|
||||
'name' => 'ecmdocuments.name',
|
||||
),
|
||||
'searchInputs' => array('name', 'name')
|
||||
);
|
||||
?>
|
||||
76
modules/EcmDocuments/metadata/studio.php
Executable file
76
modules/EcmDocuments/metadata/studio.php
Executable file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
$GLOBALS['studioDefs']['EcmDocuments'] = array(
|
||||
'LBL_DETAILVIEW'=>array(
|
||||
'template' => 'xtpl',
|
||||
'template_file' => 'modules/EcmDocuments/DetailView.html',
|
||||
'php_file' => 'modules/EcmDocuments/DetailView.php',
|
||||
'type' => 'DetailView',
|
||||
),
|
||||
'LBL_EDITVIEW'=>array(
|
||||
'template' => 'xtpl',
|
||||
'template_file' => 'modules/EcmDocuments/EditView.html',
|
||||
'php_file' => 'modules/EcmDocuments/EditView.php',
|
||||
'type' => 'EditView',
|
||||
),
|
||||
'LBL_LISTVIEW'=>array(
|
||||
'template' => 'listview',
|
||||
'meta_file' => 'modules/EcmDocuments/listviewdefs.php',
|
||||
'type' => 'ListView',
|
||||
),
|
||||
'LBL_SEARCHFORM'=>array(
|
||||
'template' => 'xtpl',
|
||||
'template_file' => 'modules/EcmDocuments/SearchForm.html',
|
||||
'php_file' => 'modules/EcmDocuments/ListView.php',
|
||||
'type' => 'SearchForm',
|
||||
),
|
||||
|
||||
);
|
||||
116
modules/EcmDocuments/metadata/subpaneldefs.php
Executable file
116
modules/EcmDocuments/metadata/subpaneldefs.php
Executable file
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/**
|
||||
|
||||
* Layout definition for Accounts
|
||||
|
||||
*
|
||||
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
|
||||
*
|
||||
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
|
||||
* details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
|
||||
* 02110-1301 USA.
|
||||
|
||||
*
|
||||
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
|
||||
*
|
||||
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
|
||||
*
|
||||
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
|
||||
* "Powered by SugarCRM".
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$layout_defs['EcmDocuments']['subpanel_setup'] = array (
|
||||
|
||||
|
||||
'accounts' => array (
|
||||
'order' => 15,
|
||||
'module' => 'Accounts',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'date_modified',
|
||||
'get_subpanel_data' => 'accounts',
|
||||
'add_subpanel_data' => 'account_id',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_ACCOUNTS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopSelectButton'),
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
),
|
||||
),
|
||||
|
||||
'contacts' => array (
|
||||
'order' => 15,
|
||||
'module' => 'Contacts',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'date_modified',
|
||||
'get_subpanel_data' => 'contacts',
|
||||
'add_subpanel_data' => 'account_id',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_CONTACTS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopSelectButton'),
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
),
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
95
modules/EcmDocuments/metadata/subpanels/default-ecmdocuments.php
Executable file
95
modules/EcmDocuments/metadata/subpanels/default-ecmdocuments.php
Executable file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*******************************************************************************
|
||||
* Subpanel Layout definition for SimpleModules
|
||||
*******************************************************************************/
|
||||
if($_SESSION['authenticated_user_id']!=1)
|
||||
{
|
||||
$wh=" and (";
|
||||
$z="select id from ecmdocuments where iddir='".$_REQUEST['record']."'";
|
||||
$w=mysql_query($z);
|
||||
$i=0;
|
||||
while($r=mysql_fetch_array($w))
|
||||
{
|
||||
$z1="select id from ecmdocuments_permissions where iddir='".$r['id']."' and userid='".$_SESSION['authenticated_user_id']."'";
|
||||
$w1=mysql_query($z1);
|
||||
$r1=mysql_fetch_array($w1);
|
||||
if($i==0)$or="";
|
||||
else $or=" or ";
|
||||
if(mysql_num_rows($w1)>0)
|
||||
{
|
||||
$wh.=$or."ecmdocuments.id='".$r['id']."'";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$wh.=")";
|
||||
}
|
||||
if($wh==" and ()")$wh="";
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
//array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
//array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'EcmDocuments'),
|
||||
),
|
||||
|
||||
'where' => 'isdir=1'.$wh,
|
||||
|
||||
'list_fields' => array(
|
||||
// 'simplemodule_number' =>array(
|
||||
// 'vname' => 'LBL_LIST_NUMBER',
|
||||
// 'width' => '5%',
|
||||
// ),
|
||||
'no'=>array(
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLinkEcmDocuments',
|
||||
'width' => '50%',
|
||||
'module' => 'EcmDocuments',
|
||||
),
|
||||
/*
|
||||
'path'=>array(
|
||||
'vname' => 'LBL_LIST_PATH',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '20%',
|
||||
'module' => 'EcmDocuments',
|
||||
),
|
||||
*/
|
||||
// 'status'=>array(
|
||||
// 'vname' => 'LBL_LIST_STATUS',
|
||||
// 'width' => '15%',
|
||||
// ),
|
||||
// 'type'=>array(
|
||||
// 'vname' => 'LBL_LIST_TYPE',
|
||||
// 'width' => '15%',
|
||||
// ),
|
||||
// 'priority'=>array(
|
||||
// 'vname' => 'LBL_LIST_PRIORITY',
|
||||
// 'width' => '11%',
|
||||
// ),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
),
|
||||
|
||||
'date_modified' => array (
|
||||
'name' => 'date_modified',
|
||||
'vname' => 'Date Modified',
|
||||
),
|
||||
'date_entered' => array (
|
||||
'name' => 'date_entered',
|
||||
'vname' => 'Date Created',
|
||||
),
|
||||
|
||||
/*
|
||||
'edit_button'=>array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'EcmDocuments',
|
||||
'width' => '4%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'EcmDocuments',
|
||||
'width' => '5%',
|
||||
),*/
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
72
modules/EcmDocuments/metadata/subpanels/default.php
Executable file
72
modules/EcmDocuments/metadata/subpanels/default.php
Executable file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*******************************************************************************
|
||||
* Subpanel Layout definition for SimpleModules
|
||||
*******************************************************************************/
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
//array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
//array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'EcmDocuments'),
|
||||
),
|
||||
|
||||
'where' => 'isdir=1',
|
||||
|
||||
'list_fields' => array(
|
||||
// 'simplemodule_number' =>array(
|
||||
// 'vname' => 'LBL_LIST_NUMBER',
|
||||
// 'width' => '5%',
|
||||
// ),
|
||||
'no'=>array(
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLinkEcmDocuments',
|
||||
'width' => '50%',
|
||||
'module' => 'EcmDocuments',
|
||||
),
|
||||
'path'=>array(
|
||||
'vname' => 'LBL_LIST_PATH',
|
||||
'widget_class' => 'SubPanelPathEcmDocuments',
|
||||
'width' => '20%',
|
||||
'module' => 'EcmDocuments',
|
||||
),
|
||||
// 'status'=>array(
|
||||
// 'vname' => 'LBL_LIST_STATUS',
|
||||
// 'width' => '15%',
|
||||
// ),
|
||||
// 'type'=>array(
|
||||
// 'vname' => 'LBL_LIST_TYPE',
|
||||
// 'width' => '15%',
|
||||
// ),
|
||||
// 'priority'=>array(
|
||||
// 'vname' => 'LBL_LIST_PRIORITY',
|
||||
// 'width' => '11%',
|
||||
// ),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
),
|
||||
/*
|
||||
'date_modified' => array (
|
||||
'name' => 'date_modified',
|
||||
'vname' => 'Date Modified',
|
||||
),
|
||||
'date_entered' => array (
|
||||
'name' => 'date_entered',
|
||||
'vname' => 'Date Created',
|
||||
),
|
||||
*/
|
||||
/*
|
||||
'edit_button'=>array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'EcmDocuments',
|
||||
'width' => '4%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'EcmDocuments',
|
||||
'width' => '5%',
|
||||
),*/
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user