5 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
30 $this->
setTitle($lng->txt(
"my_bms"));
35 $this->
id = (empty(
$_GET[
"bmf_id"]))
81 $next_class = $ilCtrl->getNextClass();
82 $cmd = $ilCtrl->getCmd(
"getHTML");
109 include_once(
"./Services/Bookmarks/classes/class.ilBookmarkFolder.php");
111 $this->num_bookmarks = $bm_items[
"bookmarks"];
112 $this->num_folders = $bm_items[
"folders"];
115 ($this->num_bookmarks > 0 || $this->num_folders > 0))
117 if ($ilUser->getPref(
"il_pd_bkm_mode") ==
'tree')
123 $this->
setRowTemplate(
"tpl.bookmark_pd_list.html",
"Services/Bookmarks");
131 if ($this->num_bookmarks == 0 && $this->num_folders == 0)
146 include_once(
"./Services/Bookmarks/classes/class.ilBookmarkExplorer.php");
150 $exp =
new ilBookmarkExplorer($ilCtrl->getLinkTargetByClass(
"ilpersonaldesktopgui",
"show"),
153 $exp->setEnableSmallMode(
true);
154 $exp->setTargetGet(
"bmf_id");
155 $exp->setSessionExpandVariable(
'mexpand');
156 $ilCtrl->setParameter($this,
"bmf_id", $this->
id);
157 $exp->setExpandTarget($ilCtrl->getLinkTargetByClass(
"ilpersonaldesktopgui",
"show"));
158 if (
$_GET[
"mexpand"] ==
"")
160 $expanded = $this->id;
164 $expanded =
$_GET[
"mexpand"];
166 $exp->setExpand($expanded);
167 $exp->setShowDetails($showdetails);
171 return $exp->getOutput();
183 $this->tpl->setVariable(
"FCOLSPAN", $this->
getColSpan());
184 if ($this->tpl->blockExists(
"block_footer"))
186 $this->tpl->setCurrentBlock(
"block_footer");
187 $this->tpl->parseCurrentBlock();
198 if ($this->num_bookmarks == 0 && $this->num_folders == 0)
207 $ilCtrl->getLinkTarget($this,
"setPdFlatMode"),
208 $ilCtrl->getLinkTarget($this,
"setPdFlatMode",
211 false,
false, ($ilUser->getPref(
"il_pd_bkm_mode") !=
'tree'));
226 $ilCtrl->getLinkTarget($this,
228 $ilCtrl->getLinkTarget($this,
229 "setPdTreeMode",
"",
true),
231 false,
false, ($ilUser->getPref(
"il_pd_bkm_mode") ==
'tree')
243 include_once(
"./Services/Bookmarks/classes/class.ilBookmarkFolder.php");
247 $sess_cur_bm_folder =
"";
250 $sess_cur_bm_folder =
$_SESSION[
"ilCurBMFolder"];
258 $ilCtrl->setParameter($this,
"curBMFolder",
263 "alt" => $lng->txt(
"bmf"),
265 "link" => $ilCtrl->getLinkTarget($this,
"setCurrentBookmarkFolder"));
270 foreach ($bm_items as $bm_item)
272 switch ($bm_item[
"type"])
275 $ilCtrl->setParameter($this,
"curBMFolder", $bm_item[
"obj_id"]);
278 "alt" => $lng->txt(
"bmf"),
281 "link" => $ilCtrl->getLinkTarget($this,
282 "setCurrentBookmarkFolder"),
289 "alt" => $lng->txt(
"bm"),
293 "target" =>
"_blank");
308 $this->tpl->setVariable(
"IMG_BM", $a_set[
"img"]);
309 $this->tpl->setVariable(
"IMG_ALT", $a_set[
"alt"]);
310 $this->tpl->setVariable(
"BM_TITLE", $a_set[
"title"]);
311 $this->tpl->setVariable(
"BM_LINK", $a_set[
"link"]);
331 return '<div class="small">'.$this->num_bookmarks.
" ".$lng->txt(
"bm_num_bookmarks").
", ".
332 $this->num_folders.
" ".$lng->txt(
"bm_num_bookmark_folders").
"</div>";
342 $ilUser->writePref(
"il_pd_bkm_mode",
'flat');
343 if ($ilCtrl->isAsynch())
350 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");
361 $ilUser->writePref(
"il_pd_bkm_mode",
'tree');
362 if ($ilCtrl->isAsynch())
369 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");
381 $ilCtrl->redirectByClass(
"ilpersonaldesktopgui",
"show");