ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTermDefinitionEditorGUI Class Reference

GUI class for glossary term definition editor. More...

+ Collaboration diagram for ilTermDefinitionEditorGUI:

Public Member Functions

 ilTermDefinitionEditorGUI ()
 Constructor public.
executeCommand ()
 main_header ($a_header_title)
 output main header (title and locator)
 setTabs ()
 output tabs
 getTabs (&$tabs_gui)
 get tabs
 saveShortText ()

Data Fields

 $ilias
 $tpl
 $lng
 $glossary
 $definition
 $term

Detailed Description

GUI class for glossary term definition editor.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilTermDefinitionEditorGUI.php 17609 2008-10-07 12:47:37Z akill

ilTermDefinitionEditorGUI: ilPageObjectGUI, ilMDEditorGUI

Definition at line 37 of file class.ilTermDefinitionEditorGUI.php.

Member Function Documentation

& ilTermDefinitionEditorGUI::executeCommand ( )

Definition at line 67 of file class.ilTermDefinitionEditorGUI.php.

References $_GET, $cmd, $ret, $tpl, ilObjStyleSheet\getContentStylePath(), ilUtil\getImagePath(), ilPageObjectGUI\getPageObject(), ilObjStyleSheet\getSyntaxStylePath(), ilPageObjectGUI\setEditPreview(), and setTabs().

{
global $tpl;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
// content style
$this->tpl->setCurrentBlock("ContentStyle");
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
$this->tpl->parseCurrentBlock();
// syntax style
$this->tpl->setCurrentBlock("SyntaxStyle");
$this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
$this->tpl->parseCurrentBlock();
//$this->tpl->setVariable("TXT_LOCATOR",$this->lng->txt("locator"));
//$this->main_header($this->lng->txt("cont_term").": ".$this->term->getTerm().", ".
// $this->lng->txt("cont_definition")." ".$this->definition->getNr());
require_once ("./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
$gloss_loc =& new ilGlossaryLocatorGUI();
$gloss_loc->setTerm($this->term);
$gloss_loc->setGlossary($this->glossary);
$gloss_loc->setDefinition($this->definition);
$this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
$this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
$this->tpl->setTitle($this->term->getTerm()." - ".
$this->lng->txt("cont_definition")." ".
$this->definition->getNr());
if ($this->ctrl->getCmdClass() == "ilpageobjectgui")
{
$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_def_b.gif"));
}
switch ($next_class)
{
/*
case "ilmdeditorgui":
$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_pg.gif"));
$gloss_loc->display();
$this->setTabs();
include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
$md_gui =& new ilMDEditorGUI($this->glossary->getId(), $this->definition->getId(), "gdf");
//$md_gui->addObserver($this->definition,'MDUpdateListener','General');
$this->ctrl->forwardCommand($md_gui);
break;*/
case "ilpageobjectgui":
// not so nice, to do: revise locator handling
if ($this->ctrl->getCmdClass() == "ilpageobjectgui"
|| $this->ctrl->getCmdClass() == "ileditclipboardgui")
{
$gloss_loc->display();
}
$this->setTabs();
$this->ctrl->setReturnByClass("ilPageObjectGUI", "edit");
$this->ctrl->setReturn($this, "listDefinitions");
$page_gui =& new ilPageObjectGUI("gdf", $this->definition->getId());
$page = $page_gui->getPageObject();
$this->definition->assignPageObject($page);
$page->addUpdateListener($this, "saveShortText");
$page_gui->setEditPreview(true);
$page_gui->activateMetaDataEditor($this->glossary->getId(),
$this->definition->getId(), "gdf");
// $this->obj, "MDUpdateListener");
$page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=".$_GET["ref_id"]);
$page_gui->setFullscreenLink("ilias.php?baseClass=ilGlossaryPresentationGUI&cmd=fullscreen&ref_id=".$_GET["ref_id"]);
$page_gui->setTemplateTargetVar("ADM_CONTENT");
$page_gui->setOutputMode("edit");
$page_gui->setLocator($gloss_loc);
$page_gui->setIntLinkHelpDefault("GlossaryItem", $_GET["ref_id"]);
$page_gui->setIntLinkReturn($this->ctrl->getLinkTargetByClass("ilobjglossarygui", "quickList"));
$page_gui->setPageBackTitle($this->lng->txt("cont_definition"));
$page_gui->setLinkParams("ref_id=".$_GET["ref_id"]);
$page_gui->setHeader($this->term->getTerm());
$page_gui->setFileDownloadLink("ilias.php?baseClass=ilGlossaryPresentationGUI&cmd=downloadFile&ref_id=".$_GET["ref_id"]);
/*
$page_gui->setTabs(array(array("cont_all_definitions", "listDefinitions"),
array("edit", "view"),
array("cont_preview", "preview"),
array("meta_data", "editDefinitionMetaData")
));*/
$page_gui->setPresentationTitle($this->term->getTerm());
//$page_gui->executeCommand();
$ret =& $this->ctrl->forwardCommand($page_gui);
$tpl->setContent($ret);
break;
default:
$this->setTabs();
$gloss_loc->display();
$ret =& $this->$cmd();
break;
}
}

+ Here is the call graph for this function:

ilTermDefinitionEditorGUI::getTabs ( $tabs_gui)

get tabs

Definition at line 210 of file class.ilTermDefinitionEditorGUI.php.

Referenced by setTabs().

{
// edit page
/*
$tabs_gui->addTarget("edit",
$this->ctrl->getLinkTargetByClass("ilPageObjectGUI", "edit"), "edit",
"ilPageObjectGUI");
// preview page
$tabs_gui->addTarget("cont_preview",
$this->ctrl->getLinkTargetByClass("ilPageObjectGUI", "preview"), "preview",
"ilPageObjectGUI");
// meta data
$tabs_gui->addTarget("meta_data",
$this->ctrl->getLinkTargetByClass('ilmdeditorgui',''),
"", "ilmdeditorgui");
*/
/*
$tabs_gui->addTarget("meta_data",
$this->ctrl->getLinkTarget($this, "editMeta"), "editMeta",
get_class($this));
*/
// back to glossary
$tabs_gui->setBack2Target($this->lng->txt("glossary"),
$this->ctrl->getParentReturn($this));
// back to upper context
$tabs_gui->setBackTarget($this->lng->txt("term"),
$this->ctrl->getLinkTargetByClass("ilglossarytermgui", "editTerm"));
/*
$tabs_gui->addTarget("cont_back",
$this->ctrl->getParentReturn($this), "",
"");*/
}

+ Here is the caller graph for this function:

ilTermDefinitionEditorGUI::ilTermDefinitionEditorGUI ( )

Constructor public.

Definition at line 50 of file class.ilTermDefinitionEditorGUI.php.

References $_GET, $ilCtrl, $ilias, $lng, and $tpl.

{
global $ilias, $tpl, $lng, $objDefinition, $ilCtrl;
// initiate variables
$this->ilias =& $ilias;
$this->tpl =& $tpl;
$this->lng =& $lng;
$this->ctrl =& $ilCtrl;
$this->glossary =& new ilObjGlossary($_GET["ref_id"], true);
$this->definition =& new ilGlossaryDefinition($_GET["def"]);
$this->term =& new ilGlossaryTerm($this->definition->getTermId());
$this->ctrl->saveParameter($this, array("def"));
}
ilTermDefinitionEditorGUI::main_header (   $a_header_title)

output main header (title and locator)

Definition at line 180 of file class.ilTermDefinitionEditorGUI.php.

References $lng.

{
global $lng;
$this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
$this->tpl->setVariable("HEADER", $a_header_title);
$this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
$this->displayLocator();
//$this->setAdminTabs($a_type);
}
ilTermDefinitionEditorGUI::saveShortText ( )

Definition at line 283 of file class.ilTermDefinitionEditorGUI.php.

{
$this->definition->updateShortText();
}
ilTermDefinitionEditorGUI::setTabs ( )

output tabs

Definition at line 194 of file class.ilTermDefinitionEditorGUI.php.

References getTabs().

Referenced by executeCommand().

{
global $ilTabs;
// catch feedback message
#include_once("classes/class.ilTabsGUI.php");
#$tabs_gui =& new ilTabsGUI();
$this->getTabs($ilTabs);
#$this->tpl->setVariable("TABS", $tabs_gui->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilTermDefinitionEditorGUI::$definition

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

ilTermDefinitionEditorGUI::$glossary

Definition at line 42 of file class.ilTermDefinitionEditorGUI.php.

ilTermDefinitionEditorGUI::$ilias

Definition at line 39 of file class.ilTermDefinitionEditorGUI.php.

Referenced by ilTermDefinitionEditorGUI().

ilTermDefinitionEditorGUI::$lng

Definition at line 41 of file class.ilTermDefinitionEditorGUI.php.

Referenced by ilTermDefinitionEditorGUI(), and main_header().

ilTermDefinitionEditorGUI::$term

Definition at line 44 of file class.ilTermDefinitionEditorGUI.php.

ilTermDefinitionEditorGUI::$tpl

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