[Vtigercrm-commits] [vtiger-commits] r6694 - in /vtigercrm/trunk: Smarty/templates/HomePage.tpl modules/Activities/OpenListView.php modules/Home/language/en_us.lang.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon May 29 09:36:37 EDT 2006


Author: don
Date: Mon May 29 07:36:28 2006
New Revision: 6694

Log:
Fixes #915

Modified:
    vtigercrm/trunk/Smarty/templates/HomePage.tpl
    vtigercrm/trunk/modules/Activities/OpenListView.php
    vtigercrm/trunk/modules/Home/language/en_us.lang.php

Modified: vtigercrm/trunk/Smarty/templates/HomePage.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/HomePage.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/HomePage.tpl Mon May 29 07:36:28 2006
@@ -114,40 +114,11 @@
 			</div>
 			{/if}	
 {/foreach}
-<div class="MatrixLayer" style="float:left;" id="SubMatrix_9">
-
-	  <table width="100%" border="0" cellpadding="5" cellspacing="0" class="small">
-          <tr style="cursor:move;">
-          <td align="left" style="border-bottom:1px solid #666666;"><b>{$MOD.LBL_LEADS_BY_SOURCE}</b></td>
-          <td align="right" style="border-bottom:1px solid #666666;"><img src="{$IMAGE_PATH}uparrow.gif" align="absmiddle" /></td>
-          </tr>
-          <tr>
-          <td colspan="2" align="center"><img src="cache/images/pie_2082672713_leadsource_96954858.png" width="200" height="170" align="absmiddle" /></td>
-          </tr>
-	<tr><td colspan="2" style="border-top:1px solid #666666;padding-right:30px;" align="right" >
-	{$MOD.LBL_TOTAL}<b>340</b>
-	</td></tr>                                
-        </table>
-</div>
-<div class="MatrixLayer" style="float:left;" id="SubMatrix_9">
-
-	  <table width="100%" border="0" cellpadding="5" cellspacing="0" class="small">
-          <tr style="cursor:move;">
-          <td align="left" style="border-bottom:1px solid #666666;"><b>{$MOD.LBL_LEADS_BY_STATUS}</b></td>
-          <td align="right" style="border-bottom:1px solid #666666;"><img src="{$IMAGE_PATH}uparrow.gif" align="absmiddle" /></td>
-          </tr>
-          <tr>
-          <td colspan="2" align="center"><img src="cache/images/hor_2082672713_leadstatus_96954858.png" width="200" height="170" align="absmiddle" /></td>
-          </tr>
-	<tr><td colspan="2" style="border-top:1px solid #666666;padding-right:30px;" align="right" >
-	{$MOD.LBL_TOTAL}<b>340</b>
-	</td></tr>                                
-        </table>
-</div>
 </div>
 </td>
 
 <td width="25%" valign="top" style="padding:5px;">
+	{if $ACTIVITIES.0.Entries.noofactivities > 0}	
 	<table width="100%" border="0" cellpadding="0" cellspacing="0">
 	<tr>
 	<td width="13" height="38"><img src="{$IMAGE_PATH}upcoming_left.gif" align="top"  /></td>
@@ -158,10 +129,9 @@
 	<td colspan="3" bgcolor="#FFFFCF" style="border-left:2px solid #A6A4A5;border-right:2px solid #A6A4A5;border-bottom:2px solid #A6A4A5;">
 	<table width="100%" border="0" cellpadding="5" cellspacing="0">
 	<tr>
-	<td width="75%" colspan="2"><b class="fontBold">{$MOD.LBL_UPCOMING_EVENTS}</b><br />{$ACTIVITIES.0.Entries.noofactivities} {$MOD.LBL_TODAYEVENT}</td>
+	<td width="75%" colspan="2"><b class="fontBold">{$MOD.LBL_UPCOMING_EVENTS}</b><br />{$ACTIVITIES.0.Entries.noofactivities} {$APP.Events} {$APP.LBL_FOR} {$ACTIVITIES.0.Title.0}</td>
 	<td width="25%" valign="top" align="right"><img src="{$IMAGE_PATH}up.gif" align="absmiddle" /></td>
 	</tr>
-	<tr><td colspan="3" height="10"></td></tr>															
 	{foreach item=entries from=$ACTIVITIES.0.Entries}
 	<tr>
 	<td align="right" width="15%">{$entries.IMAGE}</td>
@@ -173,6 +143,9 @@
 	</td>
 	</tr>
 	</table><br />
+	{/if}
+
+	{if $ACTIVITIES.1.Entries.noofactivities > 0}	
 	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="small">
 	<tr>
 	<td width="14" height="70" background="{$IMAGE_PATH}pending_left.gif" ></td>
@@ -201,6 +174,7 @@
 	</tr>
 	</table>
 	<br>
+	{/if}
     {if $TAGCLOUD_JS ne ''}
     <table width="100%" border=0>
     <tr><td>

Modified: vtigercrm/trunk/modules/Activities/OpenListView.php
==============================================================================
--- vtigercrm/trunk/modules/Activities/OpenListView.php (original)
+++ vtigercrm/trunk/modules/Activities/OpenListView.php Mon May 29 07:36:28 2006
@@ -20,7 +20,7 @@
  * Contributor(s): ______________________________________..
  ********************************************************************************/
 
-function getPendingActivities()
+function getPendingActivities($mode)
 {
 	global $log;
         $log->debug("Entering getPendingActivities() method ...");
@@ -74,14 +74,16 @@
 	{
 		$later = date("Y-m-d", strtotime("$today +1 day"));
 	}
-
-	if($activity_view != 'OverDue')
-	{
-		$list_query = " select crmentity.crmid,crmentity.smownerid,crmentity.setype, activity.*, contactdetails.lastname, contactdetails.firstname, contactdetails.contactid, account.accountid, account.accountname, recurringevents.recurringtype,recurringevents.recurringdate from activity inner join crmentity on crmentity.crmid=activity.activityid left join cntactivityrel on cntactivityrel.activityid= activity.activityid left join contactdetails on contactdetails.contactid= cntactivityrel.contactid left join seactivityrel on seactivityrel.activityid = activity.activityid left outer join account on account.accountid = contactdetails.accountid left outer join recurringevents on recurringevents.activityid=activity.activityid inner join salesmanactivityrel on salesmanactivityrel.activityid=activity.activityid WHERE crmentity.deleted=0 and (activity.activitytype = 'Meeting' or activity.activitytype='Call' or activity.activitytype='Task') AND ( activity.status is NULL OR activity.status != 'Completed' ) and ( activity.status is NULL OR activity.status != 'Deferred') and  (  activity.eventstatus is NULL OR  activity.eventstatus != 'Held') and (activity.eventstatus is NULL OR  activity.eventstatus != 'Not Held' ) AND (((date_start >= '$today' AND date_start < '$later') OR (date_start < '$today'))  OR (recurringevents.recurringdate between '$today' and '$later') ) AND crmentity.smownerid !=0 AND salesmanactivityrel.smid ='$current_user->id'";
+	$last_tendays = date("Y-m-d",strtotime("$today - 10 days"));
+	if($mode != 1)
+	{
+		//for upcoming avtivities
+		$list_query = " select crmentity.crmid,crmentity.smownerid,crmentity.setype, activity.*, contactdetails.lastname, contactdetails.firstname, contactdetails.contactid, account.accountid, account.accountname, recurringevents.recurringtype,recurringevents.recurringdate from activity inner join crmentity on crmentity.crmid=activity.activityid left join cntactivityrel on cntactivityrel.activityid= activity.activityid left join contactdetails on contactdetails.contactid= cntactivityrel.contactid left join seactivityrel on seactivityrel.activityid = activity.activityid left outer join account on account.accountid = contactdetails.accountid left outer join recurringevents on recurringevents.activityid=activity.activityid inner join salesmanactivityrel on salesmanactivityrel.activityid=activity.activityid WHERE crmentity.deleted=0 and (activity.activitytype = 'Meeting' or activity.activitytype='Call' or activity.activitytype='Task') AND ( activity.status is NULL OR activity.status != 'Completed' ) and ( activity.status is NULL OR activity.status != 'Deferred') and  (  activity.eventstatus is NULL OR  activity.eventstatus != 'Held') and (activity.eventstatus is NULL OR  activity.eventstatus != 'Not Held' ) AND (((date_start > '$today' AND date_start < '$later'))  OR (recurringevents.recurringdate between '$today' and '$later') ) AND crmentity.smownerid !=0 AND salesmanactivityrel.smid ='$current_user->id'";
 	}	
 	else
 	{
-		$list_query = " select crmentity.crmid,crmentity.smownerid,crmentity.setype, activity.*, contactdetails.lastname, contactdetails.firstname, contactdetails.contactid, account.accountid, account.accountname, recurringevents.recurringtype,recurringevents.recurringdate from activity inner join crmentity on crmentity.crmid=activity.activityid left join cntactivityrel on cntactivityrel.activityid= activity.activityid left join contactdetails on contactdetails.contactid= cntactivityrel.contactid left join seactivityrel on seactivityrel.activityid = activity.activityid left outer join account on account.accountid = contactdetails.accountid left outer join recurringevents on recurringevents.activityid=activity.activityid inner join salesmanactivityrel on salesmanactivityrel.activityid=activity.activityid WHERE crmentity.deleted=0 and (activity.activitytype = 'Meeting' or activity.activitytype='Call' or activity.activitytype='Task') AND ( activity.status is NULL OR activity.status != 'Completed' ) and ( activity.status is NULL OR activity.status != 'Deferred') and (  activity.eventstatus is NULL OR  activity.eventstatus != 'Held') and (activity.eventstatus is NULL OR  activity.eventstatus != 'Not Held' ) AND (due_date < '$today') OR (recurringevents.recurringdate < '$today') AND crmentity.smownerid !=0 AND salesmanactivityrel.smid ='$current_user->id'";
+		//for pending activities for the last 10 days
+		$list_query = " select crmentity.crmid,crmentity.smownerid,crmentity.setype, activity.*, contactdetails.lastname, contactdetails.firstname, contactdetails.contactid, account.accountid, account.accountname, recurringevents.recurringtype,recurringevents.recurringdate from activity inner join crmentity on crmentity.crmid=activity.activityid left join cntactivityrel on cntactivityrel.activityid= activity.activityid left join contactdetails on contactdetails.contactid= cntactivityrel.contactid left join seactivityrel on seactivityrel.activityid = activity.activityid left outer join account on account.accountid = contactdetails.accountid left outer join recurringevents on recurringevents.activityid=activity.activityid inner join salesmanactivityrel on salesmanactivityrel.activityid=activity.activityid WHERE crmentity.deleted=0 and (activity.activitytype = 'Meeting' or activity.activitytype='Call' or activity.activitytype='Task') AND ( activity.status is NULL OR activity.status != 'Completed' ) and ( activity.status is NULL OR activity.status != 'Deferred') and (  activity.eventstatus is NULL OR  activity.eventstatus != 'Held') and (activity.eventstatus is NULL OR  activity.eventstatus != 'Not Held' ) AND (due_date > '$last_tendays' AND due_date <= '$today') OR (recurringevents.recurringdate > '$last_tendays' AND recurringevents.recurringdate <= '$today') AND crmentity.smownerid !=0 AND salesmanactivityrel.smid ='$current_user->id'";
 	}
 	$res = $adb->query($list_query);
 	$noofrecords = $adb->num_rows($res);
@@ -114,8 +116,8 @@
 	$later_day = getDisplayDate(date("Y-m-d", strtotime("$later -1 day ")));
 	
 	$title=array();
+	$title[]=$activity_view;
 	$title[]='myUpcoPendAct.gif';
-	$title[]=$current_module_strings["LBL_UPCOMING"];
 	//.'('.$current_module_strings["LBL_TODAY"].' '.$later_day.')';
 	$title[]='home_myact';
 	$title[]=getActivityView($activity_view);
@@ -262,10 +264,6 @@
 	{
 		$selected4 = 'selected';
 	}
-	else if($activity_view == 'OverDue')	
-	{
-		$selected5 = 'selected';
-	}
 
 	//constructing the combo values for activities
 	$ACTIVITY_VIEW_SELECT_OPTION = '<select class=small name="activity_view" onchange="showActivityView(this)">';
@@ -280,9 +278,6 @@
 	$ACTIVITY_VIEW_SELECT_OPTION .= '</option>';
 	$ACTIVITY_VIEW_SELECT_OPTION .= '<option value="This Year" '.$selected4.'>';
 	$ACTIVITY_VIEW_SELECT_OPTION .= 'This Year';
-	$ACTIVITY_VIEW_SELECT_OPTION .= '</option>';
-	$ACTIVITY_VIEW_SELECT_OPTION .= '<option value="OverDue" '.$selected5.'>';
-	$ACTIVITY_VIEW_SELECT_OPTION .= 'OverDue';
 	$ACTIVITY_VIEW_SELECT_OPTION .= '</option>';
 	$ACTIVITY_VIEW_SELECT_OPTION .= '</select>';
 	

Modified: vtigercrm/trunk/modules/Home/language/en_us.lang.php
==============================================================================
--- vtigercrm/trunk/modules/Home/language/en_us.lang.php (original)
+++ vtigercrm/trunk/modules/Home/language/en_us.lang.php Mon May 29 07:36:28 2006
@@ -45,7 +45,7 @@
 
 'LBL_UPCOMING_EVENTS'=>'Upcoming Events',
 'LBL_PENDING_EVENTS'=>'Pending Events',
-'LBL_TODAYEVENT'=>'Events for Today',
+'LBL_TODAYEVENT'=>'Events for Last Ten days',
 
 
 );





More information about the vtigercrm-commits mailing list