added global cats

This commit is contained in:
bettina 2001-03-25 03:24:28 +00:00
parent a353ff71d8
commit ba4a726d8b
5 changed files with 24 additions and 10 deletions

View File

@ -42,15 +42,13 @@
if (($submit) && (! $error) && (! $errorcount)) { $t->set_var('message',lang("Category $cat_name has been added !")); }
if ((! $submit) && (! $error) && (! $errorcount)) { $t->set_var('message',''); }
$t->set_var('font',$font);
$t->set_var('title_categories',lang('Add global category'));
$t->set_var('actionurl',$phpgw->link('/admin/addcategory.php'));
$t->set_var('doneurl',$phpgw->link('/admin/categories.php'));
$t->set_var('hidden_vars','<input type="hidden" name="cat_id" value="' . $cat_id . '">');
$t->set_var('lang_choose',lang('Choose the category'));
$t->set_var('lang_main_cat',lang('Category'));
$t->set_var('lang_select_parent',lang('Select parent category'));
$t->set_var('main_cat_list',$c->formated_list('select','mains'));
$t->set_var('category_list',$c->formated_list('select','all',$cat_parent));
$t->set_var('lang_name',lang('Category name'));
$t->set_var('lang_descr',lang('Category description'));
$t->set_var('cat_name',$cat_name);

View File

@ -82,9 +82,16 @@
$cat_id = $categories[$i]['id'];
$owner = $categories[$i]['owner'];
$name = $phpgw->strip_html($categories[$i]['name']);
$space = "&nbsp;&nbsp;";
if ($categories[$i]['parent'] > 0) { $name = $space . $phpgw->strip_html($categories[$i]['name']); }
$descr = $phpgw->strip_html($categories[$i]['description']);
if (! $descr) { $descr = '&nbsp;'; }
if (! $descr) { $descr = "&nbsp;"; }
if ($categories[$i]['parent'] == 0) {
$name = "<font color=FF0000><b>" . $phpgw->strip_html($categories[$i]['name']) . "</b></font>";
$descr = "<font color=FF0000><b>" . $descr . "</b></font>";
}
//-------------------------- template declaration for list records ---------------------------

View File

@ -53,9 +53,8 @@
$cats = $c->return_single($cat_id);
$t->set_var('font',$font);
$t->set_var('title_categories',lang('Edit global category'));
$t->set_var('lang_action',lang('Edit category'));
$t->set_var('lang_select_parent',lang('Select parent category'));
$t->set_var('actionurl',$phpgw->link('/admin/editcategory.php'));
$t->set_var('deleteurl',$phpgw->link('/admin/deletecategory.php',"cat_id=$cat_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
$t->set_var('doneurl',$phpgw->link('/admin/categories.php',"start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
@ -68,9 +67,11 @@
$t->set_var('lang_delete',lang('Delete'));
$cat_id = $cats[0]['id'];
$cat_parent = $cats[0]['parent'];
$t->set_var('cat_name',$phpgw->strip_html($cats[0]['name']));
$t->set_var('cat_description',$phpgw->strip_html($cats[0]['description']));
$t->set_var('category_list',$c->formated_list('select','all',$cat_parent));
$t->set_var('edithandle','');
$t->set_var('addhandle','');

View File

@ -9,6 +9,10 @@
{message}
<table border="0" width="80%" cellspacing="2" cellpadding="2">
<form name="form" action="{actionurl}" method="POST">
<tr>
<td>&nbsp;</td>
<td><select name="cat_parent"><option value="">{lang_select_parent}</option>{category_list}</select></td>
</tr>
<tr>
<td>{lang_name}:</td>
<td><input name="cat_name" size="50" value="{cat_name}"></td>
@ -24,7 +28,7 @@
<tr valign="bottom">
<td height="50" align="center">
{hidden_vars}
<input type="submit" name="submit" value="{lang_add}"></td>
<input type="submit" name="submit" value="{lang_add}"></td>
<td height="50" align="center">
<input type="reset" name="reset" value="{lang_reset}"></form></td>
<td height="50" align="center">

View File

@ -9,6 +9,10 @@
{message}
<table border="0" width="80%" cellspacing="2" cellpadding="2">
<form name="form" action="{actionurl}" method="POST">
<tr>
<td>&nbsp;</td>
<td><select name="cat_parent"><option value="">{lang_select_parent}</option>{category_list}</select></td>
</tr>
<tr>
<td>{lang_name}:</td>
<td><input name="cat_name" size="50" value="{cat_name}"></td>
@ -24,7 +28,7 @@
<tr valign="bottom">
<td height="50" align="center">
{hidden_vars}
<input type="submit" name="submit" value="{lang_add}"></td>
<input type="submit" name="submit" value="{lang_add}"></td>
<td height="50" align="center">
<input type="reset" name="reset" value="{lang_reset}"></form></td>
<td height="50" align="center">