ILIAS  Release_3_10_x_branch Revision 61812
 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 ()
 explorer ()
 output explorer tree
 popup ()
 popup window for wysiwyg editor
 proceedDragDrop ()
 proceed drag and drop operations on pages/chapters
 saveProperties ()
 save properties
 createObject ()
 form for new content object creation
 saveObject ()
 save new content object to db
 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.
 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 ()
 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
 exportMenu ()
 show list of export files
 exportList ()
 viewExportLog ()
 downloadExportFile ()
 download export file
 publishExportFile ()
 download export file
 downloadPDFFile ()
 download export file
 confirmDeleteExportFile ()
 confirmation screen for export file deletion
 cancelDeleteExportFile ()
 cancel deletion of export files
 deleteExportFile ()
 delete export files
 fixTreeConfirm ()
 confirm screen for tree fixing
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 cancelFixTree ()
 cancel tree fixing
 fixTree ()
 fix tree
 setilLMMenu ($a_offline=false, $a_export_format="", $a_active="content", $a_use_global_tabs=false)
 get lm menu html
 createPDF ()
 export content object
 exportHTML ()
 create html package
 exportSCORM ()
 create scorm package
 addLocations ($a_omit_obj_id=false)
 display locator
 setTabs ()
 output tabs
 getTabs (&$tabs_gui)
 adds tabs to tab gui object
 editPublicSection ()
 savePublicSection ()
 history ()
 history
 linkChecker ()
 saveLinkCheck ()
 refreshLinkCheck ()
 __initLinkChecker ()
 __initLMMenuEditor ()
 addMenuEntry ()
 display add 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)
- 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
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 showUpperIcon ()
 showMountWebfolderIcon ()
 setAdminTabs ()
 set admin tabs public
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getHTML ()
 setActions ($a_actions="")
 set possible actions for objects in list.
 setSubObjects ($a_sub_objects="")
 set possible subobjects for this object.
 setLocator ()
 set Locator
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 omitLocator ($a_omit=true)
 addAdminLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 undeleteObject ()
 get object back from trash
 insertSavedNodes ($a_source_id, $a_dest_id, $a_tree_id, &$a_affected_ids)
 recursive method to insert all saved nodes of the clipboard (maybe this function could be moved to a rbac class ?)
 confirmedDeleteObject ()
 confirmed deletion if object -> objects are moved to trash
 cancelDeleteObject ()
 cancel deletion of object
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method
 removeDeletedNodes ($a_node_id, $a_checked, $a_delete_objects, &$a_affected_ids)
 remove already deleted objects within the objects in trash recursive function
 editObject ()
 edit object
 displayEditForm ($fields)
 display edit form (usually called by editObject)
 updateObject ()
 updates object entry in object_data
 afterUpdate ()
 permObject ()
 show permissions of current node
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 permSaveObject ()
 save permissions
 isVisible ($a_ref_id, $a_type)
 displayList ()
 display object list
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 display deletion confirmation screen only for referenced objects.
 trashObject ()
 show trash content of object
 addRoleObject ()
 adds a local role This method is only called when choose the option 'you may add local roles'.
 showActions ($with_subobjects=false)
 show possible action (form buttons)
 getActions ()
 Get Actions.
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 __showButton ($a_cmd, $a_text, $a_target= '')
 hitsperpageObject ()
__initTableGUI ()
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table
 __showClipboardTable ($a_result_set, $a_from="")
 infoObject ()
 __buildRoleFilterSelect ()
 __filterRoles ($a_roles, $a_filter)
 ownerObject ()
 changeOwnerObject ()
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning.
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 Add an object search in case the number of existing objects is too big to offer a selection list.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.
 copyWizardHasOptions ($a_mode)
 Check if there is any modules specific option.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="")

Additional Inherited Members

- Data Fields inherited from ilObjContentObjectGUI
 $ctrl
- Protected Member Functions inherited from ilObjectGUI
 searchCloneSourceObject ()
 Search clone source by title.
 buildCloneSelect ($existing_objs)
 Build a select box for clonable objects (permission write)

Detailed Description

Member Function Documentation

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

Definition at line 644 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 590 of file class.ilObjDlBookGUI.php.

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

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

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 425 of file class.ilObjDlBookGUI.php.

References $result, exit, searchTranslation(), ilUtil\sendInfo(), ilObjContentObjectGUI\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::sendInfo($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::sendInfo($this->lng->txt("cont_no_object_found"));
break;
case 1:
if($result["meta"][0]["id"] == $this->object->getRefId())
{
ilUtil::sendInfo($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 60 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 491 of file class.ilObjDlBookGUI.php.

References exit, and ilUtil\sendInfo().

{
if(!$_POST["id"])
{
ilUtil::sendInfo($this->lng->txt("cont_select_one_translation"));
$this->ctrl->redirect($this, "properties");
}
$this->object->deleteTranslations($_POST["id"]);
ilUtil::sendInfo($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 264 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 563 of file class.ilObjDlBookGUI.php.

References 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 46 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 278 of file class.ilObjDlBookGUI.php.

References $_GET.

{
//$tpl_offline =& new ilTemplate("tpl.");
//vd($this->tpl);
$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 395 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 "./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 538 of file class.ilObjDlBookGUI.php.

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

Referenced by addTranslation().

{
include_once("./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 321 of file class.ilObjDlBookGUI.php.

References $_GET.

{
include_once("./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 347 of file class.ilObjDlBookGUI.php.

References $_GET.

{
include_once("./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 128 of file class.ilObjDlBookGUI.php.

References 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 69 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 505 of file class.ilObjDlBookGUI.php.

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

Referenced by addTranslation().

{
include_once "./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: