Public Member Functions

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)

Detailed Description

Class ilObjDlBookGUI.

Author:
Databay AG <ay@databay.de>
Version:
Id:
class.ilObjDlBookGUI.php 11711 2006-07-30 14:11:38Z akill

ilObjDlBookGUI: ilLMPageObjectGUI, ilStructureObjectGUI, ilObjStyleSheetGUI, ilMDEditorGUI ilObjDlBookGUI: ilLearningProgressGUI, ilPermissionGUI

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


Member Function Documentation

ilObjDlBookGUI::__applyCitationText ( page_xml,
a_start,
a_end 
)

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

References $output, ilObjectGUI::$tpl, xslt_create(), and xslt_process().

Referenced by showCitation().

        {
                global $tpl;

                return true;

/*
                include_once("./content/classes/class.ilCitationTextParser.php");

                $ct_parser = new ilCitationTextParser($page_xml);
                $ct_parser->setStartId($a_start);
                $ct_parser->setEndId($a_end);
                $ct_parser->startParsing();

                echo $ct_parser->output;

                return "hallo";
*/


#               var_dump("<pre>",htmlentities($page_xml),"</pre>");exit;
                // NO TRANSLATIONS IN THE MOMENT
                #$tmp_tpl = new ilTemplate("tpl.citation_paragraph.xsl",true,true,"content");
                #$xsl = $tmp_tpl->get();

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

References $_POST.

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

ilObjDlBookGUI::__parseCitationPost (  ) 

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

References $_POST, $id, $key, and $output.

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

References $_POST, $id, $result, exit, searchTranslation(), sendInfo(), ilObjContentObjectGUI::setTabs(), and showTranslationSelect().

        {
                $this->setTabs();
                
                // SEARCH CANCELED
                if(isset($_POST["cancel"]))
                {
                        $this->ctrl->redirect($this, "properties");
                        exit;
                }
                if(isset($_POST["select"]))
                {
                        if(is_array($_POST["id"]))
                        {
                                foreach($_POST["id"] as $id)
                                {
                                        if($id != $this->object->getRefId())
                                        {
                                                $this->object->addTranslation($id);
                                        }
                                }
                                sendInfo($this->lng->txt("cont_translations_assigned"),true);
                                $this->ctrl->redirect($this, "properties");
                                exit;
                        }
                }
                $show_search = true;

                $this->tpl->addBlockfile("ADM_CONTENT","adm_content","tpl.dbk_search_translation.html",true);
                $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:
                                        sendInfo($this->lng->txt("cont_no_object_found"));
                                        break;
                                case 1:
                                        if($result["meta"][0]["id"] == $this->object->getRefId())
                                        {
                                                sendInfo($this->lng->txt("cont_no_assign_itself"));
                                                break;
                                        }
                                default:
                                        $this->showTranslationSelect($result);
                                        $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("content/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 494 of file class.ilObjDlBookGUI.php.

References $_POST, exit, and sendInfo().

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

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 267 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_id id of endnode
int $a_startnode_id id of startnode

Reimplemented from ilObjContentObjectGUI.

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

References ilObjectGUI::$tree.

Referenced by showTranslationSelect().

        {
                $path = "";

                include_once("./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:
@access public
Returns:

Definition at line 281 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", true);
                $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 398 of file class.ilObjDlBookGUI.php.

References ilObjectFactory::getInstanceByRefId().

        {
                // OVERWRITTEN METHOD, TO ADD TRANSLATIONS
                parent::properties();

                // 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)
                        {
                                $tmp_obj = ilObjectFactory::getInstanceByRefId($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 541 of file class.ilObjDlBookGUI.php.

References $_POST, $_SESSION, exit, and 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
                {
                        sendInfo($message,true);
                        $this->ctrl->redirect($this, "addTranslation");
                        exit;
                }
                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 324 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 350 of file class.ilObjDlBookGUI.php.

References $_GET, and $_POST.

        {
                include_once("./classes/class.ilTemplate.php");

                $tpl_menu =& new ilTemplate("tpl.lm_menu.html", true, true, true);

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

References $_POST, $output, ilObjStyleSheet::getContentStylePath(), ilObjectFactory::getInstanceByRefId(), ilUtil::getStyleSheetLocation(), ilObjStyleSheet::getSyntaxStylePath(), 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",
                        ilObjStyleSheet::getSyntaxStylePath());
                $this->tpl->parseCurrentBlock();

                $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
                $this->tpl->setCurrentBlock("ilPage");

                $tmp_tpl = new ilTemplate("tpl.bibliography.xsl",true,true,"content");
                $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)
                {

                        $params = array ('mode'                 => "view_full",
                                                         'action'               => "lm_presentation.php?cmd=layout&frame=maincontent&ref_id=$_GET[ref_id]",
                                                         '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'                       => "lm_presentation.php?cmd=layout&frame=maincontent&ref_id=$_GET[ref_id]");
                        $params = array ('mode'                         => "view_simple",
                                                         'action'                       => $action);
                        $this->ctrl->clearParametersByClass("illmpresentationgui");
                        if($translations = $this->object->getTranslations())
                        {
                                foreach($translations as $tr_id)
                                {
                                        $tmp_obj = ilObjectFactory::getInstanceByRefId($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)
                {
                        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, $key, $output, __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",
                        ilObjStyleSheet::getSyntaxStylePath());
                $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');
                        #header("location: lm_presentation.php?cmd=layout&frame=maincontent&ref_id=$_GET[ref_id]&obj_id=$_GET[obj_id]");
                        #exit;
                }
                $tmp_tpl = new ilTemplate("tpl.citation.xsl",true,true,"content");
                $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 508 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: