24 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
48 $this->
setTitle($lng->txt(
"my_bms"));
53 $this->
id = (empty(
$_GET[
"bmf_id"]))
99 $next_class = $ilCtrl->getNextClass();
100 $cmd = $ilCtrl->getCmd(
"getHTML");
102 return $this->
$cmd();
108 $this->
setData(array(
"dummy"));
127 include_once(
"./Services/PersonalDesktop/classes/class.ilBookmarkFolder.php");
129 $this->num_bookmarks = $bm_items[
"bookmarks"];
130 $this->num_folders = $bm_items[
"folders"];
133 ($this->num_bookmarks > 0 || $this->num_folders > 0))
135 if ($ilUser->getPref(
"il_pd_bkm_mode") ==
'tree')
141 $this->
setRowTemplate(
"tpl.bookmark_pd_list.html",
"Services/PersonalDesktop");
149 if ($this->num_bookmarks == 0 && $this->num_folders == 0)
164 include_once(
"./Services/PersonalDesktop/classes/class.ilBookmarkExplorer.php");
168 "Services/PersonalDesktop");
170 $exp =
new ilBookmarkExplorer($ilCtrl->getLinkTargetByClass(
"ilpersonaldesktopgui",
"show"),
173 $exp->setEnableSmallMode(
true);
174 $exp->setTargetGet(
"bmf_id");
175 $exp->setSessionExpandVariable(
'mexpand');
176 $ilCtrl->setParameter($this,
"bmf_id", $this->
id);
177 $exp->setExpandTarget($ilCtrl->getLinkTargetByClass(
"ilpersonaldesktopgui",
"show"));
178 if (
$_GET[
"mexpand"] ==
"")
180 $expanded = $this->id;
184 $expanded =
$_GET[
"mexpand"];
186 $exp->setExpand($expanded);
187 $exp->setShowDetails($showdetails);
191 return $exp->getOutput();
203 $this->tpl->setVariable(
"FCOLSPAN", $this->
getColSpan());
204 if ($this->tpl->blockExists(
"block_footer"))
206 $this->tpl->setCurrentBlock(
"block_footer");
207 $this->tpl->parseCurrentBlock();
218 if ($this->num_bookmarks == 0 && $this->num_folders == 0)
224 if ($ilUser->getPref(
"il_pd_bkm_mode") ==
'tree')
227 $ilCtrl->getLinkTarget($this,
"setPdFlatMode"),
228 $ilCtrl->getLinkTarget($this,
"setPdFlatMode",
238 if ($ilUser->getPref(
"il_pd_bkm_mode") ==
'tree')
245 $ilCtrl->getLinkTarget($this,
247 $ilCtrl->getLinkTarget($this,
248 "setPdTreeMode",
"",
true),
261 include_once(
"./Services/PersonalDesktop/classes/class.ilBookmarkFolder.php");
270 $ilCtrl->setParameter($this,
"curBMFolder",
275 "alt" => $lng->txt(
"bmf"),
277 "link" => $ilCtrl->getLinkTarget($this,
"setCurrentBookmarkFolder"));
282 foreach ($bm_items as $bm_item)
284 switch ($bm_item[
"type"])
287 $ilCtrl->setParameter($this,
"curBMFolder", $bm_item[
"obj_id"]);
290 "alt" => $lng->txt(
"bmf"),
293 "link" => $ilCtrl->getLinkTarget($this,
294 "setCurrentBookmarkFolder"),
301 "alt" => $lng->txt(
"bm"),
305 "target" =>
"_blank");
320 $this->tpl->setVariable(
"IMG_BM", $a_set[
"img"]);
321 $this->tpl->setVariable(
"IMG_ALT", $a_set[
"alt"]);
322 $this->tpl->setVariable(
"BM_TITLE", $a_set[
"title"]);
323 $this->tpl->setVariable(
"BM_LINK", $a_set[
"link"]);
343 return '<div class="small">'.$this->num_bookmarks.
" ".$lng->txt(
"bm_num_bookmarks").
", ".
344 $this->num_folders.
" ".$lng->txt(
"bm_num_bookmark_folders").
"</div>";
354 $ilUser->writePref(
"il_pd_bkm_mode",
'flat');
355 if ($ilCtrl->isAsynch())
362 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");
373 $ilUser->writePref(
"il_pd_bkm_mode",
'tree');
374 if ($ilCtrl->isAsynch())
381 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");
393 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");