[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8489]
From: |
Torstein |
Subject: |
[Fmsystem-commits] [8489] |
Date: |
Thu, 05 Jan 2012 08:23:01 +0000 |
Revision: 8489
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8489
Author: vator
Date: 2012-01-05 08:23:00 +0000 (Thu, 05 Jan 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/controller/inc/class.socontrol_item.inc.php
trunk/controller/inc/class.uicalendar.inc.php
trunk/controller/inc/class.uicheck_list.inc.php
trunk/controller/inc/class.uicheck_list_for_location.inc.php
trunk/controller/inc/class.uicontrol.inc.php
trunk/controller/inc/class.uierror_report_message.inc.php
Modified: trunk/controller/inc/class.socontrol_item.inc.php
===================================================================
--- trunk/controller/inc/class.socontrol_item.inc.php 2012-01-05 08:22:47 UTC
(rev 8488)
+++ trunk/controller/inc/class.socontrol_item.inc.php 2012-01-05 08:23:00 UTC
(rev 8489)
@@ -266,7 +266,7 @@
return "SELECT {$cols} FROM {$tables} {$joins} WHERE
{$condition} {$order}";
}
- function get_control_items(int $control_group_id)
+ function get_control_items($control_group_id)
{
$results = array();
Modified: trunk/controller/inc/class.uicalendar.inc.php
===================================================================
--- trunk/controller/inc/class.uicalendar.inc.php 2012-01-05 08:22:47 UTC
(rev 8488)
+++ trunk/controller/inc/class.uicalendar.inc.php 2012-01-05 08:23:00 UTC
(rev 8489)
@@ -107,6 +107,8 @@
$heading_array[$i] = "$i";
}
+ //print_r( $controls_calendar_array );
+
$data = array
(
'location_array' =>
$location_array,
Modified: trunk/controller/inc/class.uicheck_list.inc.php
===================================================================
--- trunk/controller/inc/class.uicheck_list.inc.php 2012-01-05 08:22:47 UTC
(rev 8488)
+++ trunk/controller/inc/class.uicheck_list.inc.php 2012-01-05 08:23:00 UTC
(rev 8489)
@@ -56,7 +56,8 @@
'get_check_list_info' =>
true,
'control_calendar_status_overview' => true,
'add_check_item_to_list' =>
true,
- 'update_check_list'
=> true
+ 'update_check_list'
=> true,
+ 'view_control_items' =>
true
);
public function __construct()
@@ -261,6 +262,20 @@
self::render_template_xsl('control_calendar_status_overview', $data);
}
+ public function view_control_items(){
+ $control_id = phpgw::get_var('control_id');
+
+ $control = $this->so_control->get_single($control_id);
+
+ $control_items_array =
$this->so_control_item->get_control_items_by_control_id($control_id);
+
+ $data = array
+ (
+ 'control_items_array' => $control_items_array
+ );
+
+ self::render_template_xsl('view_control_items', $data);
+ }
public function view_check_lists_for_control()
{
Modified: trunk/controller/inc/class.uicheck_list_for_location.inc.php
===================================================================
--- trunk/controller/inc/class.uicheck_list_for_location.inc.php
2012-01-05 08:22:47 UTC (rev 8488)
+++ trunk/controller/inc/class.uicheck_list_for_location.inc.php
2012-01-05 08:23:00 UTC (rev 8489)
@@ -52,15 +52,17 @@
private $so_check_list;
private $so_control_item;
private $so_check_item;
+ private $so_procedure;
var $public_functions = array(
'index' => true,
-
'view_locations_for_control' => true,
-
'add_location_to_control' => true,
-
'add_check_list_for_location' => true,
-
'save_check_list_for_location' => true,
-
'edit_check_list_for_location' => true,
-
'create_error_report_message' => true
+
'view_locations_for_control' => true,
+
'add_location_to_control' => true,
+
'add_check_list_for_location' => true,
+
'save_check_list_for_location' => true,
+
'edit_check_list_for_location' => true,
+
'create_error_report_message' => true,
+
'view_control_info' => true
);
function __construct()
@@ -74,6 +76,7 @@
$this->so_check_list =
CreateObject('controller.socheck_list');
$this->so_control_item =
CreateObject('controller.socontrol_item');
$this->so_check_item =
CreateObject('controller.socheck_item');
+ $this->so_procedure =
CreateObject('controller.soprocedure');
$this->type_id =
$this->bo->type_id;
@@ -365,7 +368,7 @@
$check_list_id = phpgw::get_var('check_list_id');
$check_list =
$this->so_check_list->get_single($check_list_id);
- print_r($check_list);
+
// Fetches with check items
$open_check_items =
$this->so_check_item->get_check_items($check_list_id, 'open',
'control_item_type_1');
@@ -486,6 +489,53 @@
self::render_template_xsl('create_error_report_message', $data);
}
+ public function view_control_info(){
+ $check_list_id = phpgw::get_var('check_list_id');
+
+ $check_list =
$this->so_check_list->get_single($check_list_id);
+ $control =
$this->so_control->get_single($check_list->get_control_id());
+
+ $cats = CreateObject('phpgwapi.categories', -1,
'controller', '.control');
+ $cats->supress_info = true;
+
+ $control_areas =
$cats->formatted_xslt_list(array('format'=>'filter','selected' =>
$control_area_id,'globals' => true,'use_acl' => $this->_category_acl));
+ array_unshift($control_areas['cat_list'],array
('cat_id'=>'','name'=> lang('select value')));
+ $control_areas_array2 = array();
+
+ foreach($control_areas['cat_list'] as $cat_list)
+ {
+ $control_areas_array2[] = array
+ (
+ 'id' => $cat_list['cat_id'],
+ 'name' => $cat_list['name'],
+ );
+ }
+
+ // Fetches prosedures that are related to first control
area in list
+ $control_area_id = $control_areas_array2[1]['id'];
+ $procedures_array =
$this->so_procedure->get_procedures_by_control_area_id($control_area_id);
+ $role_array = $this->so_control->get_roles();
+
+ $location_code = $check_list->get_location_code();
+ $location_array =
execMethod('property.bolocation.read_single', array('location_code' =>
$location_code));
+
+ $data = array
+ (
+ 'location_array' =>
$location_array,
+ 'control' =>
$control->toArray(),
+ 'check_list' =>
$check_list->toArray(),
+ 'date_format' => $date_format,
+ 'control_areas_array2' => array('options' =>
$control_areas_array2),
+ 'procedures_array' =>
$procedures_array,
+ 'role_array' => $role_array
+ );
+
+ self::add_javascript('controller', 'controller',
'jquery.js');
+ self::add_javascript('controller', 'controller',
'jquery-ui.custom.min.js');
+
+ self::render_template_xsl('view_control_info', $data);
+ }
+
function get_timestamp_from_date( $date_string ){
$pos_day = strpos($date_string, "/");
$day = substr($date_string, 0, $pos_day);
Modified: trunk/controller/inc/class.uicontrol.inc.php
===================================================================
--- trunk/controller/inc/class.uicontrol.inc.php 2012-01-05 08:22:47 UTC
(rev 8488)
+++ trunk/controller/inc/class.uicontrol.inc.php 2012-01-05 08:23:00 UTC
(rev 8489)
@@ -543,7 +543,7 @@
$control_group_ids = array();
- //Putting control_group_ids in array control_group_ids
+ // Putting control_group_ids in array control_group_ids
foreach ($control_tag_ids as $control_tag)
{
// Fetching group id from tag
@@ -605,6 +605,7 @@
self::render_template_xsl(array('control_tabs',
'sort_check_list'), $data);
}
+
public function generate_check_lists_for_control(){
$control_id = phpgw::get_var('control_id');
$control = $this->so->get_single($control_id);
Modified: trunk/controller/inc/class.uierror_report_message.inc.php
===================================================================
--- trunk/controller/inc/class.uierror_report_message.inc.php 2012-01-05
08:22:47 UTC (rev 8488)
+++ trunk/controller/inc/class.uierror_report_message.inc.php 2012-01-05
08:23:00 UTC (rev 8489)
@@ -128,16 +128,18 @@
$message_details .= $check_item->get_comment()
. "<br>";
}
+ $location_id =
$GLOBALS['phpgw']->locations->get_id("controller", ".checklist");
+
$ticket = array
(
'origin' => $location_id,
- 'origin_id' =>
$location_item_id,
+ 'origin_id' =>
$check_list_id,
'location_code' => $location_code,
'cat_id' =>
$message_cat_id,
'priority' => $priority,
//valgfri (1-3)
'title' =>
$message_title,
'details' =>
$message_details,
- 'file_input_name' => 'file' // default,
men valgfri
+ 'file_input_name' => 'file' // navn på
felt som inneholder fil
);
$botts = CreateObject('property.botts',true);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8489],
Torstein <=