当前位置: 首页>>代码示例>>PHP>>正文


PHP ilTemplate::touchBlock方法代码示例

本文整理汇总了PHP中ilTemplate::touchBlock方法的典型用法代码示例。如果您正苦于以下问题:PHP ilTemplate::touchBlock方法的具体用法?PHP ilTemplate::touchBlock怎么用?PHP ilTemplate::touchBlock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilTemplate的用法示例。


在下文中一共展示了ilTemplate::touchBlock方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: generateDBUpdateForInstallation

 public function generateDBUpdateForInstallation()
 {
     $tpl = new ilTemplate(dirname(__FILE__) . '/templates/dbupdate.txt', true, true);
     $ar = $this->getAr();
     $tpl->setVariable('TABLE_NAME', $ar->getConnectorContainerName());
     $tpl->setVariable('TABLE_NAME2', $ar->getConnectorContainerName());
     $tpl->setVariable('TABLE_NAME3', $ar->getConnectorContainerName());
     $tpl->setVariable('STEP', $this->getStep());
     $tpl->setVariable('PRIMARY', $this->getAr()->getArFieldList()->getPrimaryFieldName());
     foreach ($this->getAr()->getArFieldList()->getFields() as $field) {
         $tpl->touchBlock('field');
         $tpl->setVariable('FIELD_NAME', $field->getName());
         foreach ($field->getAttributesForConnector() as $name => $value) {
             $tpl->setCurrentBlock('attribute');
             $tpl->setVariable('NAME', arFieldList::mapKey($name));
             $tpl->setVariable('VALUE', $value);
             $tpl->parseCurrentBlock();
         }
     }
     if ($this->getAr()->getArFieldList()->getPrimaryField()->getFieldType() == arField::FIELD_TYPE_INTEGER) {
         $tpl->setCurrentBlock('attribute');
         $tpl->setVariable('TABLE_NAME4', $ar->getConnectorContainerName());
         $tpl->parseCurrentBlock();
     }
     header('Content-type: application/x-httpd-php');
     header("Content-Disposition: attachment; filename=\"dbupdate.php\"");
     echo $tpl->get();
     exit;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:29,代码来源:class.arBuilder.php

示例2: insertIconsAndCheckboxes

 public function insertIconsAndCheckboxes()
 {
     global $lng, $ilias;
     // FSX removed $this->getCheckboxStatus() in if-Statement: 0014726
     if (!$ilias->getSetting('custom_icons')) {
         parent::insertIconsAndCheckboxes();
         return;
     }
     $icons_cache = ilObjOrgUnit::getIconsCache();
     if (isset($icons_cache[$this->obj_id])) {
         $icon_file = $icons_cache[$this->obj_id];
         // icon link
         if (!$this->default_command or !$this->getCommandsStatus() and !$this->restrict_to_goto) {
         } else {
             $this->tpl->setCurrentBlock("icon_link_s");
             if ($this->default_command["frame"] != "") {
                 $this->tpl->setVariable("ICON_TAR", "target='" . $this->default_command["frame"] . "'");
             }
             $this->tpl->setVariable("ICON_HREF", $this->default_command["link"]);
             $this->tpl->parseCurrentBlock();
             $this->tpl->touchBlock("icon_link_e");
         }
         $this->enableIcon(false);
         if ($this->getContainerObject()->isActiveAdministrationPanel() && !$_SESSION['clipboard']) {
             $this->tpl->touchBlock("i_1");
             // indent main div  }
             $this->tpl->touchBlock("d_2");
             // indent main div  } #0014913
         } else {
             $this->tpl->touchBlock("d_1");
         }
         parent::insertIconsAndCheckboxes();
         $this->tpl->setCurrentBlock("icon");
         $this->tpl->setVariable("ALT_ICON", $lng->txt("icon") . " " . $lng->txt("obj_" . $this->getIconImageType()));
         $this->tpl->setVariable("SRC_ICON", $icon_file);
         $this->tpl->parseCurrentBlock();
         $this->enableIcon(true);
     } else {
         parent::insertIconsAndCheckboxes();
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:41,代码来源:class.ilObjOrgUnitListGUI.php

示例3: get

 /**
  * Get icon html
  *
  * @param string $a_type icons type ICON_RSS | ICON_ICAL
  * @param string $a_href href
  * @return string icon html
  */
 static function get($a_type, $a_href = "")
 {
     $tpl = new ilTemplate("tpl.rss_icon.html", true, true, "Services/News");
     if ($a_href != "") {
         $tpl->setCurrentBlock("a_start");
         $tpl->setVariable("HREF", $a_href);
         $tpl->parseCurrentBlock();
         $tpl->touchBlock("a_end");
     }
     $text = "";
     switch ($a_type) {
         case self::ICON_RSS:
             $text = "RSS";
             break;
         case self::ICON_RSS_AUDIO:
             $text = "RSS Audio";
             break;
         case self::ICON_RSS_VIDEO:
             $text = "RSS Video";
             break;
         case self::ICON_ICAL:
             $text = "iCal";
             break;
         case self::ICON_ITUNES:
             $text = "iTunes";
             break;
         case self::ICON_ITUNES_AUDIO:
             $text = "iTunes Audio";
             break;
         case self::ICON_ITUNES_VIDEO:
             $text = "iTunes Video";
             break;
     }
     $tpl->setVariable("TEXT", $text);
     return $tpl->get();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:43,代码来源:class.ilRSSButtonGUI.php

示例4: getResultsHeadUserAndPass

 /**
  * Returns the user and pass data for a test results output
  *
  * @param integer $active_id The active ID of the user
  * @return string HTML code of the user data for the test results
  * @access public
  */
 function getResultsHeadUserAndPass($active_id, $pass)
 {
     $template = new ilTemplate("tpl.il_as_tst_results_head_user_pass.html", TRUE, TRUE, "Modules/Test");
     include_once './Services/User/classes/class.ilObjUser.php';
     $user_id = $this->object->_getUserIdFromActiveId($active_id);
     if (strlen(ilObjUser::_lookupLogin($user_id)) > 0) {
         $user = new ilObjUser($user_id);
     } else {
         $user = new ilObjUser();
         $user->setLastname($this->lng->txt("deleted_user"));
     }
     $title_matric = "";
     if (strlen($user->getMatriculation()) && $this->object->getAnonymity() == FALSE) {
         $template->setCurrentBlock("user_matric");
         $template->setVariable("TXT_USR_MATRIC", $this->lng->txt("matriculation"));
         $template->parseCurrentBlock();
         $template->setCurrentBlock("user_matric_value");
         $template->setVariable("VALUE_USR_MATRIC", $user->getMatriculation());
         $template->parseCurrentBlock();
         $template->touchBlock("user_matric_separator");
         $title_matric = " - " . $this->lng->txt("matriculation") . ": " . $user->getMatriculation();
     }
     $invited_user = array_pop($this->object->getInvitedUsers($user_id));
     if (strlen($invited_user["clientip"])) {
         $template->setCurrentBlock("user_clientip");
         $template->setVariable("TXT_CLIENT_IP", $this->lng->txt("client_ip"));
         $template->parseCurrentBlock();
         $template->setCurrentBlock("user_clientip_value");
         $template->setVariable("VALUE_CLIENT_IP", $invited_user["clientip"]);
         $template->parseCurrentBlock();
         $template->touchBlock("user_clientip_separator");
         $title_client = " - " . $this->lng->txt("clientip") . ": " . $invited_user["clientip"];
     }
     $template->setVariable("TXT_USR_NAME", $this->lng->txt("name"));
     $uname = $this->object->userLookupFullName($user_id, FALSE);
     $template->setVariable("VALUE_USR_NAME", $uname);
     $template->setVariable("TXT_PASS", $this->lng->txt("scored_pass"));
     $template->setVariable("VALUE_PASS", $pass);
     return $template->get();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:47,代码来源:class.ilTestServiceGUI.php

示例5: getHTML

 /**
  * Get HTML
  *
  * @param
  * @return
  */
 function getHTML()
 {
     global $ilCtrl;
     $tpl = new ilTemplate("tpl.grouped_list.html", true, true, "Services/UIComponent/GroupedList");
     $tt_calls = "";
     foreach ($this->items as $i) {
         switch ($i["type"]) {
             case "sep":
                 $tpl->touchBlock("sep");
                 $tpl->touchBlock("item");
                 break;
             case "next_col":
                 $tpl->touchBlock("next_col");
                 $tpl->touchBlock("item");
                 break;
             case "group_head":
                 $tpl->setCurrentBlock("group_head");
                 if ($i["add_class"] != "") {
                     $tpl->setVariable("ADD_CLASS", $i["add_class"]);
                 }
                 $tpl->setVariable("GROUP_HEAD", $i["content"]);
                 $tpl->parseCurrentBlock();
                 $tpl->touchBlock("item");
                 break;
             case "entry":
                 if ($i["href"] != "") {
                     $tpl->setCurrentBlock("linked_entry");
                     if ($i["add_class"] != "") {
                         $tpl->setVariable("ADD_CLASS", $i["add_class"]);
                     }
                     $tpl->setVariable("HREF", $i["href"]);
                     $tpl->setVariable("TXT_ENTRY", $i["content"]);
                     if ($i["target"] != "") {
                         $tpl->setVariable("TARGET", 'target="' . $i["target"] . '"');
                     } else {
                         $tpl->setVariable("TARGET", 'target="_top"');
                     }
                     if ($i["onclick"] != "") {
                         $tpl->setVariable("ONCLICK", 'onclick="' . $i["onclick"] . '"');
                     }
                     if ($i["id"] != "") {
                         $tpl->setVariable("ID", 'id="' . $i["id"] . '"');
                     }
                     $tpl->parseCurrentBlock();
                     $tpl->touchBlock("item");
                     if ($i["ttip"] != "" && $i["id"] != "") {
                         include_once "./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php";
                         if ($ilCtrl->isAsynch()) {
                             $tt_calls .= " " . ilTooltipGUI::getTooltip($i["id"], $i["ttip"], "", $i["tt_my"], $i["tt_at"], $i["tt_use_htmlspecialchars"]);
                         } else {
                             ilTooltipGUI::addTooltip($i["id"], $i["ttip"], "", $i["tt_my"], $i["tt_at"], $i["tt_use_htmlspecialchars"]);
                         }
                     }
                 } else {
                     $tpl->setCurrentBlock("unlinked_entry");
                     if ($i["add_class"] != "") {
                         $tpl->setVariable("ADD_CLASS2", $i["add_class"]);
                     }
                     $tpl->setVariable("TXT_ENTRY2", $i["content"]);
                     $tpl->parseCurrentBlock();
                 }
                 break;
         }
     }
     if ($this->multi_column) {
         $tpl->touchBlock("multi_start");
         $tpl->touchBlock("multi_end");
     }
     if ($tt_calls != "") {
         $tpl->setCurrentBlock("script");
         $tpl->setVariable("TT_CALLS", $tt_calls);
         $tpl->parseCurrentBlock();
     }
     if ($this->getAsDropDown()) {
         if ($this->dd_pullright) {
             $tpl->setVariable("LIST_CLASS", "dropdown-menu pull-right");
         } else {
             $tpl->setVariable("LIST_CLASS", "dropdown-menu");
         }
         $tpl->setVariable("LIST_ROLE", "menu");
     } else {
         $tpl->setVariable("LIST_CLASS", "");
         $tpl->setVariable("LIST_ROLE", "");
     }
     return $tpl->get();
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:92,代码来源:class.ilGroupedListGUI.php

示例6: getHTML

 /**
  * Get locator HTML
  */
 function getHTML()
 {
     global $lng, $ilSetting;
     if ($this->getTextOnly()) {
         $loc_tpl = new ilTemplate("tpl.locator_text_only.html", true, true, "Services/Locator");
     } else {
         $loc_tpl = new ilTemplate("tpl.locator.html", true, true, "Services/Locator");
     }
     $items = $this->getItems();
     $first = true;
     if (is_array($items)) {
         foreach ($items as $item) {
             if (!$first) {
                 $loc_tpl->touchBlock("locator_separator_prefix");
             }
             if ($item["ref_id"] > 0) {
                 $obj_id = ilObject::_lookupObjId($item["ref_id"]);
                 $type = ilObject::_lookupType($obj_id);
                 if (!$this->getTextOnly()) {
                     $icon_path = ilObject::_getIcon($obj_id, "tiny", $type, $this->getOffline());
                 }
                 $loc_tpl->setCurrentBlock("locator_img");
                 $loc_tpl->setVariable("IMG_SRC", $icon_path);
                 $loc_tpl->setVariable("IMG_ALT", $lng->txt("obj_" . $type));
                 $loc_tpl->parseCurrentBlock();
             }
             $loc_tpl->setCurrentBlock("locator_item");
             if ($item["link"] != "") {
                 $loc_tpl->setVariable("LINK_ITEM", $item["link"]);
                 if ($item["frame"] != "") {
                     $loc_tpl->setVariable("LINK_TARGET", ' target="' . $item["frame"] . '" ');
                 }
                 $loc_tpl->setVariable("ITEM", $item["title"]);
             } else {
                 $loc_tpl->setVariable("PREFIX", $item["title"]);
             }
             $loc_tpl->parseCurrentBlock();
             $first = false;
         }
     } else {
         $loc_tpl->setVariable("NOITEM", " ");
         $loc_tpl->touchBlock("locator");
     }
     $loc_tpl->setVariable("TXT_BREADCRUMBS", $lng->txt("breadcrumb_navigation"));
     return trim($loc_tpl->get());
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:49,代码来源:class.ilLocatorGUI.php

示例7: getBBMenu

 /**
  * Get the bb menu incl. script
  */
 function getBBMenu($a_ta_name = "par_content")
 {
     global $lng, $ilCtrl;
     include_once "./Services/COPage/classes/class.ilPageEditorSettings.php";
     $btpl = new ilTemplate("tpl.bb_menu.html", true, true, "Services/COPage");
     // not nice, should be set by context per method
     //if ($this->pg_obj->getParentType() == "gdf" ||
     //	$this->pg_obj->getParentType() == "lm" ||
     //	$this->pg_obj->getParentType() == "dbk")
     if ($this->getPageConfig()->getEnableInternalLinks()) {
         $btpl->setCurrentBlock("bb_ilink_button");
         $btpl->setVariable("BB_LINK_ILINK", $this->ctrl->getLinkTargetByClass("ilInternalLinkGUI", "showLinkHelp"));
         $btpl->parseCurrentBlock();
         // add int link parts
         include_once "./Services/Link/classes/class.ilInternalLinkGUI.php";
         $btpl->setCurrentBlock("int_link_prep");
         $btpl->setVariable("INT_LINK_PREP", ilInternalLinkGUI::getInitHTML($ilCtrl->getLinkTargetByClass(array("ilpageeditorgui", "ilinternallinkgui"), "", false, true, false), true));
         $btpl->parseCurrentBlock();
     }
     if ($this->getPageConfig()->getEnableKeywords()) {
         $btpl->touchBlock("bb_kw_button");
         $btpl->setVariable("TXT_KW", $this->lng->txt("cont_text_keyword"));
     }
     if ($this->pg_obj->getParentType() == "wpg") {
         $btpl->setCurrentBlock("bb_wikilink_button2");
         $btpl->setVariable("TXT_WIKI_BUTTON2", $lng->txt("obj_wiki"));
         $btpl->setVariable("WIKI_BUTTON2_URL", $ilCtrl->getLinkTargetByClass("ilwikipagegui", ""));
         $btpl->parseCurrentBlock();
         $btpl->setCurrentBlock("bb_wikilink_button");
         $btpl->setVariable("TXT_WLN2", $lng->txt("wiki_wiki_page"));
         $btpl->parseCurrentBlock();
     }
     $mathJaxSetting = new ilSetting("MathJax");
     $style = $this->getStyle();
     //echo URL_TO_LATEX;
     foreach (self::$common_bb_buttons as $c => $st) {
         if (ilPageEditorSettings::lookupSettingByParentType($this->pg_obj->getParentType(), "active_" . $c, true)) {
             if ($c != "tex" || $mathJaxSetting->get("enable") || defined("URL_TO_LATEX")) {
                 $btpl->touchBlock("bb_" . $c . "_button");
                 $btpl->setVariable("TXT_" . strtoupper($c), $this->lng->txt("cont_text_" . $c));
             }
         }
     }
     if ($this->getPageConfig()->getEnableAnchors()) {
         $btpl->touchBlock("bb_anc_button");
         $btpl->setVariable("TXT_ANC", $lng->txt("cont_anchor") . ":");
     }
     // footnote
     //		$btpl->setVariable("TXT_FN", $this->lng->txt("cont_text_fn"));
     //		$btpl->setVariable("TXT_CODE", $this->lng->txt("cont_text_code"));
     $btpl->setVariable("TXT_ILN", $this->lng->txt("cont_text_iln"));
     //		$btpl->setVariable("TXT_XLN", $this->lng->txt("cont_text_xln"));
     //		$btpl->setVariable("TXT_TEX", $this->lng->txt("cont_text_tex"));
     $btpl->setVariable("TXT_BB_TIP", $this->lng->txt("cont_bb_tip"));
     $btpl->setVariable("TXT_WLN", $lng->txt("wiki_wiki_page"));
     $btpl->setVariable("PAR_TA_NAME", $a_ta_name);
     return $btpl->get();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:61,代码来源:class.ilPageContentGUI.php

示例8: getHTML

 /**
  * render attendance list
  *
  * @return string
  */
 public function getHTML()
 {
     $tpl = new ilTemplate('tpl.attendance_list_print.html', true, true, 'Services/Membership');
     // title
     $time = ilFormat::formatUnixTime(time(), true);
     $tpl->setVariable('TXT_TITLE', $this->title);
     if ($this->description) {
         $tpl->setVariable('TXT_DESCRIPTION', $this->description . " (" . $time . ")");
     } else {
         $tpl->setVariable('TXT_DESCRIPTION', $time);
     }
     // header
     $tpl->setCurrentBlock('head_item');
     foreach ($this->presets as $id => $item) {
         if ($item[1]) {
             $tpl->setVariable('TXT_HEAD', $item[0]);
             $tpl->parseCurrentBlock();
         }
     }
     if ($this->blank_columns) {
         foreach ($this->blank_columns as $blank) {
             $tpl->setVariable('TXT_HEAD', $blank);
             $tpl->parseCurrentBlock();
         }
     }
     // handle members
     $member_ids = array();
     if ($this->show_admins) {
         $member_ids = array_merge((array) $member_ids, $this->participants->getAdmins());
     }
     if ($this->show_tutors) {
         $member_ids = array_merge((array) $member_ids, $this->participants->getTutors());
     }
     if ($this->show_members) {
         $member_ids = array_merge((array) $member_ids, $this->participants->getMembers());
     }
     $member_ids = ilUtil::_sortIds((array) $member_ids, 'usr_data', 'lastname', 'usr_id');
     // rows
     foreach ($member_ids as $user_id) {
         if ($this->callback) {
             $user_data = call_user_func_array($this->callback, array($user_id));
             $tpl->setCurrentBlock("row_preset");
             foreach ($this->presets as $id => $item) {
                 if ($item[1]) {
                     switch ($id) {
                         case "name":
                             if (!$user_data[$id]) {
                                 $name = ilObjUser::_lookupName($user_id);
                                 $value = $name["lastname"] . ", " . $name["firstname"];
                                 break;
                             }
                         case "email":
                             if (!$user_data[$id]) {
                                 $value = ilObjUser::_lookupEmail($user_id);
                                 break;
                             }
                         case "login":
                             if (!$user_data[$id]) {
                                 $value = ilObjUser::_lookupLogin($user_id);
                                 break;
                             }
                         default:
                             $value = (string) $user_data[$id];
                             break;
                     }
                     $tpl->setVariable("TXT_PRESET", $value);
                     $tpl->parseCurrentBlock();
                 }
             }
         }
         if ($this->blank_columns) {
             for ($loop = 0; $loop < sizeof($this->blank_columns); $loop++) {
                 $tpl->touchBlock('row_blank');
             }
         }
         $tpl->touchBlock("member_row");
     }
     return $tpl->get();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:84,代码来源:class.ilAttendanceList.php

示例9: addYesNoDialog

 static function addYesNoDialog($dialogname, $headertext, $message, $yesaction, $noaction, $defaultyes, $icon = "help")
 {
     global $tpl, $lng;
     self::initSimpleDialog();
     $template = new ilTemplate("tpl.yes_no_dialog.js", TRUE, TRUE, "Services/YUI");
     $template->setVariable("DIALOGNAME", $dialogname);
     $template->setVariable("YES_ACTION", $yesaction);
     $template->setVariable("NO_ACTION", $noaction);
     $template->setVariable("DIALOG_HEADER", $headertext);
     $template->setVariable("DIALOG_MESSAGE", $message);
     $template->setVariable("TEXT_YES", $lng->txt("yes"));
     $template->setVariable("TEXT_NO", $lng->txt("no"));
     switch ($icon) {
         case "warn":
             $template->setVariable("ICON", "YAHOO.widget.SimpleDialog.ICON_WARN");
             break;
         case "tip":
             $template->setVariable("ICON", "YAHOO.widget.SimpleDialog.ICON_TIP");
             break;
         case "info":
             $template->setVariable("ICON", "YAHOO.widget.SimpleDialog.ICON_INFO");
             break;
         case "block":
             $template->setVariable("ICON", "YAHOO.widget.SimpleDialog.ICON_BLOCK");
             break;
         case "alarm":
             $template->setVariable("ICON", "YAHOO.widget.SimpleDialog.ICON_ALARM");
             break;
         case "help":
         default:
             $template->setVariable("ICON", "YAHOO.widget.SimpleDialog.ICON_HELP");
             break;
     }
     if ($defaultyes) {
         $template->touchBlock("isDefaultYes");
     } else {
         $template->touchBlock("isDefaultNo");
     }
     $tpl->setCurrentBlock("HeadContent");
     $tpl->setVariable("CONTENT_BLOCK", $template->get());
     $tpl->parseCurrentBlock();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:42,代码来源:class.ilYuiUtil.php

示例10: getTinyMenu

 /**
  * Get Tiny Menu
  */
 static function getTinyMenu($a_par_type, $a_int_links = false, $a_wiki_links = false, $a_keywords = false, $a_style_id = 0, $a_paragraph_styles = true, $a_save_return = true, $a_anchors = false, $a_save_new = true)
 {
     global $lng, $ilCtrl;
     $mathJaxSetting = new ilSetting("MathJax");
     include_once "./Services/COPage/classes/class.ilPageEditorSettings.php";
     include_once "./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php";
     $btpl = new ilTemplate("tpl.tiny_menu.html", true, true, "Services/COPage");
     // debug ghost element
     if (DEVMODE == 1) {
         $btpl->touchBlock("debug_ghost");
     }
     // bullet list
     $btpl->touchBlock("blist_button");
     ilTooltipGUI::addTooltip("il_edm_blist", $lng->txt("cont_blist"), "iltinymenu_bd");
     // numbered list
     $btpl->touchBlock("nlist_button");
     ilTooltipGUI::addTooltip("il_edm_nlist", $lng->txt("cont_nlist"), "iltinymenu_bd");
     // list indent
     $btpl->touchBlock("list_indent");
     ilTooltipGUI::addTooltip("ilIndentBut", $lng->txt("cont_list_indent"), "iltinymenu_bd");
     // list outdent
     $btpl->touchBlock("list_outdent");
     ilTooltipGUI::addTooltip("ilOutdentBut", $lng->txt("cont_list_outdent"), "iltinymenu_bd");
     if ($a_int_links) {
         $btpl->touchBlock("bb_ilink_button");
         ilTooltipGUI::addTooltip("iosEditInternalLinkTrigger", $lng->txt("cont_link_to_internal"), "iltinymenu_bd");
     }
     ilTooltipGUI::addTooltip("il_edm_xlink", $lng->txt("cont_link_to_external"), "iltinymenu_bd");
     // remove format
     $btpl->touchBlock("rformat_button");
     ilTooltipGUI::addTooltip("il_edm_rformat", $lng->txt("cont_remove_format"), "iltinymenu_bd");
     if ($a_paragraph_styles) {
         // new paragraph
         $btpl->setCurrentBlock("new_par");
         $btpl->setVariable("IMG_NEWPAR", "+");
         $btpl->parseCurrentBlock();
         ilTooltipGUI::addTooltip("il_edm_newpar", $lng->txt("cont_insert_new_paragraph"), "iltinymenu_bd");
         $btpl->setCurrentBlock("par_edit");
         $btpl->setVariable("TXT_PAR_FORMAT", $lng->txt("cont_par_format"));
         include_once "./Services/COPage/classes/class.ilPCParagraphGUI.php";
         $btpl->setVariable("STYLE_SELECTOR", ilPCParagraphGUI::getStyleSelector($a_selected, ilPCParagraphGUI::_getCharacteristics($a_style_id), true));
         ilTooltipGUI::addTooltip("ilAdvSelListAnchorText_style_selection", $lng->txt("cont_paragraph_styles"), "iltinymenu_bd");
         $btpl->parseCurrentBlock();
     }
     if ($a_keywords) {
         $btpl->setCurrentBlock("bb_kw_button");
         $btpl->setVariable("CC_KW", "kw");
         $btpl->parseCurrentBlock();
         ilTooltipGUI::addTooltip("il_edm_kw", $lng->txt("cont_text_keyword"), "iltinymenu_bd");
     }
     if ($a_wiki_links) {
         $btpl->setCurrentBlock("bb_wikilink_button2");
         $btpl->setVariable("TXT_WIKI_BUTTON2", $lng->txt("obj_wiki"));
         $btpl->setVariable("WIKI_BUTTON2_URL", $ilCtrl->getLinkTargetByClass("ilwikipagegui", ""));
         $btpl->parseCurrentBlock();
         $btpl->setCurrentBlock("bb_wikilink_button");
         $btpl->setVariable("TXT_WLN2", $lng->txt("obj_wiki"));
         $btpl->parseCurrentBlock();
         ilTooltipGUI::addTooltip("il_edm_wlink", $lng->txt("cont_link_to_wiki"), "iltinymenu_bd");
     }
     $aset = new ilSetting("adve");
     include_once "./Services/COPage/classes/class.ilPageContentGUI.php";
     foreach (ilPageContentGUI::_getCommonBBButtons() as $c => $st) {
         // these are handled via drop down now...
         if (in_array($c, array("com", "quot", "acc", "code"))) {
             continue;
         }
         if (ilPageEditorSettings::lookupSettingByParentType($a_par_type, "active_" . $c, true)) {
             $cc_code = $c;
             if ($aset->get("use_physical")) {
                 $cc_code = str_replace(array("str", "emp", "imp"), array("B", "I", "U"), $cc_code);
             }
             if ($c != "tex" || $mathJaxSetting->get("enable") || defined("URL_TO_LATEX")) {
                 $btpl->setCurrentBlock("bb_" . $c . "_button");
                 $btpl->setVariable("CC_" . strtoupper($c), $cc_code);
                 $btpl->parseCurrentBlock();
                 ilTooltipGUI::addTooltip("il_edm_cc_" . $c, $lng->txt("cont_cc_" . $c), "iltinymenu_bd");
                 //					$btpl->setVariable("TXT_".strtoupper($c), $this->lng->txt("cont_text_".$c));
             }
         }
     }
     if ($mathJaxSetting->get("enable") || defined("URL_TO_LATEX")) {
         ilTooltipGUI::addTooltip("il_edm_tex", $lng->txt("cont_tex"), "iltinymenu_bd");
     }
     ilTooltipGUI::addTooltip("il_edm_fn", $lng->txt("cont_fn"), "iltinymenu_bd");
     include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
     $sdd = new ilAdvancedSelectionListGUI();
     $sdd->setPullRight(false);
     $sdd->setListTitle($lng->txt("save") . "...");
     if ($a_save_return) {
         $btpl->setCurrentBlock("save_return");
         $btpl->setVariable("TXT_SAVE_RETURN", $lng->txt("save_return"));
         $btpl->parseCurrentBlock();
         $sdd->addItem($lng->txt("save_return"), "", "#", "", "", "", "", "", "ilCOPage.cmdSaveReturn(false); return false;");
     }
     if ($a_save_new) {
         $btpl->setCurrentBlock("save_new");
//.........这里部分代码省略.........
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.ilPageObjectGUI.php

示例11: addILIASFooter

 /**
  * add ILIAS footer
  */
 function addILIASFooter()
 {
     global $ilAuth;
     if (!$this->getAddFooter()) {
         return;
     }
     global $ilias, $ilClientIniFile, $ilCtrl, $ilDB, $ilSetting, $lng;
     $ftpl = new ilTemplate("tpl.footer.html", true, true, "Services/UICore");
     $ftpl->setVariable("ILIAS_VERSION", $ilias->getSetting("ilias_version"));
     $link_items = array();
     // imprint
     include_once "Services/Imprint/classes/class.ilImprint.php";
     if ($_REQUEST["baseClass"] != "ilImprintGUI" && ilImprint::isActive()) {
         include_once "Services/Link/classes/class.ilLink.php";
         $link_items[ilLink::_getStaticLink(0, "impr")] = array($lng->txt("imprint"), true);
     }
     $link_items["mailto:" . ilUtil::prepareFormOutput($ilSetting->get("feedback_recipient"))] = array($lng->txt("contact_sysadmin"), false);
     if (DEVMODE && version_compare(PHP_VERSION, '5', '>=')) {
         $link_items[ilUtil::appendUrlParameterString($_SERVER["REQUEST_URI"], "do_dev_validate=xhtml")] = array("Validate", true);
         $link_items[ilUtil::appendUrlParameterString($_SERVER["REQUEST_URI"], "do_dev_validate=accessibility")] = array("Accessibility", true);
     }
     // output translation link (extended language maintenance)
     if ($ilSetting->get("lang_ext_maintenance") == "1") {
         include_once "Services/Language/classes/class.ilObjLanguageAccess.php";
         if (ilObjLanguageAccess::_checkTranslate() and !ilObjLanguageAccess::_isPageTranslation()) {
             ilObjLanguageAccess::_saveUsages();
             $link_items[ilObjLanguageAccess::_getTranslationLink()] = array($lng->txt('translation'), true);
         }
     }
     $cnt = 0;
     foreach ($link_items as $url => $caption) {
         $cnt++;
         if ($caption[1]) {
             $ftpl->touchBlock("blank");
         }
         if ($cnt < sizeof($link_items)) {
             $ftpl->touchBlock("item_separator");
         }
         $ftpl->setCurrentBlock("items");
         $ftpl->setVariable("URL_ITEM", $url);
         $ftpl->setVariable("TXT_ITEM", $caption[0]);
         $ftpl->parseCurrentBlock();
     }
     if (DEVMODE) {
         // execution time
         $t1 = explode(" ", $GLOBALS['ilGlobalStartTime']);
         $t2 = explode(" ", microtime());
         $diff = $t2[0] - $t1[0] + $t2[1] - $t1[1];
         $mem_usage = array();
         if (function_exists("memory_get_usage")) {
             $mem_usage[] = "Memory Usage: " . memory_get_usage() . " Bytes";
         }
         if (function_exists("xdebug_peak_memory_usage")) {
             $mem_usage[] = "XDebug Peak Memory Usage: " . xdebug_peak_memory_usage() . " Bytes";
         }
         $mem_usage[] = round($diff, 4) . " Seconds";
         if (sizeof($mem_usage)) {
             $ftpl->setVariable("MEMORY_USAGE", "<br>" . implode(" | ", $mem_usage));
         }
         if (is_object($ilAuth) && isset($_SESSION[$ilAuth->_sessionName]) && isset($_SESSION[$ilAuth->_sessionName]["timestamp"])) {
             $ftpl->setVariable("SESS_INFO", "<br />maxlifetime: " . ini_get("session.gc_maxlifetime") . " (" . ini_get("session.gc_maxlifetime") / 60 . "), id: " . session_id() . "<br />" . "timestamp: " . date("Y-m-d H:i:s", $_SESSION[$ilAuth->_sessionName]["timestamp"]) . ", idle: " . date("Y-m-d H:i:s", $_SESSION[$ilAuth->_sessionName]["idle"]) . "<br />expire: " . ($exp = $ilClientIniFile->readVariable("session", "expire")) . " (" . $exp / 60 . "), session ends at: " . date("Y-m-d H:i:s", $_SESSION[$ilAuth->_sessionName]["idle"] + $exp));
         }
         if (!empty($_GET["do_dev_validate"]) && $ftpl->blockExists("xhtml_validation")) {
             require_once "Services/XHTMLValidator/classes/class.ilValidatorAdapter.php";
             $template2 = clone $this;
             //echo "-".ilValidatorAdapter::validate($template2->get(), $_GET["do_dev_validate"])."-";
             $ftpl->setCurrentBlock("xhtml_validation");
             $ftpl->setVariable("VALIDATION", ilValidatorAdapter::validate($template2->get("DEFAULT", false, false, false, true), $_GET["do_dev_validate"]));
             $ftpl->parseCurrentBlock();
         }
         // controller history
         if (is_object($ilCtrl) && $ftpl->blockExists("c_entry") && $ftpl->blockExists("call_history")) {
             $hist = $ilCtrl->getCallHistory();
             foreach ($hist as $entry) {
                 $ftpl->setCurrentBlock("c_entry");
                 $ftpl->setVariable("C_ENTRY", $entry["class"]);
                 if (is_object($ilDB)) {
                     $file = $ilCtrl->lookupClassPath($entry["class"]);
                     $add = $entry["mode"] . " - " . $entry["cmd"];
                     if ($file != "") {
                         $add .= " - " . $file;
                     }
                     $ftpl->setVariable("C_FILE", $add);
                 }
                 $ftpl->parseCurrentBlock();
             }
             $ftpl->setCurrentBlock("call_history");
             $ftpl->parseCurrentBlock();
             // debug hack
             $debug = $ilCtrl->getDebug();
             foreach ($debug as $d) {
                 $ftpl->setCurrentBlock("c_entry");
                 $ftpl->setVariable("C_ENTRY", $d);
                 $ftpl->parseCurrentBlock();
             }
             $ftpl->setCurrentBlock("call_history");
             $ftpl->parseCurrentBlock();
//.........这里部分代码省略.........
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.ilTemplate.php

示例12: getTestOutput


//.........这里部分代码省略.........
     }
     // shuffle output
     $terms = $this->object->getTerms();
     $definitions = $this->object->getDefinitions();
     switch ($this->object->getShuffle()) {
         case 1:
             $terms = $this->object->pcArrayShuffle($terms);
             if (count($solutions)) {
                 $definitions = $this->sortDefinitionsBySolution($solutions);
             } else {
                 $definitions = $this->object->pcArrayShuffle($definitions);
             }
             break;
         case 2:
             $terms = $this->object->pcArrayShuffle($terms);
             break;
         case 3:
             if (count($solutions)) {
                 $definitions = $this->sortDefinitionsBySolution($solutions);
             } else {
                 $definitions = $this->object->pcArrayShuffle($definitions);
             }
             break;
     }
     $maxcount = max(count($terms), count($definitions));
     for ($i = 0; $i < count($definitions); $i++) {
         $definition = $definitions[$i];
         if (is_object($definition)) {
             if (strlen($definition->picture)) {
                 $template->setCurrentBlock('definition_image');
                 $template->setVariable('ANSWER_IMAGE_URL', $this->object->getImagePathWeb() . $this->object->getThumbPrefix() . $definition->picture);
                 $template->setVariable('ANSWER_IMAGE_ALT', strlen($definition->text) ? ilUtil::prepareFormOutput($definition->text) : ilUtil::prepareFormOutput($definition->picture));
                 $template->setVariable('ANSWER_IMAGE_TITLE', strlen($definition->text) ? ilUtil::prepareFormOutput($definition->text) : ilUtil::prepareFormOutput($definition->picture));
                 $template->setVariable('URL_PREVIEW', $this->object->getImagePathWeb() . $definition->picture);
                 $template->setVariable("TEXT_PREVIEW", $this->lng->txt('preview'));
                 $template->setVariable("IMG_PREVIEW", ilUtil::getImagePath('enlarge.png'));
                 $template->setVariable("TEXT_DEFINITION", strlen($definition->text) ? $this->lng->txt('definition') . ' ' . ($i + 1) . ': ' . ilUtil::prepareFormOutput($definition->text) : $this->lng->txt('definition') . ' ' . ($i + 1));
                 $template->parseCurrentBlock();
             } else {
                 $template->setCurrentBlock('definition_text');
                 $template->setVariable("DEFINITION", $this->object->prepareTextareaOutput($definition->text, true));
                 $template->parseCurrentBlock();
             }
         }
         $template->setCurrentBlock('option');
         $template->setVariable("VALUE_OPTION", 0);
         $template->setVariable("TEXT_OPTION", ilUtil::prepareFormOutput($this->lng->txt('please_select')));
         $template->parseCurrentBlock();
         $j = 1;
         foreach ($terms as $term) {
             $template->setCurrentBlock('option');
             $template->setVariable("VALUE_OPTION", $term->identifier);
             $template->setVariable("TEXT_OPTION", strlen($term->text) ? $this->lng->txt('term') . ' ' . $j . ': ' . ilUtil::prepareFormOutput($term->text) : $this->lng->txt('term') . ' ' . $j);
             foreach ($solutions as $solution) {
                 if ($solution["value1"] == $term->identifier && $solution["value2"] == $definition->identifier) {
                     $template->setVariable("SELECTED_OPTION", " selected=\"selected\"");
                 }
             }
             $template->parseCurrentBlock();
             $j++;
         }
         $template->setCurrentBlock('row');
         $template->setVariable("TEXT_MATCHES", $this->lng->txt("matches"));
         if ($this->object->getEstimatedElementHeight() > 0) {
             $template->setVariable("ELEMENT_HEIGHT", " style=\"height: " . $this->object->getEstimatedElementHeight() . "px;\"");
         }
         $template->setVariable("QUESTION_ID", $this->object->getId());
         $template->setVariable("DEFINITION_ID", $definition->identifier);
         $template->parseCurrentBlock();
     }
     $i = 0;
     foreach ($terms as $term) {
         if (strlen($term->picture)) {
             $template->setCurrentBlock('term_image');
             $template->setVariable('ANSWER_IMAGE_URL', $this->object->getImagePathWeb() . $this->object->getThumbPrefix() . $term->picture);
             $template->setVariable('ANSWER_IMAGE_ALT', strlen($term->text) ? ilUtil::prepareFormOutput($term->text) : ilUtil::prepareFormOutput($term->picture));
             $template->setVariable('ANSWER_IMAGE_TITLE', strlen($term->text) ? ilUtil::prepareFormOutput($term->text) : ilUtil::prepareFormOutput($term->picture));
             $template->setVariable('URL_PREVIEW', $this->object->getImagePathWeb() . $term->picture);
             $template->setVariable("TEXT_PREVIEW", $this->lng->txt('preview'));
             $template->setVariable("TEXT_TERM", strlen($term->text) ? $this->lng->txt('term') . ' ' . ($i + 1) . ': ' . ilUtil::prepareFormOutput($term->text) : $this->lng->txt('term') . ' ' . ($i + 1));
             $template->setVariable("IMG_PREVIEW", ilUtil::getImagePath('enlarge.png'));
             $template->parseCurrentBlock();
         } else {
             $template->setCurrentBlock('term_text');
             $template->setVariable("TERM", $this->object->prepareTextareaOutput($term->text, true));
             $template->parseCurrentBlock();
         }
         $template->touchBlock('terms');
         $i++;
     }
     $questiontext = $this->object->getQuestion();
     $template->setVariable("QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext, TRUE));
     $template->setVariable("TEXT_TERMS", ilUtil::prepareFormOutput($this->lng->txt('available_terms')));
     $template->setVariable('TEXT_SELECTION', ilUtil::prepareFormOutput($this->lng->txt('selection')));
     $questiontext = $this->object->getQuestion();
     $template->setVariable("QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext, TRUE));
     $questionoutput = $template->get();
     $pageoutput = $this->outQuestionPage("", $is_postponed, $active_id, $questionoutput);
     return $pageoutput;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.assMatchingQuestionGUI.php

示例13: fillDataSection

 /**
  * Fill data section
  */
 function fillDataSection()
 {
     global $ilCtrl, $lng, $ilAccess;
     $tpl = new ilTemplate("tpl.wiki_side_block_content.html", true, true, "Modules/Wiki");
     $wp = $this->getPageObject();
     // start page
     $actions[] = array("txt" => $lng->txt("wiki_start_page"), "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "gotoStartPage"));
     // all pages
     $actions[] = array("txt" => $lng->txt("wiki_all_pages"), "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "allPages"));
     // new pages
     $actions[] = array("txt" => $lng->txt("wiki_new_pages"), "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "newPages"));
     // popular pages
     $actions[] = array("txt" => $lng->txt("wiki_popular_pages"), "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "popularPages"));
     // orphaned pages
     $actions[] = array("txt" => $lng->txt("wiki_orphaned_pages"), "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "orphanedPages"));
     // recent changes
     $actions[] = array("txt" => $lng->txt("wiki_recent_changes"), "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "recentChanges"));
     foreach ($actions as $a) {
         $tpl->setCurrentBlock("action");
         $tpl->setVariable("HREF", $a["href"]);
         $tpl->setVariable("TXT", $a["txt"]);
         $tpl->parseCurrentBlock();
         $tpl->touchBlock("item");
     }
     $this->setDataSection($tpl->get());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:29,代码来源:class.ilWikiSideBlockGUI.php

示例14: exportbibinfo

 /**
  *   export bibinfo for download or copy/paste
  *
  *   @param
  *   @access public
  *   @return
  */
 function exportbibinfo()
 {
     global $ilDB;
     $objRow["obj_id"] = ilObject::_lookupObjId($_GET["ref_id"]);
     $objRow["title"] = ilObject::_lookupTitle($objRow["obj_id"]);
     $filename = preg_replace('/[^a-z0-9_]/i', '_', $objRow["title"]);
     $C = $this->lm_gui->showAbstract(array(1));
     if ($_GET["print"] == 1) {
         $printTpl = new ilTemplate("tpl.print.html", true, true, "Modules/LearningModule");
         $printTpl->touchBlock("printreq");
         $css1 = ilObjStyleSheet::getContentStylePath($this->lm->getStyleSheetId());
         $css2 = ilUtil::getStyleSheetLocation();
         $printTpl->setVariable("LOCATION_CONTENT_STYLESHEET", $css1);
         $printTpl->setVariable("LOCATION_STYLESHEET", $css2);
         // syntax style
         $printTpl->setCurrentBlock("SyntaxStyle");
         $printTpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
         $printTpl->parseCurrentBlock();
         $printTpl->setVariable("CONTENT", $C);
         echo $printTpl->get();
         exit;
     } else {
         ilUtil::deliverData($C, $filename . ".html");
         exit;
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:33,代码来源:class.ilLMPresentationGUI.php

示例15: fillDataSection

 /**
  * Fill data section
  */
 function fillDataSection()
 {
     global $ilCtrl, $lng, $ilAccess;
     $tpl = new ilTemplate("tpl.wiki_side_block_content.html", true, true, "Modules/Wiki");
     $wp = $this->getPageObject();
     // info
     $actions[] = array("txt" => $lng->txt("info_short"), "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "infoScreen"));
     // recent changes
     $actions[] = array("txt" => $lng->txt("wiki_recent_changes"), "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "recentChanges"));
     foreach ($actions as $a) {
         $tpl->setCurrentBlock("action");
         $tpl->setVariable("HREF", $a["href"]);
         $tpl->setVariable("TXT", $a["txt"]);
         $tpl->parseCurrentBlock();
         $tpl->touchBlock("item");
     }
     $actions = array();
     // all pages
     $actions[] = array("txt" => $lng->txt("wiki_all_pages"), "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "allPages"));
     // new pages
     $actions[] = array("txt" => $lng->txt("wiki_new_pages"), "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "newPages"));
     // popular pages
     $actions[] = array("txt" => $lng->txt("wiki_popular_pages"), "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "popularPages"));
     // orphaned pages
     $actions[] = array("txt" => $lng->txt("wiki_orphaned_pages"), "href" => $ilCtrl->getLinkTargetByClass("ilobjwikigui", "orphanedPages"));
     // page lists
     include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
     $list = new ilAdvancedSelectionListGUI();
     $list->setListTitle($lng->txt("wiki_page_lists"));
     $list->setStyle(ilAdvancedSelectionListGUI::STYLE_LINK);
     $list->setId("wiki_pglists");
     foreach ($actions as $a) {
         $list->addItem($a["txt"], "", $a["href"]);
     }
     $tpl->setCurrentBlock("plain");
     $tpl->setVariable("PLAIN", $list->getHTML());
     $tpl->parseCurrentBlock();
     $tpl->touchBlock("item");
     // page actions
     $list = new ilAdvancedSelectionListGUI();
     $list->setStyle(ilAdvancedSelectionListGUI::STYLE_LINK);
     $list->setListTitle($lng->txt("wiki_page_actions"));
     $list->setId("wiki_pgactions");
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         // rating
         if (ilObjWiki::_lookupRating($this->getPageObject()->getWikiId())) {
             if (!$this->getPageObject()->getRating()) {
                 $list->addItem($lng->txt("wiki_activate_page_rating"), "", $ilCtrl->getLinkTargetByClass("ilwikipagegui", "activateWikiPageRating"));
             } else {
                 $list->addItem($lng->txt("wiki_deactivate_page_rating"), "", $ilCtrl->getLinkTargetByClass("ilwikipagegui", "deactivateWikiPageRating"));
             }
         }
         // unhide advmd?
         include_once "./Modules/Wiki/classes/class.ilWikiAdvMetaDataBlockGUI.php";
         if (ilWikiAdvMetaDataBlockGUI::isActive($this->getPageObject()->getWikiId()) && ilWikiPage::lookupAdvancedMetadataHidden($this->getPageObject()->getId())) {
             $list->addItem($lng->txt("wiki_unhide_meta_adv_records"), "", $ilCtrl->getLinkTargetByClass("ilwikipagegui", "unhideAdvancedMetaData"));
         }
     }
     if ($ilAccess->checkAccess("edit_content", "", $_GET["ref_id"]) && !$this->getPageObject()->getBlocked() || $ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         // rename
         $list->addItem($lng->txt("wiki_rename_page"), "", $ilCtrl->getLinkTargetByClass("ilwikipagegui", "renameWikiPage"));
     }
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         // block/unblock
         if ($this->getPageObject()->getBlocked()) {
             $list->addItem($lng->txt("wiki_unblock_page"), "", $ilCtrl->getLinkTargetByClass("ilwikipagegui", "unblockWikiPage"));
         } else {
             $list->addItem($lng->txt("wiki_block_page"), "", $ilCtrl->getLinkTargetByClass("ilwikipagegui", "blockWikiPage"));
         }
         // delete page
         $st_page = ilObjWiki::_lookupStartPage($this->getPageObject()->getParentId());
         if ($st_page != $this->getPageObject()->getTitle()) {
             $list->addItem($lng->txt("wiki_delete_page"), "", $ilCtrl->getLinkTargetByClass("ilwikipagegui", "deleteWikiPageConfirmationScreen"));
         }
         include_once "Modules/Wiki/classes/class.ilWikiPageTemplate.php";
         $wpt = new ilWikiPageTemplate($this->getPageObject()->getParentId());
         if (!$wpt->isPageTemplate($this->getPageObject()->getId())) {
             $list->addItem($lng->txt("wiki_add_template"), "", $ilCtrl->getLinkTargetByClass("ilwikipagetemplategui", "addPageTemplateFromPageAction"));
         } else {
             $list->addItem($lng->txt("wiki_remove_template_status"), "", $ilCtrl->getLinkTargetByClass("ilwikipagetemplategui", "removePageTemplateFromPageAction"));
         }
     }
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]) || $ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
         $tpl->setCurrentBlock("plain");
         $tpl->setVariable("PLAIN", $list->getHTML());
         $tpl->parseCurrentBlock();
         $tpl->touchBlock("item");
     }
     // permissions
     //		if ($ilAccess->checkAccess('edit_permission', "", $_GET["ref_id"]))
     //		{
     //			$actions[] = array(
     //				"txt" => $lng->txt("perm_settings"),
     //				"href" => $ilCtrl->getLinkTargetByClass(array("ilobjwikigui", "ilpermissiongui"), "perm")
     //				);
     //		}
     $actions = array();
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilWikiFunctionsBlockGUI.php


注:本文中的ilTemplate::touchBlock方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。