phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: preferences/inc class.uicategories.inc.php,1.10,


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: preferences/inc class.uicategories.inc.php,1.10,1.11
Date: Sat, 01 Jun 2002 10:15:43 -0400

Update of /cvsroot/phpgroupware/preferences/inc
In directory subversions:/tmp/cvs-serv14334

Modified Files:
        class.uicategories.inc.php 
Log Message:
some changes to be compatible with seek3r new template-system
output is not longer print, but 
$GLOBALS['phpgw']->template->set_var('phpgw_body',$content);

Index: class.uicategories.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/preferences/inc/class.uicategories.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** class.uicategories.inc.php  24 May 2002 10:38:03 -0000      1.10
--- class.uicategories.inc.php  1 Jun 2002 14:15:41 -0000       1.11
***************
*** 34,38 ****
                {
                        $this->bo                       = 
CreateObject('preferences.bocategories',$cats_app);
-                       $this->t                        = 
$GLOBALS['phpgw']->template;
                        $this->nextmatchs       = 
CreateObject('phpgwapi.nextmatchs');
                        $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
--- 34,37 ----
***************
*** 59,77 ****
                function set_langs()
                {
!                       
$this->t->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
!                       $this->t->set_var('lang_access',lang('Private'));
!                       $this->t->set_var('lang_save',lang('Save'));
!                       $this->t->set_var('user_name',$this->user);
!                       $this->t->set_var('lang_search',lang('Search'));
!                       $this->t->set_var('lang_done',lang('Done'));
!                       $this->t->set_var('lang_sub',lang('Add sub'));
!                       $this->t->set_var('lang_edit',lang('Edit'));
!                       $this->t->set_var('lang_delete',lang('Delete'));
!                       $this->t->set_var('lang_parent',lang('Parent 
category'));
!                       $this->t->set_var('lang_none',lang('None'));
!                       $this->t->set_var('lang_name',lang('Name'));
!                       $this->t->set_var('lang_descr',lang('Description'));
!                       $this->t->set_var('lang_add',lang('Add'));
!                       $this->t->set_var('lang_reset',lang('Clear Form'));
                }
  
--- 58,76 ----
                function set_langs()
                {
!                       
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
!                       
$GLOBALS['phpgw']->template->set_var('lang_access',lang('Private'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_save',lang('Save'));
!                       
$GLOBALS['phpgw']->template->set_var('user_name',$this->user);
!                       
$GLOBALS['phpgw']->template->set_var('lang_search',lang('Search'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_done',lang('Done'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_sub',lang('Add sub'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_edit',lang('Edit'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_delete',lang('Delete'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_parent',lang('Parent category'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_none',lang('None'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_name',lang('Name'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_descr',lang('Description'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_add',lang('Add'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_reset',lang('Clear Form'));
                }
  
***************
*** 105,119 ****
                        $GLOBALS['phpgw']->common->phpgw_header();
  
!                       $this->t->set_file(array('cat_list_t'   => 
'listcats.tpl',
!                                                                       
'data_column'   => 'listcats.tpl'));
!                       
$this->t->set_block('cat_list_t','data_column','column');
!                       $this->t->set_block('cat_list_t','cat_list','list');
  
                        $this->set_langs();
  
!                       $this->t->set_var('title_categories',lang('categories 
for'));
!                       $this->t->set_var('lang_app',lang($cats_app));
!                       
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$this->t->set_var('doneurl',$GLOBALS['phpgw']->link('/preferences/index.php'));
  
                        if(!$this->start)
--- 104,117 ----
                        $GLOBALS['phpgw']->common->phpgw_header();
  
!                       
$GLOBALS['phpgw']->template->set_file(array('cat_list_t'        => 
'listcats.tpl'));
!                       
$GLOBALS['phpgw']->template->set_block('cat_list_t','cat_list');
!                       
$GLOBALS['phpgw']->template->set_block('cat_list_t','cat_row');
  
                        $this->set_langs();
  
!                       
$GLOBALS['phpgw']->template->set_var('title_categories',lang('categories for'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_app',lang($cats_app));
!                       
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/preferences/index.php'));
  
                        if(!$this->start)
***************
*** 134,161 ****
                        $left  = 
$this->nextmatchs->left('/index.php',$this->start,$this->bo->cats->total_records,$link_data);
                        $right = 
$this->nextmatchs->right('/index.php',$this->start,$this->bo->cats->total_records,$link_data);
!                       $this->t->set_var('left',$left);
!                       $this->t->set_var('right',$right);
  
!                       
$this->t->set_var('lang_showing',$this->nextmatchs->show_hits($this->bo->cats->total_records,$this->start));
  
  // ------------------------------ end nextmatch 
------------------------------------------
  
! //------------------- list header variable template-declarations 
------------------------- 
  
!                       
$this->t->set_var('sort_name',$this->nextmatchs->show_sort_order($this->sort,'cat_name',$this->order,'/index.php',lang('Name'),$link_data));
!                       
$this->t->set_var('sort_description',$this->nextmatchs->show_sort_order($this->sort,'cat_description',$this->order,'/index.php',lang('Description'),$link_data));
  
                        if (is_array($edata))
                        {
                                for($i=0;$i<count($edata);$i++)
                                {
!                                       $this->t->set_var('th_data','<td 
bgcolor="' . $GLOBALS['phpgw_info']['theme']['th_bg'] . '">' . lang($edata[$i]) 
. '</td>');
!                                       
$this->t->fp('column','data_column',True);
                                }
                        }
!                       else
!                       {
!                               $this->t->set_var('th_data','');
!                       }
  
  // -------------------------- end header declaration 
--------------------------------------
--- 132,156 ----
                        $left  = 
$this->nextmatchs->left('/index.php',$this->start,$this->bo->cats->total_records,$link_data);
                        $right = 
$this->nextmatchs->right('/index.php',$this->start,$this->bo->cats->total_records,$link_data);
!                       $GLOBALS['phpgw']->template->set_var('left',$left);
!                       $GLOBALS['phpgw']->template->set_var('right',$right);
  
!                       
$GLOBALS['phpgw']->template->set_var('lang_showing',$this->nextmatchs->show_hits($this->bo->cats->total_records,$this->start));
  
  // ------------------------------ end nextmatch 
------------------------------------------
  
! //------------------- list header variable template-declarations 
-------------------------
  
!                       
$GLOBALS['phpgw']->template->set_var('sort_name',$this->nextmatchs->show_sort_order($this->sort,'cat_name',$this->order,'/index.php',lang('Name'),$link_data));
!                       
$GLOBALS['phpgw']->template->set_var('sort_description',$this->nextmatchs->show_sort_order($this->sort,'cat_description',$this->order,'/index.php',lang('Description'),$link_data));
  
+                       $th_data = '';
                        if (is_array($edata))
                        {
                                for($i=0;$i<count($edata);$i++)
                                {
!                                       $th_data .= '<td bgcolor="' . 
$GLOBALS['phpgw_info']['theme']['th_bg'] . '">' . lang($edata[$i]) . 
'</td>'."\n";
                                }
                        }
!                       
$GLOBALS['phpgw']->template->set_var('th_data',$th_data);
  
  // -------------------------- end header declaration 
--------------------------------------
***************
*** 163,167 ****
                        for ($i=0;$i<count($cats);$i++)
                        {
!                               
$this->nextmatchs->template_alternate_row_color(&$this->t);
  
                                if ($cats[$i]['app_name'] == 'phpgw')
--- 158,162 ----
                        for ($i=0;$i<count($cats);$i++)
                        {
!                               
$this->nextmatchs->template_alternate_row_color($GLOBALS['phpgw']->template);
  
                                if ($cats[$i]['app_name'] == 'phpgw')
***************
*** 197,205 ****
                                                $holder = '<td>&nbsp;</td>' . 
"\n";
                                                $placeholder = 
str_repeat($holder,count($edata));
!                                               
$this->t->set_var('td_data',$placeholder);
                                        }
                                        else
                                        {
!                                               
$this->t->set_var('td_data',$this->cat_data($edata,$data));
                                        }
                                }
--- 192,200 ----
                                                $holder = '<td>&nbsp;</td>' . 
"\n";
                                                $placeholder = 
str_repeat($holder,count($edata));
!                                               
$GLOBALS['phpgw']->template->set_var('td_data',$placeholder);
                                        }
                                        else
                                        {
!                                               
$GLOBALS['phpgw']->template->set_var('td_data',$this->cat_data($edata,$data));
                                        }
                                }
***************
*** 211,218 ****
                                }
  
!                               $this->t->set_var(array('name' => $name,
                                                                                
'descr' => $descr));
  
!                               
$this->t->set_var('app_url',$GLOBALS['phpgw']->link('/' . $cats_app . 
'/index.php','cat_id=' . $cats[$i]['id']));
  
                                if ($cats_level || ($level == 0))
--- 206,213 ----
                                }
  
!                               
$GLOBALS['phpgw']->template->set_var(array('name' => $name,
                                                                                
'descr' => $descr));
  
!                               
$GLOBALS['phpgw']->template->set_var('app_url',$GLOBALS['phpgw']->link('/' . 
$cats_app . '/index.php','cat_id=' . $cats[$i]['id']));
  
                                if ($cats_level || ($level == 0))
***************
*** 222,233 ****
                                                $link_data['menuaction']        
= 'preferences.uicategories.add';
                                                $link_data['cat_parent']        
= $cats[$i]['id'];
!                                               
$this->t->set_var('add_sub',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                                               
$this->t->set_var('lang_sub_entry',lang('Add sub'));
                                        }
                                }
                                else
                                {
!                                       $this->t->set_var('add_sub','');
!                                       
$this->t->set_var('lang_sub_entry','&nbsp;');
                                }
  
--- 217,228 ----
                                                $link_data['menuaction']        
= 'preferences.uicategories.add';
                                                $link_data['cat_parent']        
= $cats[$i]['id'];
!                                               
$GLOBALS['phpgw']->template->set_var('add_sub',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                                               
$GLOBALS['phpgw']->template->set_var('lang_sub_entry',lang('Add sub'));
                                        }
                                }
                                else
                                {
!                                       
$GLOBALS['phpgw']->template->set_var('add_sub','');
!                                       
$GLOBALS['phpgw']->template->set_var('lang_sub_entry','&nbsp;');
                                }
  
***************
*** 236,261 ****
                                {
                                        $link_data['menuaction'] = 
'preferences.uicategories.edit';
!                                       
$this->t->set_var('edit',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                                       
$this->t->set_var('lang_edit_entry',lang('Edit'));
  
                                        $link_data['menuaction'] = 
'preferences.uicategories.delete';
!                                       
$this->t->set_var('delete',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                                       
$this->t->set_var('lang_delete_entry',lang('Delete'));
                                }
                                else
                                {
!                                       $this->t->set_var('edit','');
!                                       
$this->t->set_var('lang_edit_entry','&nbsp;');
  
!                                       $this->t->set_var('delete','');
!                                       
$this->t->set_var('lang_delete_entry','&nbsp;');
                                }
!                               $this->t->fp('list','cat_list',True);
                        }
                        $link_data['menuaction'] = 
'preferences.uicategories.add';
!                       
$this->t->set_var('add_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
                        $this->save_sessiondata($cats_app);
  
!                       $this->t->pfp('out','cat_list_t',True);
                }
  
--- 231,256 ----
                                {
                                        $link_data['menuaction'] = 
'preferences.uicategories.edit';
!                                       
$GLOBALS['phpgw']->template->set_var('edit',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                                       
$GLOBALS['phpgw']->template->set_var('lang_edit_entry',lang('Edit'));
  
                                        $link_data['menuaction'] = 
'preferences.uicategories.delete';
!                                       
$GLOBALS['phpgw']->template->set_var('delete',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                                       
$GLOBALS['phpgw']->template->set_var('lang_delete_entry',lang('Delete'));
                                }
                                else
                                {
!                                       
$GLOBALS['phpgw']->template->set_var('edit','');
!                                       
$GLOBALS['phpgw']->template->set_var('lang_edit_entry','&nbsp;');
  
!                                       
$GLOBALS['phpgw']->template->set_var('delete','');
!                                       
$GLOBALS['phpgw']->template->set_var('lang_delete_entry','&nbsp;');
                                }
!                               
$GLOBALS['phpgw']->template->fp('rows','cat_row',True);
                        }
                        $link_data['menuaction'] = 
'preferences.uicategories.add';
!                       
$GLOBALS['phpgw']->template->set_var('add_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
                        $this->save_sessiondata($cats_app);
  
!                       
$GLOBALS['phpgw']->template->fp('phpgw_body','cat_list',True);
                }
  
***************
*** 283,290 ****
                        $cat_access      = get_var('cat_access',Array('POST'));
  
!                       $this->t->set_file(array('form' => 
'category_form.tpl'));
!                       $this->t->set_block('form','data_row','row');
!                       $this->t->set_block('form','add','addhandle');
!                       $this->t->set_block('form','edit','edithandle');
  
                        $this->set_langs();
--- 278,286 ----
                        $cat_access      = get_var('cat_access',Array('POST'));
  
!                       $GLOBALS['phpgw']->template->set_file(array('cat_form' 
=> 'category_form.tpl'));
!                       
$GLOBALS['phpgw']->template->set_block('cat_form','data_row');
!                       
$GLOBALS['phpgw']->template->set_block('cat_form','add');
!                       
$GLOBALS['phpgw']->template->set_block('cat_form','edit');
!                       
$GLOBALS['phpgw']->template->set_block('cat_form','form');
  
                        $this->set_langs();
***************
*** 318,333 ****
                                if (is_array($error))
                                {
!                                       
$this->t->set_var('message',$GLOBALS['phpgw']->common->error_list($error));
                                }
                                else
                                {
                                        $this->bo->save_cat($values);
!                                       
$this->t->set_var('message',lang('Category x has been added !', $cat_name));
                                }
                        }
  
!                       $this->t->set_var('title_categories',lang('Add x 
category for',lang($cats_app)));
!                       $this->t->set_var('lang_app',lang($cats_app));
!                       
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
  
                        if ($cats_level)
--- 314,329 ----
                                if (is_array($error))
                                {
!                                       
$GLOBALS['phpgw']->template->set_var('message',$GLOBALS['phpgw']->common->error_list($error));
                                }
                                else
                                {
                                        $this->bo->save_cat($values);
!                                       
$GLOBALS['phpgw']->template->set_var('message',lang('Category x has been added 
!', $cat_name));
                                }
                        }
  
!                       
$GLOBALS['phpgw']->template->set_var('title_categories',lang('Add x category 
for',lang($cats_app)));
!                       
$GLOBALS['phpgw']->template->set_var('lang_app',lang($cats_app));
!                       
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
  
                        if ($cats_level)
***************
*** 340,348 ****
                        }
  
!                       
$this->t->set_var('category_list',$this->bo->cats->formated_list('select',$type,$cat_parent,$global_cats));
!                       $this->t->set_var('cat_name',$cat_name);
!                       $this->t->set_var('cat_description',$cat_description);
  
!                       $this->t->set_var('access','<input type="checkbox" 
name="cat_access" value="True"'
                                                                                
. ($cat_access == True ?' checked':'') . '>');
  
--- 336,344 ----
                        }
  
!                       
$GLOBALS['phpgw']->template->set_var('category_list',$this->bo->cats->formated_list('select',$type,$cat_parent,$global_cats));
!                       
$GLOBALS['phpgw']->template->set_var('cat_name',$cat_name);
!                       
$GLOBALS['phpgw']->template->set_var('cat_description',$cat_description);
  
!                       $GLOBALS['phpgw']->template->set_var('access','<input 
type="checkbox" name="cat_access" value="True"'
                                                                                
. ($cat_access == True ?' checked':'') . '>');
  
***************
*** 352,367 ****
                                for($i=0;$i<count($edata);$i++)
                                {
!                                       $this->t->set_var('td_data','<input 
name="cat_data[' . $edata[$i] . ']" size="50" value="' . $cat_data[$edata[$i]] 
. '">');
!                                       
$this->t->set_var('lang_data',lang($edata[$i]));
!                                       $this->t->fp('row','data_row',True);
                                }
                        }
  
                        $link_data['menuaction']        = 
'preferences.uicategories.index';
!                       
$this->t->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                       $this->t->set_var('edithandle','');
!                       $this->t->set_var('addhandle','');
!                       $this->t->pfp('out','form');
!                       $this->t->pfp('addhandle','add');
                }
  
--- 348,362 ----
                                for($i=0;$i<count($edata);$i++)
                                {
!                                       
$GLOBALS['phpgw']->template->set_var('td_data','<input name="cat_data[' . 
$edata[$i] . ']" size="50" value="' . $cat_data[$edata[$i]] . '">');
!                                       
$GLOBALS['phpgw']->template->set_var('lang_data',lang($edata[$i]));
!                                       
$GLOBALS['phpgw']->template->fp('rows','data_row',True);
                                }
                        }
  
                        $link_data['menuaction']        = 
'preferences.uicategories.index';
!                       
$GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
! 
!                       $GLOBALS['phpgw']->template->parse('buttons','add');
!                       $GLOBALS['phpgw']->template->fp('phpgw_body','form');
                }
  
***************
*** 395,405 ****
                        $cat_access      = get_var('cat_access',Array('POST'));
  
!                       $this->t->set_file(array('form' => 
'category_form.tpl'));
!                       $this->t->set_block('form','data_row','row');
!                       $this->t->set_block('form','add','addhandle');
!                       $this->t->set_block('form','edit','edithandle');
  
                        $this->set_langs();
!                       
$this->t->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
                        $this->bo->cats->app_name = $cats_app;
  
--- 390,401 ----
                        $cat_access      = get_var('cat_access',Array('POST'));
  
!                       $GLOBALS['phpgw']->template->set_file(array('cat_form' 
=> 'category_form.tpl'));
!                       
$GLOBALS['phpgw']->template->set_block('cat_form','data_row');
!                       
$GLOBALS['phpgw']->template->set_block('cat_form','add');
!                       
$GLOBALS['phpgw']->template->set_block('cat_form','edit');
!                       
$GLOBALS['phpgw']->template->set_block('cat_form','form');
  
                        $this->set_langs();
!                       
$GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
                        $this->bo->cats->app_name = $cats_app;
  
***************
*** 431,440 ****
                                if (is_array($error))
                                {
!                                       
$this->t->set_var('message',$GLOBALS['phpgw']->common->error_list($error));
                                }
                                else
                                {
                                        $this->bo->save_cat($values);
!                                       
$this->t->set_var('message',lang('Category x has been updated !',$cat_name));
                                }
                        }
--- 427,436 ----
                                if (is_array($error))
                                {
!                                       
$GLOBALS['phpgw']->template->set_var('message',$GLOBALS['phpgw']->common->error_list($error));
                                }
                                else
                                {
                                        $this->bo->save_cat($values);
!                                       
$GLOBALS['phpgw']->template->set_var('message',lang('Category x has been 
updated !',$cat_name));
                                }
                        }
***************
*** 442,452 ****
                        $cats = $this->bo->cats->return_single($cat_id);
  
!                       $this->t->set_var('title_categories',lang('Edit x 
category for',lang($cats_app)));
!                       $this->t->set_var('lang_app',lang($cats_app));
                        $link_data['menuaction']        = 
'preferences.uicategories.edit';
!                       
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
  
!                       
$this->t->set_var('cat_name',$GLOBALS['phpgw']->strip_html($cats[0]['name']));
!                       
$this->t->set_var('cat_description',$GLOBALS['phpgw']->strip_html($cats[0]['description']));
  
                        if ($cats_level)
--- 438,448 ----
                        $cats = $this->bo->cats->return_single($cat_id);
  
!                       
$GLOBALS['phpgw']->template->set_var('title_categories',lang('Edit x category 
for',lang($cats_app)));
!                       
$GLOBALS['phpgw']->template->set_var('lang_app',lang($cats_app));
                        $link_data['menuaction']        = 
'preferences.uicategories.edit';
!                       
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
  
!                       
$GLOBALS['phpgw']->template->set_var('cat_name',$GLOBALS['phpgw']->strip_html($cats[0]['name']));
!                       
$GLOBALS['phpgw']->template->set_var('cat_description',$GLOBALS['phpgw']->strip_html($cats[0]['description']));
  
                        if ($cats_level)
***************
*** 459,465 ****
                        }
  
!                       
$this->t->set_var('category_list',$this->bo->cats->formated_list('select',$type,$cats[0]['parent'],$global_cats));
  
!                       $this->t->set_var('access','<input type="checkbox" 
name="cat_access" value="True"'
                                                                                
. ($cats[0]['access'] == private ?' checked':'') . '>');
  
--- 455,461 ----
                        }
  
!                       
$GLOBALS['phpgw']->template->set_var('category_list',$this->bo->cats->formated_list('select',$type,$cats[0]['parent'],$global_cats));
  
!                       $GLOBALS['phpgw']->template->set_var('access','<input 
type="checkbox" name="cat_access" value="True"'
                                                                                
. ($cats[0]['access'] == private ?' checked':'') . '>');
  
***************
*** 471,477 ****
                                for($i=0;$i<count($edata);$i++)
                                {
!                                       $this->t->set_var('td_data','<input 
name="cat_data[' . $edata[$i] . ']" size="50" value="' . $data[$edata[$i]] . 
'">');
!                                       
$this->t->set_var('lang_data',lang($edata[$i]));
!                                       $this->t->fp('row','data_row',True);
                                }
                        }
--- 467,473 ----
                                for($i=0;$i<count($edata);$i++)
                                {
!                                       
$GLOBALS['phpgw']->template->set_var('td_data','<input name="cat_data[' . 
$edata[$i] . ']" size="50" value="' . $data[$edata[$i]] . '">');
!                                       
$GLOBALS['phpgw']->template->set_var('lang_data',lang($edata[$i]));
!                                       
$GLOBALS['phpgw']->template->fp('rows','data_row',True);
                                }
                        }
***************
*** 480,495 ****
                        {
                                $link_data['menuaction']        = 
'preferences.uicategories.delete';
!                               $this->t->set_var('delete','<form method="POST" 
action="' . $GLOBALS['phpgw']->link('/index.php',$link_data)
                                                                                
        . '"><input type="submit" value="' . lang('Delete') .'"></form>');
                        }
                        else
                        {
!                               $this->t->set_var('delete','&nbsp;');
                        }
  
!                       $this->t->set_var('edithandle','');
!                       $this->t->set_var('addhandle','');
!                       $this->t->pfp('out','form');
!                       $this->t->pfp('edithandle','edit');
                }
  
--- 476,489 ----
                        {
                                $link_data['menuaction']        = 
'preferences.uicategories.delete';
!                               
$GLOBALS['phpgw']->template->set_var('delete','<form method="POST" action="' . 
$GLOBALS['phpgw']->link('/index.php',$link_data)
                                                                                
        . '"><input type="submit" value="' . lang('Delete') .'"></form>');
                        }
                        else
                        {
!                               
$GLOBALS['phpgw']->template->set_var('delete','&nbsp;');
                        }
  
!                       $GLOBALS['phpgw']->template->parse('buttons','edit');
!                       $GLOBALS['phpgw']->template->fp('phpgw_body','form');
                }
  
***************
*** 529,533 ****
                        else
                        {
!                               $this->t->set_file(array('category_delete' => 
'delete.tpl'));
  
                                $nolink = 
$GLOBALS['phpgw']->link('/index.php',$link_data);
--- 523,527 ----
                        else
                        {
!                               
$GLOBALS['phpgw']->template->set_file(array('category_delete' => 'delete.tpl'));
  
                                $nolink = 
$GLOBALS['phpgw']->link('/index.php',$link_data);
***************
*** 535,539 ****
                                $GLOBALS['phpgw']->common->phpgw_header();
  
!                               $this->t->set_var('deleteheader',lang('Are you 
sure you want to delete this category ?'));
  
                                $exists = $this->bo->exists(array
--- 529,533 ----
                                $GLOBALS['phpgw']->common->phpgw_header();
  
!                               
$GLOBALS['phpgw']->template->set_var('deleteheader',lang('Are you sure you want 
to delete this category ?'));
  
                                $exists = $this->bo->exists(array
***************
*** 546,564 ****
                                if ($exists)
                                {
!                                       $this->t->set_var('lang_subs',lang('Do 
you also want to delete all subcategories ?'));
!                                       $this->t->set_var('subs','<input 
type="checkbox" name="subs" value="True">');
                                }
                                else
                                {
!                                       $this->t->set_var('lang_subs','');
!                                       $this->t->set_var('subs', '');
                                }
  
!                               $this->t->set_var('nolink',$nolink);
!                               $this->t->set_var('lang_no',lang('No'));
                                $link_data['menuaction']        = 
'preferences.uicategories.delete';
!                               
$this->t->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                               $this->t->set_var('lang_yes',lang('Yes'));
!                               $this->t->pfp('out','category_delete');
                        }
                }
--- 540,558 ----
                                if ($exists)
                                {
!                                       
$GLOBALS['phpgw']->template->set_var('lang_subs',lang('Do you also want to 
delete all subcategories ?'));
!                                       
$GLOBALS['phpgw']->template->set_var('subs','<input type="checkbox" name="subs" 
value="True">');
                                }
                                else
                                {
!                                       
$GLOBALS['phpgw']->template->set_var('lang_subs','');
!                                       
$GLOBALS['phpgw']->template->set_var('subs', '');
                                }
  
!                               
$GLOBALS['phpgw']->template->set_var('nolink',$nolink);
!                               
$GLOBALS['phpgw']->template->set_var('lang_no',lang('No'));
                                $link_data['menuaction']        = 
'preferences.uicategories.delete';
!                               
$GLOBALS['phpgw']->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
!                               
$GLOBALS['phpgw']->template->set_var('lang_yes',lang('Yes'));
!                               
$GLOBALS['phpgw']->template->fp('phpgw_body','category_delete');
                        }
                }




reply via email to

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