/** * output tabs */ function setTabs() { global $ilTabs, $ilCtrl, $tpl, $lng; // subelements $ilTabs->addTarget("sahs_organization", $ilCtrl->getLinkTarget($this, 'showOrganization'), "showOrganization", get_class($this)); // questions $ilTabs->addTarget("sahs_questions", $ilCtrl->getLinkTarget($this, 'sahs_questions'), "sahs_questions", get_class($this)); // resources $ilTabs->addTarget("cont_files", $ilCtrl->getLinkTarget($this, 'sco_resources'), "sco_resources", get_class($this)); // metadata $ilTabs->addTarget("meta_data", $ilCtrl->getLinkTargetByClass("ilmdeditorgui", ''), "", "ilmdeditorgui"); // export /* $ilTabs->addTarget("export", $ilCtrl->getLinkTarget($this, "showExportList"), "showExportList", get_class($this)); // import $ilTabs->addTarget("import", $ilCtrl->getLinkTarget($this, "import"), "import", get_class($this)); */ // preview $ilTabs->addNonTabbedLink("preview", $lng->txt("cont_preview"), $ilCtrl->getLinkTarget($this, 'sco_preview'), "_blank"); $tpl->setTitleIcon(ilUtil::getImagePath("icon_ass.svg")); $tpl->setTitle($lng->txt("obj_ass") . ": " . $this->node_object->getTitle()); }
/** * Fills an entire table row with the given set. * * (non-PHPdoc) * * @see ilTable2GUI::fillRow() * * @param $a_set data set for that row */ public function fillRow($a_set) { if ($a_set['recurrence']) { // icon for the recurrence date $this->tpl->setVariable('IMG_RECURRENCE_PATH', ilUtil::getImagePath("cmd_move_s.png")); $this->tpl->setVariable('IMG_RECURRENCE_TITLE', $this->lng->txt("rep_robj_xrs_room_date_recurrence")); } else { //fills the column $this->tpl->setVariable('TXT_BLANK', ''); } // ### Appointment ### $this->tpl->setVariable('TXT_DATE', $a_set['date']); // ### Room ### $this->tpl->setVariable('TXT_ROOM', $a_set['room']); // ### Subject ### $this->tpl->setVariable('TXT_SUBJECT', $a_set['subject'] === NULL ? '' : $a_set['subject']); // ### Participants ### $participant_count = count($a_set['participants']); for ($i = 0; $i < $participant_count; ++$i) { $this->tpl->setCurrentBlock("participants"); $this->tpl->setVariable("TXT_USER", $a_set['participants'][$i]); if ($i < $participant_count - 1) { $this->tpl->setVariable('TXT_SEPARATOR', ','); } $this->tpl->parseCurrentBlock(); } // Populate the selected additional table cells foreach ($this->getSelectedColumns() as $c) { $this->tpl->setCurrentBlock("additional"); $this->tpl->setVariable("TXT_ADDITIONAL", $a_set[$c] === NULL ? "" : $a_set[$c]); $this->tpl->parseCurrentBlock(); } }
/** * Get type icon path path * Return image path for icon_xxx.pngs * Or (if enabled) path to custom icon * * @access public * @param string obj_type * @param int obj_id * @param string size 'tiny','small' or 'big' * @static * */ public static function getTypeIconPath($a_type, $a_obj_id, $a_size = 'small') { global $ilSetting; if ($ilSetting->get("custom_icons")) { switch ($a_type) { case 'cat': case 'crs': case 'grp': include_once './Services/Container/classes/class.ilContainer.php'; if (strlen($path = ilContainer::_lookupIconPath($a_obj_id, $a_size))) { return $path; } } } switch ($a_size) { case 'tiny': $postfix = '_s.png'; break; case 'big': $postfix = '_b.png'; break; default: $postfix = '.png'; break; } return ilUtil::getImagePath('icon_' . $a_type . $postfix); }
/** * @return string */ public static function getAudioScript() { $script = self::getDirectory() . '/securimage_play.swf'; $script = ilUtil::appendUrlParameterString($script, 'audio_file=' . self::getDirectory() . '/il_securimage_play.php', true); $script = ilUtil::appendUrlParameterString($script, 'icon_file=' . ilUtil::getImagePath('icon_audiocaptcha-19.png'), true); return $script; }
/** * Fill table row */ protected function fillRow($a_set) { global $lng; $this->tpl->setVariable("VAL_TITLE", $a_set["title"]); $this->tpl->setVariable("PAGE_ID", $a_set["obj_id"]); $exp_id = ilLMPageObject::getExportId($this->parent_obj->object->getId(), $a_set["obj_id"], $a_set["type"]); if ($this->validation) { if (!preg_match("/^[a-zA-Z_]*\$/", trim($_POST["exportid"][$a_set["obj_id"]]))) { // @todo: move to style $this->tpl->setVariable("STYLE", " style='background-color: #FCEAEA;' "); $this->tpl->setVariable("ALERT_IMG", ilUtil::img(ilUtil::getImagePath("icon_alert.svg"), $lng->txt("alert"))); } $this->tpl->setVariable("EXPORT_ID", ilUtil::prepareFormOutput(ilUtil::stripSlashes($_POST["exportid"][$a_set["obj_id"]]))); } else { $this->tpl->setVariable("EXPORT_ID", ilUtil::prepareFormOutput($exp_id)); } if ($this->cnt_exp_ids[$exp_id] > 1) { $this->tpl->setVariable("ITEM_ADD_TXT", $lng->txt("cont_exp_id_used_multiple")); $this->tpl->setVariable("ALERT_IMG", ilUtil::img(ilUtil::getImagePath("icon_alert.svg"), $lng->txt("alert"))); if (!$this->dup_info_given) { ilUtil::sendInfo($lng->txt("content_some_export_ids_multiple_times")); $this->dup_info_given = true; } } }
/** * Fill table row */ protected function fillRow($a_set) { global $lng, $ilCtrl, $ilUser; include_once "./Services/Skill/classes/class.ilPersonalSkill.php"; $mat = ilPersonalSkill::getAssignedMaterial($ilUser->getId(), $this->tref_id, $a_set["id"]); $ilCtrl->setParameter($this->parent_obj, "level_id", $a_set["id"]); foreach ($mat as $m) { $this->tpl->setCurrentBlock("mat"); $obj_id = $this->ws_tree->lookupObjectId($m["wsp_id"]); $this->tpl->setVariable("MAT_TITLE", ilObject::_lookupTitle($obj_id)); $this->tpl->setVariable("MAT_IMG", ilUtil::img(ilUtil::getImagePath("icon_" . ilObject::_lookupType($obj_id) . ".svg"))); $this->tpl->setVariable("TXT_REMOVE", $lng->txt("remove")); $ilCtrl->setParameter($this->parent_obj, "wsp_id", $m["wsp_id"]); $this->tpl->setVariable("HREF_REMOVE", $ilCtrl->getLinkTarget($this->parent_obj, "removeMaterial")); $obj_id = $this->ws_tree->lookupObjectId($m["wsp_id"]); $url = $this->ws_access->getGotoLink($m["wsp_id"], $obj_id); $this->tpl->setVariable("HREF_MAT", $url); $this->tpl->parseCurrentBlock(); } $this->tpl->setCurrentBlock("cmd"); $this->tpl->setVariable("HREF_CMD", $ilCtrl->getLinkTarget($this->parent_obj, "assignMaterial")); $this->tpl->setVariable("TXT_CMD", $lng->txt("skmg_assign_materials")); $this->tpl->parseCurrentBlock(); $ilCtrl->setParameter($this->parent_obj, "level_id", ""); $this->tpl->setVariable("LEVEL_ID", $a_set["id"]); $this->tpl->setVariable("SKILL_ID", $this->basic_skill_id); $this->tpl->setVariable("TXT_SKILL", $a_set["title"]); $this->tpl->setVariable("TXT_SKILL_DESC", $a_set["description"]); }
function setTabs() { global $tpl, $lng; parent::setTabs(); $tpl->setTitleIcon(ilUtil::getImagePath("icon_seqc_b.png")); $tpl->setTitle($lng->txt("sahs_chapter") . ": " . $this->node_object->getTitle()); }
/** * Get node icon * * @param array $a_node node array * @return string icon path */ function getNodeIcon($a_node) { if ($a_node["child"] == $this->getNodeId($this->getRootNode())) { $icon = ilUtil::getImagePath("icon_lm.svg"); } else { $a_name = "icon_" . $a_node["type"] . ".svg"; if ($a_node["type"] == "pg") { include_once "./Modules/LearningModule/classes/class.ilLMPage.php"; $lm_set = new ilSetting("lm"); $active = ilLMPage::_lookupActive($a_node["child"], $this->lm->getType(), $lm_set->get("time_scheduled_page_activation")); // is page scheduled? $img_sc = $lm_set->get("time_scheduled_page_activation") && ilLMPage::_isScheduledActivation($a_node["child"], $this->lm->getType()) ? "_sc" : ""; $a_name = "icon_pg" . $img_sc . ".svg"; if (!$active) { $a_name = "icon_pg_d" . $img_sc . ".svg"; } else { include_once "./Modules/LearningModule/classes/class.ilLMPage.php"; $contains_dis = ilLMPage::_lookupContainsDeactivatedElements($a_node["child"], $this->lm->getType()); if ($contains_dis) { $a_name = "icon_pg_del" . $img_sc . ".svg"; } } } $icon = ilUtil::getImagePath($a_name); } return $icon; }
/** * Get type icon path path * Return image path for icon_xxx.pngs * Or (if enabled) path to custom icon * * @access public * @param string obj_type * @param int obj_id * @param string size 'tiny','small' or 'big' * @static * */ public static function getTypeIconPath($a_type, $a_obj_id, $a_size = 'small') { global $ilSetting, $objDefinition; if ($ilSetting->get("custom_icons")) { switch ($a_type) { case 'cat': case 'crs': case 'grp': include_once './Services/Container/classes/class.ilContainer.php'; if (strlen($path = ilContainer::_lookupIconPath($a_obj_id, $a_size))) { return $path; } } } if ($objDefinition->isPluginTypeName($a_type)) { $class_name = "il" . $objDefinition->getClassName($a_type) . 'Plugin'; $location = $objDefinition->getLocation($a_type); include_once $location . "/class." . $class_name . ".php"; return call_user_func(array($class_name, "_getIcon"), $a_type, $a_size, $a_obj_id); } switch ($a_size) { case 'tiny': $postfix = '_s.png'; break; case 'big': $postfix = '_b.png'; break; default: $postfix = '.png'; break; } return ilUtil::getImagePath('icon_' . $a_type . $postfix); }
/** * Set image * * @param string $a_value * @param bool $a_is_internal */ public function setImage($a_value, $a_is_internal = true) { if ((bool) $a_is_internal) { $a_value = ilUtil::getImagePath($a_value); } $this->src = trim($a_value); }
/** * fill row * * @access public * @param * @return */ public function fillRow($data) { if (strlen($data['description'])) { $this->tpl->setCurrentBlock('description'); $this->tpl->setVariable("DESCRIPTION", ilUtil::prepareFormOutput($data['description'])); $this->tpl->parseCurrentBlock(); } if ($this->show_marker) { if ($data['marked']) { $this->tpl->setCurrentBlock('marked_img'); $this->tpl->setVariable("ALT_MARKED", $this->lng->txt("tst_question_marked")); $this->tpl->setVariable("HREF_MARKED", ilUtil::getImagePath("marked.png")); $this->tpl->parseCurrentBlock(); } else { $this->tpl->touchBlock('marker'); } } // obligatory icon if ($data["obligatory"]) { $OBLIGATORY = "<img src=\"" . ilUtil::getImagePath("obligatory.gif", "Modules/Test") . "\" alt=\"" . $this->lng->txt("question_obligatory") . "\" title=\"" . $this->lng->txt("question_obligatory") . "\" />"; } else { $OBLIGATORY = ''; } $this->tpl->setVariable("QUESTION_OBLIGATORY", $OBLIGATORY); $this->tpl->setVariable("ORDER", $data['order']); $this->tpl->setVariable("TITLE", ilUtil::prepareFormOutput($data['title'])); $this->tpl->setVariable("HREF", $data['href']); $this->tpl->setVariable("POSTPONED", $data['postponed']); }
/** * Fill a single data row. */ protected function fillRow($a_set) { global $lng, $ilCtrl; if ($a_set["img"] == ilObjectPermissionStatusGUI::IMG_OK) { $img_path = ilUtil::getImagePath("icon_ok.svg"); $img_info = $lng->txt("info_assigned"); } else { $img_path = ilUtil::getImagePath("icon_not_ok.svg"); $img_info = $lng->txt("info_not_assigned"); } $this->tpl->setVariable("IMG_PATH", $img_path); $this->tpl->setVariable("IMG_INFO", $img_info); $link = $ilCtrl->getLinkTargetByClass(array(ilpermissiongui), 'perm', '', true); $this->tpl->setVariable("ROLE_LINK", $link); $this->tpl->setVariable("TXT_ROLE", $a_set["role"]); if ($a_set["effective_from"] != "") { $this->tpl->setCurrentBlock("effective_from"); $this->tpl->setVariable("EFFECTIVE_FROM_LINK", ilLink::_getLink($a_set["effective_from_ref_id"])); $this->tpl->setVariable("TXT_EFFECTIVE_FROM", $a_set["effective_from"]); $this->tpl->parseCurrentBlock(); } if ($a_set["original_position_ref_id"] !== false) { $this->tpl->setCurrentBlock("original_position_with_link"); $this->tpl->setVariable("TXT_ORIGINAL_POSITION_WITH_LINK", $a_set["original_position"]); $this->tpl->setVariable("ORIGINAL_POSITION_LINK", ilLink::_getLink($a_set["original_position_ref_id"])); $this->tpl->parseCurrentBlock(); } else { $this->tpl->setVariable("TXT_ORIGINAL_POSITION", $a_set["original_position"]); } }
protected function parseData() { $this->determineOffsetAndOrder(); $this->determineLimit(); $xdglRequestList = ilUserSetting::getCollection(); $xdglRequestList->orderBy($this->getOrderField(), $this->getOrderDirection()); $xdglRequestList->innerjoin('object_data', 'global_role', 'obj_id', array('title')); foreach ($this->filter as $field => $value) { if ($value) { $xdglRequestList->where(array($field => $value)); } } $this->setMaxCount($xdglRequestList->count()); if (!$xdglRequestList->hasSets()) { // ilUtil::sendInfo('Keine Ergebnisse für diesen Filter'); } $xdglRequestList->limit($this->getOffset(), $this->getOffset() + $this->getLimit()); $xdglRequestList->orderBy('title'); $a_data = $xdglRequestList->getArray(); if (ilUserDefaultsPlugin::is50()) { $img_on = ilUtil::img(ilUtil::getImagePath('icon_ok.svg')); $img_off = ilUtil::img(ilUtil::getImagePath('icon_not_ok.svg')); } else { $img_on = ilUtil::img(ilUtil::getImagePath('icon_led_on_s.png')); $img_off = ilUtil::img(ilUtil::getImagePath('icon_led_off_s.png')); } foreach ($a_data as $k => $d) { $a_data[$k]['status_image'] = $d['status'] == ilUserSetting::STATUS_ACTIVE ? $img_on : $img_off; } $this->setData($a_data); }
public function executeCommand() { global $ilCtrl, $lng, $tpl, $ilTabs; $next_class = $ilCtrl->getNextClass($this); $cmd = $ilCtrl->getCmd("show"); $tpl->setTitle($lng->txt("portfolio")); $tpl->setTitleIcon(ilUtil::getImagePath("icon_prtf.svg"), $lng->txt("portfolio")); switch ($next_class) { case "ilobjportfoliogui": if ($cmd != "preview") { $this->setLocator(); $ilTabs->setBack2Target($lng->txt("prtf_tab_portfolios"), $ilCtrl->getLinkTarget($this, "show")); } include_once './Modules/Portfolio/classes/class.ilObjPortfolioGUI.php'; $gui = new ilObjPortfolioGUI($_REQUEST["prt_id"]); $ilCtrl->forwardCommand($gui); break; default: $this->setLocator(); $this->setTabs(); $this->{$cmd}(); break; } return true; }
/** * Fill row template * @param array $a_row */ public function fillRow($a_row) { global $ilCtrl; $this->tpl->setVariable('OBJ_SRC', $a_row['icon']); $this->tpl->setVariable('OBJ_ALT', $a_row['icon_alt']); $this->tpl->setVariable('OBJ_TITLE', $a_row['title']); include_once './Services/Link/classes/class.ilLink.php'; $this->tpl->setVariable('OBJ_LINK', ilLink::_getLink($a_row['ref_id'], $a_row['type'])); $this->tpl->setVariable('OBJ_DESCRIPTION', $a_row['description']); $this->tpl->setVariable('COND_ID', $a_row['id']); $this->tpl->setVariable('OBJ_CONDITION', $a_row['condition']); if (!$this->enable_editing) { $this->tpl->setCurrentBlock("obligatory_static"); $this->tpl->setVariable('OBL_SRC', ilUtil::getImagePath($a_row['obligatory'] ? 'icon_ok.svg' : 'icon_not_ok.svg')); $this->tpl->setVariable('OBL_ALT', $this->lng->txt($a_row['obligatory'] ? 'precondition_obligatory_alt' : 'precondition_not_obligatory_alt')); $this->tpl->parseCurrentBlock(); } else { $this->tpl->setCurrentBlock("obligatory_edit"); $this->tpl->setVariable('OBL_ID', $a_row['id']); $this->tpl->setVariable('OBL_STATUS', $a_row['obligatory'] ? ' checked="checked"' : ''); $this->tpl->parseCurrentBlock(); } $ilCtrl->setParameterByClass(get_class($this->getParentObject()), 'condition_id', $a_row['id']); $this->tpl->setVariable('EDIT_LINK', $ilCtrl->getLinkTargetByClass(get_class($this->getParentObject()), 'edit')); $this->tpl->setVariable('TXT_EDIT', $this->lng->txt('edit')); }
protected function setTitleAndDescription() { global $tpl, $lng; $tpl->setTitle($lng->txt("wsp_personal_workspace")); $tpl->setTitleIcon(ilUtil::getImagePath("icon_wsrt_b.png"), $title); $tpl->setDescription($lng->txt("wsp_personal_workspace_description")); }
function getNodeIcon($a_node) { if ($a_node["child"] == $this->getNodeId($this->getRootNode())) { return ilUtil::getImagePath("icon_mail_s.png"); } else { return ilUtil::getImagePath("icon_" . $a_node["m_type"] . "_s.png"); } }
protected function prepareOutput() { $this->tpl->getStandardTemplate(); $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_pays_cart_b.png"), $this->lng->txt("search")); $this->tpl->setTitle($this->lng->txt("shop")); ilUtil::infoPanel(); $this->buildSubTabs(); }
/** * @param array $row * @return array */ protected function prepareRow(array &$row) { $this->ctrl->setParameter($this->getParentObject(), 'tosv_id', $row['tosv_id']); $row['content_link'] = $this->ctrl->getLinkTarget($this->getParentObject(), 'getAcceptedContentAsynch', '', true, false); $this->ctrl->setParameter($this->getParentObject(), 'tosv_id', ''); $row['img_down'] = ilUtil::getImagePath('icon_preview.png'); $row['id'] = md5($row['usr_id'] . $row['ts']); }
function getNodeIcon($a_node) { if ($a_node["child"] == $this->getNodeId($this->getRootNode())) { return ilUtil::getImagePath("icon_mail.svg"); } else { $icon_type = $a_node["m_type"] == "user_folder" ? "local" : $a_node["m_type"]; return ilUtil::getImagePath("icon_" . $icon_type . ".svg"); } }
/** * Get node icon * * @param array * @return */ function getNodeIcon($a_node) { if ($a_node["child"] == $this->getNodeId($this->getRootNode())) { $icon = ilUtil::getImagePath("icon_sahs.svg"); } else { $icon = ilUtil::getImagePath("icon_" . $a_node["type"] . ".svg"); } return $icon; }
/** * Fill a table row. * * This method is called internally by ilias to * fill a table row according to the row template. * * @param stdClass $container * @internal param \ilObjTest $test * */ protected function fillRow(stdClass $container) { $members = $this->getMembersObject($container)->getCountMembers(); $label = $this->lng->txt('rep_robj_xtov_membership_count_members'); $this->tpl->setVariable('VAL_CHECKBOX', ilUtil::formCheckbox(false, 'membership_ids[]', $container->obj_id)); $this->tpl->setVariable('OBJECT_TITLE', $container->title); $this->tpl->setVariable('OBJECT_INFO', sprintf("%d %s", $members, $label)); $this->tpl->setVariable('OBJECT_IMG_PATH', $this->isAddedContainer($container) ? ilUtil::getImagePath('icon_ok.svg') : ilUtil::getImagePath('icon_not_ok.svg')); }
/** * insert info screen command */ function insertInfoScreenCommand() { if ($this->std_cmd_only) { return; } $cmd_link = $this->getCommandLink("infoScreen"); $cmd_frame = $this->getCommandFrame("infoScreen"); $this->insertCommand($cmd_link, $this->lng->txt("info_short"), $cmd_frame, ilUtil::getImagePath("cmd_info_s.png")); }
public function fillRow($a_data) { global $lng, $ilCtrl, $ilUser; include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php"; $current_selection_list = new ilAdvancedSelectionListGUI(); $current_selection_list->setListTitle($this->lng->txt("actions")); $current_selection_list->setId("act_" . $a_data['obj_id']); $this->tpl->setVariable("VAL_ID", $a_data["obj_id"]); // edit link $edit_link = ''; $delete_link = ''; $sendmail_link = ''; $export_link = ''; if ($a_data["type"] != "parent") { $hash = $ilUser->prefs["screen_reader_optimization"] ? "bookmark_top" : ""; $ilCtrl->setParameter($this->parent_obj, "bmf_id", $this->parent_obj->id); $ilCtrl->setParameter($this->parent_obj, "obj_id", $a_data["obj_id"]); $edit_link = $a_data["type"] == "bmf" ? $ilCtrl->getLinkTarget($this->parent_obj, "editFormBookmarkFolder", $hash) : $ilCtrl->getLinkTarget($this->parent_obj, "editFormBookmark", $hash); $ilCtrl->clearParameters($this->parent_obj); $ilCtrl->setParameter($this->parent_obj, "bm_id", $a_data['obj_id']); $delete_link = $ilCtrl->getLinkTarget($this->parent_obj, 'delete', $hash); $sendmail_link = $ilCtrl->getLinkTarget($this->parent_obj, 'sendmail', $hash); $export_link = $ilCtrl->getLinkTarget($this->parent_obj, 'export', $hash); } if ($edit_link) { $current_selection_list->addItem($this->lng->txt('edit'), '', $edit_link); } if ($delete_link) { $current_selection_list->addItem($this->lng->txt('delete'), '', $delete_link); } if ($export_link) { $current_selection_list->addItem($this->lng->txt('export'), '', $export_link); } if ($sendmail_link) { $current_selection_list->addItem($this->lng->txt('bkm_sendmail'), '', $sendmail_link); } $this->tpl->setVariable("COMMAND_SELECTION_LIST", $current_selection_list->getHTML()); // icon $img_type = $a_data["type"] == "bmf" || $a_data["type"] == "parent" ? "bmf" : $a_data["type"]; // #10556 $val = ilUtil::getImagePath("icon_" . $img_type . ".svg"); $this->tpl->setVariable("VAL_ICON", $val); $this->tpl->setVariable("VAL_ICON_ALT", $lng->txt("icon") . " " . $lng->txt($a_data["type"])); // folder links if ($a_data["type"] == "bmf" || $a_data["type"] == "parent") { $this->tpl->setVariable("VAL_BMF_TITLE", $a_data["title"]); $ilCtrl->setParameter($this->parent_obj, "bmf_id", $a_data["obj_id"]); $this->tpl->setVariable("VAL_BMF_TARGET", $ilCtrl->getLinkTarget($this->parent_obj)); //$this->tpl->setVariable("FRAME_TARGET_BMF", ilFrameTargetInfo::_getFrame("MainContent")); } else { $this->tpl->setVariable("VAL_BM_TITLE", $a_data["title"]); $this->tpl->setVariable("VAL_BM_TARGET", htmlentities($a_data["target"])); $this->tpl->setVariable("VAL_BM_DESCRIPTION", $a_data["description"]); $this->tpl->setVariable("FRAME_TARGET_BM", ilFrameTargetInfo::_getFrame("ExternalContent")); } $ilCtrl->clearParameters($this->parent_obj); }
public function getHtml() { global $ilCtrl; $tpl = new ilTemplate("tpl.dcl_tree.html", true, true, "Modules/DataCollection"); $tpl->setVariable("FIELD_ID", $this->getPostVar()); $tpl->setVariable("AJAX_LINK", $ilCtrl->getLinkTargetByClass("ildatacollectionrecordeditgui", "searchObjects")); $tpl->setVariable("LOADER_PATH", ilUtil::getImagePath("loader.gif")); return $this->title_input->getToolbarHTML() . "<br /><br />" . $this->search_input->getTableFilterHTML() . $this->hidden_input->getToolbarHTML() . " <a href='#' id='search_button_" . $this->getPostVar() . "'>Search</a>" . $tpl->get(); }
/** * insert info screen command */ function insertInfoScreenCommand() { if ($this->std_cmd_only) { return; } $cmd_link = $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"); $cmd_frame = $this->getCommandFrame("infoScreen"); $this->insertCommand($cmd_link, $this->lng->txt("info_short"), $cmd_frame, ilUtil::getImagePath("icon_info.svg")); }
/** * fill row * * @access protected * @param array set of data * @return */ protected function fillRow($a_set) { global $ilUser, $lng; if ($a_set["milestone"]) { $this->tpl->setCurrentBlock("img_ms"); $this->tpl->setVariable("IMG_MS", ilUtil::getImagePath("icon_ms_s.png")); $this->tpl->setVariable("ALT_MS", $lng->txt("cal_milestone")); $this->tpl->parseCurrentBlock(); } $this->tpl->setVariable('VAL_DESCRIPTION', $a_set['description']); $this->tpl->setVariable('VAL_TITLE_LINK', $a_set['title']); $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $a_set['id']); $this->tpl->setVariable('VAL_LINK', $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'edit')); switch ($a_set['frequence']) { case IL_CAL_FREQ_DAILY: $this->tpl->setVariable('VAL_FREQUENCE', $this->lng->txt('cal_daily')); break; case IL_CAL_FREQ_WEEKLY: $this->tpl->setVariable('VAL_FREQUENCE', $this->lng->txt('cal_weekly')); break; case IL_CAL_FREQ_MONTHLY: $this->tpl->setVariable('VAL_FREQUENCE', $this->lng->txt('cal_monthly')); break; case IL_CAL_FREQ_YEARLY: $this->tpl->setVariable('VAL_FREQUENCE', $this->lng->txt('cal_yearly')); break; default: #$this->tpl->setVariable('VAL_FREQUENCE',$this->lng->txt('cal_no_recurrence')); break; } if ($a_set['fullday']) { $date = ilDatePresentation::formatPeriod(new ilDate($a_set['begin'], IL_CAL_UNIX), new ilDate($a_set['end'], IL_CAL_UNIX)); } else { $date = ilDatePresentation::formatPeriod(new ilDateTime($a_set['begin'], IL_CAL_UNIX), new ilDateTime($a_set['end'], IL_CAL_UNIX)); } $this->tpl->setVariable('VAL_BEGIN', $date); /* if($a_set['duration']) { if($a_set['milestone']) { $this->tpl->setVariable('VAL_DURATION','-'); } else { $this->tpl->setVariable('VAL_DURATION',ilFormat::_secondsToString($a_set['duration'])); } } else { $this->tpl->setVariable('VAL_DURATION',''); } */ $update = new ilDateTime($a_set['last_update'], IL_CAL_UNIX, $ilUser->getTimeZone()); $this->tpl->setVariable('VAL_LAST_UPDATE', ilDatePresentation::formatDate($update)); }
public function getHTML() { global $ilCtrl, $tpl, $lng, $ilUser; if (!$this->isContainer) { #return ''; } if ($_GET['baseClass'] == 'ilSearchController') { // return ''; } include_once "Services/jQuery/classes/class.iljQueryUtil.php"; iljQueryUtil::initjQuery(); iljQueryUtil::initjQueryUI(); $this->tpl = new ilTemplate('tpl.main_menu_search.html', true, true, 'Services/Search'); if ($ilUser->getId() != ANONYMOUS_USER_ID) { if (ilSearchSettings::getInstance()->isLuceneUserSearchEnabled() or (int) $_GET['ref_id']) { $this->tpl->setCurrentBlock("position"); $this->tpl->setVariable('TXT_GLOBALLY', $lng->txt("search_globally")); $this->tpl->setVariable('ROOT_ID', ROOT_FOLDER_ID); $this->tpl->parseCurrentBlock(); } else { $this->tpl->setCurrentBlock("position_hid"); $this->tpl->setVariable('ROOT_ID_HID', ROOT_FOLDER_ID); $this->tpl->parseCurrentBlock(); } if ((int) $_GET['ref_id']) { $this->tpl->setCurrentBlock('position_rep'); $this->tpl->setVariable('TXT_CURRENT_POSITION', $lng->txt("search_at_current_position")); $this->tpl->setVariable('REF_ID', (int) $_GET["ref_id"]); $this->tpl->parseCurrentBlock(); } } if ($ilUser->getId() != ANONYMOUS_USER_ID && ilSearchSettings::getInstance()->isLuceneUserSearchEnabled()) { $this->tpl->setCurrentBlock('usr_search'); $this->tpl->setVariable('TXT_USR_SEARCH', $this->lng->txt('search_users')); $this->tpl->parseCurrentBlock(); } $this->tpl->setVariable('FORMACTION', 'ilias.php?baseClass=ilSearchController&cmd=post' . '&rtoken=' . $ilCtrl->getRequestToken() . '&fallbackCmd=remoteSearch'); $this->tpl->setVariable('BTN_SEARCH', $this->lng->txt('search')); // $this->tpl->setVariable('ID_AUTOCOMPLETE', "mm_sr_auto"); $this->tpl->setVariable('AC_DATASOURCE', "ilias.php?baseClass=ilSearchController&cmd=autoComplete"); $this->tpl->setVariable('IMG_MM_SEARCH', ilUtil::img(ilUtil::getImagePath("icon_seas.svg"), $lng->txt("search"))); if ($ilUser->getId() != ANONYMOUS_USER_ID) { $this->tpl->setVariable('HREF_SEARCH_LINK', "ilias.php?baseClass=ilSearchController"); $this->tpl->setVariable('TXT_SEARCH_LINK', $lng->txt("last_search_result")); } // #10555 - we need the overlay for the autocomplete which is always active $this->tpl->setVariable('TXT_SEARCH', $lng->txt("search")); include_once "./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php"; $ov = new ilOverlayGUI("mm_search_menu"); //$ov->setTrigger("main_menu_search", "none", // "main_menu_search", "tr", "br"); //$ov->setAnchor("main_menu_search", "tr", "br"); $ov->setAutoHide(false); $ov->add(); return $this->tpl->get(); }
/** * Renders the Class GUI with its icons, title, subtitle and the tabs. */ private function renderPageWithTabs() { $class_info = $this->privileges->getClassById($this->class_id); $this->tpl->setTitle($class_info["name"]); $description = $class_info["description"]; $this->tpl->setDescription($description); // $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_role_b.png"), $this->lng->txt("rep_robj_xrs_class")); $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_role_b.svg"), $this->lng->txt("rep_robj_xrs_class")); $this->setTabs(); }
/** * Constructor */ public function __construct() { global $lng; parent::__construct(); $lng->loadLanguageModule('chatroom'); $this->setImage(ilUtil::getImagePath('icon_chat.png')); $this->setTitle($lng->txt('chat_chatviewer')); $this->setAvailableDetailLevels(1, 0); $this->allow_moving = true; }