Public Member Functions | |
ilGlossaryLocatorGUI () | |
setTemplateVariable ($a_temp_var) | |
setTerm (&$a_term) | |
setGlossary (&$a_glossary) | |
setDefinition (&$a_def) | |
setMode ($a_mode) | |
display () | |
display locator | |
Data Fields | |
$mode | |
$temp_var | |
$tree | |
$obj | |
$lng | |
$tpl |
Definition at line 33 of file class.ilGlossaryLocatorGUI.php.
ilGlossaryLocatorGUI::display | ( | ) |
display locator
Definition at line 82 of file class.ilGlossaryLocatorGUI.php.
References $_GET, $ilCtrl, $key, $lng, $row, $title, and ilFrameTargetInfo::_getFrame().
{ global $lng, $ilCtrl; $this->tpl->addBlockFile("LOCATOR", "locator", "tpl.locator.html"); $path = $this->tree->getPathFull($_GET["ref_id"]); if (is_object($this->term)) { $modifier = 0; } else { $modifier = 1; } switch($this->mode) { case "edit": $repository = "./repository.php"; break; case "presentation": $script = "ilias.php?baseClass=ilGlossaryPresentationGUI"; $repository = "./repository.php"; break; } //$this->tpl->touchBlock("locator_separator"); //$this->tpl->touchBlock("locator_item"); foreach ($path as $key => $row) { //if ($row["child"] == $this->tree->getRootId()) //{ // continue; //} if (($key < count($path) - $modifier)) { $this->tpl->touchBlock("locator_separator"); } //echo "-".$row["child"]."-"; $this->tpl->setCurrentBlock("locator_item"); $t_frame = ""; if ($row["child"] == $this->tree->getRootId()) { $title = $this->lng->txt("repository"); $link = $repository."?cmd=frameset&ref_id=".$row["child"]; $t_frame = ilFrameTargetInfo::_getFrame("MainContent"); } else if (($_GET["ref_id"] == $row["child"])) { $title = $this->glossary->getTitle(); if ($this->mode == "edit") { $link = $ilCtrl->getLinkTargetByClass("ilobjglossarygui", "listTerms"); } else { $link = $script."&ref_id=".$_GET["ref_id"]; } } else { $title = $row["title"]; $link = $repository."?cmd=frameset&ref_id=".$row["child"]; $t_frame = ilFrameTargetInfo::_getFrame("MainContent"); } $this->tpl->setVariable("ITEM", $title); $this->tpl->setVariable("LINK_ITEM", $link); if ($t_frame != "") { $this->tpl->setVariable("LINK_TARGET", " target=\"$t_frame\" "); } $this->tpl->parseCurrentBlock(); } /* if (is_object($this->definition)) { $this->tpl->touchBlock("locator_separator"); }*/ if (is_object($this->term) && $this->mode != "edit") { $this->tpl->setCurrentBlock("locator_item"); $this->tpl->setVariable("ITEM", $this->term->getTerm()); //if ($this->mode == "edit") //{ // $this->tpl->setVariable("LINK_ITEM", // $ilCtrl->getLinkTargetByClass("ilglossarytermgui", "listDefinitions")); //} //else //{ $this->tpl->setVariable("LINK_ITEM", $script."&ref_id=".$_GET["ref_id"]. "&cmd=listDefinitions&term_id=".$this->term->getId()); //} $this->tpl->parseCurrentBlock(); } //$this->tpl->touchBlock("locator_separator"); if (is_object($this->definition)) { $this->tpl->setCurrentBlock("locator_item"); $this->tpl->setVariable("ITEM", $this->term->getTerm()." (". $this->lng->txt("cont_definition")." ". $this->definition->getNr().")"); if ($this->mode == "edit") { $this->tpl->setVariable("LINK_ITEM", $ilCtrl->getLinkTargetByClass("ilpageobjectgui", "view")); } else { $this->tpl->setVariable("LINK_ITEM", $script."&ref_id=".$_GET["ref_id"]. "&cmd=view&def=".$_GET["def"]); } $this->tpl->parseCurrentBlock(); } //$this->tpl->touchBlock("locator_separator"); $this->tpl->setCurrentBlock("locator"); $this->tpl->setVariable("TXT_LOCATOR", $debug.$this->lng->txt("locator")); $this->tpl->parseCurrentBlock(); }
ilGlossaryLocatorGUI::ilGlossaryLocatorGUI | ( | ) |
ilGlossaryLocatorGUI::setDefinition | ( | &$ | a_def | ) |
Definition at line 69 of file class.ilGlossaryLocatorGUI.php.
{ $this->definition =& $a_def; }
ilGlossaryLocatorGUI::setGlossary | ( | &$ | a_glossary | ) |
Definition at line 64 of file class.ilGlossaryLocatorGUI.php.
{ $this->glossary =& $a_glossary; }
ilGlossaryLocatorGUI::setMode | ( | $ | a_mode | ) |
Definition at line 74 of file class.ilGlossaryLocatorGUI.php.
{ $this->mode = $a_mode; }
ilGlossaryLocatorGUI::setTemplateVariable | ( | $ | a_temp_var | ) |
Definition at line 54 of file class.ilGlossaryLocatorGUI.php.
{ $this->temp_var = $a_temp_var; }
ilGlossaryLocatorGUI::setTerm | ( | &$ | a_term | ) |
Definition at line 59 of file class.ilGlossaryLocatorGUI.php.
{ $this->term =& $a_term; }
ilGlossaryLocatorGUI::$lng |
Definition at line 39 of file class.ilGlossaryLocatorGUI.php.
Referenced by display(), and ilGlossaryLocatorGUI().
ilGlossaryLocatorGUI::$mode |
Definition at line 35 of file class.ilGlossaryLocatorGUI.php.
ilGlossaryLocatorGUI::$obj |
Definition at line 38 of file class.ilGlossaryLocatorGUI.php.
ilGlossaryLocatorGUI::$temp_var |
Definition at line 36 of file class.ilGlossaryLocatorGUI.php.
ilGlossaryLocatorGUI::$tpl |
Definition at line 40 of file class.ilGlossaryLocatorGUI.php.
Referenced by ilGlossaryLocatorGUI().
ilGlossaryLocatorGUI::$tree |
Definition at line 37 of file class.ilGlossaryLocatorGUI.php.
Referenced by ilGlossaryLocatorGUI().