fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [6596] property: more on generic code


From: Sigurd Nes
Subject: [Fmsystem-commits] [6596] property: more on generic code
Date: Mon, 15 Nov 2010 21:41:15 +0000

Revision: 6596
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6596
Author:   sigurdne
Date:     2010-11-15 21:41:12 +0000 (Mon, 15 Nov 2010)
Log Message:
-----------
property: more on generic code

Modified Paths:
--------------
    trunk/property/inc/class.menu.inc.php
    trunk/property/inc/class.socategory.inc.php
    trunk/property/inc/class.uiactor.inc.php

Modified: trunk/property/inc/class.menu.inc.php
===================================================================
--- trunk/property/inc/class.menu.inc.php       2010-11-15 21:28:42 UTC (rev 
6595)
+++ trunk/property/inc/class.menu.inc.php       2010-11-15 21:41:12 UTC (rev 
6596)
@@ -108,7 +108,7 @@
                                        'tenant_cats'   => array
                                        (
                                                'text'  => lang('Tenant 
Categories'),
-                                               'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uicategory.index', 'type' => 'tenant') )
+                                               'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uicategory.index', 'type' => 'tenant_cats') )
                                        ),
                                        'tenant_global_cats'    => array
                                        (
@@ -132,7 +132,7 @@
                                        'vendor_cats'   => array
                                        (
                                                'text'  => lang('Vendor 
Categories'),
-                                               'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uicategory.index', 'type' => 'vendor') )
+                                               'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uicategory.index', 'type' => 'vendor_cats') )
                                        ),
                                        'vendor_global_cats'    => array
                                        (
@@ -150,7 +150,7 @@
                                        'owner_cats'    => array
                                        (
                                                'text'  => lang('Owner 
Categories'),
-                                               'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uicategory.index', 'type' => 'owner') )
+                                               'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uicategory.index', 'type' => 'owner_cats') )
                                        ),
                                        'owner_attribs' => array
                                        (

Modified: trunk/property/inc/class.socategory.inc.php
===================================================================
--- trunk/property/inc/class.socategory.inc.php 2010-11-15 21:28:42 UTC (rev 
6595)
+++ trunk/property/inc/class.socategory.inc.php 2010-11-15 21:41:12 UTC (rev 
6596)
@@ -492,7 +492,7 @@
                                                throw new 
Exception(lang('ERROR: illegal type %1', $type_id));
                                        }
                                        break;
-                               case 'owner':
+                               case 'owner_cats':
                                        $info = array
                                        (
                                                'table' => 'fm_owner_category',
@@ -513,7 +513,7 @@
                                                'menu_selection' => 
'admin::property::owner::owner_cats'
                                        );
                                        break;
-                               case 'tenant':
+                               case 'tenant_cats':
                                        $info = array
                                        (
                                                'table' => 'fm_tenant_category',
@@ -534,7 +534,7 @@
                                                'menu_selection' => 
'admin::property::tenant::tenant_cats'
                                        );
                                        break;
-                               case 'vendor':
+                               case 'vendor_cats':
                                        $info = array
                                        (
                                                'table' => 'fm_vendor_category',
@@ -555,6 +555,69 @@
                                                'menu_selection' => 
'admin::property::vendor::vendor_cats'
                                        );
                                        break;
+                               case 'vendor':
+                                       $info = array
+                                       (
+                                               'table' => 'fm_vendor',
+                                               'id'                            
=> array('name' => 'id', 'type' => 'int'),
+                                               'fields'                        
=> array
+                                               (
+                                                       array
+                                                       (
+                                                               'name' => 
'contact_phone',
+                                                               'descr' => 
lang('contact phone'),
+                                                               'type' => 
'varchar'
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name'          
        => 'category',
+                                                               'descr'         
        => lang('category'),
+                                                               'type'          
        => 'select',
+                                                               'nullable'      
        => false,
+                                                               'filter'        
        => true,
+                                                               'sortable'      
=> true,
+                                                               'values_def'    
=> array
+                                                               (
+                                                                       
'valueset'              => false,
+                                                                       
'method'                => 'property.bocategory.get_list',
+                                                                       
'method_input'  => array('type' => 'vendor_cats',       'selected' => 
'##category##')
+                                                               )
+                                                       ),
+                                                       array
+                                                       (
+                                                               //FIXME
+                                                               'name'          
        => 'member_of',
+                                                               'descr'         
        => lang('member'),
+                                                               'type'          
        => 'select', // multiple_select
+                                                               'nullable'      
        => false,
+                                                               'filter'        
        => true,
+                                                               'sortable'      
=> true,
+                                                               'values_def'    
=> array
+                                                               (
+                                                                       
'valueset'              => false,
+                                                                       
'method'                => 'phpgwapi.categories.formatted_xslt_list',
+                                                                       
'method_input'  => array('type' => 'vendor_cats',       'selected' => 
'##member_of##')
+                                                               )
+                                                       ),
+                                               ),
+
+//                             $values_combo_box[0]  = 
$this->cats->formatted_xslt_list(array('selected' => $this->member_id,'globals' 
=> true));
+
+
+                                               'edit_msg'      => lang('edit'),
+                                               'add_msg'       => lang('add'),
+                                               'name'          => 
lang('vendor'),
+                                               'acl_location' => '.vendor',
+                                               'menu_selection' => 
'property::invoice::vendor',
+                                               'default'                       
=> array
+                                               (
+                                                       'owner_id'              
=> array('add'  => '$this->account'),
+                                                       'entry_date'    => 
array('add'  => 'time()'),
+                               //                      'modified_date' => 
array('edit' => 'time()'),
+                                               )
+
+                                       );
+                                       break;
                                case 'district':
                                        $info = array
                                        (

Modified: trunk/property/inc/class.uiactor.inc.php
===================================================================
--- trunk/property/inc/class.uiactor.inc.php    2010-11-15 21:28:42 UTC (rev 
6595)
+++ trunk/property/inc/class.uiactor.inc.php    2010-11-15 21:41:12 UTC (rev 
6596)
@@ -232,7 +232,7 @@
                                $default_value = array 
('cat_id'=>'','name'=>lang('no member'));
                                array_unshift 
($values_combo_box[0]['cat_list'],$default_value);
 
-                               $values_combo_box[1] = 
$this->bocommon->select_category_list(array('format'=>'filter','selected' => 
$this->cat_id,'type' => $this->role,'order'=>'descr'));
+                               $values_combo_box[1] = 
$this->bocommon->select_category_list(array('format'=>'filter','selected' => 
$this->cat_id,'type' => "{$this->role}_cats",'order'=>'descr'));
                                $default_value = array ('id'=>'','name'=> 
lang('no category'));
                                array_unshift 
($values_combo_box[1],$default_value);
 
@@ -830,7 +830,7 @@
                                'lang_no_cat'                                   
=> lang('no category'),
                                'lang_cat_statustext'                   => 
lang('Select the category the actor belongs to. To do not use a category select 
NO CATEGORY'),
                                'select_name'                                   
=> 'values[cat_id]',
-                               'cat_list'                                      
        => 
$this->bocommon->select_category_list(array('format'=>'select','selected' => 
$this->cat_id,'type' => $this->role,'order'=>'descr')),
+                               'cat_list'                                      
        => 
$this->bocommon->select_category_list(array('format'=>'select','selected' => 
$this->cat_id,'type' => "{$this->role}_cats",'order'=>'descr')),
 
                                'lang_member_of'                                
=> lang('member of'),
                                'member_of_name'                                
=> 'member_id',
@@ -941,7 +941,7 @@
                                'lang_category'                         => 
lang('category'),
                                'lang_time_created'                     => 
lang('time created'),
                                'lang_done'                             => 
lang('done'),
-                               'cat_list'                              => 
$this->bocommon->select_category_list(array('format'=>'select','selected' => 
$actor['cat_id'],'type' => $this->role,'order'=>'descr')),
+                               'cat_list'                              => 
$this->bocommon->select_category_list(array('format'=>'select','selected' => 
$actor['cat_id'],'type' => "{$this->role}_cats",'order'=>'descr')),
 
                                'lang_member_of'                        => 
lang('member of'),
                                'member_of_list'                        => 
$member_of_data['cat_list'],




reply via email to

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