[Vtigercrm-developers] [vtiger-commits] r3859 -	/vtigercrm/trunk/modules/Products/EditView.php
    vtiger-commits at vtiger.fosslabs.com 
    vtiger-commits at vtiger.fosslabs.com
       
    Tue Feb 21 02:41:50 PST 2006
    
    
  
Author: richie
Date: Tue Feb 21 03:41:46 2006
New Revision: 3859
Log:
Added 2 if else block to separate Create New from Edit View.
Modified:
    vtigercrm/trunk/modules/Products/EditView.php
Modified: vtigercrm/trunk/modules/Products/EditView.php
==============================================================================
--- vtigercrm/trunk/modules/Products/EditView.php (original)
+++ vtigercrm/trunk/modules/Products/EditView.php Tue Feb 21 03:41:46 2006
@@ -79,8 +79,12 @@
 require_once($theme_path.'layout_utils.php');
 
 $disp_view = getView($focus->mode);
-$smarty->assign("BLOCKS",getBlocks("Products",$disp_view,$mode,$focus->column_fields));
-//echo '<pre>';print_r(getBlocks("Products",$disp_view,$mode,$focus->column_fields));echo '</pre>';
+if($disp_view == 'edit_view')
+	$smarty->assign("BLOCKS",getBlocks("Products",$disp_view,$mode,$focus->column_fields));
+else	
+{
+	$smarty->assign("BASBLOCKS",getBlocks("Products",$disp_view,$mode,$focus->column_fields,'BAS'));
+}
 $smarty->assign("OP_MODE",$disp_view);
 
 $smarty->assign("MODULE",$currentModule);
@@ -195,5 +199,8 @@
 $smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$fldDataType);
 $smarty->assign("VALIDATION_DATA_FIELDLABEL",$fieldLabel);
 
+if($focus->mode == 'edit')
 $smarty->display('salesEditView.tpl');
+else
+$smarty->display('CreateView.tpl');
 ?>
    
    
More information about the vtigercrm-developers
mailing list