From 343deeab7c9fde6995c628f6967b9d54fca73018 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 20 Jun 2012 17:34:03 +0000 Subject: [PATCH] Add 'All users' option to allowed users in definition list popup --- importexport/inc/class.importexport_definitions_ui.inc.php | 4 ++-- importexport/setup/etemplates.inc.php | 4 ++-- importexport/templates/default/definition_index.xet | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/importexport/inc/class.importexport_definitions_ui.inc.php b/importexport/inc/class.importexport_definitions_ui.inc.php index 25231fd088..2237f4646a 100644 --- a/importexport/inc/class.importexport_definitions_ui.inc.php +++ b/importexport/inc/class.importexport_definitions_ui.inc.php @@ -127,9 +127,9 @@ class importexport_definitions_ui // Action has an additional parameter if(in_array($content['nm']['action'], array('owner', 'allowed'))) { - if($content['nm']['action'] == 'allowed' && $content['allowed_private']) + if($content['nm']['action'] == 'allowed') { - $content['allowed'] = null; + $content['allowed'] = $content['allowed_private'] ? null : ($content['all_users'] ? 'all' : implode(',',$content['allowed'])); } if(is_array($content[$content['nm']['action']])) { diff --git a/importexport/setup/etemplates.inc.php b/importexport/setup/etemplates.inc.php index 3a8731b1ba..720f9948f2 100644 --- a/importexport/setup/etemplates.inc.php +++ b/importexport/setup/etemplates.inc.php @@ -2,7 +2,7 @@ /** * EGroupware - eTemplates for Application importexport * http://www.egroupware.org - * generated by soetemplate::dump4setup() 2012-06-05 15:48 + * generated by soetemplate::dump4setup() 2012-06-20 11:32 * * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @package importexport @@ -14,7 +14,7 @@ $templ_version=1; $templ_data[] = array('name' => 'importexport.config','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:2:{s:2:"c2";s:4:",top";s:2:"c3";s:4:",top";}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:45:"Users allowed to create their own definitions";}s:1:"B";a:2:{s:4:"type";s:8:"checkbox";s:4:"name";s:24:"users_create_definitions";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:44:"Users allowed to share their own definitions";}s:1:"B";a:3:{s:4:"type";s:14:"select-account";s:4:"size";s:6:"5,both";s:4:"name";s:16:"share_definition";}}i:3;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:34:"Extra charsets for import / export";}s:1:"B";a:3:{s:4:"type";s:6:"select";s:4:"size";s:1:"5";s:4:"name";s:15:"import_charsets";}}i:4;a:2:{s:1:"A";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";s:4:"span";s:3:"all";i:1;a:4:{s:4:"type";s:6:"button";s:4:"span";s:3:"all";s:5:"label";s:4:"Save";s:4:"name";s:4:"save";}i:2;a:4:{s:4:"type";s:6:"button";s:4:"span";s:3:"all";s:5:"label";s:6:"Cancel";s:4:"name";s:6:"cancel";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:4;s:4:"cols";i:2;}}','size' => '','style' => '','modified' => '1298390222',); -$templ_data[] = array('name' => 'importexport.definition_index','template' => '','lang' => '','group' => '0','version' => '1.9.002','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:2:{s:2:"h1";s:6:",!@msg";s:2:"h3";s:27:",!@nm[selectcols]=/actions/";}i:1;a:1:{s:1:"A";a:5:{s:4:"span";s:11:"all,message";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";s:4:"type";s:5:"label";s:5:"align";s:6:"center";}}i:2;a:1:{s:1:"A";a:6:{s:4:"type";s:9:"nextmatch";s:4:"data";a:3:{i:0;a:2:{s:2:"c1";s:2:"th";s:2:"c2";s:7:"row,top";}i:1;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:4:"Type";s:4:"span";s:11:",lr_padding";}s:1:"B";a:3:{s:4:"type";s:5:"label";s:5:"label";s:4:"Name";s:4:"span";s:11:",lr_padding";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:5:"label";s:11:"Application";s:4:"span";s:11:",lr_padding";}s:1:"D";a:4:{s:5:"align";s:6:"center";s:4:"type";s:5:"label";s:5:"label";s:13:"Allowed users";s:4:"span";s:11:",lr_padding";}s:1:"E";a:5:{s:5:"label";s:3:"Add";s:5:"align";s:6:"center";s:4:"type";s:6:"button";s:4:"span";s:11:",lr_padding";s:7:"onclick";s:226:"window.open(egw::link(\'/index.php\',\'menuaction=importexport.importexport_definitions_ui.wizard\'),\'\',\'dependent=yes,width=500,height=500,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false; return false;";}s:1:"F";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:6:{s:5:"label";s:6:"Delete";s:4:"name";s:15:"delete_selected";s:4:"type";s:6:"button";s:4:"help";s:31:"delete ALL selected definitions";s:4:"size";s:6:"delete";s:7:"onclick";s:65:"return confirm(\'Do you really want to DELETE this definitions?\');";}i:2;a:5:{s:5:"label";s:6:"Export";s:4:"name";s:15:"export_selected";s:4:"type";s:6:"button";s:4:"help";s:31:"export ALL selected definitions";s:4:"size";s:10:"fileexport";}}}i:2;a:6:{s:1:"A";a:5:{s:7:"no_lang";s:1:"1";s:4:"type";s:5:"image";s:4:"span";s:18:",lr_padding button";s:4:"name";s:12:"${row}[type]";s:7:"onclick";s:222:"window.open(egw::link(\'/index.php\',\'menuaction=${row_cont[menuaction]}&appname=${row_cont[application]}&definition=${row_cont[name]}\'),\'_blank\',\'dependent=yes,width=850,height=440,scrollbars=yes,status=yes\'); return false;";}s:1:"B";a:5:{s:7:"no_lang";s:1:"1";s:4:"name";s:12:"${row}[name]";s:4:"type";s:5:"label";s:4:"span";s:11:",lr_padding";s:4:"size";s:1:",";}s:1:"C";a:4:{s:7:"no_lang";s:1:"1";s:4:"name";s:19:"${row}[application]";s:4:"type";s:5:"label";s:4:"span";s:11:",lr_padding";}s:1:"D";a:6:{s:7:"no_lang";s:1:"1";s:4:"type";s:14:"select-account";s:4:"span";s:11:",lr_padding";s:8:"readonly";s:1:"1";s:4:"name";s:21:"${row}[allowed_users]";s:4:"size";s:6:"5,both";}s:1:"E";a:5:{s:5:"align";s:6:"center";s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:5:"label";s:4:"Edit";s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:7:"onclick";s:263:"window.open(egw::link(\'/index.php\',\'menuaction=importexport.importexport_definitions_ui.edit&definition=$row_cont[name]\'),\'\',\'dependent=yes,width=500,height=500,location=no,menubar=no,toolbar=no,scrollbars=yes,resizable=1,status=yes\'); return false; return false;";}i:2;a:6:{s:5:"label";s:6:"Delete";s:7:"onclick";s:41:"return confirm(\'Delete this definition\');";s:4:"name";s:32:"delete[$row_cont[definition_id]]";s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:4:"help";s:21:"Delete this eTemplate";}}s:1:"F";a:4:{s:5:"align";s:6:"center";s:4:"name";s:34:"selected[$row_cont[definition_id]]";s:4:"type";s:8:"checkbox";s:4:"help";s:34:"select this eTemplate to delete it";}}}s:4:"cols";i:6;s:4:"rows";i:2;s:4:"name";s:2:"nm";s:4:"size";s:33:"importexport.definition_index.row";}}i:3;a:1:{s:1:"A";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";s:5:"align";s:5:"right";i:1;a:5:{s:4:"type";s:10:"buttononly";s:4:"name";s:14:"legacy_actions";s:4:"help";s:13:"Select action";s:5:"label";s:13:"Select action";s:7:"onclick";s:198:"if (!egw_globalObjectManager.getObjectById(\'importexport.definition_index.row\').executeActionImplementation(this, \'popup\')) alert(egw::lang(\'You need to select some entries first!\')); return false;;";}i:2;a:8:{s:4:"type";s:6:"button";s:4:"size";s:9:"arrow_ltr";s:5:"label";s:9:"Check all";s:4:"name";s:9:"check_all";s:4:"help";s:9:"Check all";s:7:"onclick";s:109:"egw_globalObjectManager.getObjectById(\'importexport.definition_index.row\').toggleAllSelected(); return false;";s:6:"needed";s:1:"1";s:4:"span";s:14:",checkAllArrow";}}}i:4;a:1:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;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:4:{s:4:"type";s:14:"select-account";s:4:"name";s:5:"owner";s:4:"size";s:13:"None,accounts";s:4:"span";s:21:",action_popup-content";}i:4;a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:3:{s:5:"label";s:4:"Save";s:7:"onclick";s:36:"nm_submit_popup(this); return false;";s:4:"type";s:6:"button";}i:2;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";}i:2;a:6:{s:5:"class";s:19:"action_popup prompt";s:4:"name";s:13:"allowed_popup";s:4:"type";s:3:"box";s:4:"size";s:1:"1";i:1;a:7:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"5";i:1;a:3:{s:4:"type";s:5:"label";s:5:"label";s:20:"Change allowed users";s:4:"span";s:13:",promptheader";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Select groups";}i:3;a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:15:"allowed_private";s:5:"label";s:10:"%s Just me";}i:4;a:4:{s:4:"type";s:14:"select-account";s:4:"name";s:7:"allowed";s:4:"size";s:8:"5,groups";s:4:"span";s:21:",action_popup-content";}i:5;a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:3:{s:5:"label";s:4:"Save";s:7:"onclick";s:36:"nm_submit_popup(this); return false;";s:4:"type";s:6:"button";}i:2;a:3:{s:5:"label";s:6:"Cancel";s:7:"onclick";s:36:"nm_hide_popup(this,\'allowed_popup\');";s:4:"type";s:10:"buttononly";}}}s:4:"span";s:20:",action_popup prompt";}}}}s:4:"cols";i:1;s:4:"rows";i:4;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '.redItalic { color:red; font-style:italic;} td.lr_padding { padding-left: 5px; padding-right: 5px; } +$templ_data[] = array('name' => 'importexport.definition_index','template' => '','lang' => '','group' => '0','version' => '1.9.002','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:2:{s:2:"h1";s:6:",!@msg";s:2:"h3";s:27:",!@nm[selectcols]=/actions/";}i:1;a:1:{s:1:"A";a:5:{s:4:"span";s:11:"all,message";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";s:4:"type";s:5:"label";s:5:"align";s:6:"center";}}i:2;a:1:{s:1:"A";a:6:{s:4:"type";s:9:"nextmatch";s:4:"data";a:3:{i:0;a:2:{s:2:"c1";s:2:"th";s:2:"c2";s:7:"row,top";}i:1;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:4:"Type";s:4:"span";s:11:",lr_padding";}s:1:"B";a:3:{s:4:"type";s:5:"label";s:5:"label";s:4:"Name";s:4:"span";s:11:",lr_padding";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:5:"label";s:11:"Application";s:4:"span";s:11:",lr_padding";}s:1:"D";a:4:{s:5:"align";s:6:"center";s:4:"type";s:5:"label";s:5:"label";s:13:"Allowed users";s:4:"span";s:11:",lr_padding";}s:1:"E";a:5:{s:5:"label";s:3:"Add";s:5:"align";s:6:"center";s:4:"type";s:6:"button";s:4:"span";s:11:",lr_padding";s:7:"onclick";s:226:"window.open(egw::link(\'/index.php\',\'menuaction=importexport.importexport_definitions_ui.wizard\'),\'\',\'dependent=yes,width=500,height=500,location=no,menubar=no,toolbar=no,scrollbars=yes,status=yes\'); return false; return false;";}s:1:"F";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:6:{s:5:"label";s:6:"Delete";s:4:"name";s:15:"delete_selected";s:4:"type";s:6:"button";s:4:"help";s:31:"delete ALL selected definitions";s:4:"size";s:6:"delete";s:7:"onclick";s:65:"return confirm(\'Do you really want to DELETE this definitions?\');";}i:2;a:5:{s:5:"label";s:6:"Export";s:4:"name";s:15:"export_selected";s:4:"type";s:6:"button";s:4:"help";s:31:"export ALL selected definitions";s:4:"size";s:10:"fileexport";}}}i:2;a:6:{s:1:"A";a:5:{s:7:"no_lang";s:1:"1";s:4:"type";s:5:"image";s:4:"span";s:18:",lr_padding button";s:4:"name";s:12:"${row}[type]";s:7:"onclick";s:222:"window.open(egw::link(\'/index.php\',\'menuaction=${row_cont[menuaction]}&appname=${row_cont[application]}&definition=${row_cont[name]}\'),\'_blank\',\'dependent=yes,width=850,height=440,scrollbars=yes,status=yes\'); return false;";}s:1:"B";a:5:{s:7:"no_lang";s:1:"1";s:4:"name";s:12:"${row}[name]";s:4:"type";s:5:"label";s:4:"span";s:11:",lr_padding";s:4:"size";s:1:",";}s:1:"C";a:4:{s:7:"no_lang";s:1:"1";s:4:"name";s:19:"${row}[application]";s:4:"type";s:5:"label";s:4:"span";s:11:",lr_padding";}s:1:"D";a:6:{s:7:"no_lang";s:1:"1";s:4:"type";s:14:"select-account";s:4:"span";s:11:",lr_padding";s:8:"readonly";s:1:"1";s:4:"name";s:21:"${row}[allowed_users]";s:4:"size";s:6:"5,both";}s:1:"E";a:5:{s:5:"align";s:6:"center";s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:5:"label";s:4:"Edit";s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:7:"onclick";s:263:"window.open(egw::link(\'/index.php\',\'menuaction=importexport.importexport_definitions_ui.edit&definition=$row_cont[name]\'),\'\',\'dependent=yes,width=500,height=500,location=no,menubar=no,toolbar=no,scrollbars=yes,resizable=1,status=yes\'); return false; return false;";}i:2;a:6:{s:5:"label";s:6:"Delete";s:7:"onclick";s:41:"return confirm(\'Delete this definition\');";s:4:"name";s:32:"delete[$row_cont[definition_id]]";s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:4:"help";s:21:"Delete this eTemplate";}}s:1:"F";a:4:{s:5:"align";s:6:"center";s:4:"name";s:34:"selected[$row_cont[definition_id]]";s:4:"type";s:8:"checkbox";s:4:"help";s:34:"select this eTemplate to delete it";}}}s:4:"cols";i:6;s:4:"rows";i:2;s:4:"name";s:2:"nm";s:4:"size";s:33:"importexport.definition_index.row";}}i:3;a:1:{s:1:"A";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";s:5:"align";s:5:"right";i:1;a:5:{s:4:"type";s:10:"buttononly";s:4:"name";s:14:"legacy_actions";s:4:"help";s:13:"Select action";s:5:"label";s:13:"Select action";s:7:"onclick";s:198:"if (!egw_globalObjectManager.getObjectById(\'importexport.definition_index.row\').executeActionImplementation(this, \'popup\')) alert(egw::lang(\'You need to select some entries first!\')); return false;;";}i:2;a:8:{s:4:"type";s:6:"button";s:4:"size";s:9:"arrow_ltr";s:5:"label";s:9:"Check all";s:4:"name";s:9:"check_all";s:4:"help";s:9:"Check all";s:7:"onclick";s:109:"egw_globalObjectManager.getObjectById(\'importexport.definition_index.row\').toggleAllSelected(); return false;";s:6:"needed";s:1:"1";s:4:"span";s:14:",checkAllArrow";}}}i:4;a:1:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;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:4:{s:4:"type";s:14:"select-account";s:4:"name";s:5:"owner";s:4:"size";s:13:"None,accounts";s:4:"span";s:21:",action_popup-content";}i:4;a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:3:{s:5:"label";s:4:"Save";s:7:"onclick";s:36:"nm_submit_popup(this); return false;";s:4:"type";s:6:"button";}i:2;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";}i:2;a:6:{s:5:"class";s:19:"action_popup prompt";s:4:"name";s:13:"allowed_popup";s:4:"type";s:3:"box";s:4:"size";s:1:"1";i:1;a:8:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"6";i:1;a:3:{s:4:"type";s:5:"label";s:5:"label";s:20:"Change allowed users";s:4:"span";s:13:",promptheader";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Select groups";}i:3;a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:15:"allowed_private";s:5:"label";s:10:"%s Just me";}i:4;a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:9:"all_users";s:5:"label";s:12:"%s All users";}i:5;a:4:{s:4:"type";s:14:"select-account";s:4:"name";s:7:"allowed";s:4:"size";s:8:"5,groups";s:4:"span";s:21:",action_popup-content";}i:6;a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:3:{s:5:"label";s:4:"Save";s:7:"onclick";s:36:"nm_submit_popup(this); return false;";s:4:"type";s:6:"button";}i:2;a:3:{s:5:"label";s:6:"Cancel";s:7:"onclick";s:36:"nm_hide_popup(this,\'allowed_popup\');";s:4:"type";s:10:"buttononly";}}}s:4:"span";s:20:",action_popup prompt";}}}}s:4:"cols";i:1;s:4:"rows";i:4;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '.redItalic { color:red; font-style:italic;} td.lr_padding { padding-left: 5px; padding-right: 5px; } .button { cursor: pointer; diff --git a/importexport/templates/default/definition_index.xet b/importexport/templates/default/definition_index.xet index 8214b1b9c3..4395798cad 100644 --- a/importexport/templates/default/definition_index.xet +++ b/importexport/templates/default/definition_index.xet @@ -87,6 +87,7 @@ +