mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-11 16:38:39 +01:00
make cat list nicer
This commit is contained in:
parent
c0867b777e
commit
a8f3dcc2d0
@ -1,6 +1,3 @@
|
||||
|
||||
/* $Id: */
|
||||
|
||||
TODO:
|
||||
- configuration dialog for admin section
|
||||
don't use vfs
|
||||
@ -25,14 +22,10 @@ TODO:
|
||||
add location functionality
|
||||
bug: loose html and picture on tab-switch (eTemplate bug --> Ralf)
|
||||
use eTemplates input validation
|
||||
if only one cat is present --> chose it
|
||||
bug: lang() returnmessages to often
|
||||
make some returnmessages js dialogs
|
||||
|
||||
|
||||
acl : the acl realy sucks! it was copied from news_admin and persumaly needs to be rewritten...
|
||||
use of class.db / or even better no dirct access to tables!
|
||||
use of class.acl
|
||||
use of class.eTemplate
|
||||
define admin for each used cat
|
||||
add right 'direct book'
|
||||
|
||||
|
||||
----
|
||||
if basics are working --> make it scheudable (meeting with ralf)
|
@ -10,6 +10,8 @@
|
||||
* -------------------------------------------- *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
class bo_acl
|
||||
{
|
||||
/*! @var $permissions Holds alls permissions for resources of user */
|
||||
@ -69,15 +71,28 @@
|
||||
*/
|
||||
function get_cats($perm_type)
|
||||
{
|
||||
foreach($this->permissions as $cat_id => $rights)
|
||||
$cats = $this->egw_cats->return_sorted_array(0,False,'','','',!$type);
|
||||
while (list(,$cat) = @each($cats))
|
||||
{
|
||||
if(strstr($cat_id,'L') && $rights & $perm_type)
|
||||
if($this->is_permitted($cat['id'],$perm_type))
|
||||
{
|
||||
$cat_id = substr($cat_id,1);
|
||||
$readcats[$cat_id] = $this->egw_cats->id2name($cat_id);
|
||||
for ($j=0,$s=''; $j < $cat['level']; $j++)
|
||||
{
|
||||
$s .= ' ';
|
||||
}
|
||||
$s .= $GLOBALS['phpgw']->strip_html($cat['name']);
|
||||
if ($cat['app_name'] == 'phpgw')
|
||||
{
|
||||
$s .= ' <' . lang('Global') . '>';
|
||||
}
|
||||
if ($cat['owner'] == '-1')
|
||||
{
|
||||
$s .= ' <' . lang('Global') . ' ' . lang($cat['app_name']) . '>';
|
||||
}
|
||||
$perm_cats[$cat['id']] = $s;
|
||||
}
|
||||
}
|
||||
return $readcats;
|
||||
return $perm_cats;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -116,6 +131,7 @@
|
||||
return $this->so->get_rights('L'.$cat_id);
|
||||
}
|
||||
|
||||
|
||||
// privat functions from here on -------------------------------------------------------------------------
|
||||
function save_sessiondata()
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
<center>
|
||||
<table border="0" cellspacing="2" cellpadding="2" width="60%">
|
||||
<table border="0" cellspacing="2" cellpadding="2" width="80%">
|
||||
<tr>
|
||||
<td colspan="3" align="center" bgcolor="#c9c9c9"><b>{title}<b/></td>
|
||||
</tr>
|
||||
@ -22,7 +22,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
<form method="POST">
|
||||
<table border="0" cellspacing="2" cellpadding="2" width="60%">
|
||||
<table border="0" cellspacing="2" cellpadding="2" width="80%">
|
||||
<tr bgcolor="{th_bg}" valign="middle" align="center">
|
||||
<td>{sort_cat}<br>{lang_cat_admin}</td>
|
||||
<td>{lang_read}</td>
|
||||
@ -41,9 +41,10 @@
|
||||
</tr>
|
||||
<!-- END cat_list -->
|
||||
<tr>
|
||||
<td colspan="4" align="center">
|
||||
<input type="submit" name="btnSave" value="{lang_save}">
|
||||
<input type="submit" name="btnDone" value="{lang_done}">
|
||||
<td colspan="4" align="left">
|
||||
<br>
|
||||
<input type="submit" name="btnSave" value="{lang_save}">
|
||||
<input type="submit" name="btnDone" value="{lang_done}">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user