Ejemplo n.º 1
0
 public function configureAdminMenu(MenuAdmin $menu)
 {
     if (Piwik::isUserHasSomeAdminAccess()) {
         $menu->addManageItem('UsersManager_MenuUsers', array('module' => 'UsersManager', 'action' => 'index'), $order = 2);
         $menu->addManageItem('UsersManager_MenuUserSettings', array('module' => 'UsersManager', 'action' => 'userSettings'), $order = 3);
     }
 }
Ejemplo n.º 2
0
 public function configureAdminMenu(MenuAdmin $menu)
 {
     if (Piwik::isUserHasSomeAdminAccess()) {
         $menu->addManageItem('UsersManager_MenuUsers', $this->urlForAction('index'), $order = 2);
         $menu->addManageItem('UsersManager_MenuUserSettings', $this->urlForAction('userSettings'), $order = 3);
     }
 }
Ejemplo n.º 3
0
 public function configureAdminMenu(MenuAdmin $menu)
 {
     $hasAdminAccess = Piwik::isUserHasSomeAdminAccess();
     if ($hasAdminAccess) {
         $menu->addManageItem(null, "", $order = 1);
         $menu->addSettingsItem(null, "", $order = 5);
         $menu->addDiagnosticItem(null, "", $order = 10);
         $menu->addDevelopmentItem(null, "", $order = 15);
         $menu->addSettingsItem('CoreAdminHome_MenuGeneralSettings', $this->urlForAction('generalSettings'), $order = 6);
         $menu->addManageItem('CoreAdminHome_TrackingCode', $this->urlForAction('trackingCodeGenerator'), $order = 4);
     }
     if (SettingsManager::hasPluginsSettingsForCurrentUser()) {
         $menu->addSettingsItem('CoreAdminHome_PluginSettings', $this->urlForAction('pluginSettings'), $order = 7);
     }
 }
Ejemplo n.º 4
0
 public function configureAdminMenu(MenuAdmin $menu)
 {
     if (Piwik::isUserHasSomeAdminAccess()) {
         $menu->addManageItem('UsersManager_MenuUsers', $this->urlForAction('index'), $order = 2);
     }
     if (Piwik::hasUserSuperUserAccess() && API::getInstance()->getSitesAccessFromUser('anonymous')) {
         $menu->addSettingsItem('UsersManager_AnonymousUser', $this->urlForAction('anonymousSettings'), $order = 20);
     }
 }
Ejemplo n.º 5
0
 public function configureAdminMenu(MenuAdmin $menu)
 {
     if (Piwik::isUserHasSomeAdminAccess()) {
         $type = $this->getFirstTypeIfOnlyOneIsInUse();
         $menuName = 'General_Measurables';
         if ($type) {
             $menuName = $type->getNamePlural();
         }
         $menu->addManageItem($menuName, $this->urlForAction('index'), $order = 1);
     }
 }
Ejemplo n.º 6
0
 public function configureAdminMenu(MenuAdmin $menu)
 {
     $hasSuperUserAcess = Piwik::hasUserSuperUserAccess();
     $isAnonymous = Piwik::isUserIsAnonymous();
     $isMarketplaceEnabled = CorePluginsAdmin::isMarketplaceEnabled();
     $pluginsUpdateMessage = '';
     if ($hasSuperUserAcess && $isMarketplaceEnabled) {
         $marketplace = new Marketplace();
         $pluginsHavingUpdate = $marketplace->getPluginsHavingUpdate($themesOnly = false);
         $themesHavingUpdate = $marketplace->getPluginsHavingUpdate($themesOnly = true);
         if (!empty($pluginsHavingUpdate)) {
             $pluginsUpdateMessage = sprintf(' (%d)', count($pluginsHavingUpdate) + count($themesHavingUpdate));
         }
     }
     if (!$isAnonymous) {
         $menu->addPlatformItem(null, "", $order = 7);
     }
     if ($hasSuperUserAcess) {
         $menu->addManageItem(Piwik::translate('General_Plugins') . $pluginsUpdateMessage, $this->urlForAction('plugins', array('activated' => '')), $order = 4);
     }
     if (Piwik::hasUserSuperUserAccess() && CorePluginsAdmin::isMarketplaceEnabled()) {
         $menu->addManageItem('CorePluginsAdmin_Marketplace', $this->urlForAction('browsePlugins', array('activated' => '')), $order = 12);
     }
 }
Ejemplo n.º 7
0
 public function configureAdminMenu(MenuAdmin $menu)
 {
     $hasAdminAccess = Piwik::isUserHasSomeAdminAccess();
     if ($hasAdminAccess) {
         $menu->addManageItem(null, array(), $order = 1);
         $menu->addSettingsItem(null, array(), $order = 5);
         $menu->addDiagnosticItem(null, array(), $order = 10);
         $menu->addDevelopmentItem(null, array(), $order = 15);
         if (Piwik::hasUserSuperUserAccess()) {
             $menu->addSettingsItem('General_General', $this->urlForAction('generalSettings'), $order = 6);
         }
     }
     if (Piwik::hasUserSuperUserAccess() && SettingsManager::hasSystemPluginsSettingsForCurrentUser()) {
         $menu->addSettingsItem('CoreAdminHome_PluginSettings', $this->urlForAction('adminPluginSettings'), $order = 7);
     }
 }
Ejemplo n.º 8
0
 public function configureAdminMenu(MenuAdmin $menu)
 {
     if (Piwik::isUserHasSomeAdminAccess()) {
         $menu->addManageItem('SitesManager_Sites', array('module' => 'SitesManager', 'action' => 'index'), $order = 1);
     }
 }
Ejemplo n.º 9
0
 public function configureAdminMenu(MenuAdmin $menu)
 {
     if (Piwik::isUserHasSomeAdminAccess()) {
         $menu->addManageItem('SitesManager_Sites', $this->urlForAction('index'), $order = 1);
     }
 }