phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: admin/inc class.bocategories.inc.php,1.4,1.5 cla


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: admin/inc class.bocategories.inc.php,1.4,1.5 class.uicategories.inc.php,1.7,1.8
Date: Tue, 12 Mar 2002 23:15:33 -0500

Update of /cvsroot/phpgroupware/admin/inc
In directory subversions:/tmp/cvs-serv2346

Modified Files:
        class.bocategories.inc.php class.uicategories.inc.php 
Log Message:
update cats

Index: class.bocategories.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.bocategories.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.bocategories.inc.php  13 Jan 2002 23:54:46 -0000      1.4
--- class.bocategories.inc.php  13 Mar 2002 04:15:31 -0000      1.5
***************
*** 1,15 ****
  <?php
!   /**************************************************************************\
!   * phpGroupWare - Admin - Global categories                                 *
!   * http://www.phpgroupware.org                                              *
!   * Written by Bettina Gille address@hidden                          *
!   * -----------------------------------------------                          *
!   *  This program is free software; you can redistribute it and/or modify it *
!   *  under the terms of the GNU General Public License as published by the   *
!   *  Free Software Foundation; either version 2 of the License, or (at your  *
!   *  option) any later version.                                              *
!   \**************************************************************************/
! 
!   /* $Id$ */
  
        class bocategories
--- 1,15 ----
  <?php
!       
/**************************************************************************\
!       * phpGroupWare - Admin - Global categories                              
   *
!       * http://www.phpgroupware.org                                           
   *
!       * Written by Bettina Gille address@hidden                          *
!       * -----------------------------------------------                       
   *
!       *  This program is free software; you can redistribute it and/or modify 
it *
!       *  under the terms of the GNU General Public License as published by 
the   *
!       *  Free Software Foundation; either version 2 of the License, or (at 
your  *
!       *  option) any later version.                                           
   *
!       
\**************************************************************************/
!       /* $Id$ */
!       /* $Source$ */
  
        class bocategories
***************
*** 29,33 ****
                function bocategories()
                {
!                       $this->cats = CreateObject('phpgwapi.categories');
  
                        $this->read_sessiondata();
--- 29,40 ----
                function bocategories()
                {
!                       if ($GLOBALS['appname'])
!                       {
!                               $this->cats = 
CreateObject('phpgwapi.categories',-1,$GLOBALS['appname']);
!                       }
!                       else
!                       {
!                               $this->cats = 
CreateObject('phpgwapi.categories',$GLOBALS['phpgw_info']['user']['account_id'],'phpgw');
!                       }
  
                        $this->read_sessiondata();

Index: class.uicategories.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uicategories.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.uicategories.inc.php  13 Jan 2002 23:54:46 -0000      1.7
--- class.uicategories.inc.php  13 Mar 2002 04:15:31 -0000      1.8
***************
*** 1,14 ****
  <?php
!   /**************************************************************************\
!   * phpGroupWare - Admin - Global categories                                 *
!   * http://www.phpgroupware.org                                              *
!   * Written by Bettina Gille address@hidden                          *
!   * -----------------------------------------------                          *
!   *  This program is free software; you can redistribute it and/or modify it *
!   *  under the terms of the GNU General Public License as published by the   *
!   *  Free Software Foundation; either version 2 of the License, or (at your  *
!   *  option) any later version.                                              *
!   \**************************************************************************/
!   /* $Id$ */
  
        class uicategories
--- 1,15 ----
  <?php
!       
/**************************************************************************\
!       * phpGroupWare - Admin - Global categories                              
   *
!       * http://www.phpgroupware.org                                           
   *
!       * Written by Bettina Gille address@hidden                          *
!       * -----------------------------------------------                       
   *
!       *  This program is free software; you can redistribute it and/or modify 
it *
!       *  under the terms of the GNU General Public License as published by 
the   *
!       *  Free Software Foundation; either version 2 of the License, or (at 
your  *
!       *  option) any later version.                                           
   *
!       
\**************************************************************************/
!       /* $Id$ */
!       /* $Source$ */
  
        class uicategories
***************
*** 62,66 ****
                function save_sessiondata()
                {
!                       $data = array(
                                'start' => $this->start,
                                'query' => $this->query,
--- 63,68 ----
                function save_sessiondata()
                {
!                       $data = array
!                       (
                                'start' => $this->start,
                                'query' => $this->query,
***************
*** 68,71 ****
--- 70,74 ----
                                'order' => $this->order
                        );
+ 
                        if(isset($this->cat_id))
                        {
***************
*** 102,110 ****
                        $this->set_langs();
  
                        $this->template->set_var('lang_action',lang('Category 
list'));
!                       
$this->template->set_var('add_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.add'));
!                       
$this->template->set_var('title_categories',lang('Global categories'));
                        $this->template->set_var('query',$this->query);
!                       
$this->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index'));
                        
$this->template->set_var('doneurl',$GLOBALS['phpgw']->link('/admin/index.php'));
  
--- 105,126 ----
                        $this->set_langs();
  
+                       $link_data = array
+                       (
+                               'menuaction'    => 'admin.uicategories.index',
+                               'appname'               => $GLOBALS['appname']
+                       );
+ 
                        $this->template->set_var('lang_action',lang('Category 
list'));
! 
!                       if ($GLOBALS['appname'])
!                       {
!                               
$this->template->set_var('title_categories',lang('%1 Global 
categories',$GLOBALS['phpgw_info']['apps'][$GLOBALS['appname']]['title']));
!                       }
!                       else
!                       {
!                               
$this->template->set_var('title_categories',lang('Global categories'));
!                       }
                        $this->template->set_var('query',$this->query);
!                       
$this->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
                        
$this->template->set_var('doneurl',$GLOBALS['phpgw']->link('/admin/index.php'));
  
***************
*** 114,122 ****
                        }
  
-                       $this->bo->cats->app_name = 'phpgw';
                        $categories = $this->bo->get_list();
  
!                       $left  = 
$this->nextmatchs->left('/index.php',$this->start,$this->bo->cats->total_records,'menuaction=admin.uicategories.index');
!                       $right = 
$this->nextmatchs->right('/index.php',$this->start,$this->bo->cats->total_records,'menuaction=admin.uicategories.index');
                        $this->template->set_var('left',$left);
                        $this->template->set_var('right',$right);
--- 130,137 ----
                        }
  
                        $categories = $this->bo->get_list();
  
!                       $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->template->set_var('left',$left);
                        $this->template->set_var('right',$right);
***************
*** 124,129 ****
                        
$this->template->set_var('lang_showing',$this->nextmatchs->show_hits($this->bo->cats->total_records,$this->start));
  
!                       
$this->template->set_var('sort_name',$this->nextmatchs->show_sort_order($this->sort,'cat_name',$this->order,'/index.php',lang('Name'),'&menuaction=admin.uicategories.index'));
!                       
$this->template->set_var('sort_description',$this->nextmatchs->show_sort_order($this->sort,'cat_description',$this->order,'/index.php',lang('Description'),'&menuaction=admin.uicategories.index'));
  
                        for ($i=0;$i<count($categories);$i++)
--- 139,144 ----
                        
$this->template->set_var('lang_showing',$this->nextmatchs->show_hits($this->bo->cats->total_records,$this->start));
  
!                       
$this->template->set_var('sort_name',$this->nextmatchs->show_sort_order($this->sort,'cat_name',$this->order,'/index.php',lang('Name'),$link_data));
!                       
$this->template->set_var('sort_description',$this->nextmatchs->show_sort_order($this->sort,'cat_description',$this->order,'/index.php',lang('Description'),$link_data));
  
                        for ($i=0;$i<count($categories);$i++)
***************
*** 134,137 ****
--- 149,153 ----
                                $id = $categories[$i]['id'];
                                $level = $categories[$i]['level'];
+                               $cat_name = 
$GLOBALS['phpgw']->strip_html($categories[$i]['name']);
  
                                if ($level > 0)
***************
*** 139,143 ****
                                        $space = '&nbsp;&nbsp;';
                                        $spaceset = str_repeat($space,$level);
!                                       $name = $spaceset . 
$GLOBALS['phpgw']->strip_html($categories[$i]['name']);
                                }
  
--- 155,159 ----
                                        $space = '&nbsp;&nbsp;';
                                        $spaceset = str_repeat($space,$level);
!                                       $cat_name = $spaceset . $cat_name;
                                }
  
***************
*** 147,162 ****
                                if ($level == 0)
                                {
!                                       $name = '<font color="FF0000"><b>' . 
$GLOBALS['phpgw']->strip_html($categories[$i]['name']) . '</b></font>';
                                        $descr = '<font color="FF0000"><b>' . 
$descr . '</b></font>';
                                }
  
!                               $this->template->set_var(array('name' => $name,
!                               'descr' => $descr));
  
!                               
$this->template->set_var('add_sub',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.add&cat_parent='
 . $id));
                                
$this->template->set_var('lang_sub_entry',lang('Add sub'));
!                               
$this->template->set_var('edit',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.edit&cat_id='
 . $id));
                                
$this->template->set_var('lang_edit_entry',lang('Edit'));
!                               
$this->template->set_var('delete',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.delete&cat_id='
 . $id));
                                
$this->template->set_var('lang_delete_entry',lang('Delete'));
  
--- 163,199 ----
                                if ($level == 0)
                                {
!                                       $cat_name = '<font color="FF0000"><b>' 
. $cat_name . '</b></font>';
                                        $descr = '<font color="FF0000"><b>' . 
$descr . '</b></font>';
                                }
  
!                               if ($categories[$i]['app_name'] == 'phpgw')
!                               {
!                                       $appendix = '&lt;' . lang('Global') . 
'&gt;';
!                               }
!                               else
!                               {
!                                       $appendix = '';
!                               }
! 
!                               $this->template->set_var(array
!                               (
!                                       'name' => $cat_name . $appendix,
!                                       'descr' => $descr
!                               ));
! 
!                               $link_data['menuaction'] = 
'admin.uicategories.add';
!                               
$this->template->set_var('add_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
  
!                               $link_data['cat_parent'] = $id;
!                               
$this->template->set_var('add_sub',$GLOBALS['phpgw']->link('/index.php',$link_data));
                                
$this->template->set_var('lang_sub_entry',lang('Add sub'));
! 
!                               $link_data['cat_id'] = $id;
!                               $link_data['menuaction'] = 
'admin.uicategories.edit';
!                               
$this->template->set_var('edit',$GLOBALS['phpgw']->link('/index.php',$link_data));
                                
$this->template->set_var('lang_edit_entry',lang('Edit'));
! 
!                               $link_data['menuaction'] = 
'admin.uicategories.delete';
!                               
$this->template->set_var('delete',$GLOBALS['phpgw']->link('/index.php',$link_data));
                                
$this->template->set_var('lang_delete_entry',lang('Delete'));
  
***************
*** 185,189 ****
                        $this->template->set_block('form','edit','edithandle');
  
!                       $this->bo->cats->app_name = 'phpgw';
  
                        if ($new_parent)
--- 222,235 ----
                        $this->template->set_block('form','edit','edithandle');
  
!                       if ($GLOBALS['appname'])
!                       {
!                               $this->bo->cats->app_name = $GLOBALS['appname'];
!                               
$this->template->set_var('title_categories',lang('Add global category for 
%1',$GLOBALS['phpgw_info']['apps'][$GLOBALS['appname']]['title']));
!                       }
!                       else
!                       {
!                               $this->bo->cats->app_name = 'phpgw';
!                               
$this->template->set_var('title_categories',lang('Add global category'));
!                       }
  
                        if ($new_parent)
***************
*** 214,220 ****
                        }
  
!                       $this->template->set_var('title_categories',lang('Add 
global category'));
!                       
$this->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.add'));
!                       
$this->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index'));
                        $this->template->set_var('hidden_vars','<input 
type="hidden" name="cat_id" value="' . $this->cat_id . '">');
                        
$this->template->set_var('category_list',$this->bo->formatted_list(array('select'
 => 'select','all' => 'all','cat_parent' => $cat_parent)));
--- 260,265 ----
                        }
  
!                       
$this->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.add'
 . '&appname=' . $GLOBALS['appname']));
!                       
$this->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index'
 . '&appname=' . $GLOBALS['appname']));
                        $this->template->set_var('hidden_vars','<input 
type="hidden" name="cat_id" value="' . $this->cat_id . '">');
                        
$this->template->set_var('category_list',$this->bo->formatted_list(array('select'
 => 'select','all' => 'all','cat_parent' => $cat_parent)));
***************
*** 284,291 ****
                        $cats = $this->bo->cats->return_single($this->cat_id);
  
!                       $this->template->set_var('title_categories',lang('Edit 
global category'));
!                       
$this->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.edit'));
!                       
$this->template->set_var('deleteurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.delete&cat_id='
 . $this->cat_id));
!                       
$this->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index'));
                        $this->template->set_var('hidden_vars',$hidden_vars);
  
--- 329,344 ----
                        $cats = $this->bo->cats->return_single($this->cat_id);
  
!                       if ($GLOBALS['appname'])
!                       {
!                               
$this->template->set_var('title_categories',lang('Edit global category for 
%1',$GLOBALS['phpgw_info']['apps'][$GLOBALS['appname']]['title']));
!                       }
!                       else
!                       {
!                               
$this->template->set_var('title_categories',lang('Edit global category'));
!                       }
! 
!                       
$this->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.edit&appname='
 . $GLOBALS['appname']));
!                       
$this->template->set_var('deleteurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.delete&cat_id='
 . $this->cat_id . '&appname=' . $GLOBALS['appname']));
!                       
$this->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname='
 . $GLOBALS['appname']));
                        $this->template->set_var('hidden_vars',$hidden_vars);
  
***************
*** 302,308 ****
                function delete()
                {
                        if (!$this->cat_id)
                        {
!                               Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index'));
                        }
  
--- 355,367 ----
                function delete()
                {
+                       $link_data = array
+                       (
+                               'menuaction'    => 'admin.uicategories.index',
+                               'appname'               => $GLOBALS['appname']
+                       );
+ 
                        if (!$this->cat_id)
                        {
!                               Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php',$link_data));
                        }
  
***************
*** 319,323 ****
                                        $this->bo->delete($this->cat_id);
                                }
!                               Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index'));
                        }
                        else
--- 378,382 ----
                                        $this->bo->delete($this->cat_id);
                                }
!                               Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php',$link_data));
                        }
                        else
***************
*** 329,335 ****
                                
$this->template->set_block('category_delete','done','donehandle');
  
!                               $nolink = 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&cat_id='
 . $this->cat_id);
  
!                               $apps_cats = $this->bo->exists(array(
                                        'type'     => 'subs',
                                        'cat_name' => '',
--- 388,395 ----
                                
$this->template->set_block('category_delete','done','donehandle');
  
!                               $nolink = 
$GLOBALS['phpgw']->link('/index.php',$link_data);
  
!                               $apps_cats = $this->bo->exists(array
!                               (
                                        'type'     => 'subs',
                                        'cat_name' => '',
***************
*** 376,380 ****
                                        
$this->template->set_var('nolink',$nolink);
                                        
$this->template->set_var('lang_no',lang('No'));
!                                       
$this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.delete&cat_id='
 . $this->cat_id));
                                        
$this->template->set_var('lang_yes',lang('Yes'));
                                        
$this->template->set_var('deletehandle','');
--- 436,443 ----
                                        
$this->template->set_var('nolink',$nolink);
                                        
$this->template->set_var('lang_no',lang('No'));
! 
!                                       $link_data['menuaction'] = 
'admin.uicategories.delete';
!                                       $link_data['cat_id'] = $this->cat_id;
!                                       
$this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
                                        
$this->template->set_var('lang_yes',lang('Yes'));
                                        
$this->template->set_var('deletehandle','');




reply via email to

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