From: Evan Prodromou Date: Mon, 7 Mar 2011 17:36:04 +0000 (-0500) Subject: remove adminpanelnav from adminpanelaction module X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=876c7a42c835273b71a0a2a10c9e79e1660ebe47;p=quix0rs-gnu-social.git remove adminpanelnav from adminpanelaction module --- diff --git a/lib/adminpanelaction.php b/lib/adminpanelaction.php index 8dd16e9d0c..a085fcd5dc 100644 --- a/lib/adminpanelaction.php +++ b/lib/adminpanelaction.php @@ -291,129 +291,3 @@ class AdminPanelAction extends Action return $isOK; } } - -/** - * Menu for public group of actions - * - * @category Output - * @package StatusNet - * @author Evan Prodromou - * @author Sarven Capadisli - * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://status.net/ - * - * @see Widget - */ -class AdminPanelNav extends Widget -{ - var $action = null; - - /** - * Construction - * - * @param Action $action current action, used for output - */ - function __construct($action=null) - { - parent::__construct($action); - $this->action = $action; - } - - /** - * Show the menu - * - * @return void - */ - function show() - { - $action_name = $this->action->trimmed('action'); - - $this->action->elementStart('ul', array('class' => 'nav')); - - if (Event::handle('StartAdminPanelNav', array($this))) { - - if (AdminPanelAction::canAdmin('site')) { - // TRANS: Menu item title/tooltip - $menu_title = _('Basic site configuration'); - // TRANS: Menu item for site administration - $this->out->menuItem(common_local_url('siteadminpanel'), _m('MENU', 'Site'), - $menu_title, $action_name == 'siteadminpanel', 'nav_site_admin_panel'); - } - - if (AdminPanelAction::canAdmin('design')) { - // TRANS: Menu item title/tooltip - $menu_title = _('Design configuration'); - // TRANS: Menu item for site administration - $this->out->menuItem(common_local_url('designadminpanel'), _m('MENU', 'Design'), - $menu_title, $action_name == 'designadminpanel', 'nav_design_admin_panel'); - } - - if (AdminPanelAction::canAdmin('user')) { - // TRANS: Menu item title/tooltip - $menu_title = _('User configuration'); - // TRANS: Menu item for site administration - $this->out->menuItem(common_local_url('useradminpanel'), _('User'), - $menu_title, $action_name == 'useradminpanel', 'nav_user_admin_panel'); - } - - if (AdminPanelAction::canAdmin('access')) { - // TRANS: Menu item title/tooltip - $menu_title = _('Access configuration'); - // TRANS: Menu item for site administration - $this->out->menuItem(common_local_url('accessadminpanel'), _('Access'), - $menu_title, $action_name == 'accessadminpanel', 'nav_access_admin_panel'); - } - - if (AdminPanelAction::canAdmin('paths')) { - // TRANS: Menu item title/tooltip - $menu_title = _('Paths configuration'); - // TRANS: Menu item for site administration - $this->out->menuItem(common_local_url('pathsadminpanel'), _('Paths'), - $menu_title, $action_name == 'pathsadminpanel', 'nav_paths_admin_panel'); - } - - if (AdminPanelAction::canAdmin('sessions')) { - // TRANS: Menu item title/tooltip - $menu_title = _('Sessions configuration'); - // TRANS: Menu item for site administration - $this->out->menuItem(common_local_url('sessionsadminpanel'), _('Sessions'), - $menu_title, $action_name == 'sessionsadminpanel', 'nav_sessions_admin_panel'); - } - - if (AdminPanelAction::canAdmin('sitenotice')) { - // TRANS: Menu item title/tooltip - $menu_title = _('Edit site notice'); - // TRANS: Menu item for site administration - $this->out->menuItem(common_local_url('sitenoticeadminpanel'), _('Site notice'), - $menu_title, $action_name == 'sitenoticeadminpanel', 'nav_sitenotice_admin_panel'); - } - - if (AdminPanelAction::canAdmin('snapshot')) { - // TRANS: Menu item title/tooltip - $menu_title = _('Snapshots configuration'); - // TRANS: Menu item for site administration - $this->out->menuItem(common_local_url('snapshotadminpanel'), _('Snapshots'), - $menu_title, $action_name == 'snapshotadminpanel', 'nav_snapshot_admin_panel'); - } - - if (AdminPanelAction::canAdmin('license')) { - // TRANS: Menu item title/tooltip - $menu_title = _('Set site license'); - // TRANS: Menu item for site administration - $this->out->menuItem(common_local_url('licenseadminpanel'), _('License'), - $menu_title, $action_name == 'licenseadminpanel', 'nav_license_admin_panel'); - } - - if (AdminPanelAction::canAdmin('plugins')) { - // TRANS: Menu item title/tooltip - $menu_title = _('Plugins configuration'); - // TRANS: Menu item for site administration - $this->out->menuItem(common_local_url('pluginsadminpanel'), _('Plugins'), - $menu_title, $action_name == 'pluginsadminpanel', 'nav_design_admin_panel'); - } - - Event::handle('EndAdminPanelNav', array($this)); - } - $this->action->elementEnd('ul'); - } -}