[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9725]
From: |
Torstein |
Subject: |
[Fmsystem-commits] [9725] |
Date: |
Tue, 03 Jul 2012 13:11:28 +0000 |
Revision: 9725
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9725
Author: vator
Date: 2012-07-03 13:11:26 +0000 (Tue, 03 Jul 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/controller/inc/class.uicheck_list.inc.php
Modified: trunk/controller/inc/class.uicheck_list.inc.php
===================================================================
--- trunk/controller/inc/class.uicheck_list.inc.php 2012-07-03 13:11:10 UTC
(rev 9724)
+++ trunk/controller/inc/class.uicheck_list.inc.php 2012-07-03 13:11:26 UTC
(rev 9725)
@@ -427,7 +427,9 @@
}
$level = $this->get_location_level($location_code);
-
+ $year = date("Y", $check_list->get_deadline());
+ $month = date("n", $check_list->get_deadline());
+
$data = array
(
'control'
=> $control->toArray(),
@@ -439,7 +441,9 @@
'current_year'
=> $year,
'current_month_nr'
=> $month,
'building_location_code' =>
$building_location_code,
- 'location_level'
=> $level
+ 'location_level'
=> $level,
+ 'current_year'
=> $year,
+ 'current_month_nr'
=> $month
);
self::add_javascript('controller', 'controller',
'jquery.js');
@@ -543,16 +547,47 @@
$check_list = $this->so->get_single($check_list_id);
$control =
$this->so_control->get_single($check_list->get_control_id());
- $location_code = $check_list->get_location_code();
- $location_array =
execMethod('property.bolocation.read_single', array('location_code' =>
$location_code));
- $level = $this->get_location_level($location_code);
+ $component_id = $check_list->get_component_id();
+
+ if($component_id > 0)
+ {
+ $location_id = $check_list->get_location_id();
+ $component_id = $check_list->get_component_id();
+
+ $component_arr =
execMethod('property.soentity.read_single_eav', array('location_id' =>
$location_id, 'id' => $component_id));
+ $short_desc =
execMethod('property.soentity.get_short_description', array('location_id' =>
$location_id, 'id' => $component_id));
+
+ $component = new controller_component();
+ $component->set_location_code(
$component_arr['location_code'] );
+ $component->set_xml_short_desc( $short_desc );
+ $component_array = $component->toArray();
+
+ $type = 'component';
+ $building_location_code =
$this->get_building_location_code($component_arr['location_code']);
+ }
+ else
+ {
+ $location_code =
$check_list->get_location_code();
+ $location_array =
execMethod('property.bolocation.read_single', array('location_code' =>
$location_code));
+ $type = 'location';
+ $level =
$this->get_location_level($location_code);
+ }
+ $year = date("Y", $check_list->get_deadline());
+ $month = date("n", $check_list->get_deadline());
+
$data = array
(
- 'location_array'
=> $location_array,
- 'control'
=> $control->toArray(),
- 'check_list'
=> $check_list->toArray(),
- 'location_level'
=> $level,
+ 'control'
=> $control->toArray(),
+ 'check_list'
=> $check_list->toArray(),
+ 'location_array'
=> $location_array,
+ 'component_array'
=> $component_array,
+ 'date_format'
=> $date_format,
+ 'type'
=> $type,
+ 'current_year'
=> $year,
+ 'current_month_nr'
=> $month,
+ 'building_location_code' =>
$building_location_code,
+ 'location_level'
=> $level
);
self::add_javascript('controller', 'controller',
'jquery.js');
@@ -664,7 +699,9 @@
}
$level = $this->get_location_level($location_code);
-
+ $year = date("Y", $check_list->get_deadline());
+ $month = date("n", $check_list->get_deadline());
+
$data = array
(
'control'
=>
$control->toArray(),
@@ -673,7 +710,10 @@
'component_array'
=> $component_array,
'control_groups_with_items_array' =>
$control_groups_with_items_array,
'type'
=>
$type,
- 'location_level'
=> $level
+ 'location_level'
=> $level,
+ 'building_location_code'
=> $building_location_code,
+ 'current_year'
=> $year,
+ 'current_month_nr'
=> $month
);
self::add_javascript('controller', 'controller',
'jquery.js');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9725],
Torstein <=