4 include_once(
"class.ilObjCloudGUI.php");
5 include_once(
"class.ilCloudFileNode.php");
6 include_once(
"class.ilCloudFileTree.php");
7 include_once(
"class.ilCloudConnector.php");
66 public function getFolderHtml(
ilObjCloudGUI $gui_class, $id, $delete_files =
false, $delete_folder =
false, $download =
false, $files_visible =
false, $folders_visible =
false)
77 $tree_tpl =
new ilTemplate(
"tpl.cloud_block.html",
true,
true,
"Modules/Cloud/");
79 if ($files_visible || $folders_visible)
81 $tree_tpl->setVariable(
"NODE_ID", $node->getId());
83 $block =
new ilTemplate(
"tpl.container_list_block.html",
true,
true,
"Services/Container/");
85 if ($node->hasChildren())
87 $block->setVariable(
"BLOCK_HEADER_CONTENT", $lng->txt(
"content"));
89 $children = $this->
getFileTree()->getSortedListOfChildren($node);
90 foreach ($children as
$path)
92 $child_node = $this->
getFileTree()->getNodeFromPath($path);
93 if (($child_node->getIsDir() && $folders_visible) || (!$child_node->getIsDir() && $files_visible))
96 $block->setCurrentBlock(
"container_standard_row");
97 if ($child_node->getIsDir())
99 $block->setVariable(
"ROW_ID",
"id=xcld_folder_" . $child_node->getId());
102 $block->setVariable(
"ROW_ID",
"id=xcld_file_" . $child_node->getId());
104 $block->setVariable(
"BLOCK_ROW_CONTENT", $this->
getItemHtml($child_node, $gui_class, $delete_files, $delete_folder, $download));
105 $block->parseCurrentBlock();
112 $tree_tpl->setVariable(
"CONTENT", $block->get());
118 $this->
setTreeVariablePlugin($tree_tpl, $gui_class, $id, $delete_files, $delete_folder, $download , $files_visible , $folders_visible );
119 return $tree_tpl->get();
151 $item =
new ilTemplate(
"tpl.container_list_item.html",
true,
true,
"Services/Container/");
154 $item->setVariable(
"COMMAND_SELECTION_LIST", $action_list_gui->getSelectionListItemsHTML($delete_files, $delete_folder, $node));
156 $item->setVariable(
"DIV_CLASS",
"ilContainerListItemOuter");
157 $item->touchBlock(
"d_1");
159 include_once(
'./Services/Calendar/classes/class.ilDate.php');
164 $item->setVariable(
"SRC_ICON", $node->
getIconPath());
172 $item->setVariable(
"SRC_ICON",
"./Modules/Cloud/templates/images/icon_folder_b.png");
174 $item->setVariable(
"TXT_TITLE_LINKED", basename($node->
getPath()));
178 $item->setVariable(
"HREF_TITLE_LINKED", $this->
getLinkToFolder($node));
191 $item->setVariable(
"SRC_ICON",
"./Modules/Cloud/templates/images/icon_file_b.png");
194 $item->setVariable(
"TXT_DESC", pathinfo($node->
getPath(), PATHINFO_EXTENSION) .
" " . $node->
getSize() .
" " . $modified);
197 $item->setVariable(
"TXT_TITLE_LINKED", basename($node->
getPath()));
198 $item->setVariable(
"HREF_TITLE_LINKED", $ilCtrl->getLinkTarget($gui_class,
"getFile") .
"&id=" . $node->
getId());
201 $item->setVariable(
"TXT_TITLE", basename($node->
getPath()));
232 return "<DIV class='xcld_locator' id='xcld_locator_" . $node->
getId() .
"'>" . $ilLocator->getHTML() .
"</DIV>";
241 return "#/open_folder?id_parent=" . $node->
getParentId() .
"¤t_id=" . $node->
getId().
"¤t_path=" . $node->
getPath();
247 $options->dropZone =
".ilFileUploadDropZone_1";
248 $options->fileInput =
"#ilFileUploadInput_1";
249 $options->submitButton =
"uploadFiles";
250 $options->cancelButton =
"cancelAll";
251 $options->dropArea =
".ilFileDropTarget";
252 $options->fileList =
"#ilFileUploadList_1";
253 $options->fileSelectButton =
"#ilFileUploadFileSelect_1";
254 echo
"<script language='javascript' type='text/javascript'>var fileUpload1 = new ilFileUpload(1, " .
ilJsonUtil::encode(
$options) .
");</script>";