ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilCloudPluginItemCreationListGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once('class.ilCloudPluginListGUI.php');
5require_once('./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php');
6require_once('./Services/FileUpload/classes/class.ilFileUploadGUI.php');
7require_once('./Modules/Cloud/classes/class.ilCloudGroupedListGUI.php');
8
20
24 protected $gl = null;
25
26
33 public function getGroupedListItemsHTML($showUpload = false, $showCreateFolders = false) {
34 $gl = $this->getGroupedListItems($showUpload, $showCreateFolders);
35
36 return $gl->getHTML();
37 }
38
39
46 public function getGroupedListItems($show_upload = false, $show_create_folders = false) {
47 global $DIC;
48 $lng = $DIC['lng'];
49
50 $this->gl = new ilCloudGroupedListGUI();
51
52 $this->addItemsBefore();
53 $this->gl->setAsDropDown(true);
54
55 if ($show_upload) {
57 $icon_path = ilUtil::getImagePath('icon_dcl_file.svg');
58 $img = ilUtil::img($icon_path);
59 $a_ttip = $lng->txt('cld_info_add_file_to_current_directory');
60 $this->gl->addEntry($img . ' '
61 . $lng->txt('cld_add_file'), '#', '_top', 'javascript:il.CloudFileList.uploadFile();', '', 'il_cld_add_file', $a_ttip, 'bottom center', 'top center', false);
62 }
63
64 if ($show_create_folders) {
65 $icon_path = ilUtil::getImagePath('icon_dcl_fold.svg');
66 $img1 = ilUtil::img($icon_path);
67 $a_ttip1 = $lng->txt('cld_info_add_folder_to_current_directory');
68 $this->gl->addEntry($img1 . ' '
69 . $lng->txt('cld_add_folder'), '#', '_top', 'javascript:il.CloudFileList.createFolder();', '', 'il_cld_add_file', $a_ttip1, 'bottom center', 'top center', false);
70 }
71
72 $this->addItemsAfter();
73
74 return $this->gl;
75 }
76
77
78 protected function addItemsBefore() {
79 }
80
81
82 protected function addItemsAfter() {
83 }
84}
An exception for terminatinating execution or to throw for unit testing.
Class ilCloudGroupedListGUI.
getGroupedListItemsHTML($showUpload=false, $showCreateFolders=false)
getGroupedListItems($show_upload=false, $show_create_folders=false)
Class ilCloudPluginListGUI.
static initFileUpload()
Initializes the file upload and loads the needed javascripts and styles.
static img($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
global $lng
Definition: privfeed.php:17
global $DIC