Exemplo n.º 1
0
 /**
  * Fill side icons (upper icon, tree icon, webfolder icon)
  */
 function fillSideIcons()
 {
     global $lng, $ilSetting;
     if ($this->upper_icon == "" && $this->tree_flat_link == "" && $this->mount_webfolder == "") {
         return;
     }
     // upper icon
     // deprecated
     if ($this->upper_icon != "") {
         /*if ($this->upper_icon_frame != "")
         			{
         				$this->setCurrentBlock("target_top");
         				$this->setVariable("TARGET_TOP", $this->upper_icon_frame);
         				$this->parseCurrentBlock();
         			}
         	
         			$this->setCurrentBlock("alt_top");
         			$this->setVariable("ALT_TOP", $lng->txt("up"));
         			$this->parseCurrentBlock();
         	
         			$this->setCurrentBlock("top");
         			$this->setVariable("LINK_TOP", $this->upper_icon);
         			$this->parseCurrentBlock();*/
     }
     // tree/flat icon
     if ($this->tree_flat_link != "") {
         if ($this->left_nav_content != "") {
             $this->touchBlock("tree_lns");
         }
         $this->setCurrentBlock("tree_mode");
         $this->setVariable("LINK_MODE", $this->tree_flat_link);
         if ($ilSetting->get("tree_frame") == "right") {
             if ($this->tree_flat_mode == "tree") {
                 $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
                 $this->setVariable("RIGHT", "Right");
             } else {
                 $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
                 $this->setVariable("RIGHT", "Right");
             }
         } else {
             if ($this->tree_flat_mode == "tree") {
                 $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
             } else {
                 $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
             }
         }
         $this->setVariable("ALT_TREE", $lng->txt($this->tree_flat_mode . "view"));
         $this->setVariable("TARGET_TREE", ilFrameTargetInfo::_getFrame("MainContent"));
         include_once "./Services/Accessibility/classes/class.ilAccessKeyGUI.php";
         $this->setVariable("TREE_ACC_KEY", ilAccessKeyGUI::getAttribute($this->tree_flat_mode == "tree" ? ilAccessKey::TREE_ON : ilAccessKey::TREE_OFF));
         $this->parseCurrentBlock();
     }
     // mount webfolder
     if ($this->mount_webfolder != "") {
         require_once 'Services/WebDAV/classes/class.ilDAVServer.php';
         $davServer = new ilDAVServer();
         $a_ref_id = $this->mount_webfolder;
         $a_link = $davServer->getMountURI($a_ref_id);
         $a_folder = $davServer->getFolderURI($a_ref_id);
         $this->setCurrentBlock("mount_webfolder");
         $this->setVariable("LINK_MOUNT_WEBFOLDER", $a_link);
         $this->setVariable("FOLDER_MOUNT_WEBFOLDER", $a_folder);
         $this->setVariable("IMG_MOUNT_WEBFOLDER", ilUtil::getImagePath("ic_mount_webfolder.png"));
         $this->setVariable("ALT_MOUNT_WEBFOLDER", $lng->txt("mount_webfolder"));
         $this->setVariable("TARGET_MOUNT_WEBFOLDER", '_blank');
         $this->parseCurrentBlock();
     }
     $this->setCurrentBlock("tree_icons");
     $this->parseCurrentBlock();
 }