phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc/class.uiactor.inc.php, 1.1.2.4


From: nomail
Subject: [Phpgroupware-cvs] property/inc/class.uiactor.inc.php, 1.1.2.4
Date: Sun, 30 May 2004 14:28:41 +0200

Update of /property/inc
Modified Files:
        Branch: sigurd-2
          class.uiactor.inc.php

date: 2004/05/30 12:28:41;  author: sigurdne;  state: Exp;  lines: +52 -16

Log Message:
no message
=====================================================================
Index: property/inc/class.uiactor.inc.php
diff -u property/inc/class.uiactor.inc.php:1.1.2.3 
property/inc/class.uiactor.inc.php:1.1.2.4
--- property/inc/class.uiactor.inc.php:1.1.2.3  Fri May 28 21:53:41 2004
+++ property/inc/class.uiactor.inc.php  Sun May 30 12:28:41 2004
@@ -50,6 +50,9 @@
 
                        $this->role             = $this->bo->role;
 
+                       $this->cats             = 
CreateObject('phpgwapi.categories');
+                       $this->cats->app_name = 'fm_' . $this->role;
+
                        $this->acl2                     = 
CreateObject($this->currentapp.'.acl2');
                        $this->acl2_location= '.' . $this->role;
 
@@ -65,6 +68,7 @@
                        $this->filter           = $this->bo->filter;
                        $this->cat_id           = $this->bo->cat_id;
                        $this->allrows          = $this->bo->allrows;
+                       $this->member_id        = $this->bo->member_id;
 
                        $valid_role = array(
                                'tenant'=>True,
@@ -87,7 +91,8 @@
                                'order'         => $this->order,
                                'filter'        => $this->filter,
                                'cat_id'        => $this->cat_id,
-                               'allrows'       => $this->allrows
+                               'allrows'       => $this->allrows,
+                               'member_id'     => $this->member_id
                        );
                        $this->bo->save_sessiondata($data);
                }
@@ -153,7 +158,8 @@
                                                                                
'menu',
                                                                                
'receipt',
                                                                                
'search_field',
-                                                                               
'nextmatchs'));
+                                                                               
'nextmatchs',
+                                                                               
'filter_member_of'));
 
                        $links = $this->menu->links();
 
@@ -224,6 +230,7 @@
                                                                                
                        'district_id'   => $this->district_id,
                                                                                
                        'start_date'    => $start_date,
                                                                                
                        'role'                  => $this->role,
+                                                                               
                        'member_id'             => $this->member_id,
                                                                                
                        'end_date'=>$end_date)
                                                        ));
                                        }
@@ -270,7 +277,8 @@
                                                'cat_id'                
=>$this->cat_id,
                                                'filter'                
=>$this->filter,
                                                'query'                 
=>$this->query,
-                                               'role'                  => 
$this->role
+                                               'role'                  => 
$this->role,
+                                               'member_id'             => 
$this->member_id
                        );
 
                        if(!$this->allrows)
@@ -290,6 +298,9 @@
                                                'role'                  => 
$this->role
                        );
 
+                       $member_of_data = 
$this->cats->formatted_xslt_list(array('selected' => $this->member_id,'globals' 
=> True));
+
+//_debug_array($member_of_data);
                        $data = array
                        (
                                'overlib_source'                                
=> './'.$this->currentapp.'/inc/overlib.js',
@@ -311,6 +322,11 @@
                                'select_name'                                   
=> 'cat_id',
                                'cat_list'                                      
        => $this->bo->select_category_list('filter',$this->cat_id),
                                'select_action'                                 
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
+
+                               'lang_no_member'                                
=> lang('no member'),
+                               'member_of_name'                                
=> 'member_id',
+                               'member_of_list'                                
=> $member_of_data['cat_list'],
+
                                'filter_list'                                   
=> $this->nextmatchs->xslt_filter(array('filter' => $this->filter)),
                                'lang_filter_statustext'                => 
lang('Select the filter. To show all entries select SHOW ALL'),
                                'lang_searchfield_statustext'   => lang('Enter 
the search string. To show all entries, empty this field and press the SUBMIT 
button again'),
@@ -366,7 +382,7 @@
 
                                        if(!$values['last_name'])
                                        {
-                                               
$receipt['error'][]=array('msg'=>lang('Please enter a name !'));
+//                                             
$receipt['error'][]=array('msg'=>lang('Please enter a name !'));
                                        }
 
                                        if(!$receipt['error'])
@@ -395,6 +411,7 @@
                        if ($actor_id)
                        {
                                $this->cat_id = 
($actor['cat_id']?$actor['cat_id']:$this->cat_id);
+                               $this->member_id = 
($actor['member_of']?$actor['member_of']:$this->member_id);
                        }
 
                        $link_data = array
@@ -403,7 +420,6 @@
                                'actor_id'              => $actor_id,
                                'role'                  => $this->role
                        );
-//_debug_array($link_data);
 
                        $dateformat = 
strtolower($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
                        $sep = '/';
@@ -435,6 +451,9 @@
 
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
 
+                       $member_of_data = 
$this->cats->formatted_xslt_list(array('selected' => $this->member_id,'globals' 
=> True));
+
+//_debug_array($member_of_data);
                        $data = array
                        (
                                'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
@@ -453,6 +472,11 @@
                                '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->bo->select_category_list('select',$this->cat_id),
+
+                               'lang_member_of'                                
=> lang('member of'),
+                               'member_of_name'                                
=> 'member_id',
+                               'member_of_list'                                
=> $member_of_data['cat_list'],
+
                                'lang_dateformat'                               
=> lang(strtolower($dateformat)),
                                'dateformat_validate'                   => 
$dateformat_validate,
                                'onKeyUp'                                       
        => $onKeyUp,
@@ -464,7 +488,7 @@
                                'lookup_functions'                              
=> $actor['lookup_functions'],
                                'dateformat'                                    
=> $dateformat,
                        );
-                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('actor') . ': ' . ($actor_id?lang('edit actor'):lang('add actor'));
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('actor') . ': ' . ($actor_id?lang('edit') . ' ' . 
lang($this->role):lang('add') . ' ' . lang($this->role));
 
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit' => $data));
                }
@@ -514,7 +538,7 @@
                        );
 
                        $appname                                                
= lang('actor');
-                       $function_msg                                   = 
lang('delete actor');
+                       $function_msg                                   = 
lang('delete') . ' ' . lang($this->role);
 
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('delete' => $data));
@@ -527,7 +551,7 @@
                        $actor_id       = get_var('actor_id',array('GET'));
                        $action         = get_var('action',array('GET'));
 
-                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('actor') . ': ' . lang('view actor');
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('actor') . ': ' . lang('view') . ' ' . lang($this->role);
 
                        
$GLOBALS['phpgw']->xslttpl->add_file(array('actor','attributes_view'));
 
@@ -544,6 +568,8 @@
 
                        $dateformat= (implode($sep,$dlarr));
 
+                       $member_of_data = 
$this->cats->formatted_xslt_list(array('selected' => 
$actor['member_of'],'globals' => True));
+
                        $data = array
                        (
                                'done_action'                           => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiactor.index&role='
 . $this->role),
@@ -551,6 +577,9 @@
                                'lang_time_created'                     => 
lang('time created'),
                                'lang_done'                                     
=> lang('done'),
                                'cat_list'                                      
=> $this->bo->select_category_list('',$actor['cat_id']),
+                               'lang_member_of'                        => 
lang('member of'),
+                               'member_of_list'                        => 
$member_of_data['cat_list'],
+
                                'value_date'                            => 
$GLOBALS['phpgw']->common->show_date($actor['entry_date']),
                                'lang_dateformat'                       => 
lang(strtolower($dateformat)),
                                'lang_attributes'                       => 
lang('Attributes'),
@@ -588,6 +617,7 @@
                                        'column_name'                           
=> $attrib['column_name'],
                                        'input_text'                            
=> $attrib['input_text'],
                                        'sorting'                               
        => $attrib['attrib_sort'],
+                                       'search'                                
        => $attrib['search'],
                                        'link_up'                               
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiactor.list_attribute&resort=up&id='
 . $attrib['id'] . '&allrows=' . $this->allrows . '&role=' . $this->role),
                                        'link_down'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiactor.list_attribute&resort=down&id='
 . $attrib['id'] . '&allrows=' . $this->allrows . '&role=' . $this->role),
                                        'link_edit'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiactor.edit_attrib&id='
 . $attrib['id'] . '&role=' . $this->role),
@@ -611,6 +641,7 @@
                                'lang_descr'            => lang('Descr'),
                                'lang_datatype'         => lang('Datatype'),
                                'lang_sorting'          => lang('sorting'),
+                               'lang_search'           => lang('search'),
                                'lang_edit'                     => lang('edit'),
                                'lang_delete'           => lang('delete'),
                                'sort_sorting'  => 
$this->nextmatchs->show_sort_order(array
@@ -683,11 +714,10 @@
                                'table_add2'                                    
=> $table_add
                        );
 
-                       $appname                                                
= lang('attribute');
-                       $function_msg                                   = 
lang('list location attribute');
+                       $appname                                                
= lang('actor');
+                       $function_msg                                   = 
lang('list attribute') . ': ' . lang($this->role);
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
                        //$this->save_sessiondata();
-//_debug_array($GLOBALS['phpgw_info']['user']);
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list_attribute' => $data));
                }
 
@@ -764,12 +794,12 @@
                        if ($id)
                        {
                                $values = $this->bo->read_single_attrib($id);
-                               $function_msg = lang('edit attribute');
+                               $function_msg = lang('edit attribute') . ': ' . 
lang($this->role);
                                $action='edit';
                        }
                        else
                        {
-                               $function_msg = lang('add attribute');
+                               $function_msg = lang('add attribute') . ': ' . 
lang($this->role);
                                $action='add';
                        }
 
@@ -850,11 +880,17 @@
 
                                'value_list'                            => 
$values['list'],
                                'lang_list'                                     
=> lang('show in list'),
-                               'lang_list_statustext'          => lang('check 
to show this attribute in location list')
+                               'lang_list_statustext'          => lang('check 
to show this attribute in location list'),
+
+                               'value_search'                          => 
$values['search'],
+                               'lang_include_search'           => 
lang('Include in search'),
+                               'lang_include_search_statustext'=> lang('check 
to show this attribute in location list'),
+
+
                        );
        //html_print_r($data);
 
-                       $appname                                                
= lang('location');
+                       $appname                                                
= lang('actor');
 
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit_attrib' => $data));




reply via email to

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