mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
included files to edit apps categories. each app can use the files in preferences dir
This commit is contained in:
parent
6223c14c96
commit
e7a279a1f3
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Addressbook *
|
||||
* phpGroupWare - Categories *
|
||||
* http://www.phpgroupware.org *
|
||||
* Written by Bettina Gille [ceb@phpgroupware.org] *
|
||||
* ----------------------------------------------- *
|
||||
@ -56,22 +56,25 @@
|
||||
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',$phpgw_info["theme"]["font"]);
|
||||
$t->set_var('category_list',$c->formated_list('select','all',$cat_parent,'False'));
|
||||
$t->set_var('hidden_vars',$hidden_vars);
|
||||
$t->set_var('font',$font);
|
||||
$t->set_var('user_name',$phpgw_info["user"]["fullname"]);
|
||||
$t->set_var('doneurl',$phpgw->link('/preferences/categories.php'));
|
||||
$t->set_var('title_categories',lang('Add category for'));
|
||||
$t->set_var('actionurl',$phpgw->link('/preferences/addcategory.php'));
|
||||
$t->set_var('lang_choose',lang('Choose the category'));
|
||||
$t->set_var('lang_parent',lang('Parent category'));
|
||||
$t->set_var('lang_select_parent',lang('Select parent category'));
|
||||
$t->set_var('lang_access',lang('Private'));
|
||||
$t->set_var('lang_data',lang('Data'));
|
||||
if ($access) { $t->set_var('access', '<input type="checkbox" name="access" value="True" checked>'); }
|
||||
else { $t->set_var('access', '<input type="checkbox" name="access" value="True"'); }
|
||||
$t->set_var('lang_name',lang('Category name'));
|
||||
$t->set_var('lang_descr',lang('Category description'));
|
||||
$t->set_var('lang_name',lang('Name'));
|
||||
$t->set_var('lang_descr',lang('Description'));
|
||||
$t->set_var('cat_name',$cat_name);
|
||||
$t->set_var('cat_description',$cat_description);
|
||||
$t->set_var('cat_data',$cat_data);
|
||||
$t->set_var('lang_add',lang('Add'));
|
||||
$t->set_var('lang_reset',lang('Clear Form'));
|
||||
$t->set_var('lang_done',lang('Done'));
|
||||
@ -81,4 +84,4 @@
|
||||
$t->pparse('addhandle','add');
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
?>
|
@ -31,6 +31,7 @@
|
||||
. "<input type=\"hidden\" name=\"cats_app\" value=\"$cats_app\">\n"
|
||||
. "<input type=\"hidden\" name=\"filter\" value=\"$filter\">\n";
|
||||
|
||||
$t->set_var('font',$phpgw_info["theme"]["font"]);
|
||||
$t->set_var('user_name',$phpgw_info["user"]["fullname"]);
|
||||
$t->set_var('title_categories',lang('Categories for'));
|
||||
$t->set_var('lang_action',lang('Category list'));
|
||||
@ -71,6 +72,7 @@
|
||||
$t->set_var('th_bg',$phpgw_info["theme"][th_bg]);
|
||||
$t->set_var('sort_name',$phpgw->nextmatchs->show_sort_order($sort,'cat_name',$order,'/preferences/categories.php',lang('Name'),"&cats_app=$cats_app"));
|
||||
$t->set_var('sort_description',$phpgw->nextmatchs->show_sort_order($sort,'cat_description',$order,'/preferences/categories.php',lang('Description'),"&cats_app=$cats_app"));
|
||||
$t->set_var('sort_data',$phpgw->nextmatchs->show_sort_order($sort,'cat_data',$order,'/preferences/categories.php',lang('Data'),"&cats_app=$cats_app"));
|
||||
$t->set_var('lang_app',lang($cats_app));
|
||||
$t->set_var('lang_edit',lang('Edit'));
|
||||
$t->set_var('lang_delete',lang('Delete'));
|
||||
@ -90,15 +92,20 @@
|
||||
$descr = $phpgw->strip_html($categories[$i]['description']);
|
||||
if (! $descr) { $descr = ' '; }
|
||||
|
||||
$data = $categories[$i]['data'];
|
||||
if (! $data) { $data = ' '; }
|
||||
|
||||
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>';
|
||||
$data = '<font color=FF0000><b>' . $data . '</b></font>';
|
||||
}
|
||||
|
||||
//-------------------------- template declaration for list records ---------------------------
|
||||
|
||||
//-------------------------- template declaration for list records ---------------------------
|
||||
|
||||
$t->set_var(array('name' => $name,
|
||||
'descr' => $descr));
|
||||
'descr' => $descr,
|
||||
'data' => $data));
|
||||
|
||||
|
||||
$t->set_var('app_url',$phpgw->link('/' . $phpgw_info['flags']['currentapp'] . '/index.php',"cat_id=$cat_id"));
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Addressbook *
|
||||
* phpGroupWare - Categories *
|
||||
* (http://www.phpgroupware.org) *
|
||||
* Written by Bettina Gille [ceb@phpgroupware.org] *
|
||||
* ----------------------------------------------- *
|
||||
@ -20,17 +20,17 @@
|
||||
$phpgw_info['flags']['noappheader'] = True;
|
||||
$phpgw_info['flags']['noappfooter'] = True;
|
||||
|
||||
include("../header.inc.php");
|
||||
include('../header.inc.php');
|
||||
|
||||
$c = CreateObject('phpgwapi.categories');
|
||||
$c->app_name = $cats_app;
|
||||
|
||||
if (! $cat_id) {
|
||||
Header('Location: ' . $phpgw->link('/preferences/categories.php'));
|
||||
Header('Location: ' . $phpgw->link('/preferences/categories.php',"cats_app=$cats_app"));
|
||||
}
|
||||
|
||||
if ($confirm) {
|
||||
$c->delete($cat_id);
|
||||
$c->delete($cat_id);
|
||||
Header('Location: ' . $phpgw->link('/preferences/categories.php',"cats_app=$cats_app"));
|
||||
}
|
||||
else {
|
||||
@ -40,7 +40,7 @@
|
||||
$t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('preferences'));
|
||||
$t->set_file(array('category_delete' => 'delete.tpl'));
|
||||
$t->set_var('deleteheader',lang('Are you sure you want to delete this category ?'));
|
||||
|
||||
$t->set_var('font',$phpgw_info["theme"]["font"]);
|
||||
$nolinkf = $phpgw->link('/preferences/categories.php',"cat_id=$cat_id&cats_app=$cats_app");
|
||||
$nolink = "<a href=\"$nolinkf\">" . lang('No') ."</a>";
|
||||
$t->set_var("nolink",$nolink);
|
||||
|
@ -27,8 +27,8 @@
|
||||
|
||||
if (! $cat_id) {
|
||||
Header('Location: ' . $phpgw->link('/preferences/categories.php',"sort=$sort&order=$order&query=$query&start=$start"
|
||||
. "&filter=$filter"));
|
||||
}
|
||||
. "&filter=$filter&cats_app=$cats_app"));
|
||||
}
|
||||
|
||||
$t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('preferences'));
|
||||
$t->set_file(array('form' => 'category_form.tpl'));
|
||||
@ -67,7 +67,7 @@
|
||||
|
||||
$cat_parent = $cats[0]['parent'];
|
||||
$t->set_var('category_list',$c->formated_list('select','all',$cat_parent,'False'));
|
||||
$t->set_var('font',$font);
|
||||
$t->set_var('font',$phpgw_info["theme"]["font"]);
|
||||
$t->set_var('user_name',$phpgw_info["user"]["fullname"]);
|
||||
$t->set_var('title_categories',lang('Edit category for'));
|
||||
$t->set_var('lang_action',lang('Edit category'));
|
||||
@ -75,8 +75,10 @@
|
||||
$t->set_var('actionurl',$phpgw->link('/preferences/editcategory.php'));
|
||||
$t->set_var('deleteurl',$phpgw->link('/preferences/deletecategory.php'));
|
||||
$t->set_var('hidden_vars',$hidden_vars);
|
||||
$t->set_var('lang_name',lang('Category name'));
|
||||
$t->set_var('lang_descr',lang('Category description'));
|
||||
$t->set_var('lang_parent',lang('Parent category'));
|
||||
$t->set_var('lang_name',lang('Name'));
|
||||
$t->set_var('lang_descr',lang('Description'));
|
||||
$t->set_var('lang_data',lang('Data'));
|
||||
$t->set_var('lang_select_parent',lang('Select parent category'));
|
||||
$t->set_var('lang_access',lang('Private'));
|
||||
if ($cats[0]['access']=='private') { $t->set_var('access', '<input type="checkbox" name="access" value="True" checked>'); }
|
||||
@ -86,6 +88,7 @@
|
||||
|
||||
$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('cat_data',$cats[0]['data']);
|
||||
|
||||
$t->set_var('lang_edit',lang('Edit'));
|
||||
$t->set_var('lang_delete',lang('Delete'));
|
||||
|
@ -3,26 +3,30 @@
|
||||
<center>
|
||||
<table border="0" width="80%" cellspacing="2" cellpadding="2">
|
||||
<tr>
|
||||
<td colspan="1" align="center" bgcolor="#c9c9c9"><b>{title_categories}: {user_name}<b/></td>
|
||||
<td colspan="1" align="center" bgcolor="#c9c9c9"><font face="{font}"><b>{title_categories}: {user_name}<b/></font></td>
|
||||
</tr>
|
||||
</table>
|
||||
{message}
|
||||
<font face="{font}">{message}</font>
|
||||
<table border="0" width="80%" cellspacing="2" cellpadding="2">
|
||||
<form name="form" action="{actionurl}" method="POST">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><select name="cat_parent"><option value="">{lang_select_parent}</option>{category_list}</select></td>
|
||||
<td><font face="{font}">{lang_parent}:</font></td>
|
||||
<td><font face="{font}"><select name="cat_parent"><option value="">{lang_select_parent}</option>{category_list}</select></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{lang_name}:</td>
|
||||
<td><input name="cat_name" size="50" value="{cat_name}"></td>
|
||||
<td><font face="{font}">{lang_name}:</font></td>
|
||||
<td><font face="{font}"><input name="cat_name" size="50" value="{cat_name}"></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{lang_descr}:</td>
|
||||
<td colspan=2><textarea name="cat_description" rows="4" cols="50" wrap="virtual">{cat_description}</textarea></td>
|
||||
<td><font face="{font}">{lang_descr}:</font></td>
|
||||
<td colspan=2><font face="{font}"><textarea name="cat_description" rows="4" cols="50" wrap="virtual">{cat_description}</textarea></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{lang_access}:</td>
|
||||
<td><font face="{font}">{lang_data}:</font></td>
|
||||
<td><font face="{font}"><input name="cat_data" size="50" value="{cat_data}"></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font face="{font}">{lang_access}:</font></td>
|
||||
<td colspan=2>{access}</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -30,15 +34,15 @@
|
||||
<!-- BEGIN add -->
|
||||
<table width="50%" border="0" cellspacing="2" cellpadding="2">
|
||||
<tr valign="bottom">
|
||||
<td height="50" align="center">
|
||||
<td height="50" align="right">
|
||||
{hidden_vars}
|
||||
<input type="submit" name="submit" value="{lang_add}"></td>
|
||||
<td height="50" align="center">
|
||||
<input type="reset" name="reset" value="{lang_reset}"></form></td>
|
||||
<font face="{font}"><input type="submit" name="submit" value="{lang_add}"></font></td>
|
||||
<td height="50" align="center">
|
||||
<font face="{font}"><input type="reset" name="reset" value="{lang_reset}"></font></form></td>
|
||||
<td height="50">
|
||||
<form method="POST" action="{doneurl}">
|
||||
{hidden_vars}
|
||||
<input type="submit" name="done" value="{lang_done}"></form></td>
|
||||
<font face="{font}"><input type="submit" name="done" value="{lang_done}"></font></form></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
@ -48,17 +52,17 @@
|
||||
<!-- BEGIN edit -->
|
||||
<table width="50%" border="0" cellspacing="2" cellpadding="2">
|
||||
<tr valign="bottom">
|
||||
<td height="50" align="center">
|
||||
<td height="50" align="right">
|
||||
{hidden_vars}
|
||||
<input type="submit" name="submit" value="{lang_edit}"></form></td>
|
||||
<font face="{font}"><input type="submit" name="submit" value="{lang_edit}"></font></form></td>
|
||||
<td height="50" align="center">
|
||||
<form method="POST" action="{deleteurl}">
|
||||
{hidden_vars}
|
||||
<input type="submit" name="delete" value="{lang_delete}"></form></td>
|
||||
<td height="50" align="center">
|
||||
<font face="{font}"><input type="submit" name="delete" value="{lang_delete}"></font></form></td>
|
||||
<td height="50">
|
||||
<form method="POST" action="{doneurl}">
|
||||
{hidden_vars}
|
||||
<input type="submit" name="done" value="{lang_done}"></form></td>
|
||||
<font face="{font}"><input type="submit" name="done" value="{lang_done}"></font></form></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
@ -3,14 +3,14 @@
|
||||
<center>
|
||||
<table border=0 width=50% cellpadding=2 cellspacing=2>
|
||||
<tr>
|
||||
<td align=center>{deleteheader}</td>
|
||||
<td align=center><font face="{font}">{deleteheader}</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0" width="30%" align="center">
|
||||
<tr>
|
||||
<td align="center">{nolink}</td>
|
||||
<td align="center">{yeslink}</td>
|
||||
<td align="center"><font face="{font}">{nolink}</font></td>
|
||||
<td align="center"><font face="{font}">{yeslink}</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
@ -2,10 +2,10 @@
|
||||
<center>
|
||||
<table border="0" cellspacing="2" cellpadding="2">
|
||||
<tr>
|
||||
<td colspan="5" align="center" bgcolor="#c9c9c9"><font face="{font}"><b>{title_categories}: {user_name}<b/></font></td>
|
||||
<td colspan="6" align="center" bgcolor="#c9c9c9"><font face="{font}"><b>{title_categories}: {user_name}<b/></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5" align=left>
|
||||
<td colspan="6" align=left>
|
||||
<table border="0" width="100%">
|
||||
<tr>
|
||||
{left}
|
||||
@ -23,31 +23,33 @@
|
||||
</form></td>
|
||||
</tr>
|
||||
<tr bgcolor="{th_bg}">
|
||||
<td width=20% bgcolor="{th_bg}"><font face="{font}">{sort_name}</font></td>
|
||||
<td width=32% bgcolor="{th_bg}"><font face="{font}">{sort_description}</font></td>
|
||||
<td width=8% bgcolor="{th_bg}" align="center"><font face="{font}">{lang_app}</font></td>
|
||||
<td width=8% bgcolor="{th_bg}" align=center><font face="{font}">{lang_edit}</font></td>
|
||||
<td width=8% bgcolor="{th_bg}" align=center><font face="{font}">{lang_delete}</font></td>
|
||||
<td bgcolor="{th_bg}"><font face="{font}">{sort_name}</font></td>
|
||||
<td bgcolor="{th_bg}"><font face="{font}">{sort_description}</font></td>
|
||||
<td bgcolor="{th_bg}"><font face="{font}">{sort_data}</font></td>
|
||||
<td bgcolor="{th_bg}" align="center"><font face="{font}">{lang_app}</font></td>
|
||||
<td bgcolor="{th_bg}" align=center><font face="{font}">{lang_edit}</font></td>
|
||||
<td bgcolor="{th_bg}" align=center><font face="{font}">{lang_delete}</font></td>
|
||||
</tr>
|
||||
|
||||
<!-- BEGIN cat_list -->
|
||||
<tr bgcolor="{tr_color}">
|
||||
<td><font face="{font}">{name}</font></td>
|
||||
<td><font face="{font}">{descr}</font></td>
|
||||
<td><font face="{font}">{data}</font></td>
|
||||
<td align="center"><font face="{font}"><a href="{app_url}">{lang_app}</a></font></td>
|
||||
<td align="center"><font face="{font}"><a href="{edit}">{lang_edit_entry}</a></font></td>
|
||||
<td align="center"><font face="{font}"><a href="{delete}">{lang_delete_entry}</font></td>
|
||||
<td align="center"><font face="{font}"><a href="{delete}">{lang_delete_entry}</font></td>
|
||||
</tr>
|
||||
<!-- END cat_list -->
|
||||
<!-- BEGINN add -->
|
||||
<tr valign="bottom">
|
||||
<td colspan="4">
|
||||
<td colspan="5">
|
||||
<form method="POST" action="{add_action}">
|
||||
{hidden_vars}
|
||||
<font face="{font}"><input type="submit" value="{lang_add}"></font>
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<td align="right">
|
||||
<form method="POST" action="{doneurl}">
|
||||
{hidden_vars}
|
||||
<font face="{font}"><input type="submit" name="done" value="{lang_done}"></font>
|
||||
@ -56,5 +58,4 @@
|
||||
</tr>
|
||||
<!-- END add -->
|
||||
</table>
|
||||
</center>
|
||||
|
||||
</center>
|
Loading…
Reference in New Issue
Block a user