fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [10398]


From: Torstein
Subject: [Fmsystem-commits] [10398]
Date: Wed, 31 Oct 2012 13:36:07 +0000

Revision: 10398
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10398
Author:   vator
Date:     2012-10-31 13:36:07 +0000 (Wed, 31 Oct 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/logistic/inc/class.uiactivity.inc.php
    trunk/logistic/inc/class.uiallocation.inc.php
    trunk/logistic/inc/class.uirequirement.inc.php

Modified: trunk/logistic/inc/class.uiactivity.inc.php
===================================================================
--- trunk/logistic/inc/class.uiactivity.inc.php 2012-10-31 13:07:37 UTC (rev 
10397)
+++ trunk/logistic/inc/class.uiactivity.inc.php 2012-10-31 13:36:07 UTC (rev 
10398)
@@ -381,8 +381,6 @@
                        
                        $activity_children = 
$this->so->get($activity->get_id());
 
-                       print_r( $activity_children );
-                       
                        
self::render_template_xsl('activity/view_activity_item', $data);
                }
                

Modified: trunk/logistic/inc/class.uiallocation.inc.php
===================================================================
--- trunk/logistic/inc/class.uiallocation.inc.php       2012-10-31 13:07:37 UTC 
(rev 10397)
+++ trunk/logistic/inc/class.uiallocation.inc.php       2012-10-31 13:36:07 UTC 
(rev 10398)
@@ -31,7 +31,7 @@
        phpgw::import_class('logistic.soactivity');
        include_class('logistic', 'activity');
        
-       
+       /*
        class logistic_uiallocation extends phpgwapi_uicommon
        {
                
@@ -164,14 +164,7 @@
                        $control_id                     = 
phpgw::get_var('control_id', 'int');
                        $results                        = 
phpgw::get_var('results', 'int');
                        
-/*
-                       if(!$entity_id && !$cat_id)
-                       {
-                               $values = array();
-                       }
-                       else
-                       {
-                       */
+
                        $entity_id = 3;
                        $cat_id = 1;
                                $location_id = 
2295;//$GLOBALS['phpgw']->locations->get_id('property', 
".entity.{$entity_id}.{$cat_id}");
@@ -288,7 +281,6 @@
                                $data = array
                                        (
                                                'activity' => 
$activity->toArray(),
-                                               'img_go_home' => 
'rental/templates/base/images/32x32/actions/go-home.png',
                                                'dateformat'                    
        => $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']
                                );
 
@@ -313,3 +305,4 @@
                        return $user_array;
                }
        }
+*/
\ No newline at end of file

Modified: trunk/logistic/inc/class.uirequirement.inc.php
===================================================================
--- trunk/logistic/inc/class.uirequirement.inc.php      2012-10-31 13:07:37 UTC 
(rev 10397)
+++ trunk/logistic/inc/class.uirequirement.inc.php      2012-10-31 13:36:07 UTC 
(rev 10398)
@@ -34,6 +34,7 @@
        phpgw::import_class('logistic.soproject');
        phpgw::import_class('property.soadmin_entity');
        phpgw::import_class('logistic.soresource_type_requirement');
+       phpgw::import_class('logistic.sorequirement_resource_allocation');
 
        include_class('logistic', 'requirement');
        phpgw::import_class('phpgwapi.datetime');
@@ -47,6 +48,7 @@
                private $so_activity;
                private $so_project;
                private $so_resource_type_requirement;
+               private $so_resource_allocation;
 
                public $public_functions = array(
                        'query'                                                 
                        => true,
@@ -71,8 +73,8 @@
                        $this->so_activity = 
CreateObject('logistic.soactivity');
                        $this->so_project = CreateObject('logistic.soproject');
                        $this->so_resource_type_requirement = 
CreateObject('logistic.soresource_type_requirement');
+                       $this->so_resource_allocation = 
CreateObject('logistic.sorequirement_resource_allocation');
 
-
                        $GLOBALS['phpgw_info']['flags']['menu_selection'] = 
"logistic::project::requirement";
                }
 
@@ -153,7 +155,14 @@
                                {
                                        $_checked = 'checked="checked"';
                                }
-
+                               
+                         $num_required = $entry['no_of_items'];
+         
+                               $filters = array('requirement_id' => 
$entry['id']);
+                               $num_allocated = 
$this->so_resource_allocation->get_count($search_for, $search_type, $filters);
+                               
+                               $entry['status'] = $num_allocated;
+                               
                                $href = self::link(array('menuaction' => 
'logistic.uirequirement.delete', 'id' => $entry['id']));
                                $entry['delete_link'] = "<a class=\"btn-sm 
delete\" href=\"{$href}\">Slett krav</a>";
                                
@@ -264,6 +273,11 @@
                                                        'label' => 
lang('Allocate resources'),
                                                        'sortable' => false,
                                                ),
+                                               array(
+                                                       'key' => 'status',
+                                                       'label' => 
lang('Status'),
+                                                       'sortable' => false,
+                                               ),
                                        )
                                ),
                        );




reply via email to

[Prev in Thread] Current Thread [Next in Thread]