mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-23 05:41:02 +01:00
Multiple owners, change owner by context menu, application filter, misc. categories fixes.
This commit is contained in:
parent
74e7a27b4c
commit
1c8ba78da0
@ -112,7 +112,7 @@ class admin_categories
|
||||
$appname = categories::GLOBAL_APPNAME;
|
||||
}
|
||||
}
|
||||
elseif (!self::$acl_edit || ( $content['owner'] != $GLOBALS['egw_info']['user']['account_id'] && $this->appname != 'admin'))
|
||||
elseif ($content['appname'] != $appname || !self::$acl_edit || ( $content['owner'] != $GLOBALS['egw_info']['user']['account_id'] && $this->appname != 'admin'))
|
||||
{
|
||||
// only allow to view category
|
||||
$readonlys['__ALL__'] = true;
|
||||
@ -193,7 +193,7 @@ class admin_categories
|
||||
if (!empty($js)) $GLOBALS['egw']->js->set_onload($js);
|
||||
}
|
||||
$content['msg'] = $msg;
|
||||
$content['appname'] = $appname;
|
||||
if(!$content['appname']) $content['appname'] = $appname;
|
||||
$content['icon_url'] = $content['base_url'] . $content['data']['icon'];
|
||||
|
||||
$sel_options['icon'] = self::get_icons();
|
||||
@ -223,7 +223,11 @@ class admin_categories
|
||||
}
|
||||
if($this->appname == 'admin' || ($content['id'] && !((int)$content['owner'] > 0)))
|
||||
{
|
||||
if($content['owner'] > 0) $content['owner'] = 0;
|
||||
if($content['owner'] > 0)
|
||||
{
|
||||
$content['msg'] .= "\n".lang('owner "%1" removed, please select group-owner', common::grab_owner_name($content['owner']));
|
||||
$content['owner'] = 0;
|
||||
}
|
||||
$sel_options['owner'][0] = lang('All users');
|
||||
$accs = $GLOBALS['egw']->accounts->get_list('groups');
|
||||
foreach($accs as $acc)
|
||||
@ -252,6 +256,7 @@ class admin_categories
|
||||
});');
|
||||
|
||||
$readonlys['button[delete]'] = !$content['id'] || !self::$acl_delete || // cant delete not yet saved category
|
||||
$appname != $content['appname'] || // Can't edit a category from a different app
|
||||
($this->appname != 'admin' && $content['owner'] != $GLOBALS['egw_info']['user']['account_id']);
|
||||
|
||||
$tmpl = new etemplate('admin.categories.edit');
|
||||
@ -301,7 +306,7 @@ class admin_categories
|
||||
* @param array &$readonlys eg. to disable buttons based on acl, not use here, maybe in a derived class
|
||||
* @return int total number of rows
|
||||
*/
|
||||
public function get_rows($query,&$rows,&$readonlys)
|
||||
public function get_rows(&$query,&$rows,&$readonlys)
|
||||
{
|
||||
self::init_static();
|
||||
|
||||
@ -318,8 +323,12 @@ class admin_categories
|
||||
{
|
||||
$owner = $query['col_filter']['owner'] ? $query['col_filter']['owner'] : $query['filter'];
|
||||
}
|
||||
if($query['col_filter']['app'])
|
||||
{
|
||||
$globalcat = false;
|
||||
}
|
||||
$cats = new categories($filter['owner'],$query['appname']);
|
||||
$globalcat = isset($GLOBALS['egw_info']['user']['apps']['admin']) ? 'all_no_acl' : 1; // ignore acl only for admins
|
||||
$globalcat = $globalcat && isset($GLOBALS['egw_info']['user']['apps']['admin']) ? 'all_no_acl' : $globalcat; // ignore acl only for admins
|
||||
$rows = $cats->return_sorted_array($query['start'],false,$query['search'],$query['sort'],$query['order'],$globalcat,$parent=0,true,$filter);
|
||||
$count = $cats->total_records;
|
||||
foreach($rows as $key => &$row)
|
||||
@ -341,7 +350,12 @@ class admin_categories
|
||||
$row['class'] = 'level'.$row['level'];
|
||||
if($row['owner'] > 0 && !$GLOBALS['egw_info']['user']['apps']['admin'] && $row['owner'] != $GLOBALS['egw_info']['user']['account_id'])
|
||||
{
|
||||
$row['class'] . ' rowNoEdit rowNoDelete ';
|
||||
$row['class'] .= ' rowNoEdit rowNoDelete ';
|
||||
}
|
||||
// Can only edit (via context menu) categories for the selected app (backend restriction)
|
||||
if($row['appname'] != $query['appname'])
|
||||
{
|
||||
$row['class'] .= ' rowNoEdit ';
|
||||
}
|
||||
$readonlys["edit[$row[id]]"] = !self::$acl_edit;
|
||||
$readonlys["add[$row[id]]"] = !self::$acl_add_sub;
|
||||
@ -441,6 +455,17 @@ class admin_categories
|
||||
else
|
||||
{
|
||||
// Action has an additional action - add / delete, etc. Buttons named <multi-action>_action[action_name]
|
||||
if(in_array($content['nm']['action'], array('owner')))
|
||||
{
|
||||
$action = $content['nm']['action'];
|
||||
$content['nm']['action'] .= '_' . key($content[$action . '_action']);
|
||||
|
||||
if(is_array($content[$action]))
|
||||
{
|
||||
$content[$action] = implode(',',$content[$action]);
|
||||
}
|
||||
$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))
|
||||
{
|
||||
@ -455,8 +480,24 @@ class admin_categories
|
||||
$content['msg'] = $msg;
|
||||
$content['add_link']= $this->add_link.'&appname='.$appname;
|
||||
$content['edit_link']= $this->edit_link.'&appname='.$appname;
|
||||
$content['owner'] = '';
|
||||
|
||||
$sel_options['appname'] = $this->get_app_list();
|
||||
$sel_options['app'] = array(
|
||||
'' => lang('All'),
|
||||
$appname => lang($appname)
|
||||
);
|
||||
|
||||
$sel_options['owner'][0] = lang('All users');
|
||||
$accs = $GLOBALS['egw']->accounts->get_list('groups');
|
||||
foreach($accs as $acc)
|
||||
{
|
||||
if ($acc['account_type'] == 'g')
|
||||
{
|
||||
$sel_options['owner'][$acc['account_id']] = ExecMethod2('etemplate.select_widget.accountInfo',$acc['account_id'],$acc,$type2,$type=='both');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$readonlys['add'] = !self::$acl_add;
|
||||
if(!$GLOBALS['egw_info']['user']['apps']['admin'])
|
||||
@ -464,6 +505,10 @@ class admin_categories
|
||||
$readonlys['nm']['rows']['owner'] = true;
|
||||
$readonlys['nm']['col_filter']['owner'] = true;
|
||||
}
|
||||
if($appname == categories::GLOBAL_APPNAME) {
|
||||
$sel_options['app'] = array(''=>'');
|
||||
$readonlys['nm']['rows']['app'] = true;
|
||||
}
|
||||
|
||||
$tmpl = new etemplate('admin.categories.index');
|
||||
$tmpl->exec($this->list_link,$content,$sel_options,$readonlys,array(
|
||||
@ -482,7 +527,7 @@ class admin_categories
|
||||
'popup' => '600x380',
|
||||
'group' => $group=1,
|
||||
),
|
||||
'add' => array( // does edit if allowed, otherwise view
|
||||
'add' => array(
|
||||
'caption' => 'Add',
|
||||
'allowOnMultiple' => false,
|
||||
'icon' => 'new',
|
||||
@ -490,7 +535,7 @@ class admin_categories
|
||||
'popup' => '600x380',
|
||||
'group' => $group,
|
||||
),
|
||||
'sub' => array( // does edit if allowed, otherwise view
|
||||
'sub' => array(
|
||||
'caption' => 'Add sub',
|
||||
'allowOnMultiple' => false,
|
||||
'icon' => 'new',
|
||||
@ -499,15 +544,27 @@ class admin_categories
|
||||
'group' => $group,
|
||||
'disableClass' => 'rowNoSub',
|
||||
),
|
||||
'delete' => array( // does edit if allowed, otherwise view
|
||||
'owner' => array(
|
||||
'caption' => 'Change owner',
|
||||
'icon' => 'users',
|
||||
'nm_action' => 'open_popup',
|
||||
'group' => $group,
|
||||
'disableClass' => 'rowNoEdit',
|
||||
),
|
||||
'delete' => array(
|
||||
'caption' => 'Delete',
|
||||
'allowOnMultiple' => true,
|
||||
'nm_action' => 'open_popup',
|
||||
'group' => $group,
|
||||
'group' => ++$group,
|
||||
'disableClass' => 'rowNoDelete',
|
||||
),
|
||||
);
|
||||
|
||||
if(!$GLOBALS['egw_info']['user']['apps']['admin'])
|
||||
{
|
||||
unset($actions['owner']);
|
||||
}
|
||||
|
||||
return $actions;
|
||||
}
|
||||
|
||||
@ -545,17 +602,51 @@ class admin_categories
|
||||
}
|
||||
}
|
||||
$owner = $query['col_filter']['owner'] ? $query['col_filter']['owner'] : $query['filter'];
|
||||
$cats = new categories($owner,$query['appname']);
|
||||
$app = $query['col_filter']['app'] ? $query['col_filter']['app'] : $query['appname'];
|
||||
$cats = new categories($owner,$app);
|
||||
|
||||
foreach($checked as $id) {
|
||||
switch($action) {
|
||||
case 'delete':
|
||||
case 'delete_sub':
|
||||
$cats->delete($id,$action == 'delete_sub',$action != 'delete_sub');
|
||||
list($action, $settings) = explode('_', $action, 2);
|
||||
|
||||
switch($action)
|
||||
{
|
||||
case 'delete':
|
||||
foreach($checked as $id)
|
||||
{
|
||||
$cats->delete($id,$settings == 'sub',$settings != 'sub');
|
||||
$action_msg = lang('deleted');
|
||||
$success++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'owner':
|
||||
$action_msg = lang('updated');
|
||||
list($add_remove, $ids) = explode('_', $settings, 2);
|
||||
$ids = explode(',',$ids);
|
||||
// Adding 'All users' removes all the others
|
||||
if($add_remove == 'add' && array_search(categories::GLOBAL_ACCOUNT,$ids) !== false) $ids = array(categories::GLOBAL_ACCOUNT);
|
||||
|
||||
foreach($checked as $id)
|
||||
{
|
||||
if (!$data = $cats->read($id)) continue;
|
||||
$data['owner'] = explode(',',$data['owner']);
|
||||
if(array_search(categories::GLOBAL_ACCOUNT,$data['owner']) !== false || $data['owner'][0] > 0)
|
||||
{
|
||||
$data['owner'] = array();
|
||||
}
|
||||
$data['owner'] = $add_remove == 'add' ?
|
||||
$ids == array(categories::GLOBAL_ACCOUNT) ? $ids : array_merge($data['owner'],$ids) :
|
||||
array_diff($data['owner'],$ids);
|
||||
$data['owner'] = implode(',',array_unique($data['owner']));
|
||||
|
||||
if ($cats->edit($data))
|
||||
{
|
||||
$success++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$failed++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return $failed == 0;
|
||||
@ -564,7 +655,8 @@ class admin_categories
|
||||
/**
|
||||
* Get a list of apps for selectbox / filter
|
||||
*/
|
||||
protected function get_app_list() {
|
||||
protected function get_app_list()
|
||||
{
|
||||
$apps = array();
|
||||
foreach ($GLOBALS['egw_info']['apps'] as $app => $data)
|
||||
{
|
||||
|
@ -117,6 +117,7 @@ change account_id admin en Change account ID
|
||||
change acl rights admin en Change ACL rights
|
||||
change config settings admin en Change config settings
|
||||
change main screen message admin en Change main screen message
|
||||
change owner admin en Change owner
|
||||
change password for %1 admin en Change password for %1
|
||||
change password hash to admin en Change password hash to
|
||||
changed password hash for %1 to %2. admin en Changed password hash for %1 to %2.
|
||||
@ -428,6 +429,7 @@ operating system admin en Operating system
|
||||
order admin en Order
|
||||
outbound admin en Outbound
|
||||
own install id: admin en Own install ID:
|
||||
owner "%1" removed, please select group-owner admin en Owner "%1" removed, please select group owner
|
||||
passthrough admin en Passthrough
|
||||
password for smtp-authentication admin en Password for SMTP authentication
|
||||
password updated admin en Password updated.
|
||||
|
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* EGroupware - eTemplates for Application admin
|
||||
* http://www.egroupware.org
|
||||
* generated by soetemplate::dump4setup() 2011-06-27 15:13
|
||||
* generated by soetemplate::dump4setup() 2011-07-07 12:46
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package admin
|
||||
@ -37,9 +37,9 @@ $templ_data[] = array('name' => 'admin.categories.delete','template' => '','lang
|
||||
{
|
||||
}','modified' => '1308076484',);
|
||||
|
||||
$templ_data[] = array('name' => 'admin.categories.edit','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:2:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:12:{i:0;a:14:{s:2:"c2";s:2:"th";s:2:"c3";s:3:"row";s:2:"c4";s:7:"row,top";s:2:"c7";s:3:"row";s:2:"c6";s:3:"row";s:2:"h2";s:2:"25";s:2:"h1";s:6:",!@msg";s:2:"c9";s:3:"row";s:2:"c8";s:3:"row";s:3:"c10";s:3:"row";s:3:"h10";s:11:",!@last_mod";s:2:"h8";s:15:",@appname=phpgw";s:2:"h5";s:12:",@no_private";s:2:"c5";s:3:"nmr";}i:1;a:2:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:5:"align";s:6:"center";s:4:"name";s:3:"msg";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:9:",,,parent";s:5:"label";s:15:"Parent category";}s:1:"B";a:3:{s:4:"type";s:10:"select-cat";s:4:"size";s:25:"None,,,$cont[appname],,-1";s:4:"name";s:6:"parent";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,name";s:5:"label";s:4:"Name";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"50,150";s:4:"name";s:4:"name";s:6:"needed";s:1:"1";}}i:4;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:14:",,,description";s:5:"label";s:11:"Description";}s:1:"B";a:3:{s:4:"type";s:8:"textarea";s:4:"size";s:4:"5,50";s:4:"name";s:11:"description";}}i:5;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Private";}s:1:"B";a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:6:"access";s:4:"size";s:14:"private,public";}}i:6;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:18:",,,cat_data[color]";s:5:"label";s:5:"Color";}s:1:"B";a:2:{s:4:"type";s:11:"colorpicker";s:4:"name";s:11:"data[color]";}}i:7;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:13:",,,data[icon]";s:5:"label";s:4:"Icon";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:4:{s:4:"type";s:6:"select";s:4:"name";s:10:"data[icon]";s:4:"size";s:4:"None";s:8:"onchange";s:73:"document.getElementById(\'icon_url\').src = \'$cont[base_url]\' + this.value;";}i:2;a:3:{s:4:"type";s:5:"image";s:4:"name";s:8:"icon_url";s:4:"span";s:9:",leftPad5";}}}i:8;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:11:"Application";}s:1:"B";a:4:{s:4:"type";s:10:"select-app";s:4:"name";s:7:"appname";s:8:"readonly";s:1:"1";s:4:"size";s:16:"All applications";}}i:9;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:8:",,,owner";s:5:"label";s:14:"Category owner";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:4:"name";s:5:"owner";s:4:"help";s:51:"Limit global category to members of a certain group";s:6:"needed";s:1:"1";}}i:10;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Modified";}s:1:"B";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:8:"last_mod";s:8:"readonly";s:1:"1";}}i:11;a:2:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:12:"button[save]";s:7:"onclick";s:40:"return check_owner(form::name(\'owner\'));";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:5:"Apply";s:4:"name";s:13:"button[apply]";s:7:"onclick";s:40:"return check_owner(form::name(\'owner\'));";}}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:10:"buttononly";s:4:"name";s:14:"button[cancel]";s:5:"label";s:6:"Cancel";s:7:"onclick";s:15:"window.close();";}i:2;a:6:{s:4:"type";s:10:"buttononly";s:5:"label";s:6:"Delete";s:5:"align";s:5:"right";s:4:"name";s:14:"button[delete]";s:4:"help";s:20:"Delete this category";s:7:"onclick";s:157:"set_style_by_class(\'tr\',\'confirmSubs\',\'visibility\',\'$cont[children]\'?\'visible\':\'collapse\'); set_style_by_class(\'fieldset\',\'confirmDelete\',\'display\',\'block\');";}}}}s:4:"rows";i:11;s:4:"cols";i:2;}i:1;a:2:{s:4:"type";s:8:"template";s:4:"name";s:23:"admin.categories.delete";}}','size' => '','style' => '','modified' => '1308076611',);
|
||||
$templ_data[] = array('name' => 'admin.categories.edit','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:2:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:12:{i:0;a:14:{s:2:"c2";s:2:"th";s:2:"c3";s:3:"row";s:2:"c4";s:7:"row,top";s:2:"c7";s:3:"row";s:2:"c6";s:3:"row";s:2:"h2";s:2:"25";s:2:"h1";s:6:",!@msg";s:2:"c9";s:3:"row";s:2:"c8";s:3:"row";s:3:"c10";s:3:"row";s:3:"h10";s:11:",!@last_mod";s:2:"h8";s:15:",@appname=phpgw";s:2:"h5";s:12:",@no_private";s:2:"c5";s:3:"nmr";}i:1;a:2:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:5:"align";s:6:"center";s:4:"name";s:3:"msg";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:9:",,,parent";s:5:"label";s:15:"Parent category";}s:1:"B";a:3:{s:4:"type";s:10:"select-cat";s:4:"size";s:25:"None,,,$cont[appname],,-1";s:4:"name";s:6:"parent";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,name";s:5:"label";s:4:"Name";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"50,150";s:4:"name";s:4:"name";s:6:"needed";s:1:"1";}}i:4;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:14:",,,description";s:5:"label";s:11:"Description";}s:1:"B";a:3:{s:4:"type";s:8:"textarea";s:4:"size";s:4:"5,50";s:4:"name";s:11:"description";}}i:5;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Private";}s:1:"B";a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:6:"access";s:4:"size";s:14:"private,public";}}i:6;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:18:",,,cat_data[color]";s:5:"label";s:5:"Color";}s:1:"B";a:2:{s:4:"type";s:11:"colorpicker";s:4:"name";s:11:"data[color]";}}i:7;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:13:",,,data[icon]";s:5:"label";s:4:"Icon";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:4:{s:4:"type";s:6:"select";s:4:"name";s:10:"data[icon]";s:4:"size";s:4:"None";s:8:"onchange";s:73:"document.getElementById(\'icon_url\').src = \'$cont[base_url]\' + this.value;";}i:2;a:3:{s:4:"type";s:5:"image";s:4:"name";s:8:"icon_url";s:4:"span";s:9:",leftPad5";}}}i:8;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:11:"Application";}s:1:"B";a:4:{s:4:"type";s:10:"select-app";s:4:"name";s:7:"appname";s:8:"readonly";s:1:"1";s:4:"size";s:16:"All applications";}}i:9;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:8:",,,owner";s:5:"label";s:14:"Category owner";}s:1:"B";a:5:{s:4:"type";s:6:"select";s:4:"name";s:5:"owner";s:4:"help";s:51:"Limit global category to members of a certain group";s:6:"needed";s:1:"1";s:4:"size";s:1:"3";}}i:10;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Modified";}s:1:"B";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:8:"last_mod";s:8:"readonly";s:1:"1";}}i:11;a:2:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:12:"button[save]";s:7:"onclick";s:40:"return check_owner(form::name(\'owner\'));";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:5:"Apply";s:4:"name";s:13:"button[apply]";s:7:"onclick";s:40:"return check_owner(form::name(\'owner\'));";}}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:10:"buttononly";s:4:"name";s:14:"button[cancel]";s:5:"label";s:6:"Cancel";s:7:"onclick";s:15:"window.close();";}i:2;a:6:{s:4:"type";s:10:"buttononly";s:5:"label";s:6:"Delete";s:5:"align";s:5:"right";s:4:"name";s:14:"button[delete]";s:4:"help";s:20:"Delete this category";s:7:"onclick";s:157:"set_style_by_class(\'tr\',\'confirmSubs\',\'visibility\',\'$cont[children]\'?\'visible\':\'collapse\'); set_style_by_class(\'fieldset\',\'confirmDelete\',\'display\',\'block\');";}}}}s:4:"rows";i:11;s:4:"cols";i:2;}i:1;a:2:{s:4:"type";s:8:"template";s:4:"name";s:23:"admin.categories.delete";}}','size' => '','style' => '','modified' => '1308076611',);
|
||||
|
||||
$templ_data[] = array('name' => 'admin.categories.index','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:2:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:1:{s:2:"h1";s:6:",!@msg";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"name";s:3:"msg";s:5:"align";s:6:"center";s:4:"span";s:13:"all,redItalic";}}i:2;a:1:{s:1:"A";a:3:{s:4:"type";s:9:"nextmatch";s:4:"size";s:4:"rows";s:4:"name";s:2:"nm";}}i:3;a:1:{s:1:"A";a:4:{s:4:"type";s:10:"buttononly";s:5:"label";s:3:"Add";s:4:"name";s:3:"add";s:7:"onclick";s:187:"window.open(egw::link(\'/index.php\',\'menuaction=$cont[add_link]&cat_id=&appname=$cont[nm][appname]\'),\'_blank\',\'dependent=yes,width=600,height=380,scrollbars=yes,status=yes\'); return false;";}}}s:4:"rows";i:3;s:4:"cols";i:1;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}i:1;a:6:{s:5:"class";s:19:"action_popup prompt";s:4:"name";s:12:"delete_popup";s:4:"type";s:3:"box";s:4:"size";s:1:"1";i:1;a:6:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:5:"label";s:5:"label";s:6:"Delete";s:4:"span";s:13:",promptheader";}i:2;a:3:{s:4:"name";s:13:"delete_prompt";s:4:"type";s:5:"label";s:5:"label";s:24:"Delete selected entries?";}i:3;a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:4:{s:5:"label";s:12:"Yes - Delete";s:7:"onclick";s:36:"nm_submit_popup(this); return false;";s:4:"name";s:6:"delete";s:4:"type";s:6:"button";}i:2;a:4:{s:5:"label";s:34:"Yes - Delete including sub-entries";s:7:"onclick";s:71:"nm_popup_action.id = \'delete_sub\'; nm_submit_popup(this); return false;";s:4:"name";s:10:"delete_sub";s:4:"type";s:6:"button";}i:3;a:3:{s:5:"label";s:11:"No - Cancel";s:7:"onclick";s:35:"nm_hide_popup(this,\'delete_popup\');";s:4:"type";s:10:"buttononly";}}s:4:"span";s:7:",prompt";}s:4:"span";s:13:",action_popup";}}','size' => '100%','style' => '.level0 { font-weight: bold; }
|
||||
$templ_data[] = array('name' => 'admin.categories.index','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:3:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:1:{s:2:"h1";s:6:",!@msg";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"name";s:3:"msg";s:5:"align";s:6:"center";s:4:"span";s:13:"all,redItalic";}}i:2;a:1:{s:1:"A";a:3:{s:4:"type";s:9:"nextmatch";s:4:"size";s:4:"rows";s:4:"name";s:2:"nm";}}i:3;a:1:{s:1:"A";a:4:{s:4:"type";s:10:"buttononly";s:5:"label";s:3:"Add";s:4:"name";s:3:"add";s:7:"onclick";s:187:"window.open(egw::link(\'/index.php\',\'menuaction=$cont[add_link]&cat_id=&appname=$cont[nm][appname]\'),\'_blank\',\'dependent=yes,width=600,height=380,scrollbars=yes,status=yes\'); return false;";}}}s:4:"rows";i:3;s:4:"cols";i:1;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}i:1;a:6:{s:5:"class";s:19:"action_popup prompt";s:4:"name";s:12:"delete_popup";s:4:"type";s:3:"box";s:4:"size";s:1:"1";i:1;a:6:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:5:"label";s:5:"label";s:6:"Delete";s:4:"span";s:13:",promptheader";}i:2;a:3:{s:4:"name";s:13:"delete_prompt";s:4:"type";s:5:"label";s:5:"label";s:24:"Delete selected entries?";}i:3;a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:4:{s:5:"label";s:12:"Yes - Delete";s:7:"onclick";s:36:"nm_submit_popup(this); return false;";s:4:"name";s:6:"delete";s:4:"type";s:6:"button";}i:2;a:4:{s:5:"label";s:34:"Yes - Delete including sub-entries";s:7:"onclick";s:71:"nm_popup_action.id = \'delete_sub\'; nm_submit_popup(this); return false;";s:4:"name";s:10:"delete_sub";s:4:"type";s:6:"button";}i:3;a:3:{s:5:"label";s:11:"No - Cancel";s:7:"onclick";s:35:"nm_hide_popup(this,\'delete_popup\');";s:4:"type";s:10:"buttononly";}}s:4:"span";s:7:",prompt";}s:4:"span";s:13:",action_popup";}i:2;a:6:{s:5:"class";s:19:"action_popup prompt";s:4:"name";s:11:"owner_popup";s:4:"type";s:3:"box";s:4:"size";s:1:"1";i:1;a:6:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"4";i:1;a:3:{s:4:"type";s:5:"label";s:5:"label";s:12:"Change owner";s:4:"span";s:13:",promptheader";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:12:"Select owner";}i:3;a:5:{s:4:"type";s:6:"select";s:4:"name";s:5:"owner";s:4:"span";s:21:",action_popup-content";s:7:"no_lang";s:1:"1";s:4:"size";s:1:"4";}i:4;a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";i:1;a:4:{s:5:"label";s:3:"Add";s:7:"onclick";s:36:"nm_submit_popup(this); return false;";s:4:"name";s:17:"owner_action[add]";s:4:"type";s:6:"button";}i:2;a:4:{s:5:"label";s:6:"Delete";s:7:"onclick";s:36:"nm_submit_popup(this); return false;";s:4:"name";s:20:"owner_action[delete]";s:4:"type";s:6:"button";}i:3;a:4:{s:5:"label";s:2:"OK";s:7:"onclick";s:36:"nm_submit_popup(this); return false;";s:4:"type";s:6:"button";s:8:"disabled";s:1:"1";}i:4;a:3:{s:5:"label";s:6:"Cancel";s:7:"onclick";s:34:"nm_hide_popup(this,\'owner_popup\');";s:4:"type";s:10:"buttononly";}}}s:4:"span";s:20:",action_popup prompt";}}','size' => '100%','style' => '.level0 { font-weight: bold; }
|
||||
|
||||
.action_popup {
|
||||
position: fixed;
|
||||
@ -69,7 +69,7 @@ $templ_data[] = array('name' => 'admin.categories.index','template' => '','lang'
|
||||
width: 100%
|
||||
}','modified' => '1308602792',);
|
||||
|
||||
$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:13:"$row_cont[id]";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:3:{s:4:"type";s:16:"nextmatch-header";s:4:"name";s:3:"app";s:5:"label";s:11:"Application";}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:174:"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.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:174:"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.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',);
|
||||
|
||||
|
@ -99,7 +99,7 @@
|
||||
</menulist>
|
||||
</row>
|
||||
<row class="row">
|
||||
<description value="Limit to members of" options=",,,owner"/>
|
||||
<description value="Category owner" options=",,,owner"/>
|
||||
<listbox statustext="Limit global category to members of a certain group" id="owner" needed="1" rows="3"/>
|
||||
</row>
|
||||
<row class="row" disabled="!@last_mod">
|
||||
|
@ -18,7 +18,7 @@
|
||||
<row class="th">
|
||||
<nextmatch-sortheader label="Name" id="name"/>
|
||||
<nextmatch-sortheader label="Description" id="description"/>
|
||||
<nextmatch-filterheader label="Application" id="app"/>
|
||||
<nextmatch-filterheader label="Application" id="app" options=","/>
|
||||
<nextmatch-accountfilter label="Category owner" id="owner" options="all,both"/>
|
||||
<nextmatch-header align="center" label="Icon" id="icon"/>
|
||||
<nextmatch-header label="Color" id="color"/>
|
||||
@ -26,7 +26,7 @@
|
||||
<nextmatch-header align="center" label="Children" id="subs"/>
|
||||
<nextmatch-header label="Actions" id="legacy_actions"/>
|
||||
</row>
|
||||
<row class="$row_cont[id]">
|
||||
<row class="$row_cont[id] $row_cont[class]">
|
||||
<hbox options="0,0">
|
||||
<html id="${row}[level_spacer]"/>
|
||||
<description id="${row}[name]" class="$row_cont[class]"/>
|
||||
@ -79,6 +79,19 @@
|
||||
</hbox>
|
||||
</vbox>
|
||||
</box>
|
||||
<box class="action_popup prompt" id="owner_popup">
|
||||
<vbox>
|
||||
<description value="Change owner" class="promptheader"/>
|
||||
<description value="Select owner"/>
|
||||
<listbox id="owner" no_lang="1" rows="4" class="action_popup-content"/>
|
||||
<hbox>
|
||||
<button label="Add" id="owner_action[add]" onclick="nm_submit_popup(this); return false;"/>
|
||||
<button label="Delete" id="owner_action[delete]" onclick="nm_submit_popup(this); return false;"/>
|
||||
<button disabled="true" label="OK" onclick="nm_submit_popup(this); return false;"/>
|
||||
<buttononly label="Cancel" onclick="nm_hide_popup(this,'owner_popup');"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</box>
|
||||
<styles>
|
||||
.level0 { font-weight: bold; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user