fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [16429] property: user column


From: sigurdne
Subject: [Fmsystem-commits] [16429] property: user column
Date: Mon, 13 Mar 2017 10:27:30 -0400 (EDT)

Revision: 16429
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16429
Author:   sigurdne
Date:     2017-03-13 10:27:29 -0400 (Mon, 13 Mar 2017)
Log Message:
-----------
property: user column

Modified Paths:
--------------
    trunk/property/inc/class.boentity.inc.php
    trunk/property/inc/class.soentity.inc.php

Modified: trunk/property/inc/class.boentity.inc.php
===================================================================
--- trunk/property/inc/class.boentity.inc.php   2017-03-12 17:59:36 UTC (rev 
16428)
+++ trunk/property/inc/class.boentity.inc.php   2017-03-13 14:27:29 UTC (rev 
16429)
@@ -282,22 +282,22 @@
                                        );
                                }
                        }
-                       /*
-                         $columns['user_id'] = array
-                         (
-                         'id'                  => 'user_id',
-                         'input_type'  => 'text',
-                         'name'                        => 'user_id',
-                         'descr'                       => lang('User'),
-                         'statustext'  => lang('User'),
-                         'align'               => '',
-                         'datatype'            => 'user',
-                         'sortable'            => false,
-                         'exchange'            => false,
-                         'formatter'           => '',
-                         'classname'           => ''
+                       
+                       $columns['user_name'] = array
+                       (
+                               'id'                    => 'user_name',
+                               'input_type'    => 'text',
+                               'name'                  => 'user_name',
+                               'descr'                 => lang('User'),
+                               'statustext'    => lang('User'),
+                               'align'                 => '',
+                               'datatype'              => 'user',
+                               'sortable'              => false,
+                               'exchange'              => false,
+                               'formatter'             => '',
+                               'classname'             => ''
                          );
-                        */
+                       
                        return $columns;
                }
 
@@ -466,34 +466,6 @@
                                        }
                                }
                        }
-                       /*
-                         $entity = $this->so->read(array
-                         (
-                         'start' => $this->start,
-                         'query' => $this->query,
-                         'sort' => $this->sort,
-                         'order' => $this->order,
-                         'filter' => $this->filter,
-                         'cat_id' => $this->cat_id,
-                         'district_id' => $this->district_id,
-                         'part_of_town_id' => $this->part_of_town_id,
-                         'lookup'=>isset($data['lookup'])?$data['lookup']:'',
-                         
'allrows'=>isset($data['allrows'])?$data['allrows']:'',
-                         'results' => $this->results,
-                         'entity_id'=>$this->entity_id,
-                         'status'=>$this->status,
-                         
'start_date'=>$this->bocommon->date_to_timestamp($data['start_date']),
-                         
'end_date'=>$this->bocommon->date_to_timestamp($data['end_date']),
-                         'dry_run'=>$data['dry_run'],
-                         'type'=>$data['type'],
-                         'location_code' => $this->location_code,
-                         'criteria_id' => $this->criteria_id,
-                         'attrib_filter' => $attrib_filter,
-                         'p_num' => $this->p_num,
-                         
'control_registered'=>isset($data['control_registered']) ? 
$data['control_registered'] : '',
-                         'control_id'=>isset($data['control_id']) ? 
$data['control_id'] : '',
-                         'org_units' => $this->org_units
-                         ) */
                        $entity = $this->so->read(array
                                (
                                'start' => $data['start'],
@@ -600,6 +572,12 @@
                                        $entry[$_name] = 
"javascript_action_{$_name}({$entry['id']},{$entry['location_code']})";
                                        
$this->uicols['javascript_action'][$_name] = true;
                                }
+
+                               if($entry['user_id'])
+                               {
+                                       $entry['user_name'] = 
$GLOBALS['phpgw']->accounts->get($entry['user_id'])->__toString();
+                               }
+
                        }
 
                        return $entity;

Modified: trunk/property/inc/class.soentity.inc.php
===================================================================
--- trunk/property/inc/class.soentity.inc.php   2017-03-12 17:59:36 UTC (rev 
16428)
+++ trunk/property/inc/class.soentity.inc.php   2017-03-13 14:27:29 UTC (rev 
16429)
@@ -1077,6 +1077,12 @@
                                }
                                unset($key);
 
+                               $dataset[$j]['user_id'] = array
+                                       (
+                                       'value' => $this->db->f('user_id'),
+                                       'datatype' => false,
+                                       'attrib_id' => false
+                               );
 
                                //Start: get short descripion - if any
                                $_short_description = array();
@@ -1211,24 +1217,11 @@
 
                                $entity = 
$admin_entity->read_single($entity_id);
 
-
                                $cols_return_extra = array();
                                $cols_return = array();
                                $uicols = array();
                                $cols = "{$entity_table}.*";
 
-                               $cols_return[] = 'location_code';
-                               $uicols['input_type'][] = 'hidden';
-                               $uicols['name'][] = 'location_code';
-                               $uicols['descr'][] = 'dummy';
-                               $uicols['statustext'][] = 'dummy';
-                               $uicols['align'][] = '';
-                               $uicols['datatype'][] = '';
-                               $uicols['sortable'][] = true;
-                               $uicols['exchange'][] = false;
-                               $uicols['formatter'][] = '';
-                               $uicols['classname'][] = '';
-
                                $cols_return[] = 'num';
                                $uicols['input_type'][] = 'text';
                                $uicols['name'][] = 'num';
@@ -1241,6 +1234,21 @@
                                $uicols['formatter'][] = $lookup ? '' : 
'linktToEntity';
                                $uicols['classname'][] = '';
 
+                               if (!empty($category['location_level']))
+                               {
+                                       $cols_return[] = 'location_code';
+                                       $uicols['input_type'][] = 'text';
+                                       $uicols['name'][] = 'location_code';
+                                       $uicols['descr'][] = 
lang('location_code');
+                                       $uicols['statustext'][] = 
lang('location_code');
+                                       $uicols['align'][] = '';
+                                       $uicols['datatype'][] = '';
+                                       $uicols['sortable'][] = true;
+                                       $uicols['exchange'][] = false;
+                                       $uicols['formatter'][] = '';
+                                       $uicols['classname'][] = '';
+                               }
+
                                if (isset($entity['lookup_entity']) && 
is_array($entity['lookup_entity']))
                                {
                                        $uicols['input_type'][] = 'text';
@@ -1959,6 +1967,12 @@
                                                'get_single_function_input' => 
$uicols['get_single_function_input'][$key]
                                        );
                                }
+                               $dataset[$j]['user_id'] = array
+                                       (
+                                       'value' => $this->db->f('user_id'),
+                                       'datatype' => false,
+                                       'attrib_id' => false
+                               );
                                $dataset[$j]['location_id'] = array
                                        (
                                        'value' => $location_id,




reply via email to

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