Public Member Functions | |
ilPDNotesGUI () | |
Constructor. | |
& | executeCommand () |
execute command | |
displayHeader () | |
display header and locator | |
view () | |
changeRelatedObject () | |
change related object | |
Data Fields | |
$ilias | |
$tpl | |
$lng |
Definition at line 37 of file class.ilPDNotesGUI.php.
ilPDNotesGUI::changeRelatedObject | ( | ) |
change related object
Definition at line 220 of file class.ilPDNotesGUI.php.
References $_POST.
{ $this->ctrl->setParameter($this, "rel_obj", $_POST["rel_obj"]); $this->ctrl->redirect($this); }
ilPDNotesGUI::displayHeader | ( | ) |
display header and locator
Definition at line 94 of file class.ilPDNotesGUI.php.
References ilUtil::getImagePath(), infoPanel(), and sendInfo().
Referenced by executeCommand().
{ $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_pd_b.gif"), $this->lng->txt("personal_desktop")); $this->tpl->setTitle($this->lng->txt("personal_desktop")); // set locator /* $this->tpl->setVariable("TXT_LOCATOR", $this->lng->txt("locator")); $this->tpl->touchBlock("locator_separator"); $this->tpl->touchBlock("locator_item"); //$this->tpl->setCurrentBlock("locator_item"); //$this->tpl->setVariable("ITEM", $this->lng->txt("personal_desktop")); //$this->tpl->setVariable("LINK_ITEM", // $this->ctrl->getLinkTargetByClass("ilpersonaldesktopgui")); //$this->tpl->parseCurrentBlock(); $this->tpl->setCurrentBlock("locator_item"); $this->tpl->setVariable("ITEM", $this->lng->txt("private_notes")); $this->tpl->setVariable("LINK_ITEM", $this->ctrl->getLinkTargetByClass("ilpdnotesgui")); $this->tpl->parseCurrentBlock(); */ // catch feedback message sendInfo(); // display infopanel if something happened infoPanel(); }
& ilPDNotesGUI::executeCommand | ( | ) |
execute command
Definition at line 70 of file class.ilPDNotesGUI.php.
References $cmd, displayHeader(), and view().
{ $next_class = $this->ctrl->getNextClass(); switch($next_class) { case "ilnotegui": $this->displayHeader(); $this->view(); // forwardCommand is invoked in view() method break; default: $cmd = $this->ctrl->getCmd("view"); $this->displayHeader(); $this->$cmd(); break; } $this->tpl->show(true); return true; }
ilPDNotesGUI::ilPDNotesGUI | ( | ) |
ilPDNotesGUI::view | ( | ) |
Definition at line 128 of file class.ilPDNotesGUI.php.
References $_GET, $lng, $type, ilNote::_getRelatedObjectsOfUser(), ilObject::_lookupTitle(), and ilObject::_lookupType().
Referenced by executeCommand().
{ global $ilUser, $lng; //$this->tpl->addBlockFile("ADM_CONTENT", "objects", "tpl.table.html") include_once("Services/Notes/classes/class.ilNoteGUI.php"); // output related item selection (if more than one) include_once("Services/Notes/classes/class.ilNote.php"); $rel_objs = ilNote::_getRelatedObjectsOfUser(); if ($_GET["rel_obj"] > 0) { $notes_gui = new ilNoteGUI($_GET["rel_obj"], 0, ilObject::_lookupType($_GET["rel_obj"]),true); } else { $notes_gui = new ilNoteGUI(0, $ilUser->getId(), "pd"); } $notes_gui->enablePrivateNotes(); $notes_gui->enableHiding(false); $notes_gui->enableTargets(true); $notes_gui->enableMultiSelection(true); $next_class = $this->ctrl->getNextClass($this); if ($next_class == "ilnotegui") { $html = $this->ctrl->forwardCommand($notes_gui); } else { $html = $notes_gui->getNotesHTML(); } $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.pd_notes.html", "Services/Notes"); if (count($rel_objs) > 1 || ($rel_objs[0]["rep_obj_id"] > 0)) { // prepend personal dektop, if first object if ($rel_objs[0]["rep_obj_id"] > 0) { $rel_objs = array_merge(array(0), $rel_objs); } foreach($rel_objs as $obj) { $this->tpl->setCurrentBlock("related_option"); $this->tpl->setVariable("VAL_RELATED", $obj["rep_obj_id"]); //echo "-".$obj["rep_obj_id"]."-".$obj["obj_type"]."-"; if ($obj["rep_obj_id"] > 0) { $type = ilObject::_lookupType($obj["rep_obj_id"]); $type_str = (in_array($type, array("lm", "htlm", "sahs", "dbk"))) ? $lng->txt("learning_resource") : $lng->txt("obj_".$type); $this->tpl->setVariable("TXT_RELATED", $type_str.": ". ilObject::_lookupTitle($obj["rep_obj_id"])); } else { $this->tpl->setVariable("TXT_RELATED", $lng->txt("personal_desktop")); } if ($obj["rep_obj_id"] == $_GET["rel_obj"]) { $this->tpl->setVariable("SEL", 'selected="selected"'); } $this->tpl->parseCurrentBlock(); } $this->tpl->setCurrentBlock("related_selection"); $this->tpl->setVariable("TXT_CHANGE", $lng->txt("change")); $this->tpl->setVariable("TXT_RELATED_TO", $lng->txt("related_to")); $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this)); $this->tpl->parseCurrentBlock(); } $this->tpl->setCurrentBlock("adm_content"); // output notes $this->tpl->setVariable("NOTES", $html); $this->tpl->parseCurrentBlock(); }
ilPDNotesGUI::$ilias |
Definition at line 45 of file class.ilPDNotesGUI.php.
Referenced by ilPDNotesGUI().
ilPDNotesGUI::$lng |
Definition at line 47 of file class.ilPDNotesGUI.php.
Referenced by ilPDNotesGUI(), and view().
ilPDNotesGUI::$tpl |
Definition at line 46 of file class.ilPDNotesGUI.php.
Referenced by ilPDNotesGUI().