Public Member Functions | |
| ilBookmarkAdministrationGUI ($bmf_id=0) | |
| Constructor public. | |
| frameset () | |
| output main frameset of bookmark administration left frame: explorer tree of bookmark folders right frame: content of bookmark folders | |
| explorer () | |
| output explorer tree with bookmark folders | |
| main_header () | |
| output main header (title and locator) | |
| view ($a_output_header=true) | |
| add_cell ($val, $link="") | |
| output a cell in object list | |
| displayLocator () | |
| display locator | |
| newFormBookmarkFolder () | |
| display new bookmark folder form | |
| editFormBookmarkFolder () | |
| display edit bookmark folder form | |
| newFormBookmark () | |
| display new bookmark form | |
| get_last ($a_var, $a_value) | |
| get stored post var in case of an error/warning otherwise return passed value | |
| editFormBookmark () | |
| display edit bookmark form | |
| createBookmarkFolder () | |
| create new bookmark folder in db | |
| updateBookmarkFolder () | |
| update bookmark folder | |
| createBookmark () | |
| create new bookmark in db | |
| updateBookmark () | |
| update bookmark in db | |
| delete () | |
| display deletion conformation screen | |
| cancel () | |
| cancel deletion | |
| confirm () | |
| deletion confirmed -> delete folders / bookmarks | |
| showActions () | |
| display copy, paste, ... | |
| showPossibleSubObjects () | |
| display subobject addition selection | |
Data Fields | |
| $user_id | |
| $ilias | |
| $tpl | |
| $lng | |
| $tree | |
| $id | |
| $data | |
Definition at line 41 of file class.ilBookmarkAdministrationGUI.php.
| ilBookmarkAdministrationGUI::add_cell | ( | $ | val, | |
| $ | link = "" | |||
| ) |
output a cell in object list
Definition at line 319 of file class.ilBookmarkAdministrationGUI.php.
{
if (!empty($link))
{
$this->tpl->setCurrentBlock("begin_link");
$this->tpl->setVariable("LINK_TARGET", $link);
$this->tpl->parseCurrentBlock();
$this->tpl->touchBlock("end_link");
}
$this->tpl->setCurrentBlock("text");
$this->tpl->setVariable("TEXT_CONTENT", $val);
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("table_cell");
$this->tpl->parseCurrentBlock();
}
| ilBookmarkAdministrationGUI::cancel | ( | ) |
cancel deletion
Definition at line 672 of file class.ilBookmarkAdministrationGUI.php.
References view().
{
session_unregister("saved_post");
$this->view();
}
Here is the call graph for this function:| ilBookmarkAdministrationGUI::confirm | ( | ) |
deletion confirmed -> delete folders / bookmarks
Definition at line 681 of file class.ilBookmarkAdministrationGUI.php.
References $_SESSION, $id, $objDefinition, $rbacadmin, $rbacsystem, $tree, $type, main_header(), sendInfo(), and view().
{
global $tree, $rbacsystem, $rbacadmin, $objDefinition;
// AT LEAST ONE OBJECT HAS TO BE CHOSEN.
if (!isset($_SESSION["saved_post"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
// FOR ALL SELECTED OBJECTS
foreach ($_SESSION["saved_post"] as $id)
{
list($type, $id) = explode(":", $id);
// get node data and subtree nodes
$node_data = $this->tree->getNodeData($id);
$subtree_nodes = $this->tree->getSubTree($node_data);
// delete tree
$this->tree->deleteTree($node_data);
// delete objects of subtree nodes
foreach ($subtree_nodes as $node)
{
switch ($node["type"])
{
case "bmf":
$BookmarkFolder = new ilBookmarkFolder($node["obj_id"]);
$BookmarkFolder->delete();
break;
case "bm":
$Bookmark = new ilBookmark($node["obj_id"]);
$Bookmark->delete();
break;
}
}
}
$this->main_header();
// Feedback
sendInfo($this->lng->txt("info_deleted"),true);
$this->view(false);
}
Here is the call graph for this function:| ilBookmarkAdministrationGUI::createBookmark | ( | ) |
create new bookmark in db
Definition at line 533 of file class.ilBookmarkAdministrationGUI.php.
References $_POST, ilUtil::redirect(), sendInfo(), and view().
{
// check title and target
if (empty($_POST["title"]))
{
//$this->ilias->raiseError($this->lng->txt("please_enter_title"),$this->ilias->error_obj->MESSAGE);
sendInfo($this->lng->txt("please_enter_title"), true);
ilUtil::redirect("usr_bookmarks.php?bmf_id=".$this->id."&cmd=newForm&type=bm");
}
if (empty($_POST["target"]))
{
//$this->ilias->raiseError($this->lng->txt("please_enter_target"),$this->ilias->error_obj->MESSAGE);
sendInfo($this->lng->txt("please_enter_target"), true);
ilUtil::redirect("usr_bookmarks.php?bmf_id=".$this->id."&cmd=newForm&type=bm");
}
// create bookmark
$bm = new ilBookmark();
$bm->setTitle($_POST["title"]);
$bm->setTarget($_POST["target"]);
$bm->setParent($this->id);
$bm->create();
$this->view();
}
Here is the call graph for this function:| ilBookmarkAdministrationGUI::createBookmarkFolder | ( | ) |
create new bookmark folder in db
Definition at line 489 of file class.ilBookmarkAdministrationGUI.php.
References $_POST, ilUtil::redirect(), sendInfo(), and view().
{
// check title
if (empty($_POST["title"]))
{
//$this->ilias->raiseError($this->lng->txt("please_enter_title"),$this->ilias->error_obj->MESSAGE);
sendInfo($this->lng->txt("please_enter_title"), true);
ilUtil::redirect("usr_bookmarks.php?bmf_id=".$this->id."&cmd=newForm&type=bmf");
}
// create bookmark folder
$bmf = new ilBookmarkFolder();
$bmf->setTitle($_POST["title"]);
$bmf->setParent($this->id);
$bmf->create();
$this->view();
}
Here is the call graph for this function:| ilBookmarkAdministrationGUI::delete | ( | ) |
display deletion conformation screen
Definition at line 586 of file class.ilBookmarkAdministrationGUI.php.
References $_POST, $_SESSION, $counter, $id, $obj_id, $type, ilUtil::getImagePath(), ilUtil::getImageTagByType(), main_header(), sendInfo(), and ilUtil::switchColor().
{
$this->main_header();
if (!isset($_POST["id"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
$this->tpl->addBlockFile("ADM_CONTENT", "objects", "tpl.obj_confirm.html");
sendInfo($this->lng->txt("info_delete_sure"));
$this->tpl->setVariable("FORMACTION", "usr_bookmarks.php?bmf_id=".$this->id."&cmd=post");
// output table header
$cols = array("type", "title", "bookmark_target");
foreach ($cols as $key)
{
$this->tpl->setCurrentBlock("table_header");
$this->tpl->setVariable("TEXT",$this->lng->txt($key));
$this->tpl->parseCurrentBlock();
}
$_SESSION["saved_post"] = $_POST["id"];
foreach($_POST["id"] as $id)
{
list($type, $obj_id) = explode(":", $id);
switch($type)
{
case "bmf":
$BookmarkFolder = new ilBookmarkFolder($obj_id);
$title = $BookmarkFolder->getTitle();
$target = " ";
unset($BookmarkFolder);
break;
case "bm":
$Bookmark = new ilBookmark($obj_id);
$title = $Bookmark->getTitle();
$target = $Bookmark->getTarget();
unset($Bookmark);
break;
}
// output type icon
$this->tpl->setCurrentBlock("table_cell");
$img_type = ($type == "bmf") ? "cat" : $type;
$this->tpl->setVariable("TEXT_CONTENT",ilUtil::getImageTagByType($img_type, $this->tpl->tplPath));
$this->tpl->parseCurrentBlock();
// output title
$this->tpl->setCurrentBlock("table_cell");
$this->tpl->setVariable("TEXT_CONTENT", $title);
$this->tpl->parseCurrentBlock();
// output target
$this->tpl->setCurrentBlock("table_cell");
$this->tpl->setVariable("TEXT_CONTENT", $target);
$this->tpl->parseCurrentBlock();
// output table row
$this->tpl->setCurrentBlock("table_row");
$this->tpl->setVariable("CSS_ROW",ilUtil::switchColor(++$counter,"tblrow1","tblrow2"));
$this->tpl->parseCurrentBlock();
}
// cancel and confirm button
$buttons = array( "cancel" => $this->lng->txt("cancel"),
"confirm" => $this->lng->txt("confirm"));
$this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.gif"));
foreach($buttons as $name => $value)
{
$this->tpl->setCurrentBlock("operation_btn");
$this->tpl->setVariable("BTN_NAME",$name);
$this->tpl->setVariable("BTN_VALUE",$value);
$this->tpl->parseCurrentBlock();
}
}
Here is the call graph for this function:| ilBookmarkAdministrationGUI::displayLocator | ( | ) |
display locator
Definition at line 339 of file class.ilBookmarkAdministrationGUI.php.
References $lng, $path, and $row.
Referenced by main_header().
{
global $lng;
if (empty($this->id))
{
return;
}
$this->tpl->addBlockFile("LOCATOR", "locator", "tpl.locator.html");
$path = $this->tree->getPathFull($this->id);
$modifier = 1;
$this->tpl->setVariable("TXT_LOCATOR",$this->lng->txt("locator"));
$this->tpl->touchBlock("locator_separator");
$this->tpl->setCurrentBlock("locator_item");
$this->tpl->setVariable("ITEM", $this->lng->txt("personal_desktop"));
$this->tpl->setVariable("LINK_ITEM", "usr_personaldesktop.php");
$this->tpl->setVariable("LINK_TARGET","target=\"bottom\"");
$this->tpl->parseCurrentBlock();
foreach ($path as $key => $row)
{
if ($key < count($path)-$modifier)
{
$this->tpl->touchBlock("locator_separator");
}
$this->tpl->setCurrentBlock("locator_item");
$title = ($row["child"] == 1) ?
$lng->txt("bookmarks") :
$row["title"];
$this->tpl->setVariable("ITEM", $title);
// TODO: SCRIPT NAME HAS TO BE VARIABLE!!!
$this->tpl->setVariable("LINK_ITEM", "usr_bookmarks.php?bmf_id=".$row["child"]);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("locator");
$this->tpl->parseCurrentBlock();
}
Here is the caller graph for this function:| ilBookmarkAdministrationGUI::editFormBookmark | ( | ) |
display edit bookmark form
Definition at line 462 of file class.ilBookmarkAdministrationGUI.php.
References $_GET, $lng, $tpl, get_last(), and main_header().
{
global $tpl, $lng;
$this->main_header();
$tpl->addBlockFile("ADM_CONTENT", "objects", "tpl.bookmark_new.html");
$tpl->setVariable("TXT_BOOKMARK_NEW", $lng->txt("bookmark_edit"));
$tpl->setVariable("TXT_TARGET", $lng->txt("bookmark_target"));
$tpl->setVariable("TXT_TITLE", $lng->txt("title"));
$Bookmark = new ilBookmark($_GET["obj_id"]);
$tpl->setVariable("TITLE", $this->get_last("title", $Bookmark->getTitle()));
$tpl->setVariable("TARGET", $this->get_last("target", $Bookmark->getTarget()));
$tpl->setVariable("TXT_SAVE", $lng->txt("save"));
$tpl->setVariable("FORMACTION", "usr_bookmarks.php?obj_id=".$_GET["obj_id"].
"&bmf_id=".$this->id."&cmd=updateBookmark");
$tpl->parseCurrentBlock();
}
Here is the call graph for this function:| ilBookmarkAdministrationGUI::editFormBookmarkFolder | ( | ) |
display edit bookmark folder form
Definition at line 406 of file class.ilBookmarkAdministrationGUI.php.
References $_GET, $lng, $tpl, get_last(), and main_header().
{
global $tpl, $lng;
$this->main_header();
$tpl->addBlockFile("ADM_CONTENT", "objects", "tpl.bookmark_newfolder.html");
$bmf = new ilBookmarkFolder($_GET["obj_id"]);
$tpl->setVariable("TXT_TITLE", $lng->txt("title"));
$tpl->setVariable("TITLE", $this->get_last("title", $bmf->getTitle()));
$tpl->setVariable("TXT_SAVE", $lng->txt("save"));
$tpl->setVariable("TXT_FOLDER_NEW", $lng->txt("bookmark_folder_edit"));
$tpl->setVariable("FORMACTION", "usr_bookmarks.php?obj_id=".$_GET["obj_id"].
"&bmf_id=".$this->id."&cmd=updateBookmarkFolder");
}
Here is the call graph for this function:| ilBookmarkAdministrationGUI::explorer | ( | ) |
output explorer tree with bookmark folders
Definition at line 105 of file class.ilBookmarkAdministrationGUI.php.
References $_GET, $_SESSION, $exp, $expanded, and $output.
{
//$this->tpl = new ilTemplate("tpl.explorer.html", false, false);
$this->tpl->addBlockFile("CONTENT", "content", "tpl.explorer.html");
$exp = new ilBookmarkExplorer("usr_bookmarks.php",$_SESSION["AccountId"]);
$exp->setTargetGet("bmf_id");
if ($_GET["mexpand"] == "")
{
$mtree = new ilTree($_SESSION["AccountId"]);
$mtree->setTableNames('bookmark_tree','bookmark_data');
$expanded = $mtree->readRootId();
}
else
{
$expanded = $_GET["mexpand"];
}
$exp->setExpand($expanded);
// build html-output
$exp->setOutput(0);
$output = $exp->getOutput();
$this->tpl->setCurrentBlock("content");
$this->tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("bookmarks"));
$this->tpl->setVariable("EXP_REFRESH", $this->lng->txt("refresh"));
$this->tpl->setVariable("EXPLORER",$output);
$this->tpl->setVariable("ACTION", "usr_bookmarks.php?cmd=explorer&mexpand=".$_GET["mexpand"]);
$this->tpl->parseCurrentBlock();
}
| ilBookmarkAdministrationGUI::frameset | ( | ) |
output main frameset of bookmark administration left frame: explorer tree of bookmark folders right frame: content of bookmark folders
Definition at line 97 of file class.ilBookmarkAdministrationGUI.php.
{
$this->tpl = new ilTemplate("tpl.bookmark_frameset.html", false, false);
}
| ilBookmarkAdministrationGUI::get_last | ( | $ | a_var, | |
| $ | a_value | |||
| ) |
get stored post var in case of an error/warning otherwise return passed value
Definition at line 452 of file class.ilBookmarkAdministrationGUI.php.
References $_SESSION.
Referenced by editFormBookmark(), editFormBookmarkFolder(), newFormBookmark(), and newFormBookmarkFolder().
Here is the caller graph for this function:| ilBookmarkAdministrationGUI::ilBookmarkAdministrationGUI | ( | $ | bmf_id = 0 |
) |
Constructor public.
| integer | user_id (optional) |
Definition at line 68 of file class.ilBookmarkAdministrationGUI.php.
References $_SESSION, $ilias, $lng, and $tpl.
{
global $ilias, $tpl, $lng;
// if no bookmark folder id is given, take dummy root node id (that is 1)
if (empty($bmf_id))
{
$bmf_id = 1;
}
// initiate variables
$this->ilias =& $ilias;
$this->tpl =& $tpl;
$this->lng =& $lng;
$this->user_id = $_SESSION["AccountId"];
$this->id = $bmf_id;
$this->tree = new ilTree($_SESSION["AccountId"]);
$this->tree->setTableNames('bookmark_tree','bookmark_data');
$this->root_id = $this->tree->readRootId();
}
| ilBookmarkAdministrationGUI::main_header | ( | ) |
output main header (title and locator)
Definition at line 142 of file class.ilBookmarkAdministrationGUI.php.
References $ilias, $lng, $tpl, displayLocator(), infoPanel(), and sendInfo().
Referenced by confirm(), delete(), editFormBookmark(), editFormBookmarkFolder(), newFormBookmark(), newFormBookmarkFolder(), and view().
{
global $lng, $tpl,$ilias;
$this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
$this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
// output locator
$this->displayLocator();
// output message
if($this->message)
{
sendInfo($this->message);
}
// display infopanel if something happened
infoPanel();
$this->tpl->setVariable("HEADER", $this->lng->txt("personal_desktop"));
// display tabs
include "./include/inc.personaldesktop_buttons.php";
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilBookmarkAdministrationGUI::newFormBookmark | ( | ) |
display new bookmark form
Definition at line 428 of file class.ilBookmarkAdministrationGUI.php.
References $lng, $tpl, get_last(), and main_header().
{
global $tpl, $lng;
$this->main_header();
$tpl->addBlockFile("ADM_CONTENT", "objects", "tpl.bookmark_new.html");
$tpl->setVariable("TXT_BOOKMARK_NEW", $lng->txt("bookmark_new"));
$tpl->setVariable("TXT_TARGET", $lng->txt("bookmark_target"));
$tpl->setVariable("TXT_TITLE", $lng->txt("title"));
$tpl->setVariable("TITLE", $this->get_last("title", ""));
$tpl->setVariable("TARGET", $this->get_last("target", "http://"));
$tpl->setVariable("TXT_SAVE", $lng->txt("save"));
$tpl->setVariable("FORMACTION", "usr_bookmarks.php?bmf_id=".$this->id."&cmd=createBookmark");
$tpl->parseCurrentBlock();
}
Here is the call graph for this function:| ilBookmarkAdministrationGUI::newFormBookmarkFolder | ( | ) |
display new bookmark folder form
Definition at line 388 of file class.ilBookmarkAdministrationGUI.php.
References $lng, $tpl, get_last(), and main_header().
{
global $tpl, $lng;
$this->main_header();
$tpl->addBlockFile("ADM_CONTENT", "objects", "tpl.bookmark_newfolder.html");
$tpl->setVariable("TITLE", $this->get_last("title", ""));
$tpl->setVariable("TXT_TITLE", $lng->txt("title"));
$tpl->setVariable("TXT_SAVE", $lng->txt("save"));
$tpl->setVariable("TXT_FOLDER_NEW", $lng->txt("bookmark_folder_new"));
$tpl->setVariable("FORMACTION", "usr_bookmarks.php?bmf_id=".$this->id."&cmd=createBookmarkFolder");
}
Here is the call graph for this function:| ilBookmarkAdministrationGUI::showActions | ( | ) |
display copy, paste, ...
actions
Definition at line 734 of file class.ilBookmarkAdministrationGUI.php.
References $_SESSION, $d, $objDefinition, and $row.
{
global $objDefinition;
$notoperations = array();
// NO PASTE AND CLEAR IF CLIPBOARD IS EMPTY
if (empty($_SESSION["clipboard"]))
{
$notoperations[] = "paste";
$notoperations[] = "clear";
}
// CUT COPY PASTE LINK DELETE IS NOT POSSIBLE IF CLIPBOARD IS FILLED
if ($_SESSION["clipboard"])
{
$notoperations[] = "cut";
$notoperations[] = "copy";
$notoperations[] = "link";
}
$operations = array();
$d = $objDefinition->getActions("bmf");
foreach ($d as $row)
{
if (!in_array($row["name"], $notoperations))
{
$operations[] = $row;
}
}
if (count($operations)>0)
{
foreach ($operations as $val)
{
$this->tpl->setCurrentBlock("operation_btn");
$this->tpl->setVariable("BTN_NAME", $val["lng"]);
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt($val["lng"]));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("operation");
$this->tpl->parseCurrentBlock();
}
}
| ilBookmarkAdministrationGUI::showPossibleSubObjects | ( | ) |
display subobject addition selection
Definition at line 783 of file class.ilBookmarkAdministrationGUI.php.
References $count, $d, $objDefinition, $row, and formSelect().
Referenced by view().
{
global $objDefinition;
$d = $objDefinition->getCreatableSubObjects("bmf");
if (count($d) > 0)
{
foreach ($d as $row)
{
$count = 0;
if ($row["max"] > 0)
{
//how many elements are present?
for ($i=0; $i<count($this->data["ctrl"]); $i++)
{
if ($this->data["ctrl"][$i]["type"] == $row["name"])
{
$count++;
}
}
}
if ($row["max"] == "" || $count < $row["max"])
{
$subobj[] = $row["name"];
}
}
}
if (is_array($subobj))
{
//build form
$opts = ilUtil::formSelect("","type",$subobj);
$this->tpl->setCurrentBlock("add_object");
$this->tpl->setVariable("COLUMN_COUNTS", 7);
$this->tpl->setVariable("SELECT_OBJTYPE", $opts);
$this->tpl->setVariable("BTN_NAME", "newForm");
$this->tpl->setVariable("TXT_ADD", $this->lng->txt("add"));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setVariable("TPLPATH",$this->tpl->tplPath);
$this->tpl->setCurrentBlock("tbl_action_select");
//$this->tpl->setVariable("SELECT_ACTION",ilUtil::formSelect("","action_type",$actions,false,true));
$this->tpl->setVariable("BTN_NAME","delete");
$this->tpl->setVariable("BTN_VALUE",$this->lng->txt("delete"));
$this->tpl->parseCurrentBlock();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilBookmarkAdministrationGUI::updateBookmark | ( | ) |
update bookmark in db
Definition at line 562 of file class.ilBookmarkAdministrationGUI.php.
References $_GET, $_POST, and view().
{
// check title and target
if (empty($_POST["title"]))
{
$this->ilias->raiseError($this->lng->txt("please_enter_title"),$this->ilias->error_obj->MESSAGE);
}
if (empty($_POST["target"]))
{
$this->ilias->raiseError($this->lng->txt("please_enter_target"),$this->ilias->error_obj->MESSAGE);
}
// update bookmark
$bm = new ilBookmark($_GET["obj_id"]);
$bm->setTitle($_POST["title"]);
$bm->setTarget($_POST["target"]);
$bm->update();
$this->view();
}
Here is the call graph for this function:| ilBookmarkAdministrationGUI::updateBookmarkFolder | ( | ) |
update bookmark folder
Definition at line 513 of file class.ilBookmarkAdministrationGUI.php.
References $_GET, $_POST, and view().
{
// check title
if (empty($_POST["title"]))
{
$this->ilias->raiseError($this->lng->txt("please_enter_title"),$this->ilias->error_obj->MESSAGE);
}
// update bookmark folder
$bmf = new ilBookmarkFolder($_GET["obj_id"]);
$bmf->setTitle($_POST["title"]);
$bmf->update();
$this->view();
}
Here is the call graph for this function:| ilBookmarkAdministrationGUI::view | ( | $ | a_output_header = true |
) |
Definition at line 172 of file class.ilBookmarkAdministrationGUI.php.
References $_SESSION, $rbacsystem, $tbl, $tree, ilFrameTargetInfo::_getFrame(), ilUtil::getImagePath(), ilBookmarkFolder::getObjects(), main_header(), showPossibleSubObjects(), and ilUtil::switchColor().
Referenced by cancel(), confirm(), createBookmark(), createBookmarkFolder(), updateBookmark(), and updateBookmarkFolder().
{
global $tree, $rbacsystem;
include_once("classes/class.ilFrameTargetInfo.php");
$mtree = new ilTree($_SESSION["AccountId"]);
$mtree->setTableNames('bookmark_tree','bookmark_data');
if ($a_output_header)
{
$this->main_header();
}
$this->tpl->addBlockFile("ADM_CONTENT", "objects", "tpl.table.html");
$this->tpl->setVariable("FORMACTION", "usr_bookmarks.php?bmf_id=".$this->id."&cmd=post");
$objects = ilBookmarkFolder::getObjects($this->id);
$this->tpl->setCurrentBlock("objects");
$this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.bookmark_row.html");
$cnt = 0;
// return to parent folder
if ($this->id != $mtree->readRootId() || $this->id =="")
{
$this->tpl->setCurrentBlock("tbl_content");
// color changing
$css_row = ilUtil::switchColor($cnt++,"tblrow1","tblrow2");
$this->tpl->setVariable("CHECKBOX", " ");
$this->tpl->setVariable("ROWCOL", $css_row);
$val = ilUtil::getImagePath("icon_cat.gif");
$this->tpl->setVariable("IMG", $val);
// title
$link = "usr_bookmarks.php?bmf_id=".$mtree->getParentId($this->id);
$this->tpl->setVariable("TXT_TITLE", "..");
$this->tpl->setVariable("LINK_TARGET", $link);
$this->tpl->setVariable("FRAME_TARGET", ilFrameTargetInfo::_getFrame("MainContent"));
$this->tpl->parseCurrentBlock();
}
foreach ($objects as $key => $object)
{
// type icon
$link = ($object["type"] == "bmf") ?
"usr_bookmarks.php?cmd=editForm&type=bmf&obj_id=".$object["obj_id"]."&bmf_id=".$this->id :
"usr_bookmarks.php?cmd=editForm&type=bm&obj_id=".$object["obj_id"]."&bmf_id=".$this->id;
$this->tpl->setCurrentBlock("tbl_content");
// edit link
$this->tpl->setCurrentBlock("edit");
$this->tpl->setVariable("TXT_EDIT", $this->lng->txt("edit"));
$this->tpl->setVariable("LINK_EDIT", $link);
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("tbl_content");
// color changing
$css_row = ilUtil::switchColor($cnt++,"tblrow1","tblrow2");
// surpress checkbox for particular object types
//$this->tpl->setVariable("CHECKBOX_ID", $object["type"].":".$object["obj_id"]);
$this->tpl->setVariable("CHECKBOX",ilUtil::formCheckBox("", "id[]", $object["type"].":".$object["obj_id"]));
$this->tpl->setVariable("ROWCOL", $css_row);
$img_type = ($object["type"] == "bmf") ? "cat" : $object["type"];
$val = ilUtil::getImagePath("icon_".$img_type.".gif");
$this->tpl->setVariable("IMG", $val);
// title
$link = ($object["type"] == "bmf") ?
"usr_bookmarks.php?bmf_id=".$object["obj_id"] :
$object["target"];
$this->tpl->setVariable("TXT_TITLE", $object["title"]);
$this->tpl->setVariable("LINK_TARGET", $link);
if ($object["type"] == "bmf")
{
$this->tpl->setVariable("FRAME_TARGET", ilFrameTargetInfo::_getFrame("MainContent"));
}
else
{
$this->tpl->setVariable("FRAME_TARGET", ilFrameTargetInfo::_getFrame("ExternalContent"));
}
// target
$this->tpl->setVariable("TXT_TARGET", $object["target"]);
$this->tpl->parseCurrentBlock();
}
$tbl = new ilTableGUI();
if (!empty($this->id) && $this->id != 1)
{
$BookmarkFolder = new ilBookmarkFolder($this->id);
$addstr = " ".$this->lng->txt("in")." ".$BookmarkFolder->getTitle();
}
else
{
$addstr = "";
}
// title & header columns
$tbl->setTitle($this->lng->txt("bookmarks").$addstr,
"icon_bm.gif", $this->lng->txt("bookmarks"));
//$tbl->setHelp("tbl_help.php","icon_help.gif",$this->lng->txt("help"));
$tbl->setHeaderNames(array("", $this->lng->txt("type"), $this->lng->txt("title"),
$this->lng->txt("bookmark_target"), ""));
$tbl->setHeaderVars(array("", "type", "title", "target", "commands"),
array("bmf_id" => $this->id));
$tbl->setColumnWidth(array("1", "1", "", "", ""));
//$tbl->setOrderColumn($_GET["sort_by"]);
//$tbl->setOrderDirection($_GET["sort_order"]);
$tbl->setLimit($limit);
$tbl->setOffset($offset);
$tbl->setMaxCount($maxcount);
// footer
$tbl->setFooter("tblfooter", $this->lng->txt("previous"),$this->lng->txt("next"));
//$tbl->disable("content");
$tbl->disable("footer");
$tbl->disable("header");
// render table
$tbl->render();
// SHOW POSSIBLE SUB OBJECTS
$this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.gif"));
$this->tpl->setVariable("NUM_COLS", 5);
$this->showPossibleSubObjects();
$this->tpl->parseCurrentBlock();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilBookmarkAdministrationGUI::$data |
Definition at line 61 of file class.ilBookmarkAdministrationGUI.php.
| ilBookmarkAdministrationGUI::$id |
Definition at line 60 of file class.ilBookmarkAdministrationGUI.php.
| ilBookmarkAdministrationGUI::$ilias |
Definition at line 55 of file class.ilBookmarkAdministrationGUI.php.
Referenced by ilBookmarkAdministrationGUI(), and main_header().
| ilBookmarkAdministrationGUI::$lng |
Definition at line 57 of file class.ilBookmarkAdministrationGUI.php.
Referenced by displayLocator(), editFormBookmark(), editFormBookmarkFolder(), ilBookmarkAdministrationGUI(), main_header(), newFormBookmark(), and newFormBookmarkFolder().
| ilBookmarkAdministrationGUI::$tpl |
Definition at line 56 of file class.ilBookmarkAdministrationGUI.php.
Referenced by editFormBookmark(), editFormBookmarkFolder(), ilBookmarkAdministrationGUI(), main_header(), newFormBookmark(), and newFormBookmarkFolder().
| ilBookmarkAdministrationGUI::$tree |
Definition at line 59 of file class.ilBookmarkAdministrationGUI.php.
| ilBookmarkAdministrationGUI::$user_id |
Definition at line 48 of file class.ilBookmarkAdministrationGUI.php.
1.7.1