Ejemplo n.º 1
0
 public static function cpanel()
 {
     PHPWS_Core::initModClass('controlpanel', 'Panel.php');
     $linkBase = 'index.php?module=block';
     $tabs['list'] = array('title' => dgettext('block', 'List'), 'link' => $linkBase);
     $tabs['settings'] = array('title' => dgettext('block', 'Settings'), 'link' => $linkBase);
     $panel = new PHPWS_Panel('block');
     $panel->enableSecure();
     $panel->quickSetTabs($tabs);
     $panel->setModule('block');
     return $panel;
 }
Ejemplo n.º 2
0
 public function cpanel()
 {
     PHPWS_Core::initModClass('controlpanel', 'Panel.php');
     $link = 'index.php?module=users&action=user';
     foreach ($this->modules as $module) {
         $link = 'index.php?module=users&action=user';
         $tabs[$module->title] = array('title' => $module->getProperName(), 'link' => $link);
     }
     $panel = new PHPWS_Panel('users');
     $panel->quickSetTabs($tabs);
     $panel->setModule('users');
     $panel->setPanel('panel.tpl');
     return $panel;
 }
Ejemplo n.º 3
0
 public static function cpanel()
 {
     PHPWS_Core::initModClass('controlpanel', 'Panel.php');
     $link = PHPWS_Text::linkAddress('analytics', null, false, false, true, false);
     $tabs['list'] = array('title' => dgettext('analytics', 'List Trackers'), 'link' => $link);
     $tabs['new'] = array('title' => dgettext('analytics', 'New Tracker'), 'link' => $link);
     $panel = new PHPWS_Panel('analyticsPanel');
     $panel->enableSecure();
     $panel->quickSetTabs($tabs);
     $panel->setModule('analytics');
     $panel->setPanel('panel.tpl');
     return $panel;
 }
Ejemplo n.º 4
0
 public static function cpanel()
 {
     PHPWS_Core::initModClass('controlpanel', 'Panel.php');
     $link['link'] = 'index.php?module=access';
     if (MOD_REWRITE_ENABLED) {
         $link['title'] = dgettext('access', 'Shortcuts');
         $tabs['shortcuts'] = $link;
     }
     if (Current_User::allow('access', 'admin_options')) {
         $link['title'] = dgettext('access', 'Allow/Deny');
         $tabs['deny_allow'] = $link;
     }
     if (Current_User::isDeity()) {
         $link['title'] = dgettext('access', '.htaccess');
         $tabs['htaccess'] = $link;
     }
     $panel = new PHPWS_Panel('access_panel');
     $panel->enableSecure();
     if (!empty($tabs)) {
         $panel->quickSetTabs($tabs);
     }
     $panel->setModule('access');
     return $panel;
 }
Ejemplo n.º 5
0
 public static function cpanel()
 {
     PHPWS_Core::initModClass('controlpanel', 'Panel.php');
     $link = 'index.php?module=search';
     $tab['keyword'] = array('title' => dgettext('search', 'Keywords'), 'link' => $link);
     $tab['ignore'] = array('title' => dgettext('search', 'Ignore'), 'link' => $link);
     $tab['settings'] = array('title' => dgettext('search', 'Settings'), 'link' => $link);
     $panel = new PHPWS_Panel('search');
     $panel->quickSetTabs($tab);
     $panel->setModule('search');
     return $panel;
 }
Ejemplo n.º 6
0
 public static function cpanel()
 {
     PHPWS_Core::initModClass('controlpanel', 'Panel.php');
     $link = PHPWS_Text::linkAddress('users', array('action' => 'admin'), false, false, true, false);
     /*
      if (PHPWS_Settings::get('users', 'allow_new_users') || Current_User::isDeity()) {
      $tabs['new_user'] = array('title'=>dgettext('users', 'New User'), 'link'=>$link);
      }
     */
     if (Current_User::allow('users', 'edit_users') || Current_User::allow('users', 'delete_users')) {
         $tabs['manage_users'] = array('title' => dgettext('users', 'Manage Users'), 'link' => $link);
     }
     if (Current_User::allow('users', 'add_edit_groups')) {
         //$tabs['new_group'] = array('title' => dgettext('users', 'New Group'), 'link' => $link);
         $tabs['manage_groups'] = array('title' => dgettext('users', 'Manage Groups'), 'link' => $link);
     }
     if (Current_User::isDeity()) {
         $tabs['authorization'] = array('title' => dgettext('users', 'Authorization'), 'link' => $link);
     }
     if (Current_User::allow('users', 'settings')) {
         $tabs['settings'] = array('title' => dgettext('users', 'Settings'), 'link' => $link);
     }
     $panel = new PHPWS_Panel('user_user_panel');
     $panel->quickSetTabs($tabs);
     $panel->setModule('users');
     return $panel;
 }