some changes to be compatible with seek3r new template-system

output is not longer print, but $GLOBALS['phpgw']->template->set_var('phpgw_body',$content);
This commit is contained in:
Ralf Becker 2002-06-01 14:15:41 +00:00
parent 91271e3afe
commit aa2e71c35e
4 changed files with 148 additions and 149 deletions

View File

@ -33,7 +33,6 @@
function uicategories() function uicategories()
{ {
$this->bo = CreateObject('preferences.bocategories',$cats_app); $this->bo = CreateObject('preferences.bocategories',$cats_app);
$this->t = $GLOBALS['phpgw']->template;
$this->nextmatchs = CreateObject('phpgwapi.nextmatchs'); $this->nextmatchs = CreateObject('phpgwapi.nextmatchs');
$this->account = $GLOBALS['phpgw_info']['user']['account_id']; $this->account = $GLOBALS['phpgw_info']['user']['account_id'];
$this->user = $GLOBALS['phpgw_info']['user']['fullname']; $this->user = $GLOBALS['phpgw_info']['user']['fullname'];
@ -58,21 +57,21 @@
function set_langs() function set_langs()
{ {
$this->t->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']); $GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
$this->t->set_var('lang_access',lang('Private')); $GLOBALS['phpgw']->template->set_var('lang_access',lang('Private'));
$this->t->set_var('lang_save',lang('Save')); $GLOBALS['phpgw']->template->set_var('lang_save',lang('Save'));
$this->t->set_var('user_name',$this->user); $GLOBALS['phpgw']->template->set_var('user_name',$this->user);
$this->t->set_var('lang_search',lang('Search')); $GLOBALS['phpgw']->template->set_var('lang_search',lang('Search'));
$this->t->set_var('lang_done',lang('Done')); $GLOBALS['phpgw']->template->set_var('lang_done',lang('Done'));
$this->t->set_var('lang_sub',lang('Add sub')); $GLOBALS['phpgw']->template->set_var('lang_sub',lang('Add sub'));
$this->t->set_var('lang_edit',lang('Edit')); $GLOBALS['phpgw']->template->set_var('lang_edit',lang('Edit'));
$this->t->set_var('lang_delete',lang('Delete')); $GLOBALS['phpgw']->template->set_var('lang_delete',lang('Delete'));
$this->t->set_var('lang_parent',lang('Parent category')); $GLOBALS['phpgw']->template->set_var('lang_parent',lang('Parent category'));
$this->t->set_var('lang_none',lang('None')); $GLOBALS['phpgw']->template->set_var('lang_none',lang('None'));
$this->t->set_var('lang_name',lang('Name')); $GLOBALS['phpgw']->template->set_var('lang_name',lang('Name'));
$this->t->set_var('lang_descr',lang('Description')); $GLOBALS['phpgw']->template->set_var('lang_descr',lang('Description'));
$this->t->set_var('lang_add',lang('Add')); $GLOBALS['phpgw']->template->set_var('lang_add',lang('Add'));
$this->t->set_var('lang_reset',lang('Clear Form')); $GLOBALS['phpgw']->template->set_var('lang_reset',lang('Clear Form'));
} }
function cat_data($edata,$data) function cat_data($edata,$data)
@ -104,17 +103,16 @@
$GLOBALS['phpgw']->common->phpgw_header(); $GLOBALS['phpgw']->common->phpgw_header();
$this->t->set_file(array('cat_list_t' => 'listcats.tpl', $GLOBALS['phpgw']->template->set_file(array('cat_list_t' => 'listcats.tpl'));
'data_column' => 'listcats.tpl')); $GLOBALS['phpgw']->template->set_block('cat_list_t','cat_list');
$this->t->set_block('cat_list_t','data_column','column'); $GLOBALS['phpgw']->template->set_block('cat_list_t','cat_row');
$this->t->set_block('cat_list_t','cat_list','list');
$this->set_langs(); $this->set_langs();
$this->t->set_var('title_categories',lang('categories for')); $GLOBALS['phpgw']->template->set_var('title_categories',lang('categories for'));
$this->t->set_var('lang_app',lang($cats_app)); $GLOBALS['phpgw']->template->set_var('lang_app',lang($cats_app));
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data)); $GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
$this->t->set_var('doneurl',$GLOBALS['phpgw']->link('/preferences/index.php')); $GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/preferences/index.php'));
if(!$this->start) if(!$this->start)
{ {
@ -133,36 +131,33 @@
$left = $this->nextmatchs->left('/index.php',$this->start,$this->bo->cats->total_records,$link_data); $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); $right = $this->nextmatchs->right('/index.php',$this->start,$this->bo->cats->total_records,$link_data);
$this->t->set_var('left',$left); $GLOBALS['phpgw']->template->set_var('left',$left);
$this->t->set_var('right',$right); $GLOBALS['phpgw']->template->set_var('right',$right);
$this->t->set_var('lang_showing',$this->nextmatchs->show_hits($this->bo->cats->total_records,$this->start)); $GLOBALS['phpgw']->template->set_var('lang_showing',$this->nextmatchs->show_hits($this->bo->cats->total_records,$this->start));
// ------------------------------ end nextmatch ------------------------------------------ // ------------------------------ end nextmatch ------------------------------------------
//------------------- list header variable template-declarations ------------------------- //------------------- 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)); $GLOBALS['phpgw']->template->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)); $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)) if (is_array($edata))
{ {
for($i=0;$i<count($edata);$i++) 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>'); $th_data .= '<td bgcolor="' . $GLOBALS['phpgw_info']['theme']['th_bg'] . '">' . lang($edata[$i]) . '</td>'."\n";
$this->t->fp('column','data_column',True);
} }
} }
else $GLOBALS['phpgw']->template->set_var('th_data',$th_data);
{
$this->t->set_var('th_data','');
}
// -------------------------- end header declaration -------------------------------------- // -------------------------- end header declaration --------------------------------------
for ($i=0;$i<count($cats);$i++) for ($i=0;$i<count($cats);$i++)
{ {
$this->nextmatchs->template_alternate_row_color(&$this->t); $this->nextmatchs->template_alternate_row_color($GLOBALS['phpgw']->template);
if ($cats[$i]['app_name'] == 'phpgw') if ($cats[$i]['app_name'] == 'phpgw')
{ {
@ -196,11 +191,11 @@
{ {
$holder = '<td>&nbsp;</td>' . "\n"; $holder = '<td>&nbsp;</td>' . "\n";
$placeholder = str_repeat($holder,count($edata)); $placeholder = str_repeat($holder,count($edata));
$this->t->set_var('td_data',$placeholder); $GLOBALS['phpgw']->template->set_var('td_data',$placeholder);
} }
else else
{ {
$this->t->set_var('td_data',$this->cat_data($edata,$data)); $GLOBALS['phpgw']->template->set_var('td_data',$this->cat_data($edata,$data));
} }
} }
@ -210,10 +205,10 @@
$descr = '<font color="FF0000"><b>' . $descr . '</b></font>'; $descr = '<font color="FF0000"><b>' . $descr . '</b></font>';
} }
$this->t->set_var(array('name' => $name, $GLOBALS['phpgw']->template->set_var(array('name' => $name,
'descr' => $descr)); 'descr' => $descr));
$this->t->set_var('app_url',$GLOBALS['phpgw']->link('/' . $cats_app . '/index.php','cat_id=' . $cats[$i]['id'])); $GLOBALS['phpgw']->template->set_var('app_url',$GLOBALS['phpgw']->link('/' . $cats_app . '/index.php','cat_id=' . $cats[$i]['id']));
if ($cats_level || ($level == 0)) if ($cats_level || ($level == 0))
{ {
@ -221,42 +216,42 @@
{ {
$link_data['menuaction'] = 'preferences.uicategories.add'; $link_data['menuaction'] = 'preferences.uicategories.add';
$link_data['cat_parent'] = $cats[$i]['id']; $link_data['cat_parent'] = $cats[$i]['id'];
$this->t->set_var('add_sub',$GLOBALS['phpgw']->link('/index.php',$link_data)); $GLOBALS['phpgw']->template->set_var('add_sub',$GLOBALS['phpgw']->link('/index.php',$link_data));
$this->t->set_var('lang_sub_entry',lang('Add sub')); $GLOBALS['phpgw']->template->set_var('lang_sub_entry',lang('Add sub'));
} }
} }
else else
{ {
$this->t->set_var('add_sub',''); $GLOBALS['phpgw']->template->set_var('add_sub','');
$this->t->set_var('lang_sub_entry','&nbsp;'); $GLOBALS['phpgw']->template->set_var('lang_sub_entry','&nbsp;');
} }
$link_data['cat_id'] = $cats[$i]['id']; $link_data['cat_id'] = $cats[$i]['id'];
if ($cats[$i]['owner'] == $this->account && $cats[$i]['app_name'] != 'phpgw') if ($cats[$i]['owner'] == $this->account && $cats[$i]['app_name'] != 'phpgw')
{ {
$link_data['menuaction'] = 'preferences.uicategories.edit'; $link_data['menuaction'] = 'preferences.uicategories.edit';
$this->t->set_var('edit',$GLOBALS['phpgw']->link('/index.php',$link_data)); $GLOBALS['phpgw']->template->set_var('edit',$GLOBALS['phpgw']->link('/index.php',$link_data));
$this->t->set_var('lang_edit_entry',lang('Edit')); $GLOBALS['phpgw']->template->set_var('lang_edit_entry',lang('Edit'));
$link_data['menuaction'] = 'preferences.uicategories.delete'; $link_data['menuaction'] = 'preferences.uicategories.delete';
$this->t->set_var('delete',$GLOBALS['phpgw']->link('/index.php',$link_data)); $GLOBALS['phpgw']->template->set_var('delete',$GLOBALS['phpgw']->link('/index.php',$link_data));
$this->t->set_var('lang_delete_entry',lang('Delete')); $GLOBALS['phpgw']->template->set_var('lang_delete_entry',lang('Delete'));
} }
else else
{ {
$this->t->set_var('edit',''); $GLOBALS['phpgw']->template->set_var('edit','');
$this->t->set_var('lang_edit_entry','&nbsp;'); $GLOBALS['phpgw']->template->set_var('lang_edit_entry','&nbsp;');
$this->t->set_var('delete',''); $GLOBALS['phpgw']->template->set_var('delete','');
$this->t->set_var('lang_delete_entry','&nbsp;'); $GLOBALS['phpgw']->template->set_var('lang_delete_entry','&nbsp;');
} }
$this->t->fp('list','cat_list',True); $GLOBALS['phpgw']->template->fp('rows','cat_row',True);
} }
$link_data['menuaction'] = 'preferences.uicategories.add'; $link_data['menuaction'] = 'preferences.uicategories.add';
$this->t->set_var('add_action',$GLOBALS['phpgw']->link('/index.php',$link_data)); $GLOBALS['phpgw']->template->set_var('add_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
$this->save_sessiondata($cats_app); $this->save_sessiondata($cats_app);
$this->t->pfp('out','cat_list_t',True); $GLOBALS['phpgw']->template->fp('phpgw_body','cat_list',True);
} }
function add() function add()
@ -282,10 +277,11 @@
$cat_data = get_var('cat_data',Array('POST')); $cat_data = get_var('cat_data',Array('POST'));
$cat_access = get_var('cat_access',Array('POST')); $cat_access = get_var('cat_access',Array('POST'));
$this->t->set_file(array('form' => 'category_form.tpl')); $GLOBALS['phpgw']->template->set_file(array('cat_form' => 'category_form.tpl'));
$this->t->set_block('form','data_row','row'); $GLOBALS['phpgw']->template->set_block('cat_form','data_row');
$this->t->set_block('form','add','addhandle'); $GLOBALS['phpgw']->template->set_block('cat_form','add');
$this->t->set_block('form','edit','edithandle'); $GLOBALS['phpgw']->template->set_block('cat_form','edit');
$GLOBALS['phpgw']->template->set_block('cat_form','form');
$this->set_langs(); $this->set_langs();
@ -317,18 +313,18 @@
$error = $this->bo->check_values($values); $error = $this->bo->check_values($values);
if (is_array($error)) if (is_array($error))
{ {
$this->t->set_var('message',$GLOBALS['phpgw']->common->error_list($error)); $GLOBALS['phpgw']->template->set_var('message',$GLOBALS['phpgw']->common->error_list($error));
} }
else else
{ {
$this->bo->save_cat($values); $this->bo->save_cat($values);
$this->t->set_var('message',lang('Category x has been added !', $cat_name)); $GLOBALS['phpgw']->template->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))); $GLOBALS['phpgw']->template->set_var('title_categories',lang('Add x category for',lang($cats_app)));
$this->t->set_var('lang_app',lang($cats_app)); $GLOBALS['phpgw']->template->set_var('lang_app',lang($cats_app));
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data)); $GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
if ($cats_level) if ($cats_level)
{ {
@ -339,11 +335,11 @@
$type = 'mains'; $type = 'mains';
} }
$this->t->set_var('category_list',$this->bo->cats->formated_list('select',$type,$cat_parent,$global_cats)); $GLOBALS['phpgw']->template->set_var('category_list',$this->bo->cats->formated_list('select',$type,$cat_parent,$global_cats));
$this->t->set_var('cat_name',$cat_name); $GLOBALS['phpgw']->template->set_var('cat_name',$cat_name);
$this->t->set_var('cat_description',$cat_description); $GLOBALS['phpgw']->template->set_var('cat_description',$cat_description);
$this->t->set_var('access','<input type="checkbox" name="cat_access" value="True"' $GLOBALS['phpgw']->template->set_var('access','<input type="checkbox" name="cat_access" value="True"'
. ($cat_access == True ?' checked':'') . '>'); . ($cat_access == True ?' checked':'') . '>');
if ($extra) if ($extra)
@ -351,18 +347,17 @@
$edata = explode(',',$extra); $edata = explode(',',$extra);
for($i=0;$i<count($edata);$i++) 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]] . '">'); $GLOBALS['phpgw']->template->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])); $GLOBALS['phpgw']->template->set_var('lang_data',lang($edata[$i]));
$this->t->fp('row','data_row',True); $GLOBALS['phpgw']->template->fp('rows','data_row',True);
} }
} }
$link_data['menuaction'] = 'preferences.uicategories.index'; $link_data['menuaction'] = 'preferences.uicategories.index';
$this->t->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',$link_data)); $GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
$this->t->set_var('edithandle','');
$this->t->set_var('addhandle',''); $GLOBALS['phpgw']->template->parse('buttons','add');
$this->t->pfp('out','form'); $GLOBALS['phpgw']->template->fp('phpgw_body','form');
$this->t->pfp('addhandle','add');
} }
function edit() function edit()
@ -394,13 +389,14 @@
$cat_data = get_var('cat_data',Array('POST')); $cat_data = get_var('cat_data',Array('POST'));
$cat_access = get_var('cat_access',Array('POST')); $cat_access = get_var('cat_access',Array('POST'));
$this->t->set_file(array('form' => 'category_form.tpl')); $GLOBALS['phpgw']->template->set_file(array('cat_form' => 'category_form.tpl'));
$this->t->set_block('form','data_row','row'); $GLOBALS['phpgw']->template->set_block('cat_form','data_row');
$this->t->set_block('form','add','addhandle'); $GLOBALS['phpgw']->template->set_block('cat_form','add');
$this->t->set_block('form','edit','edithandle'); $GLOBALS['phpgw']->template->set_block('cat_form','edit');
$GLOBALS['phpgw']->template->set_block('cat_form','form');
$this->set_langs(); $this->set_langs();
$this->t->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',$link_data)); $GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
$this->bo->cats->app_name = $cats_app; $this->bo->cats->app_name = $cats_app;
if ($new_parent) if ($new_parent)
@ -430,24 +426,24 @@
$error = $this->bo->check_values($values); $error = $this->bo->check_values($values);
if (is_array($error)) if (is_array($error))
{ {
$this->t->set_var('message',$GLOBALS['phpgw']->common->error_list($error)); $GLOBALS['phpgw']->template->set_var('message',$GLOBALS['phpgw']->common->error_list($error));
} }
else else
{ {
$this->bo->save_cat($values); $this->bo->save_cat($values);
$this->t->set_var('message',lang('Category x has been updated !',$cat_name)); $GLOBALS['phpgw']->template->set_var('message',lang('Category x has been updated !',$cat_name));
} }
} }
$cats = $this->bo->cats->return_single($cat_id); $cats = $this->bo->cats->return_single($cat_id);
$this->t->set_var('title_categories',lang('Edit x category for',lang($cats_app))); $GLOBALS['phpgw']->template->set_var('title_categories',lang('Edit x category for',lang($cats_app)));
$this->t->set_var('lang_app',lang($cats_app)); $GLOBALS['phpgw']->template->set_var('lang_app',lang($cats_app));
$link_data['menuaction'] = 'preferences.uicategories.edit'; $link_data['menuaction'] = 'preferences.uicategories.edit';
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data)); $GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
$this->t->set_var('cat_name',$GLOBALS['phpgw']->strip_html($cats[0]['name'])); $GLOBALS['phpgw']->template->set_var('cat_name',$GLOBALS['phpgw']->strip_html($cats[0]['name']));
$this->t->set_var('cat_description',$GLOBALS['phpgw']->strip_html($cats[0]['description'])); $GLOBALS['phpgw']->template->set_var('cat_description',$GLOBALS['phpgw']->strip_html($cats[0]['description']));
if ($cats_level) if ($cats_level)
{ {
@ -458,9 +454,9 @@
$type = 'mains'; $type = 'mains';
} }
$this->t->set_var('category_list',$this->bo->cats->formated_list('select',$type,$cats[0]['parent'],$global_cats)); $GLOBALS['phpgw']->template->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"' $GLOBALS['phpgw']->template->set_var('access','<input type="checkbox" name="cat_access" value="True"'
. ($cats[0]['access'] == private ?' checked':'') . '>'); . ($cats[0]['access'] == private ?' checked':'') . '>');
if ($extra) if ($extra)
@ -470,27 +466,25 @@
$data = unserialize($cats[0]['data']); $data = unserialize($cats[0]['data']);
for($i=0;$i<count($edata);$i++) 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]] . '">'); $GLOBALS['phpgw']->template->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])); $GLOBALS['phpgw']->template->set_var('lang_data',lang($edata[$i]));
$this->t->fp('row','data_row',True); $GLOBALS['phpgw']->template->fp('rows','data_row',True);
} }
} }
if ($cats[0]['owner'] == $this->account) if ($cats[0]['owner'] == $this->account)
{ {
$link_data['menuaction'] = 'preferences.uicategories.delete'; $link_data['menuaction'] = 'preferences.uicategories.delete';
$this->t->set_var('delete','<form method="POST" action="' . $GLOBALS['phpgw']->link('/index.php',$link_data) $GLOBALS['phpgw']->template->set_var('delete','<form method="POST" action="' . $GLOBALS['phpgw']->link('/index.php',$link_data)
. '"><input type="submit" value="' . lang('Delete') .'"></form>'); . '"><input type="submit" value="' . lang('Delete') .'"></form>');
} }
else else
{ {
$this->t->set_var('delete','&nbsp;'); $GLOBALS['phpgw']->template->set_var('delete','&nbsp;');
} }
$this->t->set_var('edithandle',''); $GLOBALS['phpgw']->template->parse('buttons','edit');
$this->t->set_var('addhandle',''); $GLOBALS['phpgw']->template->fp('phpgw_body','form');
$this->t->pfp('out','form');
$this->t->pfp('edithandle','edit');
} }
function delete() function delete()
@ -528,13 +522,13 @@
} }
else else
{ {
$this->t->set_file(array('category_delete' => 'delete.tpl')); $GLOBALS['phpgw']->template->set_file(array('category_delete' => 'delete.tpl'));
$nolink = $GLOBALS['phpgw']->link('/index.php',$link_data); $nolink = $GLOBALS['phpgw']->link('/index.php',$link_data);
$GLOBALS['phpgw']->common->phpgw_header(); $GLOBALS['phpgw']->common->phpgw_header();
$this->t->set_var('deleteheader',lang('Are you sure you want to delete this category ?')); $GLOBALS['phpgw']->template->set_var('deleteheader',lang('Are you sure you want to delete this category ?'));
$exists = $this->bo->exists(array $exists = $this->bo->exists(array
( (
@ -545,21 +539,21 @@
if ($exists) if ($exists)
{ {
$this->t->set_var('lang_subs',lang('Do you also want to delete all subcategories ?')); $GLOBALS['phpgw']->template->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">'); $GLOBALS['phpgw']->template->set_var('subs','<input type="checkbox" name="subs" value="True">');
} }
else else
{ {
$this->t->set_var('lang_subs',''); $GLOBALS['phpgw']->template->set_var('lang_subs','');
$this->t->set_var('subs', ''); $GLOBALS['phpgw']->template->set_var('subs', '');
} }
$this->t->set_var('nolink',$nolink); $GLOBALS['phpgw']->template->set_var('nolink',$nolink);
$this->t->set_var('lang_no',lang('No')); $GLOBALS['phpgw']->template->set_var('lang_no',lang('No'));
$link_data['menuaction'] = 'preferences.uicategories.delete'; $link_data['menuaction'] = 'preferences.uicategories.delete';
$this->t->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data)); $GLOBALS['phpgw']->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
$this->t->set_var('lang_yes',lang('Yes')); $GLOBALS['phpgw']->template->set_var('lang_yes',lang('Yes'));
$this->t->pfp('out','category_delete'); $GLOBALS['phpgw']->template->fp('phpgw_body','category_delete');
} }
} }
} }

View File

@ -24,14 +24,7 @@
<td colspan="2"><textarea name="cat_description" rows="4" cols="50" wrap="virtual">{cat_description}</textarea></td> <td colspan="2"><textarea name="cat_description" rows="4" cols="50" wrap="virtual">{cat_description}</textarea></td>
</tr> </tr>
<!-- BEGIN data_row --> {rows}
<tr>
<td>{lang_data}</td>
<td>{td_data}</td>
</tr>
<!-- END data_row -->
<tr> <tr>
<td>{lang_access}</td> <td>{lang_access}</td>
@ -39,6 +32,12 @@
</tr> </tr>
</table> </table>
{buttons}
</center>
<!-- END form -->
<!-- BEGIN add --> <!-- BEGIN add -->
<table width="50%" border="0" cellspacing="2" cellpadding="2"> <table width="50%" border="0" cellspacing="2" cellpadding="2">
@ -52,7 +51,6 @@
<input type="submit" name="done" value="{lang_done}"></form></td> <input type="submit" name="done" value="{lang_done}"></form></td>
</tr> </tr>
</table> </table>
</center>
<!-- END add --> <!-- END add -->
@ -69,8 +67,14 @@
<input type="submit" name="done" value="{lang_done}"></form></td> <input type="submit" name="done" value="{lang_done}"></form></td>
</tr> </tr>
</table> </table>
</center>
<!-- END edit --> <!-- END edit -->
<!-- END form --> <!-- BEGIN data_row -->
<tr>
<td>{lang_data}</td>
<td>{td_data}</td>
</tr>
<!-- END data_row -->

View File

@ -4,9 +4,8 @@
<center> <center>
<table border="0" width="65%" cellpadding="2" cellspacing="2"> <table border="0" width="65%" cellpadding="2" cellspacing="2">
<form method="POST" action="{action_url}">
<tr> <tr>
<td align="center">{deleteheader}</td> <td align="center" colspan=2>{deleteheader}</td>
</tr> </tr>
<tr> <tr>
<td align="center">{lang_subs}</td> <td align="center">{lang_subs}</td>
@ -14,9 +13,15 @@
</tr> </tr>
<tr> <tr>
<td align="center"> <td align="center">
<form method="POST" action="{action_url}">
<input type="submit" name="confirm" value="{lang_yes}"></td> <input type="submit" name="confirm" value="{lang_yes}"></td>
</form> </form>
<td align="center"><a href="{nolink}">{lang_no}</a></td> </td>
<td align="center">
<form method="POST" action="{nolink}">
<input type="submit" name="cancel" value="{lang_no}"></td>
</form>
</td>
</tr> </tr>
</table> </table>
</center> </center>

View File

@ -1,5 +1,6 @@
<!-- $Id$ --> <!-- $Id$ -->
<!-- BEGIN cat_list -->
<center> <center>
<table border="0" cellspacing="2" cellpadding="2" width="87%"> <table border="0" cellspacing="2" cellpadding="2" width="87%">
<tr> <tr>
@ -29,35 +30,17 @@
<td bgcolor="{th_bg}">{sort_name}</td> <td bgcolor="{th_bg}">{sort_name}</td>
<td bgcolor="{th_bg}">{sort_description}</td> <td bgcolor="{th_bg}">{sort_description}</td>
<!-- BEGIN data_column -->
{th_data} {th_data}
<!-- END data_column -->
<td bgcolor="{th_bg}" align="center">{lang_app}</td> <td bgcolor="{th_bg}" align="center">{lang_app}</td>
<td bgcolor="{th_bg}" align=center>{lang_sub}</td> <td bgcolor="{th_bg}" align=center>{lang_sub}</td>
<td bgcolor="{th_bg}" align=center>{lang_edit}</td> <td bgcolor="{th_bg}" align=center>{lang_edit}</td>
<td bgcolor="{th_bg}" align=center>{lang_delete}</td> <td bgcolor="{th_bg}" align=center>{lang_delete}</td>
</tr> </tr>
<!-- BEGIN cat_list --> {rows}
<tr bgcolor="{tr_color}">
<td>{name}</td>
<td>{descr}</td>
{td_data}
<td align="center"><a href="{app_url}">{lang_app}</a></td>
<td align="center"><a href="{add_sub}">{lang_sub_entry}</a></td>
<td align="center"><a href="{edit}">{lang_edit_entry}</a></td>
<td align="center"><a href="{delete}">{lang_delete_entry}</a></td>
</tr>
<!-- END cat_list -->
<!-- BEGINN add -->
</table> </table>
<table border="0" cellspacing="2" cellpadding="2" width="87%"> <table border="0" cellspacing="2" cellpadding="2" width="87%">
<tr valign="bottom"> <tr valign="bottom">
<td width="50%"> <td width="50%">
@ -70,8 +53,21 @@
</form> </form>
</td> </td>
</tr> </tr>
<!-- END add -->
</table> </table>
</center> </center>
<!-- END cat_list -->
<!-- BEGIN cat_row -->
<tr bgcolor="{tr_color}">
<td>{name}</td>
<td>{descr}</td>
{td_data}
<td align="center"><a href="{app_url}">{lang_app}</a></td>
<td align="center"><a href="{add_sub}">{lang_sub_entry}</a></td>
<td align="center"><a href="{edit}">{lang_edit_entry}</a></td>
<td align="center"><a href="{delete}">{lang_delete_entry}</a></td>
</tr>
<!-- END cat_row -->