ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilGlossaryLocatorGUI Class Reference

Glossary Locator GUI. More...

+ Collaboration diagram for ilGlossaryLocatorGUI:

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

Detailed Description

Glossary Locator GUI.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilGlossaryLocatorGUI.php 19589 2009-04-10 08:08:17Z akill

Definition at line 33 of file class.ilGlossaryLocatorGUI.php.

Member Function Documentation

ilGlossaryLocatorGUI::display ( )

display locator

Definition at line 82 of file class.ilGlossaryLocatorGUI.php.

References $_GET, $ilCtrl, $key, $lng, $row, $title, ilFrameTargetInfo\_getFrame(), and ilUtil\getImagePath().

{
global $lng, $ilCtrl;
$this->tpl->addBlockFile("LOCATOR", "locator", "tpl.locator.html", "Services/Locator");
$path = $this->tree->getPathFull($_GET["ref_id"]);
if (is_object($this->term) && ($_GET["def"] > 0 || $this->mode == "presentation"))
{
$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");
}
if ($row["child"] > 0)
{
$this->tpl->setCurrentBlock("locator_img");
$this->tpl->setVariable("IMG_SRC",
ilUtil::getImagePath("icon_".$row["type"]."_s.gif"));
$this->tpl->setVariable("IMG_ALT",
$lng->txt("obj_".$type));
$this->tpl->parseCurrentBlock();
}
$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."&amp;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."&amp;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", "edit"));
}
else
{
$this->tpl->setVariable("LINK_ITEM", $script."&amp;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();
}

+ Here is the call graph for this function:

ilGlossaryLocatorGUI::ilGlossaryLocatorGUI ( )

Definition at line 43 of file class.ilGlossaryLocatorGUI.php.

References $lng, $tpl, and $tree.

{
global $lng, $tpl, $tree;
$this->mode = "edit";
$this->temp_var = "LOCATOR";
$this->lng =& $lng;
$this->tpl =& $tpl;
$this->tree =& $tree;
}
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;
}

Field Documentation

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().


The documentation for this class was generated from the following file: