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 $exp =
new ilBookmarkExplorer($ilCtrl->getLinkTargetByClass(
"ilpersonaldesktopgui",
"show"),
171 $exp->setEnableSmallMode(
true);
172 $exp->setTargetGet(
"bmf_id");
173 $exp->setSessionExpandVariable(
'mexpand');
174 $ilCtrl->setParameter($this,
"bmf_id", $this->
id);
175 $exp->setExpandTarget($ilCtrl->getLinkTargetByClass(
"ilpersonaldesktopgui",
"show"));
176 if (
$_GET[
"mexpand"] ==
"")
178 $expanded = $this->id;
182 $expanded =
$_GET[
"mexpand"];
184 $exp->setExpand($expanded);
185 $exp->setShowDetails($showdetails);
189 return $exp->getOutput();
201 $this->tpl->setVariable(
"FCOLSPAN", $this->
getColSpan());
202 if ($this->tpl->blockExists(
"block_footer"))
204 $this->tpl->setCurrentBlock(
"block_footer");
205 $this->tpl->parseCurrentBlock();
216 if ($this->num_bookmarks == 0 && $this->num_folders == 0)
222 if ($ilUser->getPref(
"il_pd_bkm_mode") ==
'tree')
225 $ilCtrl->getLinkTarget($this,
"setPdFlatMode"),
226 $ilCtrl->getLinkTarget($this,
"setPdFlatMode",
236 if ($ilUser->getPref(
"il_pd_bkm_mode") ==
'tree')
243 $ilCtrl->getLinkTarget($this,
245 $ilCtrl->getLinkTarget($this,
246 "setPdTreeMode",
"",
true),
259 include_once(
"./Services/PersonalDesktop/classes/class.ilBookmarkFolder.php");
263 $sess_cur_bm_folder =
"";
266 $sess_cur_bm_folder =
$_SESSION[
"ilCurBMFolder"];
274 $ilCtrl->setParameter($this,
"curBMFolder",
279 "alt" => $lng->txt(
"bmf"),
281 "link" => $ilCtrl->getLinkTarget($this,
"setCurrentBookmarkFolder"));
286 foreach ($bm_items as $bm_item)
288 switch ($bm_item[
"type"])
291 $ilCtrl->setParameter($this,
"curBMFolder", $bm_item[
"obj_id"]);
294 "alt" => $lng->txt(
"bmf"),
297 "link" => $ilCtrl->getLinkTarget($this,
298 "setCurrentBookmarkFolder"),
305 "alt" => $lng->txt(
"bm"),
309 "target" =>
"_blank");
324 $this->tpl->setVariable(
"IMG_BM", $a_set[
"img"]);
325 $this->tpl->setVariable(
"IMG_ALT", $a_set[
"alt"]);
326 $this->tpl->setVariable(
"BM_TITLE", $a_set[
"title"]);
327 $this->tpl->setVariable(
"BM_LINK", $a_set[
"link"]);
347 return '<div class="small">'.$this->num_bookmarks.
" ".$lng->txt(
"bm_num_bookmarks").
", ".
348 $this->num_folders.
" ".$lng->txt(
"bm_num_bookmark_folders").
"</div>";
358 $ilUser->writePref(
"il_pd_bkm_mode",
'flat');
359 if ($ilCtrl->isAsynch())
366 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");
377 $ilUser->writePref(
"il_pd_bkm_mode",
'tree');
378 if ($ilCtrl->isAsynch())
385 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");
397 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");