[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11399] property: add reference to controller on comp
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11399] property: add reference to controller on components |
Date: |
Sun, 27 Oct 2013 15:34:54 +0000 |
Revision: 11399
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11399
Author: sigurdne
Date: 2013-10-27 15:34:54 +0000 (Sun, 27 Oct 2013)
Log Message:
-----------
property: add reference to controller on components
Modified Paths:
--------------
trunk/property/inc/class.uientity.inc.php
Modified: trunk/property/inc/class.uientity.inc.php
===================================================================
--- trunk/property/inc/class.uientity.inc.php 2013-10-27 15:34:08 UTC (rev
11398)
+++ trunk/property/inc/class.uientity.inc.php 2013-10-27 15:34:54 UTC (rev
11399)
@@ -246,6 +246,15 @@
}
}
+/*
+
if(isset($GLOBALS['phpgw_info']['user']['apps']['controller']))
+ {
+ $location_id =
$GLOBALS['phpgw']->locations->get_id('property', $this->acl_location);
+ $socase =
CreateObject('controller.socase');
+ $controller_cases =
$socase->get_cases_by_message($location_id, $id);
+ }
+*/
+
//------ Start pagination
$start = phpgw::get_var('startIndex', 'REQUEST', 'int',
0);
@@ -2211,6 +2220,54 @@
}
}
+
if(isset($GLOBALS['phpgw_info']['user']['apps']['controller']))
+ {
+
+ $lang_controller =
$GLOBALS['phpgw']->translation->translate('controller', array(),false ,
'controller');
+ $location_id =
$GLOBALS['phpgw']->locations->get_id('property', $this->acl_location);
+ $socase =
CreateObject('controller.socase');
+ $controller_cases =
$socase->get_cases_by_component($location_id, $id);
+
+ $_statustext = array();
+ $_statustext[0] = lang('open');
+ $_statustext[1] = lang('closed');
+ $_statustext[2] = lang('pending');
+ }
+
+ foreach ($controller_cases as $case)
+ {
+ switch ($case['status'])
+ {
+ case 0:
+ case 2:
+ $_method =
'view_open_cases';
+ break;
+ case 1:
+ $_method =
'view_closed_cases';
+ break;
+ default:
+ $_method =
'view_open_cases';
+ }
+
+ $_link =
$GLOBALS['phpgw']->link('/index.php',array
+ (
+ 'menuaction' =>
"controller.uicase.{$_method}",
+ 'check_list_id' =>
$case['check_list_id']
+ )
+ );
+
+ $_target[] = array
+ (
+ 'url' => "<a
href=\"{$_link}\" > {$case['check_list_id']}</a>",
+ 'type' =>
$lang_controller,
+ 'title' =>
$case['descr'],
+ 'status' =>
$_statustext[$case['status']],
+ 'user' =>
$GLOBALS['phpgw']->accounts->get($case['user_id'])->__toString(),
+ 'entry_date'=>
$GLOBALS['phpgw']->common->show_date($case['modified_date'],$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']),
+ );
+ unset($_link);
+ }
+
$related =
$this->bo->read_entity_to_link(array('entity_id'=>$this->entity_id,'cat_id'=>$this->cat_id,'id'=>$id));
$_related = array();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11399] property: add reference to controller on components,
Sigurd Nes <=