48 $this->temp_var =
"LOCATOR";
56 $this->temp_var = $a_temp_var;
61 $this->term =& $a_term;
66 $this->glossary =& $a_glossary;
71 $this->definition =& $a_def;
76 $this->mode = $a_mode;
86 $this->tpl->addBlockFile(
"LOCATOR",
"locator",
"tpl.locator.html",
"Services/Locator");
88 $path = $this->tree->getPathFull(
$_GET[
"ref_id"]);
90 if (is_object($this->term) && (
$_GET[
"def"] > 0 || $this->mode ==
"presentation"))
102 $repository =
"./repository.php";
106 $script =
"ilias.php?baseClass=ilGlossaryPresentationGUI";
107 $repository =
"./repository.php";
121 if (($key < count(
$path) - $modifier))
123 $this->tpl->touchBlock(
"locator_separator");
127 if (
$row[
"child"] > 0)
129 $this->tpl->setCurrentBlock(
"locator_img");
130 $this->tpl->setVariable(
"IMG_SRC",
132 $this->tpl->setVariable(
"IMG_ALT",
133 $lng->txt(
"obj_".$type));
134 $this->tpl->parseCurrentBlock();
137 $this->tpl->setCurrentBlock(
"locator_item");
139 if (
$row[
"child"] == $this->tree->getRootId())
141 $title = $this->lng->txt(
"repository");
142 $link = $repository.
"?cmd=frameset&ref_id=".
$row[
"child"];
145 else if ((
$_GET[
"ref_id"] ==
$row[
"child"]))
147 $title = $this->glossary->getTitle();
148 if ($this->mode ==
"edit")
150 $link = $ilCtrl->getLinkTargetByClass(
"ilobjglossarygui",
"listTerms");
154 $link = $script.
"&ref_id=".
$_GET[
"ref_id"];
160 $link = $repository.
"?cmd=frameset&ref_id=".
$row[
"child"];
163 $this->tpl->setVariable(
"ITEM",
$title);
164 $this->tpl->setVariable(
"LINK_ITEM", $link);
167 $this->tpl->setVariable(
"LINK_TARGET",
" target=\"$t_frame\" ");
169 $this->tpl->parseCurrentBlock();
179 if (is_object($this->term) && $this->mode !=
"edit")
181 $this->tpl->setCurrentBlock(
"locator_item");
182 $this->tpl->setVariable(
"ITEM", $this->term->getTerm());
190 $this->tpl->setVariable(
"LINK_ITEM", $script.
"&ref_id=".
$_GET[
"ref_id"].
191 "&cmd=listDefinitions&term_id=".$this->term->getId());
193 $this->tpl->parseCurrentBlock();
198 if (is_object($this->definition))
200 $this->tpl->setCurrentBlock(
"locator_item");
201 $this->tpl->setVariable(
"ITEM", $this->term->getTerm().
" (".
202 $this->lng->txt(
"cont_definition").
" ".
203 $this->definition->getNr().
")");
204 if ($this->mode ==
"edit")
206 $this->tpl->setVariable(
"LINK_ITEM",
207 $ilCtrl->getLinkTargetByClass(
"ilpageobjectgui",
"edit"));
211 $this->tpl->setVariable(
"LINK_ITEM", $script.
"&ref_id=".
$_GET[
"ref_id"].
212 "&cmd=view&def=".$_GET[
"def"]);
214 $this->tpl->parseCurrentBlock();
219 $this->tpl->setCurrentBlock(
"locator");
220 $this->tpl->setVariable(
"TXT_LOCATOR", $debug.$this->lng->txt(
"locator"));
221 $this->tpl->parseCurrentBlock();