/** * render backend menus menu */ static public function showMenus( $function, $user, $plugin ) { CBtoolmenuBar::startTable(); cbgjMenu::getDefaults( 'menus', $function, $user, $plugin ); CBtoolmenuBar::spacer( '50px' ); CBtoolmenuBar::save( 'savePlugin', CBTxt::T( 'Save' ) ); CBtoolmenuBar::linkAction( 'cancel', cbgjClass::getPluginURL(), CBTxt::T( 'Cancel' ) ); CBtoolmenuBar::endTable(); }
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; } } }
cbgjMenu::showUserEdit(); break; case 'show': default: cbgjMenu::showUsers( $function, $user, $plugin ); break; } break; case 'invites': cbgjMenu::showInvites( $function, $user, $plugin ); break; case 'config': cbgjMenu::showConfig( $function, $user, $plugin ); break; case 'tools': cbgjMenu::showTools( $function, $user, $plugin ); break; case 'integrations': cbgjMenu::showIntegrations( $function, $user, $plugin ); break; case 'menus': cbgjMenu::showMenus( $function, $user, $plugin ); break; case 'plugin': $_PLUGINS->trigger( 'gj_onPluginBEToolbar', array( $function, $user, $plugin ) ); break; default: cbgjMenu::showPlugin(); break; } ?>