public function getPluginBEToolbar( $function, $user, $plugin ) { if ( strstr( $function, 'auto' ) ) { switch ( $function ) { case 'auto_new': case 'auto_edit': case 'auto_save': CBtoolmenuBar::startTable(); CBtoolmenuBar::save( 'savePlugin', CBTxt::T( 'Save' ) ); CBtoolmenuBar::apply( 'applyPlugin', CBTxt::T( 'Apply' ) ); CBtoolmenuBar::linkAction( 'cancel', cbgjClass::getPluginURL( array( 'plugin', 'auto' ) ), CBTxt::T( 'Cancel' ) ); CBtoolmenuBar::endTable(); break; case 'auto_show': case 'auto': default: CBtoolmenuBar::startTable(); cbgjMenu::getDefaults( 'plugin', $function, $user, $plugin ); CBtoolmenuBar::spacer( '50px' ); CBtoolmenuBar::linkAction( 'publish', "javascript:cbDoListTask( this, 'editPlugin', 'action', 'plugin.auto_publish', 'id' )", CBTxt::T( 'Publish' ) ); CBtoolmenuBar::linkAction( 'unpublish', "javascript:cbDoListTask( this, 'editPlugin', 'action', 'plugin.auto_unpublish', 'id' )", CBTxt::T( 'Unpublish' ) ); CBtoolmenuBar::linkAction( 'copy', "javascript:cbDoListTask( this, 'editPlugin', 'action', 'plugin.auto_copy', 'id' )", CBTxt::T( 'Copy' ) ); CBtoolmenuBar::linkAction( 'delete', "javascript:cbDoListTask( this, 'editPlugin', 'action', 'plugin.auto_delete', 'id' )", CBTxt::T( 'Delete' ) ); CBtoolmenuBar::linkAction( 'edit', "javascript:cbDoListTask( this, 'editPlugin', 'action', 'plugin.auto_edit', 'id' )", CBTxt::T( 'Edit' ) ); CBtoolmenuBar::linkAction( 'new', cbgjClass::getPluginURL( array( 'plugin', 'auto_new' ) ), CBTxt::T( 'New' ) ); CBtoolmenuBar::back( CBTxt::T( 'Back' ), cbgjClass::getPluginURL() ); CBtoolmenuBar::endTable(); break; } } }
/** * render backend integrations menu */ static public function showIntegrations( $function, $user, $plugin ) { CBtoolmenuBar::startTable(); cbgjMenu::getDefaults( 'integrations', $function, $user, $plugin ); CBtoolmenuBar::spacer( '50px' ); CBtoolmenuBar::back( CBTxt::T( 'Back' ), cbgjClass::getPluginURL() ); CBtoolmenuBar::endTable(); }