protected function addAdminLocatorItems() { $path = $this->tree->getPathFull($_GET["ref_id"], ilObjOrgUnit::getRootOrgRefId()); // add item for each node on path foreach ((array) $path as $key => $row) { if ($row["title"] == "__OrgUnitAdministration") { $row["title"] = $this->lng->txt("objs_orgu"); } $this->ctrl->setParameterByClass("ilobjorgunitgui", "ref_id", $row["child"]); $this->ilLocator->addItem($row["title"], $this->ctrl->getLinkTargetByClass("ilobjorgunitgui", "view"), ilFrameTargetInfo::_getFrame("MainContent"), $row["child"]); $this->ctrl->setParameterByClass("ilobjorgunitgui", "ref_id", $_GET["ref_id"]); } }
/** * get HTML * * @param * @return */ function render() { global $ilCtrl, $lng; $mtpl = new ilTemplate("tpl.media_sel_table.html", true, true, "Modules/MediaPool"); $pre = ""; if ($this->current_folder != $this->tree->getRootId() && !$this->all_objects) { $path = $this->tree->getPathFull($this->current_folder); include_once "./Services/Locator/classes/class.ilLocatorGUI.php"; $loc = new ilLocatorGUI(); foreach ($path as $p) { $ilCtrl->setParameter($this->parent_obj, $this->folder_par, $p["child"]); $title = $p["title"]; if ($this->tree->getRootId() == $p["child"]) { $title = ilObject::_lookupTitle($this->media_pool->getId()); } $loc->addItem($title, $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd)); } $ilCtrl->setParameter($this->parent_obj, $this->folder_par, $this->current_folder); $mtpl->setCurrentBlock("loc"); $mtpl->setVariable("LOC", $loc->getHTML()); $mtpl->parseCurrentBlock(); } $mtpl->setVariable("TABLE", parent::render()); return $mtpl->get(); }
/** * @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()); } }