[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11221] controller: list components
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11221] controller: list components |
Date: |
Mon, 01 Jul 2013 08:51:19 +0000 |
Revision: 11221
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11221
Author: sigurdne
Date: 2013-07-01 08:51:18 +0000 (Mon, 01 Jul 2013)
Log Message:
-----------
controller: list components
Modified Paths:
--------------
trunk/controller/inc/class.uicase.inc.php
Modified: trunk/controller/inc/class.uicase.inc.php
===================================================================
--- trunk/controller/inc/class.uicase.inc.php 2013-06-30 17:17:37 UTC (rev
11220)
+++ trunk/controller/inc/class.uicase.inc.php 2013-07-01 08:51:18 UTC (rev
11221)
@@ -140,6 +140,26 @@
$type = 'location';
}
+
+ //------------- START find already registered cases
-------------//
+
+ $cases_at_component_group = array();
+ $existing_check_items_and_cases =
$this->so_check_item->get_check_items_with_cases($check_list_id, $type = null,
'all', null, null);//$location_code_search_components);
+ foreach($existing_check_items_and_cases as $check_item)
+ {
+ foreach($check_item->get_cases_array() as $case)
+ {
+ $component_id =
$case->get_component_id();
+ if($component_id)
+ {
+
$cases_at_component_group[$check_item->get_control_item()->get_control_group_id()][$component_id]
++;
+ }
+ }
+ }
+
+ //------------- END find already registered cases
-------------//
+
+
//Populating array with saved control items for each
group
//Cache result
$components_at_location = array();
@@ -155,29 +175,7 @@
{
//// start components
- //------------- START find
already registered cases -------------//
-/*
- $cases_at_component = array();
- $existing_check_items_and_cases
= array();
- if( $_components_at_location )
- {
-
$existing_check_items_and_cases =
$this->so_check_item->get_check_items_with_cases($check_list_id, $type = null,
'all', null, null);//$location_code_search_components);
- }
-
foreach($existing_check_items_and_cases as $check_item)
- {
-
foreach($check_item->get_cases_array() as $case)
- {
- $component_id =
$case->get_component_id();
-
if($component_id)
- {
-
$cases_at_component[$check_item->get_id()][$component_id] ++;
- }
- }
- }
-*/
- //------------- END find
already registered cases -------------//
-
$criterias_array = array();
$loc_arr =
$GLOBALS['phpgw']->locations->get_name($component_location_id);
$criterias_array['location_id']
= $component_location_id;
@@ -212,6 +210,13 @@
if($_components_at_location)
{
+
foreach($_components_at_location as &$_component_at_location)
+ {
+
if(isset($cases_at_component_group[$control_group->get_id()][$_component_at_location['id']]))
+ {
+
$_component_at_location['short_description'] .= ' (' .
$cases_at_component_group[$control_group->get_id()][$_component_at_location['id']]
. ')';
+ }
+ }
$control_groups_with_items_array[] = array
(
'control_group'
=> $control_group->toArray(),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11221] controller: list components,
Sigurd Nes <=