Esempio n. 1
0
 /**
  * Render this taskbar view
  * @param boolean $return true to return the rendered view, false to send it to the client
  * @return mixed null when provided $return is set to true; the rendered output when the provided $return is set to false
  */
 public function render($return = true)
 {
     $request = Zibo::getInstance()->getRequest();
     if (!$request) {
         return;
     }
     $baseUrl = $request->getBaseUrl() . Request::QUERY_SEPARATOR;
     $renderedPanels = array();
     $notificationPanels = $this->taskbar->getNotificationPanels();
     foreach ($notificationPanels as $panel) {
         $renderedPanels[] = $this->renderView($panel);
     }
     $applicationsMenu = $this->taskbar->getApplicationsMenu();
     $applicationsMenu->setBaseUrl($baseUrl);
     $settingsMenu = $this->taskbar->getSettingsMenu();
     $settingsMenu->setBaseUrl($baseUrl);
     $settingsMenu->orderItems();
     $this->set('applicationsMenu', $applicationsMenu);
     $this->set('settingsMenu', $settingsMenu);
     $this->set('notificationPanels', array_reverse($renderedPanels));
     $this->set('title', $this->taskbar->getTitle());
     $this->addStyle(self::STYLE_TASKBAR);
     $this->addJavascript(self::SCRIPT_CLICKMENU);
     $this->addInlineJavascript("\$('#taskbarApplications').clickMenu({start: 'left'}); \n \t\t\t\t" . "\$('#taskbarSettings').clickMenu({start: 'right'});");
     return parent::render($return);
 }
Esempio n. 2
0
 /**
  * Renders the notify container
  * @param boolean $return Flag to see if the output should be printed or returned
  * @return null|string
  */
 public function render($return = true)
 {
     $renderedNotificationViews = array();
     foreach ($this->notifications as $notificationView) {
         $renderedNotificationViews[] = $this->renderView($notificationView);
     }
     $this->set('notifications', $renderedNotificationViews);
     return parent::render($return);
 }
Esempio n. 3
0
 /**
  * Renders the sidebar
  * @param boolean $return True to return the rendered string, false to output it directly
  * @return null|string
  */
 public function render($return = true)
 {
     $renderedPanels = array();
     $panels = $this->sidebar->getPanels();
     foreach ($panels as $panel) {
         $renderedPanels[] = $this->renderView($panel);
     }
     $this->set('actions', $this->sidebar->getActions());
     $this->set('panels', $renderedPanels);
     $this->set('information', $this->sidebar->getInformation());
     $request = Zibo::getInstance()->getRequest();
     $baseUrl = $request->getBaseUrl() . Request::QUERY_SEPARATOR;
     $sidebarAction = $baseUrl . Module::ROUTE_SIDEBAR . Request::QUERY_SEPARATOR;
     $isVisible = SidebarController::isSidebarVisible() ? 'true' : 'false';
     $this->addStyle(self::STYLE_SIDEBAR);
     $this->addJavascript(self::SCRIPT_SIDEBAR);
     $this->addInlineJavascript("ziboAdminInitializeSidebar(" . $isVisible . ", '" . $sidebarAction . "');");
     return parent::render($return);
 }
Esempio n. 4
0
 /**
  * Renders this view
  * @param boolean $return True to return the rendered view, false to write it to the output
  * @return null|string
  */
 public function render($return = true)
 {
     $this->addTaskbar();
     $this->addSidebar();
     $this->set('_stylesIE', $this->getStylesForIE());
     $this->set('_title', $this->title);
     $this->set('_pageTitle', $this->pageTitle);
     return parent::render($return);
 }
Esempio n. 5
0
 /**
  * Renders this view
  * @param boolean $return
  * @return null|string
  */
 public function render($return = true)
 {
     return parent::render($return);
 }