mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:55 +01:00
formatting
This commit is contained in:
parent
ed1da95900
commit
158c78afb6
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
/***************************************************************************\
|
||||
* phpGroupWare - Categories *
|
||||
* http://www.phpgroupware.org *
|
||||
* Written by Bettina Gille [ceb@phpgroupware.org] *
|
||||
@ -8,8 +8,8 @@
|
||||
* 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$ */
|
||||
\***************************************************************************/
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_flags = array('currentapp' => $cats_app,
|
||||
'noappheader' => True,
|
||||
@ -18,16 +18,15 @@
|
||||
$phpgw_info['flags'] = $phpgw_flags;
|
||||
include('../header.inc.php');
|
||||
|
||||
$hidden_vars = "<input type=\"hidden\" name=\"sort\" value=\"$sort\">\n"
|
||||
. "<input type=\"hidden\" name=\"order\" value=\"$order\">\n"
|
||||
. "<input type=\"hidden\" name=\"query\" value=\"$query\">\n"
|
||||
. "<input type=\"hidden\" name=\"start\" value=\"$start\">\n"
|
||||
. "<input type=\"hidden\" name=\"cats_app\" value=\"$cats_app\">\n"
|
||||
. "<input type=\"hidden\" name=\"extra\" value=\"$extra\">\n"
|
||||
. "<input type=\"hidden\" name=\"global_cats\" value=\"$global_cats\">\n"
|
||||
. "<input type=\"hidden\" name=\"cats_level\" value=\"$cats_level\">\n"
|
||||
. "<input type=\"hidden\" name=\"filter\" value=\"$filter\">\n";
|
||||
|
||||
$hidden_vars = '<input type="hidden" name="sort" value="' . $sort . '">' . "\n"
|
||||
. '<input type="hidden" name="order" value="' . $order . '">' . "\n"
|
||||
. '<input type="hidden" name="query" value="' . $query . '">' . "\n"
|
||||
. '<input type="hidden" name="start" value="' . $start . '">' . "\n"
|
||||
. '<input type="hidden" name="cats_app" value="' . $cats_app . '">' . "\n"
|
||||
. '<input type="hidden" name="extra" value="' . $extra . '">' . "\n"
|
||||
. '<input type="hidden" name="global_cats" value="' . $global_cats . '">' . "\n"
|
||||
. '<input type="hidden" name="cats_level" value="' . $cats_level . '">' . "\n"
|
||||
. '<input type="hidden" name="filter" value="' . $filter . '">' . "\n";
|
||||
|
||||
$t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('preferences'));
|
||||
$t->set_file(array('form' => 'category_form.tpl'));
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
/***************************************************************************\
|
||||
* phpGroupWare - Categories *
|
||||
* http://www.phpgroupware.org *
|
||||
* Written by Bettina Gille [ceb@phpgroupware.org] *
|
||||
@ -8,7 +8,7 @@
|
||||
* 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$ */
|
||||
|
||||
$phpgw_flags = array('currentapp' => $cats_app,
|
||||
@ -24,18 +24,19 @@
|
||||
'cat_list' => 'listcats.tpl'));
|
||||
$t->set_block('cat_list_t','cat_list','list');
|
||||
|
||||
$common_hidden_vars = "<input type=\"hidden\" name=\"sort\" value=\"$sort\">\n"
|
||||
. "<input type=\"hidden\" name=\"order\" value=\"$order\">\n"
|
||||
. "<input type=\"hidden\" name=\"query\" value=\"$query\">\n"
|
||||
. "<input type=\"hidden\" name=\"start\" value=\"$start\">\n"
|
||||
. "<input type=\"hidden\" name=\"cats_app\" value=\"$cats_app\">\n"
|
||||
. "<input type=\"hidden\" name=\"extra\" value=\"$extra\">\n"
|
||||
. "<input type=\"hidden\" name=\"global_cats\" value=\"$global_cats\">\n"
|
||||
. "<input type=\"hidden\" name=\"cats_level\" value=\"$cats_level\">\n"
|
||||
. "<input type=\"hidden\" name=\"filter\" value=\"$filter\">\n";
|
||||
$hidden_vars = '<input type="hidden" name="sort" value="' . $sort . '">' . "\n"
|
||||
. '<input type="hidden" name="order" value="' . $order . '">' . "\n"
|
||||
. '<input type="hidden" name="query" value="' . $query . '">' . "\n"
|
||||
. '<input type="hidden" name="start" value="' . $start . '">' . "\n"
|
||||
. '<input type="hidden" name="cats_app" value="' . $cats_app . '">' . "\n"
|
||||
. '<input type="hidden" name="extra" value="' . $extra . '">' . "\n"
|
||||
. '<input type="hidden" name="global_cats" value="' . $global_cats . '">' . "\n"
|
||||
. '<input type="hidden" name="cats_level" value="' . $cats_level . '">' . "\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('hidden_vars',$hidden_vars);
|
||||
$t->set_var('title_categories',lang('categories for'));
|
||||
$t->set_var('lang_action',lang('Category list'));
|
||||
$t->set_var('add_action',$phpgw->link('/preferences/addcategory.php',"cats_app=$cats_app&extra=$extra&cats_level=$cats_level&global_cats=$global_cats"));
|
||||
@ -61,11 +62,11 @@
|
||||
|
||||
if ($global_cats)
|
||||
{
|
||||
$categories = $c->return_array('all',$start,$limit,$query,$sort,$order,True);
|
||||
$categories = $c->return_array('all',$start,True,$query,$sort,$order,True);
|
||||
}
|
||||
else
|
||||
{
|
||||
$categories = $c->return_array('all',$start,$limit,$query,$sort,$order);
|
||||
$categories = $c->return_array('all',$start,True,$query,$sort,$order);
|
||||
}
|
||||
|
||||
//--------------------------------- nextmatch --------------------------------------------
|
||||
@ -109,10 +110,8 @@
|
||||
|
||||
for ($i=0;$i<count($categories);$i++)
|
||||
{
|
||||
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
$t->set_var('tr_color',$tr_color);
|
||||
|
||||
$cat_id = $categories[$i]['id'];
|
||||
$owner = $categories[$i]['owner'];
|
||||
$level = $categories[$i]['level'];
|
||||
@ -171,6 +170,7 @@
|
||||
$t->set_var('edit','');
|
||||
$t->set_var('lang_edit_entry',' ');
|
||||
}
|
||||
|
||||
if ($categories[$i]['owner'] == $phpgw_info['user']['account_id'] && $categories[$i]['app_name'] != 'phpgw')
|
||||
{
|
||||
$t->set_var('delete',$phpgw->link('/preferences/deletecategory.php',"cat_id=$cat_id&cats_app=$cats_app&extra=$extra&cats_level=$cats_level&global_cats=$global_cats"));
|
||||
@ -181,8 +181,10 @@
|
||||
$t->set_var('delete','');
|
||||
$t->set_var('lang_delete_entry',' ');
|
||||
}
|
||||
|
||||
$t->parse('list','cat_list',True);
|
||||
}
|
||||
|
||||
// ---------------------------- end record declaration -----------------------------------------
|
||||
|
||||
$t->parse('out','cat_list_t',True);
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
/***************************************************************************\
|
||||
* phpGroupWare - Categories *
|
||||
* (http://www.phpgroupware.org) *
|
||||
* Written by Bettina Gille [ceb@phpgroupware.org] *
|
||||
@ -8,7 +8,7 @@
|
||||
* 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$ */
|
||||
|
||||
if (! $cat_id)
|
||||
@ -45,11 +45,16 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$hidden_vars = "<input type=\"hidden\" name=\"cat_id\" value=\"$cat_id\">\n"
|
||||
. "<input type=\"hidden\" name=\"cats_app\" value=\"$cats_app\">\n"
|
||||
. "<input type=\"hidden\" name=\"cats_level\" value=\"$cats_level\">\n"
|
||||
. "<input type=\"hidden\" name=\"global_cats\" value=\"$global_cats\">\n"
|
||||
. "<input type=\"hidden\" name=\"extra\" value=\"$extra\">\n";
|
||||
$hidden_vars = '<input type="hidden" name="sort" value="' . $sort . '">' . "\n"
|
||||
. '<input type="hidden" name="order" value="' . $order . '">' . "\n"
|
||||
. '<input type="hidden" name="start" value="' . $start . '">' . "\n"
|
||||
. '<input type="hidden" name="query" value="' . $query . '">' . "\n"
|
||||
. '<input type="hidden" name="filter" value="' . $filter . '">' . "\n"
|
||||
. '<input type="hidden" name="cat_id" value="' . $cat_id . '">' . "\n"
|
||||
. '<input type="hidden" name="cats_app" value="' . $cats_app . '">' . "\n"
|
||||
. '<input type="hidden" name="cats_level" value="' . $cats_level . '">' . "\n"
|
||||
. '<input type="hidden" name="global_cats" value="' . $global_cats . '">' . "\n"
|
||||
. '<input type="hidden" name="extra" value="' . $extra . '">' . "\n";
|
||||
|
||||
$t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('preferences'));
|
||||
$t->set_file(array('category_delete' => 'delete.tpl'));
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
/***************************************************************************\
|
||||
* phpGroupWare - Categories *
|
||||
* http://www.phpgroupware.org *
|
||||
* Written by Bettina Gille [ceb@phpgroupware.org] *
|
||||
@ -8,7 +8,7 @@
|
||||
* 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$ */
|
||||
|
||||
if (! $cat_id)
|
||||
@ -23,16 +23,16 @@
|
||||
|
||||
include('../header.inc.php');
|
||||
|
||||
$hidden_vars = "<input type=\"hidden\" name=\"sort\" value=\"$sort\">\n"
|
||||
. "<input type=\"hidden\" name=\"order\" value=\"$order\">\n"
|
||||
. "<input type=\"hidden\" name=\"query\" value=\"$query\">\n"
|
||||
. "<input type=\"hidden\" name=\"start\" value=\"$start\">\n"
|
||||
. "<input type=\"hidden\" name=\"cats_app\" value=\"$cats_app\">\n"
|
||||
. "<input type=\"hidden\" name=\"cat_id\" value=\"$cat_id\">\n"
|
||||
. "<input type=\"hidden\" name=\"extra\" value=\"$extra\">\n"
|
||||
. "<input type=\"hidden\" name=\"global_cats\" value=\"$global_cats\">\n"
|
||||
. "<input type=\"hidden\" name=\"cats_level\" value=\"$cats_level\">\n"
|
||||
. "<input type=\"hidden\" name=\"filter\" value=\"$filter\">\n";
|
||||
$hidden_vars = '<input type="hidden" name="sort" value="' . $sort . '">' . "\n"
|
||||
. '<input type="hidden" name="order" value="' . $order . '">' . "\n"
|
||||
. '<input type="hidden" name="query" value="' . $query . '">' . "\n"
|
||||
. '<input type="hidden" name="start" value="' . $start . '">' . "\n"
|
||||
. '<input type="hidden" name="cats_app" value="' . $cats_app . '">' . "\n"
|
||||
. '<input type="hidden" name="cat_id" value="' . $cat_id . '">' . "\n"
|
||||
. '<input type="hidden" name="extra" value="' . $extra . '">' . "\n"
|
||||
. '<input type="hidden" name="global_cats" value="' . $global_cats . '">' . "\n"
|
||||
. '<input type="hidden" name="cats_level" value="' . $cats_level . '">' . "\n"
|
||||
. '<input type="hidden" name="filter" value="' . $filter . '">' . "\n";
|
||||
|
||||
$t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('preferences'));
|
||||
$t->set_file(array('form' => 'category_form.tpl'));
|
||||
@ -46,31 +46,65 @@
|
||||
{
|
||||
$errorcount = 0;
|
||||
|
||||
if (!$cat_name) { $error[$errorcount++] = lang('Please enter a name for that category !'); }
|
||||
if (!$cat_name)
|
||||
{
|
||||
$error[$errorcount++] = lang('Please enter a name for that category !');
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
if (!$cat_parent) { $exists = $c->exists('appandmains',$cat_name,$cat_id); }
|
||||
else { $exists = $c->exists('appandsubs',$cat_name,$cat_id); }
|
||||
if ($exists == True) { $error[$errorcount++] = lang('That category name has been used already !'); }
|
||||
if (!$cat_parent)
|
||||
{
|
||||
$exists = $c->exists('appandmains',$cat_name,$cat_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$exists = $c->exists('appandsubs',$cat_name,$cat_id);
|
||||
}
|
||||
if ($exists == True)
|
||||
{
|
||||
$error[$errorcount++] = lang('That category name has been used already !');
|
||||
}
|
||||
}
|
||||
|
||||
if ($cat_main && $cat_parent) {
|
||||
if ($cat_main && $cat_parent)
|
||||
{
|
||||
$main = $c->return_main($cat_parent);
|
||||
if ($main != $cat_main) { $error[$errorcount++] = lang('You selected an invalid main category !'); }
|
||||
if ($main != $cat_main)
|
||||
{
|
||||
$error[$errorcount++] = lang('You selected an invalid main category !');
|
||||
}
|
||||
}
|
||||
|
||||
$cat_name = addslashes($cat_name);
|
||||
$cat_description = addslashes($cat_description);
|
||||
if ($access) { $cat_access = 'private'; }
|
||||
else { $cat_access = 'public'; }
|
||||
|
||||
if (! $error) { $c->edit($cat_id,$cat_parent,$cat_name,$cat_description,$cat_data,$cat_access,$cat_main); }
|
||||
if ($access)
|
||||
{
|
||||
$cat_access = 'private';
|
||||
}
|
||||
else
|
||||
{
|
||||
$cat_access = 'public';
|
||||
}
|
||||
|
||||
if ($errorcount) { $t->set_var('message',$phpgw->common->error_list($error)); }
|
||||
if (($submit) && (! $error) && (! $errorcount)) { $t->set_var('message',lang('Category x has been updated !',$cat_name)); }
|
||||
if ((! $submit) && (! $error) && (! $errorcount)) { $t->set_var('message',''); }
|
||||
if (! $error)
|
||||
{
|
||||
$c->edit($cat_id,$cat_parent,$cat_name,$cat_description,$cat_data,$cat_access,$cat_main);
|
||||
}
|
||||
}
|
||||
|
||||
if ($errorcount)
|
||||
{
|
||||
$t->set_var('message',$phpgw->common->error_list($error));
|
||||
}
|
||||
if (($submit) && (! $error) && (! $errorcount))
|
||||
{
|
||||
$t->set_var('message',lang('Category x has been updated !',$cat_name));
|
||||
}
|
||||
if ((! $submit) && (! $error) && (! $errorcount))
|
||||
{
|
||||
$t->set_var('message','');
|
||||
}
|
||||
|
||||
$cats = $c->return_single($cat_id);
|
||||
|
||||
@ -148,12 +182,9 @@
|
||||
$t->set_var('lang_edit',lang('Edit'));
|
||||
$t->set_var('lang_delete',lang('Delete'));
|
||||
$t->set_var('lang_done',lang('Done'));
|
||||
|
||||
$t->set_var('edithandle','');
|
||||
$t->set_var('addhandle','');
|
||||
|
||||
$t->pparse('out','form');
|
||||
$t->pparse('edithandle','edit');
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
@ -1,13 +1,15 @@
|
||||
<!-- $Id$ -->
|
||||
|
||||
<!-- BEGIN form -->
|
||||
|
||||
<center>
|
||||
<table border="0" width="80%" cellspacing="2" cellpadding="2">
|
||||
<tr>
|
||||
<table border="0" width="80%" cellspacing="2" cellpadding="2">
|
||||
<tr>
|
||||
<td colspan="1" align="center" bgcolor="#c9c9c9"><font face="{font}"><b>{title_categories}: {user_name}<b/></font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<font face="{font}">{message}</font>
|
||||
<table border="0" width="80%" cellspacing="2" cellpadding="2">
|
||||
</tr>
|
||||
</table>
|
||||
<font face="{font}">{message}</font>
|
||||
<table border="0" width="80%" cellspacing="2" cellpadding="2">
|
||||
<form name="form" action="{actionurl}" method="POST">
|
||||
<tr>
|
||||
<td><font face="{font}">{lang_main}</font></td>
|
||||
@ -36,6 +38,7 @@
|
||||
</table>
|
||||
|
||||
<!-- BEGIN add -->
|
||||
|
||||
<table width="50%" border="0" cellspacing="2" cellpadding="2">
|
||||
<tr valign="bottom">
|
||||
<td height="50" align="right">
|
||||
@ -49,11 +52,12 @@
|
||||
<font face="{font}"><input type="submit" name="done" value="{lang_done}"></font></form></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</center>
|
||||
</center>
|
||||
|
||||
<!-- END add -->
|
||||
|
||||
<!-- BEGIN edit -->
|
||||
|
||||
<table width="50%" border="0" cellspacing="2" cellpadding="2">
|
||||
<tr valign="bottom">
|
||||
<td height="50" align="right">
|
||||
@ -69,6 +73,8 @@
|
||||
<font face="{font}"><input type="submit" name="done" value="{lang_done}"></font></form></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</center>
|
||||
|
||||
<!-- END edit -->
|
||||
|
||||
<!-- END form -->
|
@ -1,10 +1,12 @@
|
||||
<!-- $Id$ -->
|
||||
|
||||
<!-- BEGIN form -->
|
||||
<center>
|
||||
<table border=0 width="65%" cellpadding="2" cellspacing="2">
|
||||
|
||||
<center>
|
||||
<table border="0" width="65%" cellpadding="2" cellspacing="2">
|
||||
<form method="POST" action="{action_url}">
|
||||
<tr>
|
||||
<td align=center><font face="{font}">{deleteheader}</font></td>
|
||||
<td align="center"><font face="{font}">{deleteheader}</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">{lang_subs}</td>
|
||||
@ -19,4 +21,5 @@
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<!-- END form -->
|
@ -1,11 +1,12 @@
|
||||
<!-- $Id$ -->
|
||||
<center>
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="80%">
|
||||
|
||||
<center>
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="80%">
|
||||
<tr>
|
||||
<td colspan="3" width="80%" align="center" bgcolor="#c9c9c9"><font face="{font}"><b>{lang_app} {title_categories}: {user_name}<b/></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align=left>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align=left>
|
||||
<table border="0" width="100%">
|
||||
<tr>
|
||||
{left}
|
||||
@ -22,8 +23,8 @@
|
||||
<font face="{font}"><input type="text" name="query"> <input type="submit" name="search" value="{lang_search}"></font>
|
||||
</form></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellspacing="2" cellpadding="2" width="80%">
|
||||
</table>
|
||||
<table border="0" cellspacing="2" cellpadding="2" width="80%">
|
||||
<tr bgcolor="{th_bg}">
|
||||
<td bgcolor="{th_bg}"><font face="{font}">{sort_name}</font></td>
|
||||
<td bgcolor="{th_bg}"><font face="{font}">{sort_description}</font></td>
|
||||
@ -34,6 +35,7 @@
|
||||
</tr>
|
||||
|
||||
<!-- BEGIN cat_list -->
|
||||
|
||||
<tr bgcolor="{tr_color}">
|
||||
<td><font face="{font}">{name}</font></td>
|
||||
<td><font face="{font}">{descr}</font></td>
|
||||
@ -41,12 +43,15 @@
|
||||
<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>
|
||||
</tr>
|
||||
</tr>
|
||||
|
||||
<!-- END cat_list -->
|
||||
|
||||
<!-- BEGINN add -->
|
||||
</table>
|
||||
<table border="0" cellspacing="2" cellpadding="2" width="80%">
|
||||
<tr valign="bottom">
|
||||
|
||||
</table>
|
||||
<table border="0" cellspacing="2" cellpadding="2" width="80%">
|
||||
<tr valign="bottom">
|
||||
<td width="50%">
|
||||
<form method="POST" action="{add_action}">
|
||||
{hidden_vars}
|
||||
@ -60,6 +65,8 @@
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- END add -->
|
||||
</table>
|
||||
|
||||
</table>
|
||||
</center>
|
Loading…
Reference in New Issue
Block a user