[Vtigercrm-commits] [vtiger-commits] r10118 - in /vtigercrm/branches/5.0.3: include/RelatedListView.php include/language/en_us.lang.php include/utils/ListViewUtils.php modules/Calendar/Activity.php modules/Contacts/Contacts.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon Jan 29 10:27:35 EST 2007


Author: richie
Date: Mon Jan 29 08:27:26 2007
New Revision: 10118

Log:
Activity date and time added

Modified:
    vtigercrm/branches/5.0.3/include/RelatedListView.php
    vtigercrm/branches/5.0.3/include/language/en_us.lang.php
    vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php
    vtigercrm/branches/5.0.3/modules/Calendar/Activity.php
    vtigercrm/branches/5.0.3/modules/Contacts/Contacts.php

Modified: vtigercrm/branches/5.0.3/include/RelatedListView.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/RelatedListView.php (original)
+++ vtigercrm/branches/5.0.3/include/RelatedListView.php Mon Jan 29 08:27:26 2007
@@ -216,6 +216,7 @@
 		$module_rel = $module.'&relmodule='.$relatedmodule.'&record='.$id;
 		$navigationOutput[] = getRelatedTableHeaderNavigation($navigation_array, $url_qry,$module_rel);
 		$related_entries = array('header'=>$listview_header,'entries'=>$listview_entries,'navigation'=>$navigationOutput);
+
 		$log->debug("Exiting GetRelatedList method ...");
 		return $related_entries;
 	}
@@ -244,7 +245,6 @@
 			}
 		}
 	</script>';
-	echo $list;
 
 	$theme_path="themes/".$theme."/";
 	$image_path=$theme_path."images/";

Modified: vtigercrm/branches/5.0.3/include/language/en_us.lang.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/language/en_us.lang.php (original)
+++ vtigercrm/branches/5.0.3/include/language/en_us.lang.php Mon Jan 29 08:27:26 2007
@@ -471,7 +471,9 @@
 'Sales Order' => 'Sales Order',
 'COMBO_QUOTES' => 'Quotes',
 'End Date' => 'End Date',
+'End Date & Time' => 'End Date & Time',
 'Start Date' => 'Start Date',
+'Start Date & Time' => 'Start Date & Time',
 'Recurring Type' => 'Recurring Type',
 'SalesOrders' => 'Sales Order',
 'LBL_QUOTE_NAME' => 'Quote Name',
@@ -626,7 +628,9 @@
 'LBL_RENAME_PROFILE'=>'Rename Profile',
 'LBL_PROFILE_NAME'=>'Profile Name',
 'LBL_START_DATE'=>'Start Date',
+'LBL_START_DATE_TIME'=>'Start Date & Time',
 'LBL_END_DATE'=>'End Date',
+'LBL_END_DATE_TIME'=>'End Date & Time',
 'LBL_CREATE_MERGE_TEMPLATE'=>'Create Mail Merge templates ',
 'LBL_IMG_FORMATS'=>'(Only jpg, gif, bmp and png images)',
 );

Modified: vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php (original)
+++ vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php Mon Jan 29 08:27:26 2007
@@ -61,7 +61,6 @@
 			$focus->list_fields = $oCv->list_fields;
 		}
 	}
-
 	//Added to reduce the no. of queries logging for non-admin user -- by Minnie-start
 	$field_list ='(';
 	$j=0;
@@ -132,7 +131,7 @@
 				//Added on 14-12-2005 to avoid if and else check for every list vtiger_field for arrow image and change order
 				$change_sorder = array('ASC'=>'DESC','DESC'=>'ASC');
 				$arrow_gif = array('ASC'=>'arrow_down.gif','DESC'=>'arrow_up.gif');
-
+			
 				foreach($focus->list_fields[$name] as $tab=>$col)
 				{
 					if(in_array($col,$focus->sortby_fields))
@@ -178,7 +177,8 @@
 							$arrow = '';
 					}
 					else
-					{       if($app_strings[$name])
+					{
+					       if($app_strings[$name])
 						{
 							$name = $app_strings[$name];
 						}
@@ -1027,12 +1027,20 @@
 		{
 			$value = $temp_val;
 		}
+			
+	
 		//Added to get both start date & time
 		if(($tabid == 9 || $tabid == 16) && $uitype == 6 && $viewname != 'All')
 		{
 			$timestart = $adb->query_result($list_result,$list_result_count,'time_start');
-			$value = $value .'&nbsp;&nbsp;&nbsp;'.$timestart;
-		}
+			$value = $value .'&nbsp;&nbsp;&nbsp;'.$timestart;	
+		}
+		else if($viewname != 'All' && isset($focus->list_fields['End Date & Time']))
+		{
+			$timeend = $adb->query_result($list_result,$list_result_count,'time_end');
+                        $value = $value .'&nbsp;&nbsp;&nbsp;'.$timeend;
+		}
+		
 		
 	}
 	elseif($uitype == 71 || $uitype == 72)

Modified: vtigercrm/branches/5.0.3/modules/Calendar/Activity.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Calendar/Activity.php (original)
+++ vtigercrm/branches/5.0.3/modules/Calendar/Activity.php Mon Jan 29 08:27:26 2007
@@ -47,8 +47,8 @@
        'Type'=>Array('activity'=>'activitytype'),
        'Subject'=>Array('activity'=>'subject'),
        'Related to'=>Array('seactivityrel'=>'activityid'),
-       'Start Date'=>Array('activity'=>'date_start'),
-       'End Date'=>Array('activity'=>'due_date'),
+       'Start Date & Time'=>Array('activity'=>'date_start'),
+       'End Date & Time'=>Array('activity'=>'due_date'),
        'Recurring Type'=>Array('recurringevents'=>'recurringtype'),
        'Assigned To'=>Array('crmentity'=>'smownerid')
        );
@@ -76,8 +76,8 @@
        'Subject'=>'subject',
        'Contact Name'=>'lastname',
        'Related to'=>'activityid',
-       'Start Date'=>'date_start',
-       'End Date'=>'due_date',
+       'Start Date & Time'=>'date_start',
+       'End Date & Time'=>'due_date',
 	'Recurring Type'=>'recurringtype',	
        'Assigned To'=>'assigned_user_id');
 

Modified: vtigercrm/branches/5.0.3/modules/Contacts/Contacts.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Contacts/Contacts.php (original)
+++ vtigercrm/branches/5.0.3/modules/Contacts/Contacts.php Mon Jan 29 08:27:26 2007
@@ -383,7 +383,7 @@
 
 		$log->info("Activity Related List for Contact Displayed");
 
-		$query = "SELECT case when (vtiger_users.user_name not like '') then vtiger_users.user_name else vtiger_groups.groupname end as user_name,vtiger_contactdetails.lastname, vtiger_contactdetails.firstname,  vtiger_activity.activityid , vtiger_activity.subject, vtiger_activity.activitytype, vtiger_activity.date_start, vtiger_activity.due_date, vtiger_cntactivityrel.contactid, vtiger_crmentity.crmid, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime, vtiger_recurringevents.recurringtype  from vtiger_contactdetails inner join vtiger_cntactivityrel on vtiger_cntactivityrel.contactid = vtiger_contactdetails.contactid inner join vtiger_activity on vtiger_cntactivityrel.activityid=vtiger_activity.activityid inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_cntactivityrel.activityid left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid left outer join vtiger_recurringevents on vtiger_recurringevents.activityid=vtiger_activity.activityid left join vtiger_activitygrouprelation on vtiger_activitygrouprelation.activityid=vtiger_crmentity.crmid left join vtiger_groups on vtiger_groups.groupname=vtiger_activitygrouprelation.groupname  where vtiger_contactdetails.contactid=".$id." and vtiger_crmentity.deleted = 0 and (vtiger_activity.activitytype = 'Meeting' or vtiger_activity.activitytype='Call' or vtiger_activity.activitytype='Task') AND ( vtiger_activity.status is NULL OR vtiger_activity.status != 'Completed' ) and ( vtiger_activity.eventstatus is NULL OR vtiger_activity.eventstatus != 'Held') ";  //recurring type is added in Query -Jaguar
+		$query = "SELECT case when (vtiger_users.user_name not like '') then vtiger_users.user_name else vtiger_groups.groupname end as user_name,vtiger_contactdetails.lastname, vtiger_contactdetails.firstname,  vtiger_activity.activityid , vtiger_activity.subject, vtiger_activity.activitytype, vtiger_activity.date_start, vtiger_activity.due_date,vtiger_activity.time_start,vtiger_activity.time_end, vtiger_cntactivityrel.contactid, vtiger_crmentity.crmid, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime, vtiger_recurringevents.recurringtype  from vtiger_contactdetails inner join vtiger_cntactivityrel on vtiger_cntactivityrel.contactid = vtiger_contactdetails.contactid inner join vtiger_activity on vtiger_cntactivityrel.activityid=vtiger_activity.activityid inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_cntactivityrel.activityid left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid left outer join vtiger_recurringevents on vtiger_recurringevents.activityid=vtiger_activity.activityid left join vtiger_activitygrouprelation on vtiger_activitygrouprelation.activityid=vtiger_crmentity.crmid left join vtiger_groups on vtiger_groups.groupname=vtiger_activitygrouprelation.groupname  where vtiger_contactdetails.contactid=".$id." and vtiger_crmentity.deleted = 0 and (vtiger_activity.activitytype = 'Meeting' or vtiger_activity.activitytype='Call' or vtiger_activity.activitytype='Task') AND ( vtiger_activity.status is NULL OR vtiger_activity.status != 'Completed' ) and ( vtiger_activity.eventstatus is NULL OR vtiger_activity.eventstatus != 'Held') ";  //recurring type is added in Query -Jaguar
 		$log->debug("Exiting get_activities method ...");
 		return GetRelatedList('Contacts','Calendar',$focus,$query,$button,$returnset);
 





More information about the vtigercrm-commits mailing list