[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] [20956] improvement: Some work on dashboard
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] [20956] improvement: Some work on dashboard |
Date: |
Wed, 13 Jan 2010 19:11:38 +0000 |
Revision: 20956
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=20956
Author: sigurdne
Date: 2010-01-13 19:11:38 +0000 (Wed, 13 Jan 2010)
Log Message:
-----------
improvement: Some work on dashboard
Modified Paths:
--------------
people/sigurdne/modules/property/trunk/inc/hook_home.inc.php
people/sigurdne/modules/property/trunk/inc/hook_settings.inc.php
Modified: people/sigurdne/modules/property/trunk/inc/hook_home.inc.php
===================================================================
--- people/sigurdne/modules/property/trunk/inc/hook_home.inc.php
2010-01-13 19:09:35 UTC (rev 20955)
+++ people/sigurdne/modules/property/trunk/inc/hook_home.inc.php
2010-01-13 19:11:38 UTC (rev 20956)
@@ -95,9 +95,15 @@
}
$location =
execMethod('property.bolocation.read_single', array('location_code' =>
$ticket['location_code'], 'extra' => array('view' => true)));
+
+ $group = '';
+ if($ticket['group_id'])
+ {
+ $group = '[' .
$GLOBALS['phpgw']->accounts->get($ticket['group_id'])->__toString() . ']';
+ }
$portalbox->data[] = array
(
- 'text' => "{$location['loc1_name']} ::
{$ticket['subject']}",
+ 'text' => "{$location['loc1_name']} ::
{$ticket['subject']}{$group}",
'link' => $GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'property.uitts.view', 'id' => $ticket['id']))
);
}
@@ -169,9 +175,16 @@
}
$location =
execMethod('property.bolocation.read_single', array('location_code' =>
$ticket['location_code'], 'extra' => array('view' => true)));
+
+ $group = '';
+ if($ticket['group_id'])
+ {
+ $group = '[' .
$GLOBALS['phpgw']->accounts->get($ticket['group_id'])->__toString() . ']';
+ }
+
$portalbox->data[] = array
(
- 'text' => "{$location['loc1_name']} ::
{$ticket['subject']}",
+ 'text' => "{$location['loc1_name']} ::
{$ticket['subject']}{$group}",
'link' => $GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'property.uitts.view', 'id' => $ticket['id']))
);
}
@@ -242,9 +255,16 @@
}
}
$location =
execMethod('property.bolocation.read_single', array('location_code' =>
$ticket['location_code'], 'extra' => array('view' => true)));
+
+ $group = '';
+ if($ticket['group_id'])
+ {
+ $group = '[' .
$GLOBALS['phpgw']->accounts->get($ticket['group_id'])->__toString() . ']';
+ }
+
$portalbox->data[] = array
(
- 'text' => "{$location['loc1_name']} ::
{$ticket['subject']}",
+ 'text' => "{$location['loc1_name']} ::
{$ticket['subject']}{$group}",
'link' => $GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'property.uitts.view', 'id' => $ticket['id']))
);
}
@@ -350,6 +370,62 @@
unset($default_status);
}
+ if ( isset($prefs['property']['mainscreen_project_1'])
+ && $prefs['property']['mainscreen_project_1'] == 'yes')
+ {
+
+ $default_status =
isset($prefs['property']['project_status_mainscreen_1']) ?
$prefs['property']['project_status_mainscreen_1'] : '';
+ $obj = CreateObject('property.soproject');
+ $projects = $obj->read(array('filter' => $accound_id,
'status_id' => $default_status));
+ $total_records = $obj->total_records;
+
+ $portalbox = CreateObject('phpgwapi.listbox', array
+ (
+ 'title' =>
isset($prefs['property']['mainscreen_projects_1_title']) &&
$prefs['property']['mainscreen_projects_1_title']?
"{$prefs['property']['mainscreen_projects_1_title']} ({$total_records})" :
lang('project') . '::' . lang('list') . ' ' . 1 . "::Status: {$default_status}
({$total_records})",
+ 'primary' =>
$GLOBALS['phpgw_info']['theme']['navbar_bg'],
+ 'secondary' =>
$GLOBALS['phpgw_info']['theme']['navbar_bg'],
+ 'tertiary' =>
$GLOBALS['phpgw_info']['theme']['navbar_bg'],
+ 'width' => '100%',
+ 'outerborderwidth' => '0',
+ 'header_background_image' =>
$GLOBALS['phpgw']->common->image('phpgwapi','bg_filler', '.png', False)
+ ));
+
+ $app_id = $GLOBALS['phpgw']->applications->name2id('property');
+ if( !isset($GLOBALS['portal_order']) ||!in_array($app_id,
$GLOBALS['portal_order']) )
+ {
+ $GLOBALS['portal_order'][] = $app_id;
+ }
+ $var = array
+ (
+ 'up' => array('url' => '/set_box.php', 'app'
=> $app_id),
+ 'down' => array('url' => '/set_box.php', 'app'
=> $app_id),
+ 'close' => array('url' => '/set_box.php', 'app'
=> $app_id),
+ 'question' => array('url' => '/set_box.php',
'app' => $app_id),
+ 'edit' => array('url' => '/set_box.php', 'app'
=> $app_id)
+ );
+
+ foreach ( $var as $key => $value )
+ {
+// $portalbox->set_controls($key,$value);
+ }
+
+ $portalbox->data = array();
+ foreach ($projects as $project)
+ {
+ $portalbox->data[] = array
+ (
+ 'text' => "{$project['address']} ::
{$project['name']}",
+ 'link' => $GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'property.uiproject.edit', 'id' =>
$project['project_id']))
+ );
+ }
+
+ echo "\n".'<!-- BEGIN project 1 info
-->'."\n".$portalbox->draw()."\n".'<!-- END project 1 info -->'."\n";
+
+ unset($obj);
+ unset($portalbox);
+ unset($default_status);
+ }
+
if ( isset($prefs['property']['mainscreen_workorder_1'])
&& $prefs['property']['mainscreen_workorder_1'] == 'yes')
{
@@ -464,6 +540,7 @@
if ( isset($prefs['property']['mainscreen_showapprovals_request'])
&& $prefs['property']['mainscreen_showapprovals_request'] ==
'yes' )
{
+ $total_records = 0;
$title =
isset($prefs['property']['mainscreen_showapprovals_request_title']) &&
$prefs['property']['mainscreen_showapprovals_request_title']?
"{$prefs['property']['mainscreen_showapprovals_request_title']}
({$total_records})" : lang('approvals request') . " ({$total_records})";
//TODO Make listbox css compliant
@@ -511,7 +588,9 @@
'created_by' => $accound_id
);
- $pending_approvals =
execMethod('property.sopending_action.get_pending_action', $action_params);
+ $obj = CreateObject('property.sopending_action');
+ $pending_approvals = $obj->get_pending_action($action_params);
+ $total_records = $obj->total_records;
$portalbox->data = array();
foreach ($pending_approvals as $entry)
@@ -535,7 +614,8 @@
'created_by' => $accound_id
);
- $pending_approvals =
execMethod('property.sopending_action.get_pending_action', $action_params);
+ $pending_approvals = $obj->get_pending_action($action_params);
+ $total_records = $total_records + $obj->total_records;
foreach ($pending_approvals as $entry)
{
@@ -558,7 +638,8 @@
'created_by' => $accound_id
);
- $pending_approvals =
execMethod('property.sopending_action.get_pending_action', $action_params);
+ $pending_approvals = $obj->get_pending_action($action_params);
+ $total_records = $total_records + $obj->total_records;
foreach ($pending_approvals as $entry)
{
@@ -572,6 +653,7 @@
echo "\n".'<!-- BEGIN approval info
-->'."\n".$portalbox->draw()."\n".'<!-- END approval info -->'."\n";
unset($portalbox);
+ unset($obj);
unset($pending_approvals);
}
@@ -694,9 +776,7 @@
if ( isset($prefs['property']['mainscreen_showvendor_reminder'])
&& $prefs['property']['mainscreen_showvendor_reminder'] ==
'yes' )
{
-
- $title = lang('vendor reminder');
- $title =
isset($prefs['property']['mainscreen_showvendor_reminder_title']) &&
$prefs['property']['mainscreen_showvendor_reminder_title']?
"{$prefs['property']['mainscreen_showvendor_reminder_title']}
({$total_records})" : lang('approvals') . " ({$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})";
//TODO Make listbox css compliant
$portalbox = CreateObject('phpgwapi.listbox', array
(
Modified: people/sigurdne/modules/property/trunk/inc/hook_settings.inc.php
===================================================================
--- people/sigurdne/modules/property/trunk/inc/hook_settings.inc.php
2010-01-13 19:09:35 UTC (rev 20955)
+++ people/sigurdne/modules/property/trunk/inc/hook_settings.inc.php
2010-01-13 19:11:38 UTC (rev 20956)
@@ -99,6 +99,10 @@
create_select_box('Default updated ticket status when creating
project','tts_status_create_project',$_status_tts,'The default status when
entering the helpdesk and mainscreen');
create_select_box('Autocreate project from
ticket','auto_create_project_from_ticket',$yes_and_no);
+ create_select_box('your projects on main screen - list
1','mainscreen_project_1',$yes_and_no,'Link to your projects');
+ create_select_box('Default project status
1','project_status_mainscreen_1',$_status_project,'The default status for list
1 when entering the mainscreen');
+ create_input_box('Custom title on projects on main screen - list
1','mainscreen_projects_1_title');
+
create_select_box('your workorders on main screen - list
1','mainscreen_workorder_1',$yes_and_no,'Link to your workorders');
create_select_box('Default workorder status
1','workorder_status_mainscreen_1',$_status_workorder,'The default status for
list 1 when entering the mainscreen');
create_input_box('Custom title on workorders on main screen - list
1','mainscreen_workorders_1_title');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] [20956] improvement: Some work on dashboard,
Sigurd Nes <=