5 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
27 parent::__construct();
30 $this->
setTitle($lng->txt(
"my_bms"));
35 $this->
id = (empty(
$_GET[
"bmf_id"]))
47 return self::$block_type;
81 $next_class = $ilCtrl->getNextClass();
82 $cmd = $ilCtrl->getCmd(
"getHTML");
97 return parent::getHTML();
108 include_once(
"./Services/Bookmarks/classes/class.ilBookmarkFolder.php");
110 $this->num_bookmarks = $bm_items[
"bookmarks"];
111 $this->num_folders = $bm_items[
"folders"];
114 ($this->num_bookmarks > 0 || $this->num_folders > 0))
116 if ($ilUser->getPref(
"il_pd_bkm_mode") ==
'tree')
122 $this->
setRowTemplate(
"tpl.bookmark_pd_list.html",
"Services/Bookmarks");
125 parent::fillDataSection();
130 if ($this->num_bookmarks == 0 && $this->num_folders == 0)
145 include_once(
"./Services/Bookmarks/classes/class.ilBookmarkBlockExplorerGUI.php");
147 if (!$exp->handleCommand())
149 return "<div id='tree_div'>".$exp->getHTML().
"</div>";
162 $this->tpl->setVariable(
"FCOLSPAN", $this->
getColSpan());
163 if ($this->tpl->blockExists(
"block_footer"))
165 $this->tpl->setCurrentBlock(
"block_footer");
166 $this->tpl->parseCurrentBlock();
177 if ($this->num_bookmarks == 0 && $this->num_folders == 0)
184 $ilCtrl->getLinkTarget($this,
"setPdFlatMode"),
185 $ilCtrl->getLinkTarget($this,
"setPdFlatMode",
188 false,
false, ($ilUser->getPref(
"il_pd_bkm_mode") !=
'tree'));
192 $ilCtrl->getLinkTarget($this,
196 false,
false, ($ilUser->getPref(
"il_pd_bkm_mode") ==
'tree')
207 include_once(
"./Services/Bookmarks/classes/class.ilBookmarkFolder.php");
211 $sess_cur_bm_folder =
"";
214 $sess_cur_bm_folder =
$_SESSION[
"ilCurBMFolder"];
222 $ilCtrl->setParameter($this,
"curBMFolder",
227 "alt" => $lng->txt(
"bmf"),
229 "link" => $ilCtrl->getLinkTarget($this,
"setCurrentBookmarkFolder"));
234 foreach ($bm_items as $bm_item)
236 switch ($bm_item[
"type"])
239 $ilCtrl->setParameter($this,
"curBMFolder", $bm_item[
"obj_id"]);
242 "alt" => $lng->txt(
"bmf"),
245 "link" => $ilCtrl->getLinkTarget($this,
246 "setCurrentBookmarkFolder"),
253 "alt" => $lng->txt(
"bm"),
258 "target" =>
"_blank");
273 $this->tpl->setVariable(
"IMG_BM", $a_set[
"img"]);
274 $this->tpl->setVariable(
"IMG_ALT", $a_set[
"alt"]);
275 $this->tpl->setVariable(
"BM_TITLE", $a_set[
"title"]);
276 $this->tpl->setVariable(
"BM_LINK", $a_set[
"link"]);
278 if (isset($a_set[
'rel'])) {
279 $this->tpl->setVariable(
"BM_REL", $a_set[
'rel']);
299 return '<div class="small">'.$this->num_bookmarks.
" ".$lng->txt(
"bm_num_bookmarks").
", ".
300 $this->num_folders.
" ".$lng->txt(
"bm_num_bookmark_folders").
"</div>";
310 $ilUser->writePref(
"il_pd_bkm_mode",
'flat');
311 if ($ilCtrl->isAsynch())
318 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");
329 $ilUser->writePref(
"il_pd_bkm_mode",
'tree');
330 if ($ilCtrl->isAsynch())
337 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");
349 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
fillRow($a_set)
get flat bookmark list for personal desktop
static _getParentId($a_id)
addFooterLink($a_text, $a_href="", $a_onclick="", $a_block_id="", $a_top=false, $a_omit_separator=false, $a_checked=false)
Add a footer text/link.
BlockGUI class for Bookmarks block.
static _getNumberOfObjects()
Get number of folders and bookmarks for current user.
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
setFooterLinks()
Set footer links.
static isRootFolder($a_id)
executeCommand()
execute command
fillFooterLinks($a_top=false, $a_numinfo="")
Fill footer links.
static _lookupTitle($a_bmf_id)
lookup bookmark folder title
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
setCurrentBookmarkFolder()
set current bookmarkfolder on personal desktop
Bookmark block explorer GUI class.
static getBlockType()
Get block type.
setColSpan($a_colspan)
Set Columns Span.
static isRepositoryObject()
Is block used in repository object?
getOverview()
Get overview.
setImage($a_image)
Set Image.
setTitle($a_title)
Set Title.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
setData($a_data)
Set Data.
setAvailableDetailLevels($a_max, $a_min=0)
Set Available Detail Levels.
__construct()
Constructor.
Create styles array
The data for the language used.
getPDBookmarkListHTMLTree()
get tree bookmark list for personal desktop
setPdFlatMode()
set current desktop view mode to flat
getListRowData()
Get list data (for flat list).
setLimit($a_limit)
Set Limit.
fillDataSection()
Fill data section.
getColSpan()
Get Columns Span.
setPdTreeMode()
set current desktop view mode to tree
This class represents a block method of a block.
static getObjects($a_id)
static
setRowTemplate($a_rowtemplatename, $a_rowtemplatedir="")
Set Row Template Name.
static getScreenMode()
Get Screen Mode for current command.
setEnableDetailRow($a_enabledetailrow)
Set EnableDetailRow.
getCurrentDetailLevel()
Get Current Detail Level.