mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 16:33:17 +01:00
fixed app >> categories filter "all" to contain private categories too, also added a private column for easier identification
This commit is contained in:
parent
34393ca041
commit
205a362497
@ -316,7 +316,10 @@ class admin_categories
|
||||
{
|
||||
$globalcat = false;
|
||||
}
|
||||
if ($globalcat) $filter['access'] = 'public';
|
||||
if ($globalcat && $query['filter']) $filter['access'] = 'public';
|
||||
// new column-filter access has highest priority
|
||||
if (!empty($query['col_filter']['access']))$filter['access'] = $query['col_filter']['access'];
|
||||
|
||||
egw_cache::setSession(__CLASS__.$query['appname'],'nm',$query);
|
||||
|
||||
if($query['filter'] > 0 || $query['col_filter']['owner'])
|
||||
@ -449,12 +452,12 @@ class admin_categories
|
||||
break; // Only one can come per submit
|
||||
}
|
||||
}
|
||||
if (!count($content['nm']['selected']) && !$content['nm']['select_all'])
|
||||
{
|
||||
$msg = lang('You need to select some entries first!');
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!count($content['nm']['selected']) && !$content['nm']['select_all'])
|
||||
{
|
||||
$msg = lang('You need to select some entries first!');
|
||||
}
|
||||
else
|
||||
{
|
||||
// Action has an additional action - add / delete, etc. Buttons named <multi-action>_action[action_name]
|
||||
if(in_array($content['nm']['action'], array('owner')))
|
||||
{
|
||||
@ -467,17 +470,17 @@ class admin_categories
|
||||
}
|
||||
$content['nm']['action'] .= '_' . $content[$action];
|
||||
}
|
||||
if ($this->action($content['nm']['action'],$content['nm']['selected'],$content['nm']['select_all'],
|
||||
$success,$failed,$action_msg,$content['nm'],$msg))
|
||||
{
|
||||
$msg .= lang('%1 category(s) %2',$success,$action_msg);
|
||||
}
|
||||
elseif(empty($msg))
|
||||
{
|
||||
$msg .= lang('%1 category(s) %2, %3 failed because of insufficent rights !!!',$success,$action_msg,$failed);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($this->action($content['nm']['action'],$content['nm']['selected'],$content['nm']['select_all'],
|
||||
$success,$failed,$action_msg,$content['nm'],$msg))
|
||||
{
|
||||
$msg .= lang('%1 category(s) %2',$success,$action_msg);
|
||||
}
|
||||
elseif(empty($msg))
|
||||
{
|
||||
$msg .= lang('%1 category(s) %2, %3 failed because of insufficent rights !!!',$success,$action_msg,$failed);
|
||||
}
|
||||
}
|
||||
}
|
||||
$content['msg'] = $msg;
|
||||
$content['add_link']= $this->add_link.'&appname='.$appname;
|
||||
$content['edit_link']= $this->edit_link.'&appname='.$appname;
|
||||
@ -488,6 +491,10 @@ class admin_categories
|
||||
'' => lang('All'),
|
||||
$appname => lang($appname)
|
||||
);
|
||||
$sel_options['access'] = array(
|
||||
'public' => 'No',
|
||||
'private' => 'Yes',
|
||||
);
|
||||
|
||||
$sel_options['owner'][0] = lang('All users');
|
||||
$accs = $GLOBALS['egw']->accounts->get_list('groups');
|
||||
|
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* EGroupware - eTemplates for Application admin
|
||||
* http://www.egroupware.org
|
||||
* generated by soetemplate::dump4setup() 2011-11-17 13:27
|
||||
* generated by soetemplate::dump4setup() 2012-02-15 10:30
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package admin
|
||||
@ -69,7 +69,7 @@ $templ_data[] = array('name' => 'admin.categories.index','template' => '','lang'
|
||||
width: 100%
|
||||
}','modified' => '1310572522',);
|
||||
|
||||
$templ_data[] = array('name' => 'admin.categories.index.rows','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:6:{s:2:"c1";s:2:"th";s:2:"c2";s:30:"$row_cont[id] $row_cont[class]";s:1:"I";s:2:"1%";s:1:"F";s:2:"80";s:1:"E";s:2:"40";s:1:"H";s:2:"30";}i:1;a:9:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Name";s:4:"name";s:4:"name";}s:1:"B";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:11:"Description";s:4:"name";s:11:"description";}s:1:"C";a:4:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"name";s:3:"app";s:5:"label";s:11:"Application";s:4:"size";s:1:",";}s:1:"D";a:4:{s:4:"type";s:23:"nextmatch-accountfilter";s:5:"label";s:14:"Category owner";s:4:"name";s:5:"owner";s:4:"size";s:8:"all,both";}s:1:"E";a:4:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:4:"Icon";s:4:"name";s:4:"icon";s:5:"align";s:6:"center";}s:1:"F";a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:5:"Color";s:4:"name";s:5:"color";}s:1:"G";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Modified";s:4:"name";s:8:"last_mod";}s:1:"H";a:4:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:8:"Children";s:4:"name";s:4:"subs";s:5:"align";s:6:"center";}s:1:"I";a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:7:"Actions";s:4:"name";s:14:"legacy_actions";}}i:2;a:9:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:2:{s:4:"type";s:4:"html";s:4:"name";s:20:"${row}[level_spacer]";}i:2;a:3:{s:4:"type";s:5:"label";s:4:"name";s:12:"${row}[name]";s:4:"span";s:17:",$row_cont[class]";}}s:1:"B";a:2:{s:4:"type";s:5:"label";s:4:"name";s:19:"${row}[description]";}s:1:"C";a:3:{s:4:"type";s:6:"select";s:4:"name";s:15:"${row}[appname]";s:8:"readonly";s:1:"1";}s:1:"D";a:4:{s:4:"type";s:14:"select-account";s:4:"name";s:13:"${row}[owner]";s:8:"readonly";s:1:"1";s:4:"size";s:16:"All users,groups";}s:1:"E";a:4:{s:4:"type";s:5:"image";s:4:"name";s:16:"${row}[icon_url]";s:5:"label";s:23:"{$row_cont[data][icon]}";s:5:"align";s:6:"center";}s:1:"F";a:2:{s:4:"type";s:5:"label";s:4:"name";s:19:"${row}[data][color]";}s:1:"G";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:16:"${row}[last_mod]";s:8:"readonly";s:1:"1";}s:1:"H";a:3:{s:4:"type";s:5:"label";s:4:"name";s:12:"${row}[subs]";s:5:"align";s:6:"center";}s:1:"I";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"3,,0,0";i:1;a:5:{s:4:"type";s:10:"buttononly";s:4:"size";s:4:"edit";s:5:"label";s:4:"Edit";s:4:"name";s:19:"edit[$row_cont[id]]";s:7:"onclick";s:176:"window.open(egw::link(\'/index.php\',\'menuaction={$cont[edit_link]}&cat_id=$row_cont[id]\'),\'_blank\',\'dependent=yes,width=600,height=380,scrollbars=yes,status=yes\'); return false;";}i:2;a:5:{s:4:"type";s:10:"buttononly";s:4:"size";s:3:"new";s:5:"label";s:7:"Add sub";s:4:"name";s:18:"add[$row_cont[id]]";s:7:"onclick";s:197:"window.open(egw::link(\'/index.php\',\'menuaction=$cont[edit_link]&parent=$row_cont[id]&appname=$cont[appname]\'),\'_blank\',\'dependent=yes,width=600,height=380,scrollbars=yes,status=yes\'); return false;";}i:3;a:7:{s:4:"type";s:10:"buttononly";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"name";s:21:"delete[$row_cont[id]]";s:4:"help";s:20:"Delete this category";s:7:"onclick";s:246:"document.getElementById(\'exec[delete][cat_id]\').value=\'$row_cont[id]\'; set_style_by_class(\'tr\',\'confirmSubs\',\'visibility\',\'$row_cont[children]\'?\'visible\':\'collapse\'); set_style_by_class(\'fieldset\',\'confirmDelete\',\'display\',\'block\'); return false;";s:4:"span";s:9:",leftPad5";}}}}s:4:"rows";i:2;s:4:"cols";i:9;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1264657599',);
|
||||
$templ_data[] = array('name' => 'admin.categories.index.rows','template' => '','lang' => '','group' => '0','version' => '1.9.002','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:6:{s:2:"c1";s:2:"th";s:2:"c2";s:30:"$row_cont[id] $row_cont[class]";s:1:"I";s:2:"30";s:1:"J";s:2:"1%";s:1:"G";s:2:"80";s:1:"F";s:2:"40";}i:1;a:10:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Name";s:4:"name";s:4:"name";}s:1:"B";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:11:"Description";s:4:"name";s:11:"description";}s:1:"C";a:4:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"name";s:3:"app";s:5:"label";s:11:"Application";s:4:"size";s:1:",";}s:1:"D";a:4:{s:4:"type";s:23:"nextmatch-accountfilter";s:5:"label";s:5:"Owner";s:4:"name";s:5:"owner";s:4:"size";s:8:"all,both";}s:1:"E";a:4:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"size";s:3:"All";s:4:"name";s:6:"access";s:5:"label";s:7:"Private";}s:1:"F";a:4:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:4:"Icon";s:4:"name";s:4:"icon";s:5:"align";s:6:"center";}s:1:"G";a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:5:"Color";s:4:"name";s:5:"color";}s:1:"H";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Modified";s:4:"name";s:8:"last_mod";}s:1:"I";a:4:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:8:"Children";s:4:"name";s:4:"subs";s:5:"align";s:6:"center";}s:1:"J";a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:7:"Actions";s:4:"name";s:14:"legacy_actions";}}i:2;a:10:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:2:{s:4:"type";s:4:"html";s:4:"name";s:20:"${row}[level_spacer]";}i:2;a:3:{s:4:"type";s:5:"label";s:4:"name";s:12:"${row}[name]";s:4:"span";s:17:",$row_cont[class]";}}s:1:"B";a:2:{s:4:"type";s:5:"label";s:4:"name";s:19:"${row}[description]";}s:1:"C";a:3:{s:4:"type";s:6:"select";s:4:"name";s:15:"${row}[appname]";s:8:"readonly";s:1:"1";}s:1:"D";a:4:{s:4:"type";s:14:"select-account";s:4:"name";s:13:"${row}[owner]";s:8:"readonly";s:1:"1";s:4:"size";s:16:"All users,groups";}s:1:"E";a:5:{s:4:"type";s:8:"checkbox";s:4:"size";s:14:"private,public";s:5:"align";s:6:"center";s:4:"name";s:14:"${row}[access]";s:8:"readonly";s:1:"1";}s:1:"F";a:4:{s:4:"type";s:5:"image";s:4:"name";s:16:"${row}[icon_url]";s:5:"label";s:23:"{$row_cont[data][icon]}";s:5:"align";s:6:"center";}s:1:"G";a:2:{s:4:"type";s:5:"label";s:4:"name";s:19:"${row}[data][color]";}s:1:"H";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:16:"${row}[last_mod]";s:8:"readonly";s:1:"1";}s:1:"I";a:3:{s:4:"type";s:5:"label";s:4:"name";s:12:"${row}[subs]";s:5:"align";s:6:"center";}s:1:"J";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"3,,0,0";i:1;a:5:{s:4:"type";s:10:"buttononly";s:4:"size";s:4:"edit";s:5:"label";s:4:"Edit";s:4:"name";s:19:"edit[$row_cont[id]]";s:7:"onclick";s:199:"window.open(egw::link(\'/index.php\',\'menuaction={$cont[edit_link]}&cat_id=$row_cont[id]&appname=$cont[appname]\'),\'_blank\',\'dependent=yes,width=600,height=380,scrollbars=yes,status=yes\'); return false;";}i:2;a:5:{s:4:"type";s:10:"buttononly";s:4:"size";s:3:"new";s:5:"label";s:7:"Add sub";s:4:"name";s:18:"add[$row_cont[id]]";s:7:"onclick";s:197:"window.open(egw::link(\'/index.php\',\'menuaction=$cont[edit_link]&parent=$row_cont[id]&appname=$cont[appname]\'),\'_blank\',\'dependent=yes,width=600,height=380,scrollbars=yes,status=yes\'); return false;";}i:3;a:7:{s:4:"type";s:10:"buttononly";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"name";s:21:"delete[$row_cont[id]]";s:4:"help";s:20:"Delete this category";s:7:"onclick";s:246:"document.getElementById(\'exec[delete][cat_id]\').value=\'$row_cont[id]\'; set_style_by_class(\'tr\',\'confirmSubs\',\'visibility\',\'$row_cont[children]\'?\'visible\':\'collapse\'); set_style_by_class(\'fieldset\',\'confirmDelete\',\'display\',\'block\'); return false;";s:4:"span";s:9:",leftPad5";}}}}s:4:"rows";i:2;s:4:"cols";i:10;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1264657599',);
|
||||
|
||||
$templ_data[] = array('name' => 'admin.cmds','template' => '','lang' => '','group' => '0','version' => '1.5.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:9:"nextmatch";s:4:"size";s:15:"admin.cmds.rows";s:4:"name";s:2:"nm";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1195518120',);
|
||||
|
||||
|
@ -1,13 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id$ -->
|
||||
<overlay>
|
||||
<template id="admin.categories.index.rows" template="" lang="" group="0" version="1.9.001">
|
||||
<template id="admin.categories.index.rows" template="" lang="" group="0" version="1.9.002">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column width="40"/>
|
||||
<column width="80"/>
|
||||
<column/>
|
||||
@ -19,7 +20,8 @@
|
||||
<nextmatch-sortheader label="Name" id="name"/>
|
||||
<nextmatch-sortheader label="Description" id="description"/>
|
||||
<nextmatch-filterheader label="Application" id="app" options=","/>
|
||||
<nextmatch-accountfilter label="Category owner" id="owner" options="all,both"/>
|
||||
<nextmatch-accountfilter label="Owner" id="owner" options="all,both"/>
|
||||
<nextmatch-filterheader label="Private" id="access" options="All"/>
|
||||
<nextmatch-header align="center" label="Icon" id="icon"/>
|
||||
<nextmatch-header label="Color" id="color"/>
|
||||
<nextmatch-sortheader label="Modified" id="last_mod"/>
|
||||
@ -38,6 +40,7 @@
|
||||
<menulist>
|
||||
<menupopup type="select-account" id="${row}[owner]" readonly="true" options="All users,groups"/>
|
||||
</menulist>
|
||||
<checkbox align="center" id="${row}[access]" readonly="true" options="private,public"/>
|
||||
<image align="center" label="{$row_cont[data][icon]}" src="${row}[icon_url]"/>
|
||||
<description id="${row}[data][color]"/>
|
||||
<date-time id="${row}[last_mod]" readonly="true"/>
|
||||
|
Loading…
Reference in New Issue
Block a user