]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
remove adminpanelnav from adminpanelaction module
authorEvan Prodromou <evan@status.net>
Mon, 7 Mar 2011 17:36:04 +0000 (12:36 -0500)
committerEvan Prodromou <evan@status.net>
Mon, 7 Mar 2011 17:36:04 +0000 (12:36 -0500)
lib/adminpanelaction.php

index 8dd16e9d0ce6a2b1d1e8b2abdd6f712257c1561c..a085fcd5dc2db3657d19aa877734750e385a5389 100644 (file)
@@ -291,129 +291,3 @@ class AdminPanelAction extends Action
         return $isOK;
     }
 }
-
-/**
- * Menu for public group of actions
- *
- * @category Output
- * @package  StatusNet
- * @author   Evan Prodromou <evan@status.net>
- * @author   Sarven Capadisli <csarven@status.net>
- * @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');
-    }
-}