diff --git a/workflow/engine/methods/setup/pluginsMain.php b/workflow/engine/methods/setup/pluginsMain.php index cfc084570..dc2d148ec 100644 --- a/workflow/engine/methods/setup/pluginsMain.php +++ b/workflow/engine/methods/setup/pluginsMain.php @@ -29,6 +29,11 @@ $headPublisher->addExtJsScript( 'setup/pluginsMain', false ); $headPublisher->assign( "PROCESSMAKER_URL", "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN ); $headPublisher->assign( "SYS_SKIN", SYS_SKIN ); +$oPluginRegistry = &PMPluginRegistry::getSingleton(); +if ($oPluginRegistry->getStatusPlugin('pmWorkspaceManagement') == "enabled") { + $headPublisher = $oPluginRegistry->executeMethod('pmWorkspaceManagement', 'disableButtonsPluginMain', $headPublisher); +} + if (isset( $_SESSION['__PLUGIN_ERROR__'] )) { $headPublisher->assign( '__PLUGIN_ERROR__', $_SESSION['__PLUGIN_ERROR__'] ); unset( $_SESSION['__PLUGIN_ERROR__'] ); diff --git a/workflow/engine/templates/setup/pluginsMain.js b/workflow/engine/templates/setup/pluginsMain.js index 230343eaa..5ed5d9cce 100644 --- a/workflow/engine/templates/setup/pluginsMain.js +++ b/workflow/engine/templates/setup/pluginsMain.js @@ -109,35 +109,40 @@ Ext.onReady(function(){ selModel:selModel, store: store, - tbar:[{ - text : _('ID_IMPORT'), - iconCls: 'silk-add', - icon : '/images/import.gif', - handler: importProcess - },{ - xtype: 'tbseparator' - }, - { - id : 'setup', - text : _('ID_CONFIGURE'), - iconCls: 'silk-add', - icon : '/images/options.png', - handler: configure - }, - { - text : _('ID_STATUS'), - id : 'activator', - icon : '', - iconCls : 'silk-add', - handler : activeDeactive, - disabled: true - },{ - text : _('ID_DELETE'), - iconCls: 'silk-add', - icon : '/images/delete-16x16.gif', - handler: deletePlugin - } - ], + tbar: [ + { + text: _('ID_IMPORT'), + iconCls: 'silk-add', + icon: '/images/import.gif', + handler: importProcess, + disabled: typeof ID_IMPORT_DISABLED === 'undefined' ? false : ID_IMPORT_DISABLED + }, + { + xtype: 'tbseparator' + }, + { + id: 'setup', + text: _('ID_CONFIGURE'), + iconCls: 'silk-add', + icon: '/images/options.png', + handler: configure + }, + { + text: _('ID_STATUS'), + id: 'activator', + icon: '', + iconCls: 'silk-add', + handler: activeDeactive, + disabled: true + }, + { + text: _('ID_DELETE'), + iconCls: 'silk-add', + icon: '/images/delete-16x16.gif', + handler: deletePlugin, + disabled: typeof ID_DELETE_DISABLED === 'undefined' ? false : ID_DELETE_DISABLED + } + ], listeners: { render: function(){ this.loadMask = new Ext.LoadMask(this.body, {msg: _('ID_LOADING_GRID')});