Inheritance: extends WP_Widget
Example #1
0
 /**
  * Render PHP template for widget object
  *
  * @param MenuWidget $widgetObj
  * @param string $tplFile
  * @return string result of rendering process
  */
 protected static function renderPHP($widgetObj, $tplFile)
 {
     $view = BizSystem::getZendTemplate();
     $view->addScriptPath(dirname($tplFile));
     $view->widget = $widgetObj->OutputAttrs();
     return $view->render($widgetObj->m_TemplateFile);
 }
Example #2
0
 /**
  * Render PHP template for widget object
  *
  * @param MenuWidget $widgetObj
  * @param string $tplFile
  * @return string result of rendering process
  */
 protected static function renderPHP($widgetObj, $tplFile)
 {
     $view = BizSystem::getZendTemplate();
     $view->addScriptPath(dirname($tplFile));
     $view->widget = $widgetObj->OutputAttrs();
     $smarty->assign("formname", $widgetObj->m_Name);
     $smarty->assign("module", $view->getModuleName($view->m_Name));
     $smarty->assign("title", $view->m_Title);
     $smarty->assign("errors", $view->m_Errors);
     $smarty->assign("notices", $view->m_Notices);
     return $view->render($view->m_TemplateFile);
 }
Example #3
0
 /**
  * Render PHP template for widget object
  *
  * @param MenuWidget $widgetObj
  * @param string $tplFile
  * @return string result of rendering process
  */
 protected static function renderPHP($widgetObj, $tplFile)
 {
     $view = TemplateHelper::getZendTemplate();
     $view->addScriptPath(dirname($tplFile));
     $view->widget = $widgetObj->OutputAttrs();
     /*
             $smarty->assign("formname", $widgetObj->objectName);
             $smarty->assign("module", $view->getModuleName($view->objectName));
             $smarty->assign("title", $view->title);
             $smarty->assign("errors", ( isset($view->errors) ? $view->errors : null ) );
             $smarty->assign("notices", $view->notices);
     * 
     */
     return $view->render($view->templateFile);
 }
Example #4
0
 public function run()
 {
     if (Yii::app()->user->isGuest && $this->user->visibility != User::VISIBILITY_ALL) {
         return;
     }
     return parent::run();
 }
Example #5
0
 public function init()
 {
     // Reckon the current controller is a valid profile controller
     // (Needs to implement the ProfileControllerBehavior)
     $userGuid = Yii::app()->getController()->getUser()->guid;
     $this->addItemGroup(array('id' => 'profile', 'label' => Yii::t('UserModule.widgets_ProfileMenuWidget', '<strong>Profile</strong> menu'), 'sortOrder' => 100));
     $this->addItem(array('label' => Yii::t('UserModule.widgets_ProfileMenuWidget', 'Stream'), 'group' => 'profile', 'url' => Yii::app()->createUrl('//user/profile', array('uguid' => $userGuid)), 'sortOrder' => 200, 'isActive' => Yii::app()->controller->id == "profile" && Yii::app()->controller->action->id == "index"));
     //if (Yii::app()->getController()->getUser()->profile->about != "") {
     $this->addItem(array('label' => Yii::t('UserModule.widgets_ProfileMenuWidget', 'About'), 'group' => 'profile', 'url' => Yii::app()->createUrl('//user/profile/about', array('uguid' => $userGuid)), 'sortOrder' => 300, 'isActive' => Yii::app()->controller->id == "profile" && Yii::app()->controller->action->id == "about"));
     //}
     parent::init();
 }
Example #6
0
 public function init()
 {
     $this->addItemGroup(array('id' => 'manage', 'label' => Yii::t('AdminModule.widgets_AdminMenuWidget', '<strong>Administration</strong> menu'), 'sortOrder' => 100));
     $this->addItem(array('label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Users'), 'url' => Yii::app()->createUrl('admin/user'), 'icon' => '<i class="fa fa-user"></i>', 'group' => 'manage', 'sortOrder' => 200, 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'user', 'isVisible' => Yii::app()->user->isAdmin(), 'newItemCount' => 0));
     $this->addItem(array('label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'User approval'), 'id' => 'approval', 'url' => Yii::app()->createUrl('admin/approval'), 'icon' => '<i class="fa fa-check-circle"></i>', 'group' => 'manage', 'sortOrder' => 200, 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'approval', 'isVisible' => Yii::app()->user->canApproveUsers(), 'newItemCount' => 0));
     $this->addItem(array('label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Groups'), 'id' => 'groups', 'url' => Yii::app()->createUrl('admin/group'), 'icon' => '<i class="fa fa-group"></i>', 'group' => 'manage', 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'group', 'sortOrder' => 300, 'isVisible' => Yii::app()->user->isAdmin(), 'newItemCount' => 0));
     $this->addItem(array('label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Spaces'), 'id' => 'spaces', 'url' => Yii::app()->createUrl('admin/space'), 'icon' => '<i class="fa fa-inbox"></i>', 'group' => 'manage', 'sortOrder' => 400, 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'space', 'isVisible' => Yii::app()->user->isAdmin(), 'newItemCount' => 0));
     $this->addItem(array('label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Modules'), 'id' => 'modules', 'url' => Yii::app()->createUrl('admin/module'), 'icon' => '<i class="fa fa-rocket"></i>', 'sortOrder' => 500, 'group' => 'manage', 'newItemCount' => 0, 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'module', 'isVisible' => Yii::app()->user->isAdmin()));
     $this->addItem(array('label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'About'), 'url' => Yii::app()->createUrl('admin/about'), 'icon' => '<i class="fa fa-info-circle"></i>', 'sortOrder' => 10000, 'group' => 'manage', 'newItemCount' => 0, 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'about', 'isVisible' => Yii::app()->user->isAdmin()));
     $this->addItemGroup(array('id' => 'settings', 'label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Settings'), 'sortOrder' => 200));
     $this->addItem(array('label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Basic'), 'url' => Yii::app()->createUrl('admin/setting/index'), 'icon' => '<i class="fa fa-cogs"></i>', 'group' => 'settings', 'sortOrder' => 100, 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'setting' && Yii::app()->controller->action->id == 'index', 'isVisible' => Yii::app()->user->isAdmin()));
     $this->addItem(array('label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Design'), 'url' => Yii::app()->createUrl('admin/setting/design'), 'icon' => '<i class="fa fa-magic"></i>', 'group' => 'settings', 'sortOrder' => 200, 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'setting' && Yii::app()->controller->action->id == 'design', 'isVisible' => Yii::app()->user->isAdmin()));
     /*
      $this->addItem(array(
      'label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Users'),
      'url' => Yii::app()->createUrl('admin/setting/user'),
      'group' => 'settings',
      'sortOrder' => 300,
      'isActive' => (Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'setting' && Yii::app()->controller->action->id == 'authentication'),
      ));
      $this->addItem(array(
      'label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Spaces'),
      'url' => Yii::app()->createUrl('admin/setting/user'),
      'group' => 'settings',
      'sortOrder' => 400,
      'isActive' => (Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'setting' && Yii::app()->controller->action->id == 'authentication'),
      ));
     *
     */
     $this->addItem(array('label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Authentication'), 'url' => Yii::app()->createUrl('admin/setting/authentication'), 'icon' => '<i class="fa fa-lock"></i>', 'group' => 'settings', 'sortOrder' => 500, 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'setting' && (Yii::app()->controller->action->id == 'authentication' || Yii::app()->controller->action->id == 'authenticationLdap'), 'isVisible' => Yii::app()->user->isAdmin()));
     $this->addItem(array('label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'User profiles'), 'url' => Yii::app()->createUrl('admin/userprofile/index'), 'icon' => '<i class="fa fa-wrench"></i>', 'group' => 'settings', 'sortOrder' => 500, 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'userprofile', 'isVisible' => Yii::app()->user->isAdmin()));
     /*
               $this->addItem(array(
               'label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Security & Roles'),
               'url' => Yii::app()->createUrl('admin/setting/security'),
               'group' => 'settings',
               'sortOrder' => 700,
               'isActive' => (Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'setting' && Yii::app()->controller->action->id == 'security'),
               ));
     */
     $this->addItem(array('label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Mailing'), 'url' => Yii::app()->createUrl('admin/setting/mailing'), 'icon' => '<i class="fa fa-envelope"></i>', 'group' => 'settings', 'sortOrder' => 600, 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'setting' && Yii::app()->controller->action->id == 'mailing', 'isVisible' => Yii::app()->user->isAdmin()));
     $this->addItem(array('label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Caching'), 'url' => Yii::app()->createUrl('admin/setting/caching'), 'icon' => '<i class="fa fa-dashboard"></i>', 'group' => 'settings', 'sortOrder' => 800, 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'setting' && Yii::app()->controller->action->id == 'caching', 'isVisible' => Yii::app()->user->isAdmin()));
     $this->addItem(array('label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Files'), 'url' => Yii::app()->createUrl('admin/setting/file'), 'icon' => '<i class="fa fa-file"></i>', 'group' => 'settings', 'sortOrder' => 800, 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'setting' && Yii::app()->controller->action->id == 'file', 'isVisible' => Yii::app()->user->isAdmin()));
     $this->addItem(array('label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Proxy'), 'url' => Yii::app()->createUrl('admin/setting/proxy'), 'icon' => '<i class="fa fa-sitemap"></i>', 'group' => 'settings', 'sortOrder' => 800, 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'setting' && Yii::app()->controller->action->id == 'proxy', 'isVisible' => Yii::app()->user->isAdmin()));
     $this->addItem(array('label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Statistics'), 'url' => Yii::app()->createUrl('admin/setting/statistic'), 'icon' => '<i class="fa fa-bar-chart-o"></i>', 'group' => 'settings', 'sortOrder' => 900, 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'setting' && Yii::app()->controller->action->id == 'statistic', 'isVisible' => Yii::app()->user->isAdmin()));
     $this->addItem(array('label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Cron jobs'), 'url' => Yii::app()->createUrl('admin/setting/cronjob'), 'icon' => '<i class="fa fa-history"></i>', 'group' => 'settings', 'sortOrder' => 1000, 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'setting' && Yii::app()->controller->action->id == 'cronjob', 'isVisible' => Yii::app()->user->isAdmin()));
     $this->addItem(array('label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Logging'), 'url' => Yii::app()->createUrl('admin/logging'), 'icon' => '<i class="fa fa-keyboard-o"></i>', 'group' => 'settings', 'sortOrder' => 1100, 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'logging', 'isVisible' => Yii::app()->user->isAdmin()));
     $this->addItem(array('label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'OEmbed Provider'), 'url' => Yii::app()->createUrl('admin/setting/oembed'), 'icon' => '<i class="fa fa-cloud"></i>', 'group' => 'settings', 'sortOrder' => 1200, 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'setting' && (Yii::app()->controller->action->id == 'oembed' || Yii::app()->controller->action->id == 'oembedEdit'), 'isVisible' => Yii::app()->user->isAdmin()));
     $this->addItem(array('label' => Yii::t('AdminModule.widgets_AdminMenuWidget', 'Self test & update'), 'url' => Yii::app()->createUrl('admin/setting/selftest'), 'icon' => '<i class="fa fa-warning"></i>', 'group' => 'settings', 'sortOrder' => 1300, 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'admin' && Yii::app()->controller->id == 'setting' && Yii::app()->controller->action->id == 'selftest', 'isVisible' => Yii::app()->user->isAdmin()));
     parent::init();
 }
 public function init()
 {
     $this->addItemGroup(array('id' => 'spaces', 'label' => Yii::t('LibraryModule.base', '<strong>Public</strong> libraries'), 'sortOrder' => 100));
     if (is_array(Yii::app()->controller->publicLibraries)) {
         // Get array of public libraries from controller and sort descending.
         $publicLibraries = Yii::app()->controller->publicLibraries;
         krsort($publicLibraries, SORT_NUMERIC);
         // Loop array and add menu entries so we end up with the lowest ID on top.
         foreach ($publicLibraries as $id => $library) {
             $this->addItem(array('label' => $library, 'url' => Yii::app()->createUrl('library/global/showLibrary', array('id' => $id)), 'group' => 'spaces', 'isActive' => Yii::app()->controller->module && Yii::app()->controller->module->id == 'library' && Yii::app()->controller->id == 'global' && Yii::app()->controller->action->id == 'showLibrary' && Yii::app()->controller->currentLibrary == $id));
         }
     }
     parent::init();
 }
 public function init()
 {
     $this->addItemGroup(array('id' => 'browse', 'label' => Yii::t('SpaceModule.widgets_SpaceBrowseMenuWidget', 'Spaces'), 'sortOrder' => 100));
     $this->addItem(array('label' => Yii::t('SpaceModule.widgets_SpaceBrowseMenuWidget', 'My Space List'), 'url' => Yii::app()->createUrl('//space/browse', array()), 'sortOrder' => 100, 'isActive' => Yii::app()->controller->id == "spacebrowse" && Yii::app()->controller->action->id == "index"));
     $this->addItem(array('label' => Yii::t('SpaceModule.widgets_SpaceBrowseMenuWidget', 'My space summary'), 'url' => Yii::app()->createUrl('//dashboard', array()), 'sortOrder' => 100, 'isActive' => Yii::app()->controller->id == "spacebrowse" && Yii::app()->controller->action->id == "index"));
     $this->addItem(array('label' => Yii::t('SpaceModule.widgets_SpaceBrowseMenuWidget', 'Space directory'), 'url' => Yii::app()->createUrl('//community/workspaces', array()), 'sortOrder' => 200, 'isActive' => Yii::app()->controller->id == "spacebrowse" && Yii::app()->controller->action->id == "index"));
     #        $this->addItem(array(
     #            'label' => Yii::t('SpaceModule.widgets_SpaceBrowseMenuWidget', 'Members'),
     #            'url' => Yii::app()->createUrl('//space/space/members', array('sguid'=>$spaceGuid)),
     #            'sortOrder' => 200,
     #            'isActive' => (Yii::app()->controller->id == "space" && Yii::app()->controller->action->id == "members"),
     #        ));
     #        $this->addItem(array(
     #            'label' => Yii::t('SpaceModule.widgets_SpaceBrowseMenuWidget', 'Admin'),
     #            'url' => Yii::app()->createUrl('//space/admin', array('sguid'=>$spaceGuid)),
     #            'sortOrder' => 9999,
     #            'isActive' => (Yii::app()->controller->id == "admin" && Yii::app()->controller->action->id == "index"),
     #        ));
     parent::init();
 }
Example #9
0
 public function init()
 {
     // Reckon the current controller is a valid space controller
     // (Needs to implement the SpaceControllerBehavior)
     $spaceGuid = Yii::app()->getController()->getSpace()->guid;
     $this->addItemGroup(array('id' => 'modules', 'label' => Yii::t('SpaceModule.widgets_SpaceMenuWidget', '<strong>Space</strong> menu'), 'sortOrder' => 100));
     $this->addItem(array('label' => Yii::t('SpaceModule.widgets_SpaceMenuWidget', 'Stream'), 'group' => 'modules', 'url' => Yii::app()->createUrl('//space/space', array('sguid' => $spaceGuid)), 'icon' => '<i class="fa fa-bars"></i>', 'sortOrder' => 100, 'isActive' => Yii::app()->controller->id == "space" && Yii::app()->controller->action->id == "index" && Yii::app()->controller->module->id == "space"));
     #        $this->addItem(array(
     #            'label' => Yii::t('SpaceModule.widgets_SpaceMenuWidget', 'Members'),
     #            'url' => Yii::app()->createUrl('//space/space/members', array('sguid'=>$spaceGuid)),
     #            'sortOrder' => 200,
     #            'isActive' => (Yii::app()->controller->id == "space" && Yii::app()->controller->action->id == "members"),
     #        ));
     #        $this->addItem(array(
     #            'label' => Yii::t('SpaceModule.widgets_SpaceMenuWidget', 'Admin'),
     #            'url' => Yii::app()->createUrl('//space/admin', array('sguid'=>$spaceGuid)),
     #            'sortOrder' => 9999,
     #            'isActive' => (Yii::app()->controller->id == "admin" && Yii::app()->controller->action->id == "index"),
     #        ));
     parent::init();
 }
Example #10
0
 public function init()
 {
     $this->addItemGroup(array('id' => 'account', 'label' => Yii::t('UserModule.widgets_AccountMenuWidget', '<strong>Account</strong> settings'), 'sortOrder' => 100));
     $this->addItem(array('label' => Yii::t('UserModule.widgets_AccountMenuWidget', 'Profile'), 'icon' => '<i class="fa fa-user"></i>', 'group' => 'account', 'url' => Yii::app()->createUrl('//user/account/edit'), 'sortOrder' => 100, 'isActive' => Yii::app()->controller->action->id == "edit"));
     $this->addItem(array('label' => Yii::t('UserModule.widgets_AccountMenuWidget', 'Settings'), 'icon' => '<i class="fa fa-wrench"></i>', 'group' => 'account', 'url' => Yii::app()->createUrl('//user/account/editSettings'), 'sortOrder' => 110, 'isActive' => Yii::app()->controller->action->id == "editSettings"));
     // Only show this page when really user specific modules available
     if (count(Yii::app()->user->getModel()->getAvailableModules()) != 0) {
         $this->addItem(array('label' => Yii::t('UserModule.widgets_AccountMenuWidget', 'Modules'), 'icon' => '<i class="fa fa-rocket"></i>', 'group' => 'account', 'url' => Yii::app()->createUrl('//user/account/editModules'), 'sortOrder' => 120, 'isActive' => Yii::app()->controller->action->id == "editModules"));
     }
     $this->addItem(array('label' => Yii::t('UserModule.widgets_AccountMenuWidget', 'Notifications'), 'icon' => '<i class="fa fa-bell"></i>', 'group' => 'account', 'url' => Yii::app()->createUrl('//user/account/emailing/'), 'sortOrder' => 200, 'isActive' => Yii::app()->controller->action->id == "emailing"));
     // LDAP users cannot change their e-mail address
     if (Yii::app()->user->getAuthMode() != User::AUTH_MODE_LDAP) {
         $this->addItem(array('label' => Yii::t('UserModule.widgets_AccountMenuWidget', 'E-Mail'), 'icon' => '<i class="fa fa-paper-plane"></i>', 'group' => 'account', 'url' => Yii::app()->createUrl('//user/account/changeEmail'), 'sortOrder' => 300, 'isActive' => Yii::app()->controller->action->id == "changeEmail"));
     }
     // LDAP users cannot changes password or delete account
     if (Yii::app()->user->getAuthMode() != User::AUTH_MODE_LDAP) {
         $this->addItem(array('label' => Yii::t('UserModule.widgets_AccountMenuWidget', 'Password'), 'icon' => '<i class="fa fa-key"></i>', 'group' => 'account', 'url' => Yii::app()->createUrl('//user/account/changePassword'), 'sortOrder' => 500, 'isActive' => Yii::app()->controller->action->id == "changePassword"));
         $this->addItem(array('label' => Yii::t('UserModule.widgets_AccountMenuWidget', 'Delete account'), 'icon' => '<i class="fa fa-trash-o"></i>', 'group' => 'account', 'url' => Yii::app()->createUrl('//user/account/delete'), 'sortOrder' => 600, 'isActive' => Yii::app()->controller->action->id == "delete"));
     }
     parent::init();
 }
 public function init()
 {
     // Reckon the current controller is a valid space controller
     // (Needs to implement the SpaceControllerBehavior)
     $spaceGuid = Yii::app()->getController()->getSpace()->guid;
     $space = Yii::app()->getController()->getSpace();
     $this->addItemGroup(array('id' => 'admin', 'label' => Yii::t('SpaceModule.widgets_SpaceAdminMenuWidget', '<strong>Space</strong> preferences'), 'sortOrder' => 100));
     // check user rights
     if ($space->isAdmin()) {
         $this->addItem(array('label' => Yii::t('SpaceModule.widgets_SpaceAdminMenuWidget', 'General'), 'group' => 'admin', 'url' => Yii::app()->createUrl('//space/admin/edit', array('sguid' => $spaceGuid)), 'icon' => '<i class="fa fa-cogs"></i>', 'sortOrder' => 100, 'isActive' => Yii::app()->controller->id == "admin" && Yii::app()->controller->action->id == "edit"));
     }
     // check user rights
     if ($space->isAdmin()) {
         $this->addItem(array('label' => Yii::t('SpaceModule.widgets_SpaceAdminMenuWidget', 'Members'), 'group' => 'admin', 'url' => Yii::app()->createUrl('//space/admin/members', array('sguid' => $spaceGuid)), 'icon' => '<i class="fa fa-group"></i>', 'sortOrder' => 200, 'isActive' => Yii::app()->controller->id == "admin" && Yii::app()->controller->action->id == "members"));
     }
     // check user rights
     if ($space->isAdmin()) {
         $this->addItem(array('label' => Yii::t('SpaceModule.widgets_SpaceAdminMenuWidget', 'Modules'), 'group' => 'admin', 'url' => Yii::app()->createUrl('//space/admin/modules', array('sguid' => $spaceGuid)), 'icon' => '<i class="fa fa-rocket"></i>', 'sortOrder' => 300, 'isActive' => Yii::app()->controller->id == "admin" && Yii::app()->controller->action->id == "modules"));
     }
     #        $this->addItem(array(
     #            'label' => Yii::t('SpaceModule.widgets_SpaceAdminMenuWidget', 'Archive'),
     #            'url' => Yii::app()->createUrl('//space/admin/archive', array('sguid'=>$spaceGuid)),
     #            'sortOrder' => 400,
     #            'isActive' => (Yii::app()->controller->id == "admin" && Yii::app()->controller->action->id == "archive"),
     #        ));
     #        $this->addItem(array(
     #            'label' => Yii::t('SpaceModule.widgets_SpaceAdminMenuWidget', 'Delete'),
     #            'url' => Yii::app()->createUrl('//space/admin/delete', array('sguid'=>$spaceGuid)),
     #            'sortOrder' => 500,
     #            'isActive' => (Yii::app()->controller->id == "admin" && Yii::app()->controller->action->id == "delete"),
     #        ));
     #        $this->addItem(array(
     #            'label' => Yii::t('SpaceModule.widgets_SpaceAdminMenuWidget', 'Back to workspace'),
     #            'url' => Yii::app()->createUrl('//space/space', array('sguid'=>$spaceGuid)),
     #            'sortOrder' => 1000,
     #        ));
     parent::init();
 }
Example #12
0
 public function init()
 {
     /**
      * Backward compatibility - try to auto load space based on current
      * controller.
      */
     if ($this->space === null) {
         $this->space = Yii::app()->getController()->getSpace();
     }
     $this->addItemGroup(array('id' => 'admin', 'label' => Yii::t('SpaceModule.widgets_SpaceAdminMenuWidget', '<strong>Space</strong> preferences'), 'sortOrder' => 100));
     // check user rights
     if ($this->space->isAdmin()) {
         $this->addItem(array('label' => Yii::t('SpaceModule.widgets_SpaceAdminMenuWidget', 'General'), 'group' => 'admin', 'url' => $this->space->createUrl('//space/admin/edit'), 'icon' => '<i class="fa fa-cogs"></i>', 'sortOrder' => 100, 'isActive' => Yii::app()->controller->id == "admin" && Yii::app()->controller->action->id == "edit"));
     }
     // check user rights
     if ($this->space->isAdmin()) {
         $this->addItem(array('label' => Yii::t('SpaceModule.widgets_SpaceAdminMenuWidget', 'Members'), 'group' => 'admin', 'url' => $this->space->createUrl('//space/admin/members'), 'icon' => '<i class="fa fa-group"></i>', 'sortOrder' => 200, 'isActive' => Yii::app()->controller->id == "admin" && Yii::app()->controller->action->id == "members"));
     }
     // check user rights
     if ($this->space->isAdmin()) {
         $this->addItem(array('label' => Yii::t('SpaceModule.widgets_SpaceAdminMenuWidget', 'Modules'), 'group' => 'admin', 'url' => $this->space->createUrl('//space/admin/modules'), 'icon' => '<i class="fa fa-rocket"></i>', 'sortOrder' => 300, 'isActive' => Yii::app()->controller->id == "admin" && Yii::app()->controller->action->id == "modules"));
     }
     parent::init();
 }
Example #13
0
 public function setLang($path)
 {
     self::$lang = $_SERVER["DOCUMENT_ROOT"] . $path;
 }
Example #14
0
 public function NewsMenu()
 {
     $data = array();
     $sql = 'SELECT id FROM {{tree}} WHERE parent=1 AND path=\'' . Funcs::$uri[0] . '\' ORDER BY num';
     $parent = DB::getOne($sql);
     $sql = 'SELECT * FROM {{tree}} WHERE parent=' . $parent . ' AND menu=1 ORDER BY num';
     $list = DB::getAll($sql);
     foreach ($list as $item) {
         $selected = '';
         $path = '/' . Funcs::$uri[0] . '/' . $item['path'] . '/';
         if ($item['path'] == Funcs::$uri[1]) {
             $selected = 'inner';
         }
         if ($path == '/' . implode('/', Funcs::$uri) . '/') {
             $selected = 'selected';
         }
         $data[] = array('name' => $item['name'], 'path' => $path, 'selected' => $selected, 'years' => MenuWidget::NewsDateMenu($item['id'], $path));
     }
     if (isset($_GET['d'])) {
         $date = explode('-', $_GET['d']);
     } else {
         $date[] = date('Y');
         //$date[]=date('m');
     }
     if (is_numeric(Funcs::$uri[count(Funcs::$uri) - 1])) {
         $date = array();
         $element = Tree::getTreeById(Funcs::$uri[count(Funcs::$uri) - 1]);
         $date[] = date('Y', strtotime($element['udate']));
         $date[] = date('m', strtotime($element['udate']));
     }
     View::widget('menu/news', array('list' => $data, 'date' => $date));
 }
Example #15
0
<ul>
<?php 
foreach ($classMethods as $value) {
    ?>
<li><a href="<?php 
    echo HFURL_ON ? $value : "?view=" . $value;
    ?>
"><?php 
    echo MenuWidget::getTranslate($value);
    ?>
</a></li><?php 
}
?>
</ul>
Example #16
0
					$('#pass').css('border','solid 1px red');
					$('#pass2').css('border','solid 1px red');
					f=1;
				}else{
					$('#pass').css('border','');
					$('#pass2').css('border','');
				}
				if(f==1){
					 return false;
				}else{
					$('#chpass').submit();
				}
			}
		</script>
	</div>
</div>
<div class="left-block-content">
	<div class="left-content">
		<div class="logined">
			Здравствуйте,<br/>
			<b style="font-size: 15px;"><?php 
echo $_SESSION['iuser']['name'];
?>
</b><br/>
			<a href="/registration/logout/" class="exit"></a>
		</div>
		<?php 
MenuWidget::CabinetMenu();
?>
	</div>
</div>
Example #17
0
<div class="wrapper">
    <div class="column1">
        <?php 
$menu = new MenuWidget("/engine/protected/core/gmvc-core/lang/" . DEFAULT_LANG . ".json");
$menu->getMenu("GmvcController");
?>
    </div>
    <div class="column2">
        <h2>Генерация формы</h2>
        <form method="post">
            <div>
                Генерировать форму как:<br />
                <select name="genForm">
                    <option value="html">
                        HTML
                    </option>
                    <option value="widget">
                        Widget
                    </option>
                </select><br />
                Путь относительно папки "engine" до файла для создания формы: <br />
                <input type="text" name="pathForm" size="50" /><br />
                Атрибуты формы(method,action,class...) через запятую: <br />
                <input type="text" name="formAttrs" size="50" />

                    <table class="createForm">
                        <tr>
                            <td>Имя поля</td>
                            <td>Тип поля</td>
                            <td>Класс</td>
                            <td>Значение по умолчанию</td>
Example #18
0
				<?php 
}
?>
			</div>
			<div class="ltRow ltFullHeight <?php 
if (!in_array(Funcs::$uri[1], Funcs::$modMenu) && Funcs::$uri[1] != '') {
    ?>
cell_content_full<?php 
}
?>
">
				<?php 
if (Funcs::$uri[1] != 'work' && Funcs::$uri[1] != '') {
    ?>
                	<?php 
    echo MenuWidget::run();
    ?>
                <?php 
} else {
    ?>
					<?php 
    echo TreeWidget::run();
    ?>
				<?php 
}
?>
				{content}
			</div>
		</div>
	</section>
	<section class="popup popup_section-settings jsSectionSettingsPopup">
Example #19
0
								  <div class="zone"><?php 
    echo $item['name'];
    ?>
</div>
								  <div class="price"><?php 
    echo $item['path'];
    ?>
 руб. </div>
								  <div class="city"><?php 
    echo $item['value'];
    ?>
</div>
								</td>
							<?php 
}
?>
							</tr>
					   </table>
					</div>
				</div>
				<div id="courier" style="display: none;" class="inset">
					Доставка курьером
				</div>
			</div>
		</div>
	</div>
	<?php 
MenuWidget::BottomMenu();
?>
	<br clear="all" />
</div>
Example #20
0
<div id="content"><div class="common_padds"><div class="inline_block">
	<?php 
CrumbsWidget::run();
?>
	<div id="right_part" class="without_left"><div class="right_padds">
		<?php 
MenuWidget::FaqMenu();
?>
		<div class="faq_content faq_one">
			<h1><?php 
echo $name;
?>
</h1>
			<?php 
echo $fields['answer'];
?>
			<p><a href="/faq/" class="back_to">Вернуться в основной раздел</a></p>
		</div>
	</div></div>
</div></div></div>
Example #21
0
				</td>
			</tr>
		</table>
	</form>
	<script>
	function checkForm(){
		var f=0;
		$('#anketaform .required').each(function(){
			if (jQuery.trim($(this).val())==''){
				$(this).css('border','solid 1px red');
				f=1;
			}else{
				$(this).css('border','');
			}
		});
		if(f==1){
			return false;
		}else{
			return true;
		}
	}
</script>
</div>
<div class="left-block-content">
	<?php 
MenuWidget::LeftMenu();
?>
	<?php 
BannersWidget::run();
?>
</div>
Example #22
0
 /**
  * Inits the Top Navigation by adding some default items
  */
 public function init()
 {
     parent::init();
 }