96 lines
2.8 KiB
PHP
Executable File
96 lines
2.8 KiB
PHP
Executable File
<?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%',
|
|
),*/
|
|
),
|
|
);
|
|
|
|
?>
|