[Vtigercrm-commits] [vtiger-commits] r9944 - in /vtigercrm/branches/5.0.3/modules: Calendar/language/en_us.lang.php CustomView/EditView.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Dec 7 09:22:50 EST 2006
Author: richie
Date: Thu Dec 7 07:22:45 2006
New Revision: 9944
Log:
renamed task/event information in customview column header to calendar information
Modified:
vtigercrm/branches/5.0.3/modules/Calendar/language/en_us.lang.php
vtigercrm/branches/5.0.3/modules/CustomView/EditView.php
Modified: vtigercrm/branches/5.0.3/modules/Calendar/language/en_us.lang.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Calendar/language/en_us.lang.php (original)
+++ vtigercrm/branches/5.0.3/modules/Calendar/language/en_us.lang.php Thu Dec 7 07:22:45 2006
@@ -263,6 +263,7 @@
'LBL_NEW_FORM_TITLE'=>'New Activity',
'LBL_TASK_INFORMATION'=>'Task Information',
'LBL_EVENT_INFORMATION'=>'Event Information',
+'LBL_CALENDAR_INFORMATION'=>'Calendar Information',
'LBL_NAME'=>'Subject:',
'LBL_ACTIVITY_STRING'=>'There is an activity',
Modified: vtigercrm/branches/5.0.3/modules/CustomView/EditView.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/CustomView/EditView.php (original)
+++ vtigercrm/branches/5.0.3/modules/CustomView/EditView.php Thu Dec 7 07:22:45 2006
@@ -54,7 +54,7 @@
$log->info('CustomView :: Successfully got StandardFilter for the module'.$cv_module);
$stdfiltercolhtml = getStdFilterHTML($cv_module);
$stdfilterjs = $oCustomView->getCriteriaJS();
- $smarty->assign("MOD",$mod_strings);
+
//step4
$advfilterhtml = getAdvCriteriaHTML();
for($i=1;$i<10;$i++)
@@ -72,7 +72,7 @@
$smarty->assign("STDFILTERCRITERIA",$stdfilterhtml);
$smarty->assign("STDFILTER_JAVASCRIPT",$stdfilterjs);
- $smarty->assign("MANDATORYCHECK",implode(",",$oCustomView->mandatoryvalues));
+ $smarty->assign("MANDATORYCHECK",implode(",",array_unique($oCustomView->mandatoryvalues)));
$smarty->assign("SHOWVALUES",implode(",",$oCustomView->showvalues));
}
else
@@ -82,6 +82,7 @@
$customviewdtls = $oCustomView->getCustomViewByCvid($recordid);
$log->info('CustomView :: Successfully got ViewDetails for the Viewid'.$recordid);
$modulecollist = $oCustomView->getModuleColumnsList($cv_module);
+
$selectedcolumnslist = $oCustomView->getColumnsListByCvid($recordid);
$log->info('CustomView :: Successfully got ColumnsList for the Viewid'.$recordid);
@@ -128,7 +129,7 @@
$smarty->assign("STDFILTERCRITERIA",$stdfilterhtml);
$smarty->assign("STDFILTER_JAVASCRIPT",$stdfilterjs);
- $smarty->assign("MANDATORYCHECK",implode(",",$oCustomView->mandatoryvalues));
+ $smarty->assign("MANDATORYCHECK",implode(",",array_unique($oCustomView->mandatoryvalues)));
$smarty->assign("SHOWVALUES",implode(",",$oCustomView->showvalues));
$cactionhtml = "<input name='customaction' class='button' type='button' value='Create Custom Action' onclick=goto_CustomAction('".$cv_module."');>";
@@ -216,8 +217,9 @@
global $oCustomView;
global $app_list_strings;
$advfilter = array();
- $mod_strings = return_module_language($current_language,$module);
-
+ $mod_strings = return_specified_module_language($current_language,$module);
+
+ $check_dup = Array();
foreach($oCustomView->module_list[$module] as $key=>$value)
{
$advfilter = array();
@@ -226,37 +228,67 @@
{
foreach($columnslist[$module][$key] as $field=>$fieldlabel)
{
- if(isset($mod_strings[$fieldlabel]))
- {
- if($selected == $field)
+ if(!in_array($fieldlabel,$check_dup))
+ {
+ if(isset($mod_strings[$fieldlabel]))
{
- $advfilter_option['value'] = $field;
- $advfilter_option['text'] = $mod_strings[$fieldlabel];
- $advfilter_option['selected'] = "selected";
+ if($selected == $field)
+ {
+ $advfilter_option['value'] = $field;
+ $advfilter_option['text'] = $mod_strings[$fieldlabel];
+ $advfilter_option['selected'] = "selected";
+ }else
+ {
+ $advfilter_option['value'] = $field;
+ $advfilter_option['text'] = $mod_strings[$fieldlabel];
+ $advfilter_option['selected'] = "";
+ }
}else
{
- $advfilter_option['value'] = $field;
- $advfilter_option['text'] = $mod_strings[$fieldlabel];
- $advfilter_option['selected'] = "";
+ if($selected == $field)
+ {
+ $advfilter_option['value'] = $field;
+ $advfilter_option['text'] = $fieldlabel;
+ $advfilter_option['selected'] = "selected";
+ }else
+ {
+ $advfilter_option['value'] = $field;
+ $advfilter_option['text'] = $fieldlabel;
+ $advfilter_option['selected'] = "";
+ }
}
- }else
- {
- if($selected == $field)
- {
- $advfilter_option['value'] = $field;
- $advfilter_option['text'] = $fieldlabel;
- $advfilter_option['selected'] = "selected";
- }else
- {
- $advfilter_option['value'] = $field;
- $advfilter_option['text'] = $fieldlabel;
- $advfilter_option['selected'] = "";
- }
+ $advfilter[] = $advfilter_option;
+ $check_dup [] = $fieldlabel;
}
- $advfilter[] = $advfilter_option;
}
$advfilter_out[$label]= $advfilter;
}
+ }
+
+ $finalfield = Array();
+ foreach($advfilter_out as $header=>$value)
+ {
+ if($header == $mod_strings['LBL_TASK_INFORMATION'])
+ {
+ $newLabel = $mod_strings['LBL_CALENDAR_INFORMATION'];
+ $finalfield[$newLabel] = $advfilter_out[$header];
+
+ }
+ elseif($header == $mod_strings['LBL_EVENT_INFORMATION'])
+ {
+ $index = count($finalfield[$newLabel]);
+ foreach($value as $key=>$result)
+ {
+ $finalfield[$newLabel][$index]=$result;
+ $index++;
+ }
+ }
+ else
+ {
+ $finalfield = $advfilter_out;
+ }
+
+ $advfilter_out=$finalfield;
}
return $advfilter_out;
}
More information about the vtigercrm-commits
mailing list