/**
  * @param ilCloudFileNode $node
  *
  * @return string
  */
 public function getLocatorHtml(ilCloudFileNode $node)
 {
     global $ilLocator;
     if ($node == $this->getFileTree()->getRootNode()) {
         $ilLocator = new ilLocatorGUI();
         $ilLocator->addItem($this->getPluginObject()->getCloudModulObject()->getTitle(), ilCloudPluginFileTreeGUI::getLinkToFolder($node));
     } else {
         $this->getLocatorHtml($this->getFileTree()->getNodeFromId($node->getParentId()));
         $ilLocator->addItem(basename($node->getPath()), $this->getLinkToFolder($node));
     }
     return "<DIV class='xcld_locator' id='xcld_locator_" . $node->getId() . "'>" . $ilLocator->getHTML() . "</DIV>";
 }
 function addToolbar($root_node)
 {
     global $lng, $ilToolbar, $tpl;
     $create_list_gui = ilCloudConnector::getItemCreationListGUIClass($this->getService());
     $list_gui_html = $create_list_gui->getGroupedListItemsHTML($this->getPermUploadItems(), $this->getPermCreateFolders());
     if ($list_gui_html) {
         // toolbar
         $ov_id = "il_add_new_cld_item_v";
         $ov_trigger_id = $ov_id . "_tr";
         $toolbar_locator = new ilLocatorGUI();
         $toolbar_locator->addItem($this->getGuiClass()->object->getTitle(), ilCloudPluginFileTreeGUI::getLinkToFolder($root_node));
         $ilToolbar->setId('xcld_toolbar');
         $ilToolbar->addText("<div class='xcld_locator'>" . $toolbar_locator->getHtml() . "</div>");
         $ilToolbar->addSeparator();
         $ilToolbar->addButton($lng->txt("cld_add_new_item"), "#", "", "", "", $ov_trigger_id, 'submit emphsubmit');
         include_once "Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
         $ov = new ilOverlayGUI($ov_id);
         $ov->add();
         $ov->addTrigger($ov_trigger_id, "click", $ov_trigger_id, false, "tl", "tr");
         $tpl->setVariable("SELECT_OBJTYPE_REPOS", '<div id="' . $ov_id . '" class="ilOverlay ilNoDisplay">' . $list_gui_html . '</div>');
     }
 }
 /**
  * @param $root_node
  */
 public function addToolbar($root_node)
 {
     global $lng, $ilToolbar, $ilLog;
     $create_list_gui = ilCloudConnector::getItemCreationListGUIClass($this->getService());
     $list_gui_html = $create_list_gui->getGroupedListItemsHTML($this->getPermUploadItems(), $this->getPermCreateFolders());
     if ($list_gui_html) {
         //toolbar
         $toolbar_locator = new ilLocatorGUI();
         $toolbar_locator->addItem($this->getGuiClass()->object->getTitle(), ilCloudPluginFileTreeGUI::getLinkToFolder($root_node));
         $ilToolbar->setId('xcld_toolbar');
         $ilToolbar->addText("<div class='xcld_locator'>" . $toolbar_locator->getHtml() . "</div>");
         $ilToolbar->addSeparator();
         include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
         $adv = new ilAdvancedSelectionListGUI();
         $adv->setListTitle($lng->txt("cld_add_new_item"));
         $ilCloudGroupedListGUI = $create_list_gui->getGroupedListItems($this->getPermUploadItems(), $this->getPermCreateFolders());
         if ($ilCloudGroupedListGUI->hasItems()) {
             $adv->setGroupedList($ilCloudGroupedListGUI);
         }
         $adv->setStyle(ilAdvancedSelectionListGUI::STYLE_EMPH);
         $ilToolbar->addText($adv->getHTML());
     }
 }