[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: admin/inc class.bocategories.inc.php,1.3.2.2,1.3
From: |
Bettina Gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: admin/inc class.bocategories.inc.php,1.3.2.2,1.3.2.3 class.uicategories.inc.php,1.6.2.3,1.6.2.4 |
Date: |
Wed, 13 Mar 2002 16:31:39 -0500 |
Update of /cvsroot/phpgroupware/admin/inc
In directory subversions:/tmp/cvs-serv28209/inc
Modified Files:
Tag: Version-0_9_14-branch
class.bocategories.inc.php class.uicategories.inc.php
Log Message:
fixed cats to work in global cats apps part
Index: class.bocategories.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.bocategories.inc.php,v
retrieving revision 1.3.2.2
retrieving revision 1.3.2.3
diff -C2 -r1.3.2.2 -r1.3.2.3
*** class.bocategories.inc.php 23 Jan 2002 20:47:03 -0000 1.3.2.2
--- class.bocategories.inc.php 13 Mar 2002 21:31:36 -0000 1.3.2.3
***************
*** 10,16 ****
* option) any later version.
*
\**************************************************************************/
!
! // $Id$
! // $Source$
class bocategories
--- 10,15 ----
* option) any later version.
*
\**************************************************************************/
! /* $Id$ */
! /* $Source$ */
class bocategories
***************
*** 32,40 ****
if ($GLOBALS['appname'])
{
! $this->cats =
CreateObject('phpgwapi.categories',-1);
}
else
{
! $this->cats =
CreateObject('phpgwapi.categories');
}
--- 31,39 ----
if ($GLOBALS['appname'])
{
! $this->cats =
CreateObject('phpgwapi.categories',-1,$GLOBALS['appname']);
}
else
{
! $this->cats =
CreateObject('phpgwapi.categories',$GLOBALS['phpgw_info']['user']['account_id'],'phpgw');
}
***************
*** 101,108 ****
function get_list()
{
! if ($this->debug)
! {
! echo '<br>querying: "' . $this->query . '"';
! }
return
$this->cats->return_sorted_array($this->start,True,$this->query,$this->sort,$this->order,True);
}
--- 100,104 ----
function get_list()
{
! if($this->debug) { echo '<br>querying: "' .
$this->query . '"'; }
return
$this->cats->return_sorted_array($this->start,True,$this->query,$this->sort,$this->order,True);
}
***************
*** 129,133 ****
function formatted_list($data)
{
! return
$this->cats->formated_list($data['select'],$data['all'],$data['cat_parent']);
}
--- 125,129 ----
function formatted_list($data)
{
! return
$this->cats->formated_list($data['select'],$data['all'],$data['cat_parent'],True);
}
Index: class.uicategories.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uicategories.inc.php,v
retrieving revision 1.6.2.3
retrieving revision 1.6.2.4
diff -C2 -r1.6.2.3 -r1.6.2.4
*** class.uicategories.inc.php 25 Feb 2002 21:11:35 -0000 1.6.2.3
--- class.uicategories.inc.php 13 Mar 2002 21:31:36 -0000 1.6.2.4
***************
*** 10,16 ****
* option) any later version.
*
\**************************************************************************/
!
! // $Id$
! // $Source$
class uicategories
--- 10,15 ----
* option) any later version.
*
\**************************************************************************/
! /* $Id$ */
! /* $Source$ */
class uicategories
***************
*** 37,41 ****
{
$this->bo =
CreateObject('admin.bocategories');
! $this->template = $GLOBALS['phpgw']->template;
$this->nextmatchs =
CreateObject('phpgwapi.nextmatchs');
--- 36,40 ----
{
$this->bo =
CreateObject('admin.bocategories');
! $this->template = $GLOBALS['phpgw']->template;
$this->nextmatchs =
CreateObject('phpgwapi.nextmatchs');
***************
*** 45,61 ****
$this->order = $this->bo->order;
$this->cat_id = $this->bo->cat_id;
! if ($this->debug)
! {
! $this->_debug_sqsof();
! }
!
! if ($GLOBALS['appname'])
! {
! $this->bo->cats->app_name = $GLOBALS['appname'];
! }
! else
! {
! $this->bo->cats->app_name = 'phpgw';
! }
}
--- 44,48 ----
$this->order = $this->bo->order;
$this->cat_id = $this->bo->cat_id;
! if($this->debug) { $this->_debug_sqsof(); }
}
***************
*** 73,80 ****
}
- /* Called only by index() */
function save_sessiondata()
{
! $data = array(
'start' => $this->start,
'query' => $this->query,
--- 60,67 ----
}
function save_sessiondata()
{
! $data = array
! (
'start' => $this->start,
'query' => $this->query,
***************
*** 82,85 ****
--- 69,73 ----
'order' => $this->order
);
+
if(isset($this->cat_id))
{
***************
*** 116,124 ****
$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&appname='
. $GLOBALS['appname']));
if ($GLOBALS['appname'])
{
!
$this->template->set_var('title_categories',lang('%1 Global
categories',$GLOBALS['phpgw_info']['apps'][$GLOBALS['appname']]['title']));
}
else
--- 104,118 ----
$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',$GLOBALS['phpgw_info']['apps'][$GLOBALS['appname']]['title']
. ' ' . lang('global categories'));
}
else
***************
*** 127,134 ****
}
$this->template->set_var('query',$this->query);
!
$this->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname='
. $GLOBALS['appname']));
$this->template->set_var('doneurl',$GLOBALS['phpgw']->link('/admin/index.php'));
! if (!$start)
{
$start = 0;
--- 121,128 ----
}
$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'));
! if(!$start)
{
$start = 0;
***************
*** 137,142 ****
$categories = $this->bo->get_list();
! $left =
$this->nextmatchs->left('/index.php',$this->start,$this->bo->cats->total_records,'menuaction=admin.uicategories.index&appname='
. $GLOBALS['apname']);
! $right =
$this->nextmatchs->right('/index.php',$this->start,$this->bo->cats->total_records,'menuaction=admin.uicategories.index&appname='
. $GLOBALS['apname']);
$this->template->set_var('left',$left);
$this->template->set_var('right',$right);
--- 131,136 ----
$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);
***************
*** 144,149 ****
$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++)
--- 138,143 ----
$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++)
***************
*** 152,159 ****
$this->template->set_var(tr_color,$tr_color);
! $id = $categories[$i]['id'];
! $level = $categories[$i]['level'];
! $owner = $categories[$i]['owner'];
! $name =
$GLOBALS['phpgw']->strip_html($categories[$i]['name']);
if ($level > 0)
--- 146,152 ----
$this->template->set_var(tr_color,$tr_color);
! $id = $categories[$i]['id'];
! $level = $categories[$i]['level'];
! $cat_name =
$GLOBALS['phpgw']->strip_html($categories[$i]['name']);
if ($level > 0)
***************
*** 161,209 ****
$space = ' ';
$spaceset = str_repeat($space,$level);
! $name = $spaceset . $name;
}
$descr =
$GLOBALS['phpgw']->strip_html($categories[$i]['description']);
! if (! $descr)
{
! $descr = ' ';
}
! if ($level == 0 && $owner != -1)
{
! $name = '<font color="FF0000"><b>' .
$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 . '&appname=' . $GLOBALS['appname']));
$this->template->set_var('lang_sub_entry',lang('Add sub'));
! if ($GLOBALS['appname'] && $owner == -1)
{
!
$this->template->set_var('link_edit','<a href="' .
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.edit&cat_id='
. $id . '&appname=' . $GLOBALS['appname']) . '">' . lang('Edit') . '</a>');
!
$this->template->set_var('link_delete','<a href="' .
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.delete&cat_id='
. $id . '&appname=' . $GLOBALS['appname']) . '">' . lang('Delete') . '</a>');
}
! else if (! $GLOBALS['appname'])
{
!
$this->template->set_var('link_edit','<a href="' .
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.edit&cat_id='
. $id . '&appname=' . $GLOBALS['appname']) . '">' . lang('Edit') . '</a>');
!
$this->template->set_var('link_delete','<a href="' .
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.delete&cat_id='
. $id . '&appname=' . $GLOBALS['appname']) . '">' . lang('Delete') . '</a>');
}
else
{
!
$this->template->set_var('link_edit',' ');
!
$this->template->set_var('link_delete',' ');
}
$this->template->fp('list','cat_list',True);
}
$this->save_sessiondata();
$this->template->pfp('out','cat_list_t',True);
--- 154,227 ----
$space = ' ';
$spaceset = str_repeat($space,$level);
! $cat_name = $spaceset . $cat_name;
}
$descr =
$GLOBALS['phpgw']->strip_html($categories[$i]['description']);
! if (!$descr) { $descr = ' '; }
!
! if ($level == 0)
{
! $cat_name = '<font color="FF0000"><b>'
. $cat_name . '</b></font>';
! $descr = '<font color="FF0000"><b>' .
$descr . '</b></font>';
}
! if ($GLOBALS['appname'] &&
$categories[$i]['app_name'] == 'phpgw')
{
! $appendix = '<' . lang('Global') .
'>';
! }
! else
! {
! $appendix = '';
}
! $this->template->set_var(array
! (
! 'name' => $cat_name . $appendix,
! 'descr' => $descr
! ));
! $link_data['menuaction'] =
'admin.uicategories.add';
! $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'));
! if ($GLOBALS['appname'] &&
$categories[$i]['app_name'] == $GLOBALS['appname'])
{
! $show_edit_del = True;
}
! elseif(!$GLOBALS['appname'] &&
$categories[$i]['app_name'] == 'phpgw')
{
! $show_edit_del = True;
}
else
{
! $show_edit_del = False;
}
+ if ($show_edit_del)
+ {
+ $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'));
+ }
+ else
+ {
+ $this->template->set_var('edit','');
+
$this->template->set_var('lang_edit_entry',' ');
+ $this->template->set_var('delete','');
+
$this->template->set_var('lang_delete_entry',' ');
+ }
$this->template->fp('list','cat_list',True);
}
+ $link_data['menuaction'] = 'admin.uicategories.add';
+ $link_data['cat_parent'] = '';
+
$this->template->set_var('add_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
+
$this->save_sessiondata();
$this->template->pfp('out','cat_list_t',True);
***************
*** 212,215 ****
--- 230,239 ----
function add()
{
+ $link_data = array
+ (
+ 'menuaction' => 'admin.uicategories.index',
+ 'appname' => $GLOBALS['appname']
+ );
+
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
***************
*** 217,225 ****
$this->set_langs();
! $new_parent = $GLOBALS['HTTP_POST_VARS']['new_parent'];
! $submit = $GLOBALS['HTTP_POST_VARS']['submit'];
! $cat_parent = $GLOBALS['HTTP_POST_VARS']['cat_parent']
? $GLOBALS['HTTP_POST_VARS']['cat_parent'] :
$GLOBALS['HTTP_GET_VARS']['cat_parent'];
! $cat_name = $GLOBALS['HTTP_POST_VARS']['cat_name'];
! $cat_description =
$GLOBALS['HTTP_POST_VARS']['cat_description'];
$this->template->set_file(array('form' =>
'category_form.tpl'));
--- 241,249 ----
$this->set_langs();
! $new_parent =
$GLOBALS['HTTP_POST_VARS']['new_parent'];
! $submit =
$GLOBALS['HTTP_POST_VARS']['submit'];
! $cat_parent =
$GLOBALS['HTTP_POST_VARS']['cat_parent'] ?
$GLOBALS['HTTP_POST_VARS']['cat_parent'] :
$GLOBALS['HTTP_GET_VARS']['cat_parent'];
! $cat_name =
$GLOBALS['HTTP_POST_VARS']['cat_name'];
! $cat_description =
$GLOBALS['HTTP_POST_VARS']['cat_description'];
$this->template->set_file(array('form' =>
'category_form.tpl'));
***************
*** 227,231 ****
$this->template->set_block('form','edit','edithandle');
! $this->bo->cats->appname = 'phpgw';
if ($new_parent)
--- 251,264 ----
$this->template->set_block('form','edit','edithandle');
!
$this->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
!
! if ($GLOBALS['appname'])
! {
!
$this->template->set_var('title_categories',lang('Add global category for
x',$GLOBALS['phpgw_info']['apps'][$GLOBALS['appname']]['title']));
! }
! else
! {
!
$this->template->set_var('title_categories',lang('Add global category'));
! }
if ($new_parent)
***************
*** 252,270 ****
{
$this->bo->save_cat($values);
!
$this->template->set_var('message',lang('Category %1 has been added !',
$cat_name));
}
}
! if ($GLOBALS['appname'])
! {
!
$this->template->set_var('title_categories',lang('Add global category for
%1',$GLOBALS['phpgw_info']['apps'][$GLOBALS['appname']]['title']));
! }
! else
! {
!
$this->template->set_var('title_categories',lang('Add global category'));
! }
!
$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)));
$this->template->set_var('cat_name',$cat_name);
--- 285,295 ----
{
$this->bo->save_cat($values);
!
$this->template->set_var('message',lang('Category x has been added !',
$cat_name));
}
}
! $link_data['menuaction'] = 'admin.uicategories.add';
!
$this->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
!
$this->template->set_var('category_list',$this->bo->formatted_list(array('select'
=> 'select','all' => 'all','cat_parent' => $cat_parent)));
$this->template->set_var('cat_name',$cat_name);
***************
*** 279,285 ****
function edit()
{
if (!$this->cat_id)
{
! Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname='
. $GLOBALS['appname']));
}
--- 304,316 ----
function edit()
{
+ $link_data = array
+ (
+ 'menuaction' => 'admin.uicategories.index',
+ 'appname' => $GLOBALS['appname']
+ );
+
if (!$this->cat_id)
{
! Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php',$link_data));
}
***************
*** 289,297 ****
$this->set_langs();
! $new_parent = $GLOBALS['HTTP_POST_VARS']['new_parent'];
! $submit = $GLOBALS['HTTP_POST_VARS']['submit'];
! $cat_parent = $GLOBALS['HTTP_POST_VARS']['cat_parent'];
! $cat_name = $GLOBALS['HTTP_POST_VARS']['cat_name'];
! $cat_description =
$GLOBALS['HTTP_POST_VARS']['cat_description'];
$this->template->set_file(array('form' =>
'category_form.tpl'));
--- 320,328 ----
$this->set_langs();
! $new_parent =
$GLOBALS['HTTP_POST_VARS']['new_parent'];
! $submit =
$GLOBALS['HTTP_POST_VARS']['submit'];
! $cat_parent =
$GLOBALS['HTTP_POST_VARS']['cat_parent'];
! $cat_name =
$GLOBALS['HTTP_POST_VARS']['cat_name'];
! $cat_description =
$GLOBALS['HTTP_POST_VARS']['cat_description'];
$this->template->set_file(array('form' =>
'category_form.tpl'));
***************
*** 299,304 ****
$this->template->set_block('form','edit','edithandle');
-
$hidden_vars = '<input type="hidden" name="cat_id"
value="' . $this->cat_id . '">' . "\n";
if ($new_parent)
--- 330,336 ----
$this->template->set_block('form','edit','edithandle');
$hidden_vars = '<input type="hidden" name="cat_id"
value="' . $this->cat_id . '">' . "\n";
+ $this->template->set_var('hidden_vars',$hidden_vars);
+
$this->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
if ($new_parent)
***************
*** 313,318 ****
'id' => $this->cat_id,
'parent' => $cat_parent,
! 'descr' => $cat_description,
! 'name' => $cat_name,
'access' => 'public'
);
--- 345,350 ----
'id' => $this->cat_id,
'parent' => $cat_parent,
! 'descr' => $cat_description,
! 'name' => $cat_name,
'access' => 'public'
);
***************
*** 326,330 ****
{
$this->bo->save_cat($values);
!
$this->template->set_var('message',lang('Category %1 has been updated
!',$cat_name));
}
}
--- 358,362 ----
{
$this->bo->save_cat($values);
!
$this->template->set_var('message',lang('Category x has been updated
!',$cat_name));
}
}
***************
*** 334,338 ****
if ($GLOBALS['appname'])
{
!
$this->template->set_var('title_categories',lang('Edit global category for
%1',$GLOBALS['phpgw_info']['apps'][$GLOBALS['appname']]['title']));
}
else
--- 366,370 ----
if ($GLOBALS['appname'])
{
!
$this->template->set_var('title_categories',lang('Edit global category for
x',$GLOBALS['phpgw_info']['apps'][$GLOBALS['appname']]['title']));
}
else
***************
*** 341,348 ****
}
!
$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);
$this->template->set_var('cat_name',$GLOBALS['phpgw']->strip_html($cats[0]['name']));
--- 373,381 ----
}
! $link_data['menuaction'] =
'admin.uicategories.edit';
! $link_data['cat_id'] = $this->cat_id;
!
$this->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
! $link_data['menuaction'] =
'admin.uicategories.delete';
!
$this->template->set_var('deleteurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
$this->template->set_var('cat_name',$GLOBALS['phpgw']->strip_html($cats[0]['name']));
***************
*** 358,367 ****
function delete()
{
! if (! $this->cat_id)
{
! Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname='
. $GLOBALS['appname']));
}
-
if ($GLOBALS['HTTP_POST_VARS']['confirm'])
{
--- 391,405 ----
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));
}
if ($GLOBALS['HTTP_POST_VARS']['confirm'])
{
***************
*** 374,390 ****
$this->bo->delete($this->cat_id);
}
! Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname='
. $GLOBALS['appname']));
}
else
{
- $hidden_vars = '<input type="hidden"
name="cat_id" value="' . $this->cat_id . '">' . "\n";
-
$this->template->set_file(array('category_delete' => 'delete_cat.tpl'));
$this->template->set_block('category_delete','delete','deletehandle');
$this->template->set_block('category_delete','done','donehandle');
! $nolink =
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&cat_id='
. $this->cat_id . '&appname=' . $GLOBALS['appname']);
! $apps_cats = $this->bo->exists(array(
'type' => 'subs',
'cat_name' => '',
--- 412,427 ----
$this->bo->delete($this->cat_id);
}
! Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php',$link_data));
}
else
{
$this->template->set_file(array('category_delete' => 'delete_cat.tpl'));
$this->template->set_block('category_delete','delete','deletehandle');
$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' => '',
***************
*** 395,403 ****
echo parse_navbar();
if ($apps_cats)
{
$this->template->set_var('messages',lang('This category is currently being used
by applications as a parent category') . '<br>'
. lang('You will need to remove
the subcategories before you can delete this category'));
!
$this->template->set_var('hidden_vars',$hidden_vars);
$this->template->set_var('lang_subs','');
$this->template->set_var('subs','');
--- 432,443 ----
echo parse_navbar();
+ $hidden_vars = '<input type="hidden"
name="cat_id" value="' . $this->cat_id . '">' . "\n";
+
$this->template->set_var('hidden_vars',$hidden_vars);
+
if ($apps_cats)
{
$this->template->set_var('messages',lang('This category is currently being used
by applications as a parent category') . '<br>'
. lang('You will need to remove
the subcategories before you can delete this category'));
!
$this->template->set_var('lang_subs','');
$this->template->set_var('subs','');
***************
*** 411,421 ****
{
$this->template->set_var('messages',lang('Are you sure you want to delete this
category ?'));
-
$this->template->set_var('hidden_vars',$hidden_vars);
! $exists = $this->bo->exists(array(
'type' => 'subs',
'cat_name' => '',
'cat_id' => $this->cat_id
));
if ($exists)
{
--- 451,462 ----
{
$this->template->set_var('messages',lang('Are you sure you want to delete this
category ?'));
! $exists = $this->bo->exists(array
! (
'type' => 'subs',
'cat_name' => '',
'cat_id' => $this->cat_id
));
+
if ($exists)
{
***************
*** 431,435 ****
$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 . '&appname=' . $GLOBALS['appname']));
$this->template->set_var('lang_yes',lang('Yes'));
$this->template->set_var('deletehandle','');
--- 472,479 ----
$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','');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: admin/inc class.bocategories.inc.php,1.3.2.2,1.3.2.3 class.uicategories.inc.php,1.6.2.3,1.6.2.4,
Bettina Gille <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: admin/templates/default category_form.tpl,1.7,1.7.2.1 listcats.tpl,1.6.2.1,1.6.2.2
- Next by Date:
[Phpgroupware-cvs] CVS: admin/setup phpgw_de.lang,1.14,1.14.2.1 phpgw_en.lang,1.23.2.1,1.23.2.2
- Previous by thread:
[Phpgroupware-cvs] CVS: admin/templates/default category_form.tpl,1.7,1.7.2.1 listcats.tpl,1.6.2.1,1.6.2.2
- Next by thread:
[Phpgroupware-cvs] CVS: admin/setup phpgw_de.lang,1.14,1.14.2.1 phpgw_en.lang,1.23.2.1,1.23.2.2
- Index(es):