[Vtigercrm-commits] [vtiger-commits] r9111 - in /vtigercrm/trunk/modules/Vendors: CallRelatedList.php DetailView.php Vendor.php updateRelations.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Aug 24 01:41:37 EDT 2006
Author: richie
Date: Wed Aug 23 23:41:16 2006
New Revision: 9111
Log:
Updated the single pane view feature for detailview in Vendors Module -- ahmed
Modified:
vtigercrm/trunk/modules/Vendors/CallRelatedList.php
vtigercrm/trunk/modules/Vendors/DetailView.php
vtigercrm/trunk/modules/Vendors/Vendor.php
vtigercrm/trunk/modules/Vendors/updateRelations.php
Modified: vtigercrm/trunk/modules/Vendors/CallRelatedList.php
==============================================================================
--- vtigercrm/trunk/modules/Vendors/CallRelatedList.php (original)
+++ vtigercrm/trunk/modules/Vendors/CallRelatedList.php Wed Aug 23 23:41:16 2006
@@ -51,8 +51,7 @@
if(isset($focus->name))
$smarty->assign("UPDATEINFO",updateInfo($focus->id));
$smarty->assign("NAME", $focus->name);
-$smarty->assign("id",$focus->id);
-$smarty->assign("ID",$RECORD );
+$smarty->assign("ID",$focus->id);
$smarty->assign("MODULE",$currentmodule);
$smarty->assign("SINGLE_MOD",$app_strings['Vendor']);
$smarty->assign("RELATEDLISTS", $related_array);
Modified: vtigercrm/trunk/modules/Vendors/DetailView.php
==============================================================================
--- vtigercrm/trunk/modules/Vendors/DetailView.php (original)
+++ vtigercrm/trunk/modules/Vendors/DetailView.php Wed Aug 23 23:41:16 2006
@@ -12,6 +12,7 @@
require_once('Smarty_setup.php');
require_once('modules/Vendors/Vendor.php');
require_once('include/utils/utils.php');
+require_once('user_privileges/default_module_view.php');
$focus = new Vendor();
@@ -27,7 +28,7 @@
$focus->id = "";
}
-global $app_strings,$mod_strings,$theme,$currentModule;
+global $app_strings,$mod_strings,$theme,$currentModule,$singlepane_view;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
@@ -69,6 +70,15 @@
$smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']);
$smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']);
$smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST[record]));
+
+if($singlepane_view == 'true')
+{
+ $related_array = getRelatedLists($currentModule,$focus);
+ $smarty->assign("RELATEDLISTS", $related_array);
+}
+
+$smarty->assign("SinglePane_View", $singlepane_view);
+
$smarty->display("Inventory/InventoryDetailView.tpl");
?>
Modified: vtigercrm/trunk/modules/Vendors/Vendor.php
==============================================================================
--- vtigercrm/trunk/modules/Vendors/Vendor.php (original)
+++ vtigercrm/trunk/modules/Vendors/Vendor.php Wed Aug 23 23:41:16 2006
@@ -16,6 +16,7 @@
require_once('data/CRMEntity.php');
require_once('include/utils/utils.php');
require_once('include/RelatedListView.php');
+require_once('user_privileges/default_module_view.php');
class Vendor extends CRMEntity {
var $log;
@@ -71,7 +72,7 @@
*/
function get_products($id)
{
- global $log;
+ global $log,$singlepane_view;
$log->debug("Entering get_products(".$id.") method ...");
global $app_strings;
require_once('modules/Products/Product.php');
@@ -79,7 +80,10 @@
$button = '';
- $returnset = '&return_module=Vendors&return_action=CallRelatedList&return_id='.$id;
+ if($singlepane_view == 'true')
+ $returnset = '&return_module=Vendors&return_action=DetailView&return_id='.$id;
+ else
+ $returnset = '&return_module=Vendors&return_action=CallRelatedList&return_id='.$id;
$query = 'select vtiger_products.productid, vtiger_products.productname, vtiger_products.productcode, vtiger_products.commissionrate, vtiger_products.qty_per_unit, vtiger_products.unit_price, vtiger_crmentity.crmid, vtiger_crmentity.smownerid,vtiger_vendor.vendorname from vtiger_products inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_products.productid left outer join vtiger_vendor on vtiger_vendor.vendorid = vtiger_products.vendor_id where vtiger_vendor.vendorid = '.$id.' and vtiger_crmentity.deleted = 0';
$log->debug("Exiting get_products method ...");
@@ -92,7 +96,7 @@
*/
function get_purchase_orders($id)
{
- global $log;
+ global $log,$singlepane_view;
$log->debug("Entering get_purchase_orders(".$id.") method ...");
global $app_strings;
require_once('modules/PurchaseOrder/PurchaseOrder.php');
@@ -100,7 +104,10 @@
$button = '';
- $returnset = '&return_module=Vendors&return_action=CallRelatedList&return_id='.$id;
+ if($singlepane_view == 'true')
+ $returnset = '&return_module=Vendors&return_action=DetailView&return_id='.$id;
+ else
+ $returnset = '&return_module=Vendors&return_action=CallRelatedList&return_id='.$id;
$query = "select vtiger_users.user_name,vtiger_groups.groupname,vtiger_crmentity.*, vtiger_purchaseorder.*,vtiger_vendor.vendorname from vtiger_purchaseorder inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_purchaseorder.purchaseorderid left outer join vtiger_vendor on vtiger_purchaseorder.vendorid=vtiger_vendor.vendorid left join vtiger_pogrouprelation on vtiger_purchaseorder.purchaseorderid=vtiger_pogrouprelation.purchaseorderid left join vtiger_groups on vtiger_groups.groupname=vtiger_pogrouprelation.groupname left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid where vtiger_crmentity.deleted=0 and vtiger_purchaseorder.vendorid=".$id;
$log->debug("Exiting get_purchase_orders method ...");
@@ -113,14 +120,17 @@
*/
function get_contacts($id)
{
- global $log;
+ global $log,$singlepane_view;
$log->debug("Entering get_contacts(".$id.") method ...");
global $app_strings;
require_once('modules/Contacts/Contact.php');
$focus = new Contact();
$button = '';
- $returnset = '&return_module=Vendors&return_action=CallRelatedList&return_id='.$id;
+ if($singlepane_view == 'true')
+ $returnset = '&return_module=Vendors&return_action=DetailView&return_id='.$id;
+ else
+ $returnset = '&return_module=Vendors&return_action=CallRelatedList&return_id='.$id;
$query = 'SELECT vtiger_users.user_name,vtiger_groups.groupname,vtiger_contactdetails.*, vtiger_crmentity.crmid, vtiger_crmentity.smownerid,vtiger_vendorcontactrel.vendorid from vtiger_contactdetails inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_contactdetails.contactid inner join vtiger_vendorcontactrel on vtiger_vendorcontactrel.contactid=vtiger_contactdetails.contactid left join vtiger_contactgrouprelation on vtiger_contactdetails.contactid=vtiger_contactgrouprelation.contactid left join vtiger_groups on vtiger_groups.groupname=vtiger_contactgrouprelation.groupname left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid where vtiger_crmentity.deleted=0 and vtiger_vendorcontactrel.vendorid = '.$id;
$log->debug("Exiting get_contacts method ...");
Modified: vtigercrm/trunk/modules/Vendors/updateRelations.php
==============================================================================
--- vtigercrm/trunk/modules/Vendors/updateRelations.php (original)
+++ vtigercrm/trunk/modules/Vendors/updateRelations.php Wed Aug 23 23:41:16 2006
@@ -10,7 +10,9 @@
********************************************************************************/
require_once('include/database/PearDatabase.php');
-global $adb;
+require_once('user_privileges/default_module_view.php');
+global $adb, $singlepane_view;
+
$idlist = $_REQUEST['idlist'];
if(isset($_REQUEST['idlist']) && $_REQUEST['idlist'] != '')
@@ -27,6 +29,9 @@
$adb->query($sql);
}
}
+ if($singlepane_view == 'true')
+ header("Location: index.php?action=DetailView&module=Vendors&record=".$_REQUEST["parentid"]);
+ else
header("Location: index.php?action=CallRelatedList&module=Vendors&record=".$_REQUEST["parentid"]);
}
@@ -37,7 +42,10 @@
$adb->query($sql);
$sql = "insert into vtiger_seproductsrel values (". $_REQUEST["parid"] .",".$_REQUEST["entityid"] .")";
$adb->query($sql);
- header("Location:index.php?action=CallRelatedList&module=Vendors&record=".$_REQUEST["parid"]);
+ if($singlepane_view == 'true')
+ header("Location: index.php?action=DetailView&module=Vendors&record=".$_REQUEST["parid"]);
+ else
+ header("Location:index.php?action=CallRelatedList&module=Vendors&record=".$_REQUEST["parid"]);
}
More information about the vtigercrm-commits
mailing list