[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6497] Property: calculate correct number of pending
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6497] Property: calculate correct number of pending task on homepage |
Date: |
Tue, 19 Oct 2010 08:37:26 +0000 |
Revision: 6497
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6497
Author: sigurdne
Date: 2010-10-19 08:37:26 +0000 (Tue, 19 Oct 2010)
Log Message:
-----------
Property: calculate correct number of pending task on homepage
Modified Paths:
--------------
trunk/property/inc/hook_home.inc.php
Modified: trunk/property/inc/hook_home.inc.php
===================================================================
--- trunk/property/inc/hook_home.inc.php 2010-10-18 17:05:43 UTC (rev
6496)
+++ trunk/property/inc/hook_home.inc.php 2010-10-19 08:37:26 UTC (rev
6497)
@@ -317,25 +317,25 @@
}
$status = array();
- $status['X'] = array
- (
- 'name' =>
lang('closed'),
- );
- $status['O'] = array
- (
- 'name' => lang('open'),
- );
+ $status['X'] = array
+ (
+ 'name' =>
lang('closed'),
+ );
+ $status['O'] = array
+ (
+ 'name' => lang('open'),
+ );
- $custom_status =
execMethod('property.botts.get_custom_status');
-
- foreach($custom_status as $custom)
- {
- $status["C{$custom['id']}"] = array
- (
- 'status'
=> $custom['name'],
- );
- }
+ $custom_status =
execMethod('property.botts.get_custom_status');
+ foreach($custom_status as $custom)
+ {
+ $status["C{$custom['id']}"] = array
+ (
+ 'status'
=> $custom['name'],
+ );
+ }
+
$category_name = array(); // caching
$portalbox->data = array();
@@ -659,7 +659,8 @@
if ( isset($prefs['property']['mainscreen_showapprovals'])
&& $prefs['property']['mainscreen_showapprovals'] == 'yes' )
{
- $title =
isset($prefs['property']['mainscreen_showapprovals_title']) &&
$prefs['property']['mainscreen_showapprovals_title']?
"{$prefs['property']['mainscreen_showapprovals_title']} ({$total_records})" :
lang('approvals') . " ({$total_records})";
+ $total_records = 0;
+ $title = 'dummy';
//TODO Make listbox css compliant
$portalbox = CreateObject('phpgwapi.listbox', array
(
@@ -715,6 +716,7 @@
'text' => 'Prosjekt venter på godkjenning: ' .
$entry['item_id'],
'link' => $entry['url']
);
+ $total_records++;
}
// echo "\n".'<!-- BEGIN approval info
-->'."\n".$portalbox->draw()."\n".'<!-- END approval info -->'."\n";
@@ -741,6 +743,7 @@
'text' => 'Ordre venter på godkjenning: ' .
$entry['item_id'],
'link' => $entry['url']
);
+ $total_records++;
}
$action_params = array
@@ -765,7 +768,12 @@
'text' => 'Melding venter på godkjenning: ' .
$entry['item_id'],
'link' => $entry['url']
);
+ $total_records++;
}
+ //Hack
+ $title =
isset($prefs['property']['mainscreen_showapprovals_title']) &&
$prefs['property']['mainscreen_showapprovals_title']?
"{$prefs['property']['mainscreen_showapprovals_title']} ({$total_records})" :
lang('approvals') . " ({$total_records})";
+ $portalbox->setvar('title', $title);
+ $portalbox->start_template();
echo "\n".'<!-- BEGIN approval info
-->'."\n".$portalbox->draw()."\n".'<!-- END approval info -->'."\n";
unset($portalbox);
@@ -775,7 +783,8 @@
if ( isset($prefs['property']['mainscreen_showvendor_reminder'])
&& $prefs['property']['mainscreen_showvendor_reminder'] ==
'yes' )
{
- $title =
isset($prefs['property']['mainscreen_showvendor_reminder_title']) &&
$prefs['property']['mainscreen_showvendor_reminder_title']?
"{$prefs['property']['mainscreen_showvendor_reminder_title']}
({$total_records})" : lang('vendor reminder') . " ({$total_records})";
+ $total_records = 0;
+ $title = 'dummy';
//TODO Make listbox css compliant
$portalbox = CreateObject('phpgwapi.listbox', array
(
@@ -836,8 +845,13 @@
'text' => "påminning nr {$entry['reminder']}
til leverandør {$vendor_name}- ordre nr: {$entry['item_id']}",
'link' => $entry['url']
);
+ $total_records++;
}
+ $title =
isset($prefs['property']['mainscreen_showvendor_reminder_title']) &&
$prefs['property']['mainscreen_showvendor_reminder_title']?
"{$prefs['property']['mainscreen_showvendor_reminder_title']}
({$total_records})" : lang('vendor reminder') . " ({$total_records})";
+ $portalbox->setvar('title', $title);
+ $portalbox->start_template();
+
echo "\n".'<!-- BEGIN reminder info
-->'."\n".$portalbox->draw()."\n".'<!-- END reminder info -->'."\n";
unset($pending_reminder);
unset($portalbox);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6497] Property: calculate correct number of pending task on homepage,
Sigurd Nes <=