ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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');
7
19
23 protected $gl = NULL;
24
25
32 public function getGroupedListItemsHTML($showUpload = false, $showCreateFolders = false) {
33 $gl = $this->getGroupedListItems($showUpload, $showCreateFolders);
34
35 return $gl->getHTML();
36 }
37
38
45 public function getGroupedListItems($show_upload = false, $show_create_folders = false) {
46 global $lng;
47
48 $this->gl = new ilCloudGroupedListGUI();
49
50 $this->addItemsBefore();
51 $this->gl->setAsDropDown(true);
52
53 if ($show_upload) {
55// $icon_path = './Modules/Cloud/templates/images/icon_file_s.svg';
56 $icon_path = ilUtil::getImagePath('icon_dcl_file.svg');
57 $img = ilUtil::img($icon_path);
58 $a_ttip = $lng->txt('cld_info_add_file_to_current_directory');
59 $this->gl->addEntry($img . ' '
60 . $lng->txt('cld_add_file'), 'javascript:il.CloudFileList.uploadFile();', '_top', '', '', 'il_cld_add_file', $a_ttip, 'bottom center', 'top center', false);
61 }
62
63 if ($show_create_folders) {
64// $icon_path = './Modules/Cloud/templates/images/icon_folder_s.svg';
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'), 'javascript:il.CloudFileList.createFolder();', '_top', '', '', '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}
85
94
98 protected $count = 0;
99
100
113 public function addEntry($a_content, $a_href = '', $a_target = '', $a_onclick = '', $a_add_class = '', $a_id = '', $a_ttip = '', $a_tt_my = 'right center', $a_tt_at = 'left center', $a_tt_use_htmlspecialchars = true) {
114 $this->count ++;
115 parent::addEntry($a_content, $a_href, $a_target, $a_onclick, $a_add_class, $a_id, $a_ttip, $a_tt_my, $a_tt_at, $a_tt_use_htmlspecialchars); // TODO: Change the autogenerated stub
116 }
117
118
123 public function addGroupHeader($a_content, $a_add_class = "") {
124 $this->count ++;
125 parent::addGroupHeader($a_content, $a_add_class); // TODO: Change the autogenerated stub
126 }
127
128
129 public function addSeparator() {
130 $this->count ++;
131 parent::addSeparator(); // TODO: Change the autogenerated stub
132 }
133
134
138 public function getCount() {
139 return $this->count;
140 }
141
142
146 public function hasItems() {
147 return $this->getCount() > 0;
148 }
149}
150
151?>
addEntry($a_content, $a_href='', $a_target='', $a_onclick='', $a_add_class='', $a_id='', $a_ttip='', $a_tt_my='right center', $a_tt_at='left center', $a_tt_use_htmlspecialchars=true)
addGroupHeader($a_content, $a_add_class="")
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.
Grouped list GUI class.
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:40