[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: preferences/inc class.uicategories.inc.php,1.2.
From: |
Bettina Gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: preferences/inc class.uicategories.inc.php,1.2.2.8.2.1,1.2.2.8.2.2 |
Date: |
Tue, 24 Jun 2003 17:03:18 -0400 |
Update of /cvsroot/phpgroupware/preferences/inc
In directory subversions:/tmp/cvs-serv28127/inc
Modified Files:
Tag: Version-0_9_16-branch
class.uicategories.inc.php
Log Message:
fix
Index: class.uicategories.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/preferences/inc/class.uicategories.inc.php,v
retrieving revision 1.2.2.8.2.1
retrieving revision 1.2.2.8.2.2
diff -C2 -r1.2.2.8.2.1 -r1.2.2.8.2.2
*** class.uicategories.inc.php 19 Apr 2003 18:42:40 -0000 1.2.2.8.2.1
--- class.uicategories.inc.php 24 Jun 2003 21:03:16 -0000 1.2.2.8.2.2
***************
*** 1,19 ****
<?php
! /**************************************************************************\
! * phpGroupWare - Preferences - 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
{
var $bo;
- var $t;
var $start;
--- 1,20 ----
<?php
!
/**************************************************************************\
! * phpGroupWare - Preferences - categories
*
! * http://www.phpgroupware.org
*
! * Written by Bettina Gille address@hidden *
! * -----------------------------------------------
*
! * Copyright 2000 - 2003 Free Software Foundation, Inc
*
! *
*
! * 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
{
var $bo;
var $start;
***************
*** 23,26 ****
--- 24,29 ----
var $cat_id;
+ var $cats_app;
+
var $public_functions = array
(
***************
*** 33,42 ****
function uicategories()
{
! //$this->bo =
CreateObject('preferences.bocategories',$cats_app);
! $this->bo =
CreateObject('preferences.bocategories');
! $this->t = $GLOBALS['phpgw']->template;
! $this->nextmatchs = CreateObject('phpgwapi.nextmatchs');
! $this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
! $this->user =
$GLOBALS['phpgw_info']['user']['fullname'];
$this->start = $this->bo->start;
--- 36,45 ----
function uicategories()
{
! $cats_app =
get_var('cats_app',array('GET','POST'));
!
! $this->bo =
CreateObject('preferences.bocategories',$cats_app);
! $this->nextmatchs =
CreateObject('phpgwapi.nextmatchs');
! $this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
! $this->user =
$GLOBALS['phpgw_info']['user']['fullname'];
$this->start = $this->bo->start;
***************
*** 60,80 ****
function set_langs()
{
!
$this->t->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
!
$this->t->set_var('row_on',$GLOBALS['phpgw_info']['theme']['row_on']);
!
$this->t->set_var('row_off',$GLOBALS['phpgw_info']['theme']['row_off']);
! $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('Cancel'));
! $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'));
}
--- 63,83 ----
function set_langs()
{
!
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
!
$GLOBALS['phpgw']->template->set_var('row_on',$GLOBALS['phpgw_info']['theme']['row_on']);
!
$GLOBALS['phpgw']->template->set_var('row_off',$GLOBALS['phpgw_info']['theme']['row_off']);
!
$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('Cancel'));
!
$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'));
}
***************
*** 113,129 ****
echo parse_navbar();
! $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)
--- 116,130 ----
echo parse_navbar();
!
$GLOBALS['phpgw']->template->set_file(array('cat_list_t' => 'listcats.tpl',
!
'data_column' => 'listcats.tpl'));
!
$GLOBALS['phpgw']->template->set_block('cat_list_t','data_column','column');
!
$GLOBALS['phpgw']->template->set_block('cat_list_t','cat_list','list');
$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)
***************
*** 137,141 ****
}
- $this->bo->cats->app_name = $cats_app;
$cats = $this->bo->get_list($global_cats);
--- 138,141 ----
***************
*** 144,151 ****
$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
------------------------------------------
--- 144,151 ----
$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
------------------------------------------
***************
*** 153,158 ****
//------------------- 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))
--- 153,158 ----
//------------------- 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));
if (is_array($edata))
***************
*** 160,170 ****
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','');
}
--- 160,170 ----
for($i=0;$i<count($edata);$i++)
{
!
$GLOBALS['phpgw']->template->set_var('th_data','<td bgcolor="' .
$GLOBALS['phpgw_info']['theme']['th_bg'] . '">' . lang($edata[$i]) . '</td>');
!
$GLOBALS['phpgw']->template->fp('column','data_column',True);
}
}
else
{
!
$GLOBALS['phpgw']->template->set_var('th_data','');
}
***************
*** 173,177 ****
for ($i=0;$i<count($cats);$i++)
{
!
$this->nextmatchs->template_alternate_row_color(&$this->t);
if ($cats[$i]['app_name'] == 'phpgw')
--- 173,177 ----
for ($i=0;$i<count($cats);$i++)
{
!
$this->nextmatchs->template_alternate_row_color(&$GLOBALS['phpgw']->template);
if ($cats[$i]['app_name'] == 'phpgw')
***************
*** 207,215 ****
$holder = '<td> </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));
}
}
--- 207,215 ----
$holder = '<td> </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));
}
}
***************
*** 221,230 ****
}
! $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))
--- 221,230 ----
}
! $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))
***************
*** 234,245 ****
$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',' ');
}
--- 234,245 ----
$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',' ');
}
***************
*** 248,273 ****
{
$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',' ');
! $this->t->set_var('delete','');
!
$this->t->set_var('lang_delete_entry',' ');
}
! $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);
}
--- 248,273 ----
{
$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',' ');
!
$GLOBALS['phpgw']->template->set_var('delete','');
!
$GLOBALS['phpgw']->template->set_var('lang_delete_entry',' ');
}
!
$GLOBALS['phpgw']->template->fp('list','cat_list',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->pfp('out','cat_list_t',True);
}
***************
*** 294,298 ****
$new_parent = $_POST['new_parent'];
- $submit = $_POST['submit'];
$cat_parent =
get_var('cat_parent',array('POST','GET'));
$cat_name = $_POST['cat_name'];
--- 294,297 ----
***************
*** 301,313 ****
$cat_access = $_POST['cat_access'];
! $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->bo->cats->app_name = $cats_app;
-
if ($new_parent)
{
--- 300,310 ----
$cat_access = $_POST['cat_access'];
! $GLOBALS['phpgw']->template->set_file(array('form' =>
'category_form.tpl'));
!
$GLOBALS['phpgw']->template->set_block('form','data_row','row');
!
$GLOBALS['phpgw']->template->set_block('form','add','addhandle');
!
$GLOBALS['phpgw']->template->set_block('form','edit','edithandle');
$this->set_langs();
if ($new_parent)
{
***************
*** 320,324 ****
}
! if ($submit)
{
$data = serialize($cat_data);
--- 317,321 ----
}
! if ($_POST['save'])
{
$data = serialize($cat_data);
***************
*** 336,349 ****
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 %1 has been added !', $cat_name));
}
}
!
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
if ($cats_level)
--- 333,346 ----
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 %1 has been added
!', $cat_name));
}
}
!
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
if ($cats_level)
***************
*** 356,364 ****
}
!
$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':'') . '>');
--- 353,361 ----
}
!
$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':'') . '>');
***************
*** 368,384 ****
for($i=0;$i<count($edata);$i++)
{
!
$this->t->set_var('tr_color',$GLOBALS['phpgw']->nextmatchs->alternate_row_color());
! $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');
}
--- 365,381 ----
for($i=0;$i<count($edata);$i++)
{
!
$GLOBALS['phpgw']->template->set_var('tr_color',$GLOBALS['phpgw']->nextmatchs->alternate_row_color());
!
$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('row','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->set_var('edithandle','');
! $GLOBALS['phpgw']->template->set_var('addhandle','');
! $GLOBALS['phpgw']->template->pfp('out','form');
! $GLOBALS['phpgw']->template->pfp('addhandle','add');
}
***************
*** 412,416 ****
$new_parent = $_POST['new_parent'];
- $submit = $_POST['submit'];
$cat_parent = $_POST['cat_parent'];
$cat_name = $_POST['cat_name'];
--- 409,412 ----
***************
*** 420,431 ****
$old_parent = $_POST['old_parent'];
! $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;
if ($new_parent)
--- 416,426 ----
$old_parent = $_POST['old_parent'];
! $GLOBALS['phpgw']->template->set_file(array('form' =>
'category_form.tpl'));
!
$GLOBALS['phpgw']->template->set_block('form','data_row','row');
!
$GLOBALS['phpgw']->template->set_block('form','add','addhandle');
!
$GLOBALS['phpgw']->template->set_block('form','edit','edithandle');
$this->set_langs();
!
$GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
if ($new_parent)
***************
*** 439,443 ****
}
! if ($submit)
{
$data = serialize($cat_data);
--- 434,438 ----
}
! if ($_POST['save'])
{
$data = serialize($cat_data);
***************
*** 457,466 ****
if (is_array($error))
{
!
$this->t->set_var('message',$GLOBALS['phpgw']->common->error_list($error));
}
else
{
$cat_id = $this->bo->save_cat($values);
!
$this->t->set_var('message',lang('Category %1 has been updated !',$cat_name));
}
}
--- 452,461 ----
if (is_array($error))
{
!
$GLOBALS['phpgw']->template->set_var('message',$GLOBALS['phpgw']->common->error_list($error));
}
else
{
$cat_id = $this->bo->save_cat($values);
!
$GLOBALS['phpgw']->template->set_var('message',lang('Category %1 has been
updated !',$cat_name));
}
}
***************
*** 469,478 ****
$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']));
! $this->t->set_var('hidden_vars','<input type="hidden"
name="old_parent" value="' . $cats[0]['parent'] . '">');
if ($cats_level)
--- 464,473 ----
$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']));
!
$GLOBALS['phpgw']->template->set_var('hidden_vars','<input type="hidden"
name="old_parent" value="' . $cats[0]['parent'] . '">');
if ($cats_level)
***************
*** 485,492 ****
}
!
$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':'') . '>');
if ($extra)
--- 480,488 ----
}
!
$GLOBALS['phpgw']->template->set_var('category_list',$this->bo->cats->formated_list(array('type'
=> $type,'selected' => $cats[0]['parent'],
!
'globals' => $global_cats, 'self' =>
$cat_id)));
! $GLOBALS['phpgw']->template->set_var('access','<input
type="checkbox" name="cat_access" value="True"'
!
. ($cats[0]['access'] == private ?' checked':'') . '>');
if ($extra)
***************
*** 497,503 ****
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);
}
}
--- 493,499 ----
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('row','data_row',True);
}
}
***************
*** 506,521 ****
{
$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',' ');
}
! $this->t->set_var('edithandle','');
! $this->t->set_var('addhandle','');
! $this->t->pfp('out','form');
! $this->t->pfp('edithandle','edit');
}
--- 502,517 ----
{
$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',' ');
}
! $GLOBALS['phpgw']->template->set_var('edithandle','');
! $GLOBALS['phpgw']->template->set_var('addhandle','');
! $GLOBALS['phpgw']->template->pfp('out','form');
! $GLOBALS['phpgw']->template->pfp('edithandle','edit');
}
***************
*** 543,548 ****
}
- $this->bo->cats->app_name = $cats_app;
-
if ($_POST['confirm'])
{
--- 539,542 ----
***************
*** 559,563 ****
else
{
! $this->t->set_file(array('category_delete' =>
'delete.tpl'));
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('Delete Categories');
--- 553,557 ----
else
{
!
$GLOBALS['phpgw']->template->set_file(array('category_delete' => 'delete.tpl'));
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('Delete Categories');
***************
*** 565,569 ****
echo parse_navbar();
! $this->t->set_var('deleteheader',lang('Are you
sure you want to delete this category ?'));
$exists = $this->bo->exists(array
--- 559,563 ----
echo parse_navbar();
!
$GLOBALS['phpgw']->template->set_var('deleteheader',lang('Are you sure you want
to delete this category ?'));
$exists = $this->bo->exists(array
***************
*** 576,593 ****
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('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');
}
}
--- 570,587 ----
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('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->pfp('out','category_delete');
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: preferences/inc class.uicategories.inc.php,1.2.2.8.2.1,1.2.2.8.2.2,
Bettina Gille <address@hidden> <=