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(); }