4 include_once(
"class.ilCloudPluginGUI.php");
215 $ilTabs->activateTab(
"content");
232 $tpl->addJavaScript(
"./Modules/Cloud/js/ilCloudFileList.js");
233 $tpl->addJavaScript(
"./Modules/Cloud/js/jquery.address.js");
234 $tpl->addJavascript(
"./Services/UIComponent/AdvancedSelectionList/js/AdvancedSelectionList.js");
235 $tpl->addCss(
"./Modules/Cloud/templates/css/cloud.css");
237 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
240 $this->tpl_file_tree =
new ilTemplate(
"tpl.cloud_file_tree.html",
true,
true,
"Modules/Cloud");
242 $file_tree =
new ilCloudFileTree($this->getGUIClass()->object->getRootFolder(), $this->getGUIClass()->object->getRootId(), $this->getGUIClass()->object->getId(), $this->getGUIClass()->object->getServiceName());
247 $this->tpl_file_tree->setVariable(
"ASYNC_GET_BLOCK", json_encode($this->getGUIClass()->ctrl->getLinkTargetByClass(
"ilobjcloudgui",
"asyncGetBlock",
true)));
248 $this->tpl_file_tree->setVariable(
"ASYNC_CREATE_FOLDER", json_encode($this->getGUIClass()->ctrl->getLinkTargetByClass(
"ilcloudplugincreatefoldergui",
"asyncCreateFolder",
true)));
249 $this->tpl_file_tree->setVariable(
"ASYNC_UPLOAD_FILE", json_encode($this->getGUIClass()->ctrl->getLinkTargetByClass(
"ilcloudpluginuploadgui",
"asyncUploadFile",
true)));
250 $this->tpl_file_tree->setVariable(
"ASYNC_DELETE_ITEM", json_encode($this->getGUIClass()->ctrl->getLinkTargetByClass(
"ilcloudplugindeletegui",
"asyncDeleteItem",
true)));
251 $this->tpl_file_tree->setVariable(
"ROOT_ID", json_encode($file_tree->getRootNode()->getId()));
252 $this->tpl_file_tree->setVariable(
"ROOT_PATH", json_encode($file_tree->getRootNode()->getPath()));
253 if (isset(
$_POST[
"path"])) {
254 $this->tpl_file_tree->setVariable(
"CURRENT_PATH", json_encode(
$_POST[
"path"]));
255 $file_tree->updateFileTree(
$_POST[
"path"]);
256 $node = $file_tree->getNodeFromPath(
$_POST[
"path"]);
257 $this->tpl_file_tree->setVariable(
"CURRENT_ID", json_encode($node->getId()));
259 $this->tpl_file_tree->setVariable(
"CURRENT_PATH", json_encode($file_tree->getRootNode()->getPath()));
260 $this->tpl_file_tree->setVariable(
"CURRENT_ID", json_encode($file_tree->getRootNode()->getID()));
262 $txt_max_file_size = $lng->txt(
"file_notice") .
" "
264 ->getMaxFileSize() .
" MB";
265 $this->tpl_file_tree->setVariable(
"MAX_FILE_SIZE", json_encode($txt_max_file_size));
267 $tpl->setContent($this->tpl_file_tree->get());
268 $tpl->setPermanentLink(
"cld", $this->
getGuiClass()->object->getRefId(),
"_path__endPath");
298 $this->getGUIClass()->object->setAuthComplete(
false);
299 $this->getGUIClass()->object->doUpdate();
315 if ($list_gui_html) {
319 $ilToolbar->setId(
'xcld_toolbar');
320 $ilToolbar->addText(
"<div class='xcld_locator'>" . $toolbar_locator->getHtml() .
"</div>");
321 $ilToolbar->addSeparator();
323 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
325 $adv->setListTitle($lng->txt(
"cld_add_new_item"));
329 if ($ilCloudGroupedListGUI->hasItems()) {
330 $adv->setGroupedList($ilCloudGroupedListGUI);
334 $ilToolbar->addText($adv->getHTML());