private function showViewDialog() { // Build index template $INDEX = new NagVisIndexView($this->CORE); // Need to parse the header menu? if (cfg('index', 'headermenu')) { // Parse the header menu $HEADER = new NagVisHeaderMenu(cfg('index', 'headertemplate')); // Put rotation information to header menu if ($this->rotation != '') { $HEADER->setRotationEnabled(); } $INDEX->setHeaderMenu($HEADER->__toString()); } // Initialize overview view $this->VIEW = new NagVisOverviewView($this->CORE); // Maybe it is needed to handle the requested rotation if ($this->rotation != '') { $ROTATION = new FrontendRotation($this->rotation); $ROTATION->setStep('overview', '', $this->rotationStep); $this->VIEW->setRotation($ROTATION->getRotationProperties()); } $INDEX->setContent($this->VIEW->parse()); return $INDEX->parse(); }
private function showViewDialog() { // Only show when map name given if (!isset($this->url) || $this->url == '') { throw new NagVisException(l('No url given.')); } // Build index template $INDEX = new NagVisIndexView($this->CORE); // Need to parse the header menu? if (cfg('index', 'headermenu')) { // Parse the header menu $HEADER = new NagVisHeaderMenu(cfg('index', 'headertemplate')); // Put rotation information to header menu if ($this->rotation != '') { $HEADER->setRotationEnabled(); } $INDEX->setHeaderMenu($HEADER->__toString()); } // Initialize map view $this->VIEW = new NagVisUrlView($this->CORE, $this->url); // Maybe it is needed to handle the requested rotation if ($this->rotation != '') { $ROTATION = new FrontendRotation($this->rotation); $ROTATION->setStep('url', $this->url, $this->rotationStep); $this->VIEW->setRotation($ROTATION->getRotationProperties()); } $INDEX->setContent($this->VIEW->parse()); return $INDEX->parse(); }
public function parse($e) { global $CORE; $INDEX = new NagVisIndexView($CORE); $HEADER = new NagVisHeaderMenu(cfg('index', 'headertemplate')); $INDEX->setHeaderMenu($HEADER->__toString()); $INDEX->setContent($this->errorPage($e)); return $INDEX->parse(); }
private function showViewDialog() { global $AUTHORISATION; // Initialize map configuration $MAPCFG = new GlobalMapCfg($this->name); // Read the map configuration file (Only global section!) $MAPCFG->readMapConfig(ONLY_GLOBAL); // Get all source parameters $opts = $MAPCFG->getSourceParams(); // Build index template $INDEX = new NagVisIndexView($this->CORE); // Need to load the custom stylesheet? $customStylesheet = $MAPCFG->getValue(0, 'stylesheet'); if ($customStylesheet !== '') { $INDEX->setCustomStylesheet(path('html', 'global', 'styles', $customStylesheet)); } // Need to parse the header menu by config or url value? if (isset($opts['header_menu']) && $opts['header_menu']) { // Parse the header menu $HEADER = new NagVisHeaderMenu($MAPCFG->getValue(0, 'header_template'), $MAPCFG); // Put rotation information to header menu if ($this->rotation != '') { $HEADER->setRotationEnabled(); } $INDEX->setHeaderMenu($HEADER->__toString()); } // Initialize map view $this->VIEW = new NagVisMapView($this->CORE, $this->name); $this->VIEW->setParams($opts); // The user is searching for an object $this->VIEW->setSearch($this->search); // Enable edit mode for all objects if ($this->sAction == 'edit') { $this->VIEW->setEditMode(); } // Maybe it is needed to handle the requested rotation if ($this->rotation != '') { // Only allow the rotation if the user is permitted to use it if ($AUTHORISATION->isPermitted('Rotation', 'view', $this->rotation)) { $ROTATION = new FrontendRotation($this->rotation); $ROTATION->setStep('map', $this->name, $this->rotationStep); $this->VIEW->setRotation($ROTATION->getRotationProperties()); } } $INDEX->setContent($this->VIEW->parse()); return $INDEX->parse(); }