ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjDlBookGUI Class Reference

Class ilObjDlBookGUI. More...

+ Inheritance diagram for ilObjDlBookGUI:
+ Collaboration diagram for ilObjDlBookGUI:

Public Member Functions

 ilObjDlBookGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor.
 assignObject ()
 showCitation ($page_xml)
 showAbstract ($a_target_id)
 show abstract of digilib book
 export ()
 exports the digi-lib-object into a xml structure
 offlineexportform ()
 print export-form to screen
 setilCitationMenu ()
 setilLMMenu ()
 digilib book menu
 properties ()
 edit properties form
 addTranslation ()
 deleteTranslation ()
 showTranslationSelect ($a_result)
 searchTranslation ($a_search_str)
 getContextPath ($a_endnode_id, $a_startnode_id=1)
 get context path in content object tree
 __checkCitationPost (&$message)
 __parseCitationPost ()
 __applyCitationText ($page_xml, $a_start, $a_end)
- Public Member Functions inherited from ilObjContentObjectGUI
 ilObjContentObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=false)
 Constructor.
executeCommand ()
 execute command
 _forwards ()
 initPropertiesForm ()
 Init properties form.
 getPropertiesFormValues ()
 Get values for properties form.
 saveProperties ()
 save properties
 editStyleProperties ()
 Edit style properties.
 initStylePropertiesForm ()
 Init style properties form.
 createStyle ()
 Create Style.
 editStyle ()
 Edit Style.
 deleteStyle ()
 Delete Style.
 saveStyleSettings ()
 Save style settings.
 initMenuForm ()
 Init menu form.
 editMenuProperties ()
 Edit menu properies.
 saveMenuProperties ()
 save properties
 explorer ()
 output explorer tree
 popup ()
 popup window for wysiwyg editor
 proceedDragDrop ()
 proceed drag and drop operations on pages/chapters
 initImportForm ()
 Init import form.
 addBibItemObject ($a_target="")
 add bib item (admin call)
 addBibItem ()
 add bib item (module call)
 deleteBibItemObject ($a_target="")
 delete bib item (admin call)
 deleteBibItem ()
 delete bib item (module call)
 editBibItemObject ($a_target="")
 edit bib items (admin call)
 editBibItem ()
 edit bib items (module call)
 saveBibItemObject ($a_target="")
 save bib item (admin call)
 saveBibItem ()
 save bib item (module call)
 exportObject ()
 export object
 importObject ()
 display dialogue for importing XML-LeaningObjects
 importFileObject ()
 display status information or report errors messages in case of error
 chapters ()
 show chapters
 pages ()
 listLinks ()
 List all broken links.
 showMaintenance ()
 Show maintenance.
 activatePages ()
 activates or deactivates pages
 deactivateJSChapterEditing ()
 Deactivate Javascript Chapter Editing.
 activateJSChapterEditing ()
 Deactivate Javascript Chapter Editing.
 pastePage ()
 paste page
 copyPage ()
 copy page
 delete ($a_parent_subobj_id=0)
 confirm deletion screen for page object and structure object deletion
 cancelDelete ()
 cancel delete
 confirmedDelete ($a_parent_subobj_id=0)
 delete page object or structure objects
 showActions ($a_actions)
 show possible action (form buttons)
 perm ()
 edit permissions
 permSave ()
 save permissions
 info ()
 info permissions
 addRole ()
 add local role
 owner ()
 show owner of content object
 view ()
 view content object
 moveChapter ($a_parent_subobj_id=0)
 move a single chapter (selection)
 copyChapter ($a_parent_subobj_id=0)
 copy a single chapter (selection)
 pasteChapter ($a_parent_subobj_id=0)
 paste chapter
 movePage ()
 move page
 cancel ()
 cancel action
 getPublicAccessColValue ($a_type, $a_file)
 Get public access value for export table.
 publishExportFile ($a_files)
 download export file
 downloadPDFFile ()
 download export file
 fixTreeConfirm ()
 confirm screen for tree fixing
 fixTree ()
 Fix tree.
 setilLMMenu ($a_offline=false, $a_export_format="", $a_active="content", $a_use_global_tabs=false, $a_as_subtabs=false, $a_cur_page=0)
 get lm menu html
 createPDF ()
 export content object
 exportHTML ()
 create html package
 exportSCORM ()
 create scorm package
 addLocations ($a_omit_obj_id=false)
 display locator
 listQuestions ()
 List questions.
 setTabs ($a_act="")
 output tabs
 setContentSubTabs ($a_active)
 Set pages tabs.
 addTabs ($a_act="")
 Adds tabs.
 setSubTabs ($a_active)
 Set sub tabs.
 editPublicSection ()
 savePublicSection ()
 history ()
 history
 formatInvalidLinkArray (Array $row)
 linkChecker ()
 saveLinkCheck ()
 refreshLinkCheck ()
 __initLinkChecker ()
 __initLMMenuEditor ()
 addMenuEntry ()
 display add menu entry form
 initMenuEntryForm ($a_mode="edit")
 Init menu entry form.
 saveMenuEntry ()
 save new menu entry
 deleteMenuEntry ()
 drop a menu entry
 editMenuEntry ()
 edit menu entry form
 updateMenuEntry ()
 update a menu entry
 showEntrySelector ()
 selectHeader ()
 select page as header
 selectFooter ()
 select page as footer
 saveAllTitles ()
 Save all titles of chapters/pages.
 insertChapter ()
 Insert (multiple) chapters at node.
 insertChapterClip ()
 Insert Chapter from clipboard.
 _goto ($a_target)
 redirect script
 cutItems ($a_return="chapters")
 Copy items to clipboard, then cut them from the current tree.
 copyItems ()
 Copy items to clipboard.
 cutChapter ()
 Cut chapter(s)
 showExportIDsOverview ($a_validation=false)
 Show export IDs overview.
 filterHelpChapters ()
 Filter help chapters.
 saveExportIds ()
 Save export IDs.
 saveHelpMapping ()
 Save help mapping.
 showTooltipList ()
 Show export IDs overview.
 addTooltip ()
 Add tooltip.
 filterTooltips ()
 Filter tooltips.
 saveTooltips ()
 Save tooltips.
 deleteTooltips ()
 Delete tooltips.
 setPageLayoutInHierarchy ()
 Set layout for multipl pages.
 setPageLayout ($a_in_hierarchy=false)
 Set layout for multipl pages.
 initSetPageLayoutForm ()
 Init set page layout form.
 savePageLayout ()
 Save page layout.
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui
 getCreationMode ()
 get creation mode
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getHTML ()
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 createObject ()
 create new object form
 cancelCreation ()
 cancel create action and go back to repository parent
 saveObject ()
 save object
 editObject ()
 edit object
 updateObject ()
 updates object entry in object_data
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.

Additional Inherited Members

- Static Public Member Functions inherited from ilObjContentObjectGUI
static getLayoutOption ($a_txt, $a_var, $a_def_option="")
 Save help mapping.
- Data Fields inherited from ilObjContentObjectGUI
 $ctrl
- Protected Member Functions inherited from ilObjContentObjectGUI
 initCreationForms ($a_new_type)
 Init creation froms.
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook.

Detailed Description

Member Function Documentation

ilObjDlBookGUI::__applyCitationText (   $page_xml,
  $a_start,
  $a_end 
)

Definition at line 642 of file class.ilObjDlBookGUI.php.

References ilObjectGUI\$tpl, xslt_create(), and xslt_process().

Referenced by showCitation().

{
global $tpl;
return true;
$xsl = file_get_contents($tpl->tplPath."/tpl.citation_paragraph.xsl");
$args = array( '/_xml' => $page_xml, '/_xsl' => $xsl );
$xh = xslt_create();
$params = array ('start_id' => $a_start,
'end_id' => $a_end);
$output = xslt_process($xh,"arg:/_xml","arg:/_xsl",NULL,$args, $params);
return $output;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjDlBookGUI::__checkCitationPost ( $message)

Definition at line 588 of file class.ilObjDlBookGUI.php.

References $_POST.

{
if(!$_POST["pgt_id"])
{
$message = "SELECT ONE<br />";
return false;
}
return true;
}
ilObjDlBookGUI::__parseCitationPost ( )

Definition at line 598 of file class.ilObjDlBookGUI.php.

References $_POST.

Referenced by showCitation().

{
if(!is_array($_POST["pgt_id"]))
{
return array();
}
foreach($_POST["pgt_id"] as $key => $id)
{
switch($_POST["ct_option"][$key])
{
case "single":
$output[] = array("text" => $id,
"start" => $key,
"end" => $key);
break;
case "f":
$output[] = array("text" => $id."f",
"start" => $key,
"end" => $key);
break;
case "ff":
$output[] = array("text" => $id."ff",
"start" => $key,
"end" => $key);
break;
case "from":
$start = $id."-";
$start_v = $key;
break;
case "to":
if($start)
{
$output[] = array("text" => $start."".$id,
"start" => $start_v,
"end" => $key);
}
unset($start);
unset($start_v);
break;
}
}
return $output ? $output : array();
}

+ Here is the caller graph for this function:

ilObjDlBookGUI::addTranslation ( )

Definition at line 423 of file class.ilObjDlBookGUI.php.

References $_POST, $result, exit, searchTranslation(), ilUtil\sendFailure(), ilUtil\sendSuccess(), ilObjectGUI\setTabs(), and showTranslationSelect().

{
$this->setTabs();
// SEARCH CANCELED
if(isset($_POST["cancel"]))
{
$this->ctrl->redirect($this, "properties");
}
if(isset($_POST["select"]))
{
if(is_array($_POST["id"]))
{
foreach($_POST["id"] as $id)
{
if($id != $this->object->getRefId())
{
$this->object->addTranslation($id);
}
}
ilUtil::sendSuccess($this->lng->txt("cont_translations_assigned"),true);
$this->ctrl->redirect($this, "properties");
}
}
$show_search = true;
$this->tpl->addBlockfile("ADM_CONTENT","adm_content","tpl.dbk_search_translation.html","Modules/LearningModule");
$this->tpl->setVariable("F_ACTION",
$this->ctrl->getLinkTarget($this, "addTranslation"));
if($_POST["search_str"])
{
$result = $this->searchTranslation($_POST["search_str"]);
switch(count($result["meta"]))
{
case 0:
ilUtil::sendFailure($this->lng->txt("cont_no_object_found"));
break;
case 1:
if($result["meta"][0]["id"] == $this->object->getRefId())
{
ilUtil::sendFailure($this->lng->txt("cont_no_assign_itself"));
break;
}
default:
$show_search = false;
break;
}
}
if($show_search)
{
$this->lng->loadLanguageModule("search");
$this->tpl->setVariable("SEARCH_TXT",$this->lng->txt("cont_insert_search"));
$this->tpl->setVariable("SEARCH_ASSIGN_TR",$this->lng->txt("cont_assign_translation"));
$this->tpl->setVariable("SEARCH_SEARCH_TERM",$this->lng->txt("search_search_term"));
$this->tpl->setVariable("BTN1_VALUE",$this->lng->txt("search"));
$this->tpl->setVariable("BTN2_VALUE",$this->lng->txt("cancel"));
}
}

+ Here is the call graph for this function:

ilObjDlBookGUI::assignObject ( )

Reimplemented from ilObjectGUI.

Definition at line 61 of file class.ilObjDlBookGUI.php.

Referenced by ilObjDlBookGUI().

{
include_once("./Modules/LearningModule/classes/class.ilObjDlBook.php");
$this->link_params = "ref_id=".$this->ref_id;
$this->object =& new ilObjDlBook($this->id, true);
}

+ Here is the caller graph for this function:

ilObjDlBookGUI::deleteTranslation ( )

Definition at line 489 of file class.ilObjDlBookGUI.php.

References $_POST, exit, ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
if(!$_POST["id"])
{
ilUtil::sendFailure($this->lng->txt("cont_select_one_translation"));
$this->ctrl->redirect($this, "properties");
}
$this->object->deleteTranslations($_POST["id"]);
ilUtil::sendSuccess($this->lng->txt("cont_assignments_deleted"));
$this->ctrl->redirect($this, "properties");
}

+ Here is the call graph for this function:

ilObjDlBookGUI::export ( )

exports the digi-lib-object into a xml structure

Reimplemented from ilObjContentObjectGUI.

Definition at line 265 of file class.ilObjDlBookGUI.php.

References $_GET.

{
// BASE CLASS objectGUI IS INSTATIATING $this->object
#$this->object =& new ilObjDlBook($this->id, true);
$this->object->export($_GET["ref_id"]);
}
ilObjDlBookGUI::getContextPath (   $a_endnode_id,
  $a_startnode_id = 1 
)

get context path in content object tree

Parameters
int$a_endnode_idid of endnode
int$a_startnode_idid of startnode

Reimplemented from ilObjContentObjectGUI.

Definition at line 561 of file class.ilObjDlBookGUI.php.

References $path, and ilObjectGUI\$tree.

Referenced by showTranslationSelect().

{
$path = "";
include_once("./Services/Tree/classes/class.ilTree.php");
$tree = new ilTree(1);
if(!$tree->isInTree($a_startnode_id) or !$tree->isInTree($a_endnode_id))
{
return '';
}
$tmpPath = $tree->getPathFull($a_endnode_id, $a_startnode_id);
// count -1, to exclude the learning module itself
for ($i = 1; $i < (count($tmpPath) - 1); $i++)
{
if ($path != "")
{
$path .= " > ";
}
$path .= $tmpPath[$i]["title"];
}
return $path;
}

+ Here is the caller graph for this function:

ilObjDlBookGUI::ilObjDlBookGUI (   $a_data,
  $a_id = 0,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Constructor.

public

Definition at line 47 of file class.ilObjDlBookGUI.php.

References assignObject(), and ilObjContentObjectGUI\ilObjContentObjectGUI().

{
$this->type = "dbk";
parent::ilObjContentObjectGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
# BETTER DO IT HERE THAN IN PARENT CLASS ( PROBLEMS FOR import, create)
$this->assignObject();
// SAME REASON
if($a_id != 0)
{
$this->lm_tree =& $this->object->getLMTree();
}
}

+ Here is the call graph for this function:

ilObjDlBookGUI::offlineexportform ( )

print export-form to screen

Parameters
@accesspublic
Returns

Definition at line 279 of file class.ilObjDlBookGUI.php.

References $_GET.

{
$this->tpl->addBlockfile("CONTENT", "offline_content", "tpl.offline_export.html", "Modules/LearningModule");
$this->tpl->touchBlock("offline_content");
$this->tpl->setVariable("TXT_TYPE","Export-Type");
if ($_GET["print"]==1)
{
$this->tpl->setVariable("TXT_ACTION","Digilib-Book - print");
$this->tpl->setVariable("TXT_PRINTEXPORT",$this->lng->txt("Print") );
$this->tpl->setVariable("PRINT_CHECKED","checked");
$this->tpl->setVariable("EXPORT_TARGET","_blank");
}
else
{
$this->tpl->setVariable("TXT_ACTION","Digilib-Book - download");
$this->tpl->setVariable("TXT_HTMLEXPORT",$this->lng->txt("HTML export") );
$this->tpl->setVariable("TXT_PDFEXPORT",$this->lng->txt("PDF export") );
$this->tpl->setVariable("TXT_XMLEXPORT",$this->lng->txt("XML export (only complete book)") );
$this->tpl->setVariable("OFFLINE_CHECKED","checked");
}
$this->tpl->setVariable("TXT_PAGES",$this->lng->txt("Pages") );
$this->tpl->setVariable("TXT_PAGESALL",$this->lng->txt("all"));
$this->tpl->setVariable("TXT_PAGESCHAPTER",$this->lng->txt("chapter") );
if ($_GET["obj_id"] != "") $this->tpl->setVariable("TXT_PAGESPAGE",$this->lng->txt("this page"));
$this->tpl->setVariable("TXT_PAGESFROM",$this->lng->txt("pages from") );
$this->tpl->setVariable("TXT_PAGESTO",$this->lng->txt("to") );
$this->tpl->setVariable("BTN_VALUE",$this->lng->txt("start export") );
$this->tpl->setVariable("BTN_C_VALUE",$this->lng->txt("cancel") );
$this->ctrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
$this->tpl->setVariable("EXPORT_ACTION",
$this->ctrl->getLinkTargetByClass("illmpresentationgui", "offlineexport"));
$this->ctrl->clearParametersByClass("illmpresentationgui");
$this->tpl->show();
}
ilObjDlBookGUI::properties ( )

edit properties form

Reimplemented from ilObjContentObjectGUI.

Definition at line 393 of file class.ilObjDlBookGUI.php.

References ilObjectFactory\getInstanceByRefId().

{
// OVERWRITTEN METHOD, TO ADD TRANSLATIONS
// BUTTONS
$this->tpl->setVariable("BTN1_NAME","addTranslation");
$this->tpl->setVariable("BTN1_TEXT",$this->lng->txt("cont_new_assignment"));
if($trs = $this->object->getTranslations())
{
include_once "./Services/Object/classes/class.ilObjectFactory.php";
foreach($trs as $tr)
{
$this->tpl->setCurrentBlock("TRANSLATION_ROW");
$this->tpl->setVariable("ROW_ID",$tr);
$this->tpl->setVariable("ROW_TITLE",$tmp_obj->getTitle());
$this->tpl->parseCurrentBlock();
unset($tmp_obj);
}
$this->tpl->setVariable("BTN2_NAME","deleteTranslation");
$this->tpl->setVariable("BTN2_TEXT",$this->lng->txt("cont_del_assignment"));
}
$this->tpl->setCurrentBlock("TRANSLATION");
$this->tpl->setVariable("TRANSLATION_HEADER",$this->lng->txt("cont_translations"));
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilObjDlBookGUI::searchTranslation (   $a_search_str)

Definition at line 536 of file class.ilObjDlBookGUI.php.

References $_POST, $_SESSION, exit, and ilUtil\sendInfo().

Referenced by addTranslation().

{
include_once("./Services/Search/classes/class.ilSearch.php");
$search =& new ilSearch($_SESSION["AccountId"]);
$search->setPerformUpdate(false);
$search->setSearchString($_POST["search_str"]);
$search->setCombination("and");
$search->setSearchFor(array(0 => 'dbk'));
$search->setSearchIn(array('dbk' => 'meta'));
$search->setSearchType('new');
if($search->validate($message))
{
$search->performSearch();
}
else
{
ilUtil::sendInfo($message,true);
$this->ctrl->redirect($this, "addTranslation");
}
return $search->getResultByType('dbk');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjDlBookGUI::setilCitationMenu ( )

Definition at line 319 of file class.ilObjDlBookGUI.php.

References $_GET.

{
include_once("./Services/UICore/classes/class.ilTemplate.php");
$tpl_menu =& new ilTemplate("tpl.buttons.html",true,true);
$tpl_menu->setCurrentBlock("btn_cell");
#$tpl_menu->setVariable("BTN_LINK","./ilias.php?frame=maincontent&ref_id=".$_GET["ref_id"].
#"&obj_id=".$_GET["obj_id"]);
$this->ctrl->setParameterByClass('illmpresentationgui','frame','maincontent');
$this->ctrl->setParameterByClass('illmpresentationgui','obj_id',(int) $_GET['obj_id']);
$tpl_menu->setVariable('BTN_LINK',$this->ctrl->getLinkTargetByClass('illmpresentationgui','layout'));
$tpl_menu->setVariable("BTN_TXT",$this->lng->txt("back"));
$tpl_menu->parseCurrentBlock();
$tpl_menu->setCurrentBlock("btn_row");
$tpl_menu->parseCurrentBlock();
return $tpl_menu->get();
}
ilObjDlBookGUI::setilLMMenu ( )

digilib book menu

Definition at line 345 of file class.ilObjDlBookGUI.php.

References $_GET, and $_POST.

{
include_once("./Services/UICore/classes/class.ilTemplate.php");
$tpl_menu =& new ilTemplate("tpl.lm_menu.html", true, true, "Modules/LearningModule");
$tpl_menu->setCurrentBlock("lm_menu_btn");
// menu for abstract page
if ($_POST["action"]=="details" && count($_POST["target"])==1)
{
$this->ctrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
$tpl_menu->setVariable("BTN_LINK",
$this->ctrl->getLinkTargetByClass("illmpresentationgui", "exportbibinfo"));
$tpl_menu->setVariable("BTN_TXT",$this->lng->txt("download"));
$tpl_menu->parseCurrentBlock();
$this->ctrl->setParameterByClass("illmpresentationgui", "print", "1");
$tpl_menu->setVariable("BTN_LINK",
$this->ctrl->getLinkTargetByClass("illmpresentationgui", "exportbibinfo"));
$tpl_menu->setVariable("BTN_TXT",$this->lng->txt("print"));
$tpl_menu->parseCurrentBlock();
$this->ctrl->clearParametersByClass("illmpresentationgui");
}
else
{
// menu for normal pages
$this->ctrl->setParameterByClass("illmpresentationgui", "obj_id", $_GET["obj_id"]);
$tpl_menu->setVariable("BTN_LINK",
$this->ctrl->getLinkTargetByClass("illmpresentationgui", "offlineexportform"));
$tpl_menu->setVariable("BTN_TXT",$this->lng->txt("download"));
$tpl_menu->parseCurrentBlock();
$this->ctrl->setParameterByClass("illmpresentationgui", "print", "1");
$tpl_menu->setVariable("BTN_LINK",
$this->ctrl->getLinkTargetByClass("illmpresentationgui", "offlineexportform"));
$tpl_menu->setVariable("BTN_TXT",$this->lng->txt("print") );
$tpl_menu->parseCurrentBlock();
$this->ctrl->clearParametersByClass("illmpresentationgui");
}
$tpl_menu->setCurrentBlock("btn_row");
$tpl_menu->parseCurrentBlock();
return $tpl_menu->get();
}
ilObjDlBookGUI::showAbstract (   $a_target_id)

show abstract of digilib book

Definition at line 129 of file class.ilObjDlBookGUI.php.

References $_POST, ilObjStyleSheet\getContentStylePath(), ilObjectFactory\getInstanceByRefId(), ilUtil\getStyleSheetLocation(), ilObjStyleSheet\getSyntaxStylePath(), ilUtil\sendInfo(), xslt_create(), and xslt_process().

{
if(count($_POST["tr_id"]) > 1)
{
$message = true;
$message_text = $this->lng->txt("cont_select_one_translation_warning");
$show_full = false;
}
else if(!$a_target_id and ($_POST["action"] == "show" or $_POST["action"] == "details"))
{
$message = true;
$message_text = $this->lng->txt("cont_select_one_edition");
$show_full = false;
}
else if(is_array($a_target_id) and count($a_target_id) > 1)
{
$message = true;
$message_text = $this->lng->txt("cont_msg_multiple_editions");
$show_full = false;
}
else if(is_array($a_target_id))
{
$a_target_id = $a_target_id[0];
$show_full = true;
}
else
{
$a_target_id = 0;
$show_full = false;
}
$this->object->initBibItemObject();
// content style
$this->tpl->setCurrentBlock("ContentStyle");
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
$this->tpl->parseCurrentBlock();
// syntax style
$this->tpl->setCurrentBlock("SyntaxStyle");
$this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
$this->tpl->parseCurrentBlock();
$this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
$this->tpl->setCurrentBlock("ilPage");
$tmp_tpl = new ilTemplate("tpl.bibliography.xsl",true,true,"Modules/LearningModule");
$tmp_tpl->setVariable("TITLE",$this->lng->txt("title"));
$tmp_tpl->setVariable("EDITION",$this->lng->txt("cont_edition"));
$tmp_tpl->setVariable("AUTHORS",$this->lng->txt("authors"));
if($show_full)
{
$this->ctrl->setParameterByClass("illmpresentationgui", "frame", "maincontent");
$action = $this->ctrl->getLinkTargetByClass("illmpresentationgui", "layout");
$params = array ('mode' => "view_full",
'action' => $action,
'target_id' => "$a_target_id");
$tmp_tpl->setVariable("BOOKTITLE",$this->lng->txt("cont_booktitle"));
$tmp_tpl->setVariable("CROSS_REFERENCE",$this->lng->txt("cont_cross_reference"));
$tmp_tpl->setVariable("DETAILS",$this->lng->txt("cont_details"));
$tmp_tpl->setVariable("EDITOR",$this->lng->txt("editor"));
$tmp_tpl->setVariable("HOW_PUBLISHED",$this->lng->txt("cont_how_published"));
$tmp_tpl->setVariable("WHERE_PUBLISHED",$this->lng->txt("cont_where_published"));
$tmp_tpl->setVariable("INSTITUTION",$this->lng->txt("institution"));
$tmp_tpl->setVariable("JOURNAL",$this->lng->txt("cont_journal"));
$tmp_tpl->setVariable("KEYWORD",$this->lng->txt("cont_keyword"));
$tmp_tpl->setVariable("PAGES",$this->lng->txt("cont_pages"));
$tmp_tpl->setVariable("SCHOOL",$this->lng->txt("cont_school"));
$tmp_tpl->setVariable("MONTH",$this->lng->txt("cont_month"));
$tmp_tpl->setVariable("PUBLISHER",$this->lng->txt("cont_publisher"));
$tmp_tpl->setVariable("SERIES",$this->lng->txt("cont_series"));
$tmp_tpl->setVariable("SERIES_TITLE",$this->lng->txt("cont_series_title"));
$tmp_tpl->setVariable("SERIES_EDITOR",$this->lng->txt("cont_series_editor"));
$tmp_tpl->setVariable("SERIES_VOLUME",$this->lng->txt("cont_series_volume"));
$tmp_tpl->setVariable("YEAR",$this->lng->txt("cont_year"));
$tmp_tpl->setVariable("ISBN",$this->lng->txt("cont_isbn"));
$tmp_tpl->setVariable("URL",$this->lng->txt("cont_url"));
}
else
{
$this->ctrl->setParameterByClass("illmpresentationgui", "frame", "maincontent");
$action = $this->ctrl->getLinkTargetByClass("illmpresentationgui", "layout");
$params = array ('mode' => "view_simple",
'action' => $action);
$this->ctrl->clearParametersByClass("illmpresentationgui");
if($translations = $this->object->getTranslations())
{
foreach($translations as $tr_id)
{
$tmp_tpl->setCurrentBlock("TRANSLATION_ROW");
$tmp_tpl->setVariable("ROW_TITLE",$tmp_obj->getTitle());
$tmp_tpl->setVariable("ROW_ID",$tr_id);
$tmp_tpl->parseCurrentBlock();
unset($tmp_obj);
}
$tmp_tpl->setCurrentBlock("TRANSLATION");
$tmp_tpl->setVariable("TRANSLATION_HEADER",$this->lng->txt("cont_translations"));
$tmp_tpl->parseCurrentBlock();
}
$tmp_tpl->setVariable("DETAILS",$this->lng->txt("cont_details"));
$tmp_tpl->setVariable("SHOW",$this->lng->txt("cont_show"));
$tmp_tpl->setVariable("SHOW_CITATION",$this->lng->txt("cont_show_citation"));
$tmp_tpl->setVariable("GO",$this->lng->txt("go"));
}
// SHOW MESSAGE
if($message)
{
ilUtil::sendInfo($message_text);
}
$xsl = $tmp_tpl->get();
$xml = $this->object->bib_obj->getXML();
if(empty($xml))
{
return true;
}
$args = array( '/_xml' => $xml, '/_xsl' => $xsl );
$xh = xslt_create();
$output = xslt_process($xh,"arg:/_xml","arg:/_xsl",NULL,$args, $params);
$this->tpl->setVariable("PAGE_CONTENT",$output);
return $output;
}

+ Here is the call graph for this function:

ilObjDlBookGUI::showCitation (   $page_xml)

Definition at line 70 of file class.ilObjDlBookGUI.php.

References $_GET, $_SESSION, ilObjectGUI\$data, __applyCitationText(), __parseCitationPost(), ilObjStyleSheet\getContentStylePath(), ilUtil\getStyleSheetLocation(), ilObjStyleSheet\getSyntaxStylePath(), xslt_create(), and xslt_process().

{
// content style
$this->tpl->setCurrentBlock("ContentStyle");
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
$this->tpl->parseCurrentBlock();
// syntax style
$this->tpl->setCurrentBlock("SyntaxStyle");
$this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
$this->tpl->parseCurrentBlock();
$this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
$parsed_post = $this->__parseCitationPost();
if(!count($parsed_post))
{
$_SESSION["citation_error"] = 1;
$this->ctrl->setParameterByClass('illmpresentationgui','frame','maincontent');
$this->ctrl->setParameterByClass('illmpresentationgui','obj_id',(int) $_GET['obj_id']);
$this->ctrl->redirectByClass('illmpresentationgui','layout');
}
$tmp_tpl = new ilTemplate("tpl.citation.xsl",true,true,"Modules/LearningModule");
$tmp_tpl->setVariable("CITATIONS",$this->lng->txt("cont_citations"));
foreach($parsed_post as $key => $data)
{
$tmp_tpl->setCurrentBlock("citation_row");
$tmp_tpl->setVariable("CITATION",$this->__applyCitationText($page_xml,$data["start"],$data["end"]));
$tmp_tpl->setVariable("PAGES_ROW",$data["text"]);
$tmp_tpl->parseCurrentBlock();
}
$xsl = $tmp_tpl->get();
$this->object->initBibItemObject();
$xml = $this->object->bib_obj->getXML();
if(empty($xml))
{
return true;
}
$args = array( '/_xml' => $xml, '/_xsl' => $xsl );
$xh = xslt_create();
$params = array ('target_id' => $_SESSION["bib_id"]);
$output = xslt_process($xh,"arg:/_xml","arg:/_xsl",NULL,$args, $params);
$this->tpl->setCurrentBlock("ilPage");
$this->tpl->setVariable("PAGE_CONTENT",$output);
$this->tpl->parseCurrentBlock();
return true;
}

+ Here is the call graph for this function:

ilObjDlBookGUI::showTranslationSelect (   $a_result)

Definition at line 503 of file class.ilObjDlBookGUI.php.

References $path, getContextPath(), and ilObjectFactory\getInstanceByRefId().

Referenced by addTranslation().

{
include_once "./Services/Object/classes/class.ilObjectFactory.php";
foreach($a_result["meta"] as $book)
{
if(!($path = $this->getContextPath($book["id"])))
{
continue;
}
$tmp_obj = ilObjectFactory::getInstanceByRefId($book["id"]);
$this->tpl->setCurrentBlock("TR_SELECT_ROW");
$this->tpl->setVariable("ROW_ID",$book["id"]);
$this->tpl->setVariable("ROW_TITLE",$tmp_obj->getTitle());
$this->tpl->setVariable("ROW_DESCRIPTION",$tmp_obj->getDescription());
$this->tpl->setVariable("ROW_KONTEXT",$path);
$this->tpl->parseCurrentBlock();
unset($tmp_obj);
}
$this->tpl->setCurrentBlock("TR_SELECT");
$this->tpl->setVariable("SELECT_TXT",$this->lng->txt("cont_select_translation"));
$this->tpl->setVariable("SELECT_TITLE",$this->lng->txt("title"));
$this->tpl->setVariable("SELECT_DESCRIPTION",$this->lng->txt("description"));
$this->tpl->setVariable("SELECT_KONTEXT",$this->lng->txt("context"));
$this->tpl->setVariable("BTN1_VALUE",$this->lng->txt("assign"));
$this->tpl->setVariable("BTN2_VALUE",$this->lng->txt("cancel"));
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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