6 require_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
7 require_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
46 $lng = $DIC->language();
48 $ilTabs = $DIC->tabs();
58 $this->tabs_gui = $ilTabs;
60 $this->ctrl->saveParameter($this,
array(
"def"));
70 $next_class = $this->ctrl->getNextClass($this);
71 $cmd = $this->ctrl->getCmd();
74 $this->tpl->setCurrentBlock(
"ContentStyle");
75 $this->tpl->setVariable(
76 "LOCATION_CONTENT_STYLESHEET",
79 $this->tpl->parseCurrentBlock();
82 $this->tpl->setCurrentBlock(
"SyntaxStyle");
83 $this->tpl->setVariable(
84 "LOCATION_SYNTAX_STYLESHEET",
87 $this->tpl->parseCurrentBlock();
89 require_once(
"./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
91 $gloss_loc->setTerm($this->term);
92 $gloss_loc->setGlossary($this->glossary);
93 $gloss_loc->setDefinition($this->definition);
96 $this->tpl->setTitle($this->term->getTerm() .
" - " .
97 $this->lng->txt(
"cont_definition") .
" " .
98 $this->definition->getNr());
99 if ($this->ctrl->getNextClass() ==
"ilglossarydefpagegui") {
103 switch ($next_class) {
105 case "ilglossarydefpagegui":
108 if (
$ilCtrl->getCmd() ==
"edit" &&
109 $ilCtrl->getCmdClass() ==
"ilglossarydefpagegui") {
112 $link =
"[<a href='" .
113 $ilCtrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages") .
114 "'>" .
$lng->txt(
"glo_list_usages") .
"</a>]";
116 $lng->txt(
"glo_term_is_used_n_times"),
123 if ($this->ctrl->getNextClass() ==
"ilglossarydefpagegui" 124 || $this->ctrl->getCmdClass() ==
"ileditclipboardgui") {
125 $gloss_loc->display();
128 $this->ctrl->setReturnByClass(
"ilGlossaryDefPageGUI",
"edit");
129 $this->ctrl->setReturn($this,
"listDefinitions");
132 $this->definition->assignPageObject($page);
133 $page->addUpdateListener($this,
"saveShortText");
138 include_once(
"./Services/MetaData/classes/class.ilMD.php");
139 $md =
new ilMD($this->term_glossary->getId(), $this->definition->getId(),
"gdf");
141 if ($md_gen->getTitle() ==
"") {
142 $md_gen->setTitle($this->term->getTerm());
146 $page_gui->activateMetaDataEditor($this->term_glossary,
"gdf", $this->definition->getId());
148 $page_gui->setSourcecodeDownloadScript(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" .
$_GET[
"ref_id"]);
149 $page_gui->setFullscreenLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&cmd=fullscreen&ref_id=" .
$_GET[
"ref_id"]);
150 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
151 $page_gui->setOutputMode(
"edit");
154 $this->term_glossary->getStyleSheetId(),
157 $page_gui->setLocator($gloss_loc);
158 $page_gui->setIntLinkReturn($this->ctrl->getLinkTargetByClass(
165 $page_gui->setPageBackTitle($this->lng->txt(
"cont_definition"));
166 $page_gui->setLinkParams(
"ref_id=" .
$_GET[
"ref_id"]);
167 $page_gui->setHeader($this->term->getTerm());
168 $page_gui->setFileDownloadLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&cmd=downloadFile&ref_id=" .
$_GET[
"ref_id"]);
169 $page_gui->setPresentationTitle($this->term->getTerm());
170 $ret = $this->ctrl->forwardCommand($page_gui);
176 $gloss_loc->display();
177 $ret = $this->$cmd();
191 $this->tpl->getStandardTemplate();
192 $this->tpl->setTitle($a_header_title);
193 $this->displayLocator();
212 $this->tabs_gui->setBack2Target(
213 $this->lng->txt(
"glossary"),
214 $this->ctrl->getParentReturn($this)
218 $this->tabs_gui->setBackTarget(
219 $this->lng->txt(
"term"),
220 $this->ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"editTerm")
227 $this->definition->updateShortText();
setEditPreview($a_editpreview)
Set Display first Edit tab, then Preview tab, instead of Page and Edit.
getPageObject()
Get Page Object.
static getNumberOfUsages($a_term_id)
Get number of usages.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
GUI class for glossary term definition editor.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
__construct()
Constructor public.
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true)
get content style path
Create styles array
The data for the language used.
static _lookGlossaryID($term_id)
get glossary id form term id
Class ilGlossaryDefinition.
Glossary definition page GUI class.
main_header($a_header_title)
output main header (title and locator)