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) {
75 $tree_tpl =
new ilTemplate(
"tpl.cloud_block.html",
true,
true,
"Modules/Cloud/");
77 if ($files_visible || $folders_visible) {
78 $tree_tpl->setVariable(
"NODE_ID", $node->getId());
80 $block =
new ilTemplate(
"tpl.container_list_block.html",
true,
true,
"Services/Container/");
82 if ($node->hasChildren()) {
83 $block->setVariable(
"BLOCK_HEADER_CONTENT", $lng->txt(
"content"));
85 $children = $this->
getFileTree()->getSortedListOfChildren($node);
86 foreach ($children as
$path) {
87 $child_node = $this->
getFileTree()->getNodeFromPath($path);
88 if (($child_node->getIsDir() && $folders_visible) || (!$child_node->getIsDir() && $files_visible)) {
90 $block->setCurrentBlock(
"container_standard_row");
91 if ($child_node->getIsDir()) {
92 $block->setVariable(
"ROW_ID",
"id=xcld_folder_" . $child_node->getId());
94 $block->setVariable(
"ROW_ID",
"id=xcld_file_" . $child_node->getId());
96 $block->setVariable(
"BLOCK_ROW_CONTENT", $this->
getItemHtml($child_node, $gui_class, $delete_files, $delete_folder, $download));
97 $block->parseCurrentBlock();
102 $tree_tpl->setVariable(
"CONTENT", $block->get());
107 $this->
setTreeVariablePlugin($tree_tpl, $gui_class, $id, $delete_files, $delete_folder, $download, $files_visible, $folders_visible);
109 return $tree_tpl->get();
143 $item =
new ilTemplate(
"tpl.container_list_item.html",
true,
true,
"Services/Container/");
146 $item->setVariable(
"COMMAND_SELECTION_LIST", $action_list_gui->getSelectionListItemsHTML($delete_files, $delete_folder, $node));
148 $item->setVariable(
"DIV_CLASS",
"ilContainerListItemOuter");
149 $item->touchBlock(
"d_1");
151 include_once(
'./Services/Calendar/classes/class.ilDate.php');
155 $item->setVariable(
"SRC_ICON", $node->
getIconPath());
164 $item->setVariable(
"TXT_DESC",
' ');
165 $item->setVariable(
"TXT_TITLE_LINKED", basename($node->
getPath()));
166 $item->setVariable(
"HREF_TITLE_LINKED", $this->
getLinkToFolder($node));
174 $item->setVariable(
"TXT_DESC",
175 pathinfo($node->
getPath(), PATHINFO_EXTENSION) .
" " . $node->
getSize() .
" " . $modified);
177 $item->setVariable(
"TXT_TITLE_LINKED", basename($node->
getPath()));
178 $item->setVariable(
"HREF_TITLE_LINKED", $ilCtrl->getLinkTarget($gui_class,
"getFile") .
"&id=" . $node->
getId());
180 $item->setVariable(
"TXT_TITLE", basename($node->
getPath()));
205 if ($node == $this->
getFileTree()->getRootNode()) {
213 return "<DIV class='xcld_locator' id='xcld_locator_" . $node->
getId() .
"'>" . $ilLocator->getHTML() .
"</DIV>";
223 return "#/open_folder?id_parent=" . $node->
getParentId() .
"¤t_id=" . $node->
getId() .
"¤t_path=" . $node->
getPath();
229 $options->dropZone =
".ilFileUploadDropZone_1";
230 $options->fileInput =
"#ilFileUploadInput_1";
231 $options->submitButton =
"uploadFiles";
232 $options->cancelButton =
"cancelAll";
233 $options->dropArea =
".ilFileDropTarget";
234 $options->fileList =
"#ilFileUploadList_1";
235 $options->fileSelectButton =
"#ilFileUploadFileSelect_1";
236 echo
"<script language='javascript' type='text/javascript'>var fileUpload1 = new ilFileUpload(1, " .
ilJsonUtil::encode(
$options)