/** * Get HTML for navigation history */ function getHTML() { global $ilNavigationHistory, $lng; include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php"; $selection = new ilAdvancedSelectionListGUI(); $selection->setFormSelectMode("url_ref_id", "ilNavHistorySelect", true, "goto.php?target=navi_request", "ilNavHistory", "ilNavHistoryForm", "_top", $lng->txt("go"), "ilNavHistorySubmit"); $selection->setListTitle($lng->txt("last_visited")); $selection->setId("lastvisited"); $selection->setSelectionHeaderClass("MMInactive"); $selection->setHeaderIcon(ilAdvancedSelectionListGUI::NO_ICON); $selection->setItemLinkClass("small"); $selection->setUseImages(true); include_once "./Services/Accessibility/classes/class.ilAccessKey.php"; $selection->setAccessKey(ilAccessKey::LAST_VISITED); $items = $ilNavigationHistory->getItems(); //$sel_arr = array(0 => "-- ".$lng->txt("last_visited")." --"); reset($items); $cnt = 0; foreach ($items as $k => $item) { if ($cnt++ > 20) { break; } if (!isset($item["ref_id"]) || !isset($_GET["ref_id"]) || $item["ref_id"] != $_GET["ref_id"] || $k > 0) { $obj_id = ilObject::_lookupObjId($item["ref_id"]); $selection->addItem($item["title"], $item["ref_id"], $item["link"], ilObject::_getIcon($obj_id, "tiny", $item["type"]), $lng->txt("obj_" . $item["type"]), "_top"); } } $html = $selection->getHTML(); if ($html == "") { $selection->addItem($lng->txt("no_items"), "", "#", "", "", "_top"); $selection->setUseImages(false); $html = $selection->getHTML(); } return $html; }
/** * Fill row * @param array $a_set */ public function fillRow($a_set) { global $ilCtrl; // show title if available if ($a_set['term']) { $this->tpl->setVariable('VAL_TITLE', $a_set['term']); } else { $this->tpl->setVariable('VAL_TITLE', $a_set['title']); } $this->tpl->setVariable('TXT_STATUS', $this->lng->txt('status')); $this->tpl->setVariable('VAL_STATUS', ilECSMappingUtils::mappingStatusToString($a_set['status'])); // Actions include_once './Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php'; $list = new ilAdvancedSelectionListGUI(); $list->setSelectionHeaderClass('small'); $list->setItemLinkClass('small'); $list->setId('actl_' . $a_set['id']); $list->setListTitle($this->lng->txt('actions')); $ilCtrl->setParameter($this->getParentObject(), 'tid', $a_set['id']); $this->tpl->setVariable('EDIT_TITLE', $this->ctrl->getLinkTarget($this->getParentObject(), 'dInitEditTree')); $list->addItem($this->lng->txt('edit'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'dInitEditTree')); include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php'; if ($a_set['status'] != ilECSMappingUtils::MAPPED_UNMAPPED && ilECSNodeMappingSettings::getInstance()->isDirectoryMappingEnabled()) { $list->addItem($this->lng->txt('ecs_cms_tree_synchronize'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'dSynchronizeTree')); } $list->addItem($this->lng->txt('delete'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'dConfirmDeleteTree')); $this->tpl->setVariable('ACTIONS', $list->getHTML()); $ilCtrl->clearParameters($this->getParentObject()); }
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); }
/** * Build action menu for a record asynchronous * */ protected function buildActions() { // Download is only possible if certificate is processed $alist = new ilAdvancedSelectionListGUI(); $alist->setId((int) $_GET['cert_id']); $alist->setListTitle($this->pl->txt('actions')); $this->ctrl->setParameter($this, 'cert_id', (int) $_GET['cert_id']); $alist->addItem($this->pl->txt('download'), 'download', $this->ctrl->getLinkTarget($this, 'downloadCertificate')); echo $alist->getHTML(true); exit; }
/** * @param string $type * @param string $filename */ protected function formatActionsList($type, $filename) { /** * @var $ilCtrl ilCtrl */ global $ilCtrl; $list = new ilAdvancedSelectionListGUI(); $list->setListTitle($this->lng->txt('actions')); $ilCtrl->setParameter($this->getParentObject(), 'file', $filename); $list->addItem($this->lng->txt('download'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'download')); $ilCtrl->setParameter($this->getParentObject(), 'file', ''); return $list->getHTML(); }
/** * Fills table rows with content from $a_set. * * @global ilCtrl2 $ilCtrl * * @param array $a_set */ public function fillRow($a_set) { global $ilCtrl; $this->tpl->setVariable('VAL_LIBRARY_NAME', $a_set['name']); $this->tpl->setVariable('VAL_LIBRARY_URL', $a_set['url']); $this->tpl->setVariable('VAL_LIBRARY_IMG', $a_set['img']); $current_selection_list = new ilAdvancedSelectionListGUI(); $current_selection_list->setListTitle($this->lng->txt("actions")); $current_selection_list->setId($a_set['id']); $current_selection_list->addItem($this->lng->txt("edit"), "", $ilCtrl->getLinkTarget($this->gui, 'edit') . "&lib_id=" . $a_set['id']); $current_selection_list->addItem($this->lng->txt("delete"), "", $ilCtrl->getLinkTarget($this->gui, 'delete') . "&lib_id=" . $a_set['id']); $this->tpl->setVariable('VAL_ACTIONS', $current_selection_list->getHTML()); }
/** * Pass data to row template * * @param array $set */ public function fillRow($set) { $this->tpl->setVariable('TITLE', $set['title']); $this->tpl->setVariable('DESCRIPTION', $set['description']); $this->tpl->setVariable('DEFAULT_LANG', $set['default_language']); $this->tpl->setVariable('ICON', $set['icon']); $this->ctrl->setParameterByClass("ilorgunittypegui", "type_id", $set['id']); $selection = new ilAdvancedSelectionListGUI(); $selection->setListTitle($this->lng->txt('Actions')); $selection->setId('action_orgu_type' . $set['id']); $selection->addItem($this->lng->txt('edit'), 'edit', $this->ctrl->getLinkTargetByClass('ilorgunittypegui', 'edit')); $selection->addItem($this->lng->txt('delete'), 'delete', $this->ctrl->getLinkTargetByClass('ilorgunittypegui', 'delete')); $this->tpl->setVariable('ACTIONS', $selection->getHTML()); }
/** * @param bool $delete_item * @param bool $delete_folder * @param ilCloudFileNode $node */ public function asyncGetContent($delete_item = false, $delete_folder = false, ilCloudFileNode $node) { global $lng; $this->node = $node; include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php"; $this->selection_list = new ilAdvancedSelectionListGUI(); $this->selection_list->setId($this->node->getId()); $this->selection_list->setListTitle($lng->txt("actions")); $this->selection_list->setItemLinkClass("xsmall"); $this->addSelectionListItems($delete_item, $delete_folder); if ($this->selection_list->getItems() != NULL) { echo $this->selection_list->getHTML(true); exit; } else { echo $lng->txt("empty"); exit; } }
/** * Fill row * @staticvar int $counter * @param array $set */ public function fillRow($set) { global $ilCtrl; $ilCtrl->setParameter($this->getParentObject(), 'server_id', $set['server_id']); $ilCtrl->setParameterByClass('ilecsmappingsettingsgui', 'server_id', $set['server_id']); if ($set['active']) { $this->tpl->setVariable('IMAGE_OK', ilUtil::getImagePath('icon_ok.png')); $this->tpl->setVariable('TXT_OK', $this->lng->txt('ecs_activated')); } else { $this->tpl->setVariable('IMAGE_OK', ilUtil::getImagePath('icon_not_ok.png')); $this->tpl->setVariable('TXT_OK', $this->lng->txt('ecs_inactivated')); } $this->tpl->setVariable('VAL_TITLE', ilECSSetting::getInstanceByServerId($set['server_id'])->getTitle()); $this->tpl->setVariable('LINK_EDIT', $ilCtrl->getLinkTarget($this->getParentObject(), 'edit')); $this->tpl->setVariable('TXT_SRV_ADDR', $this->lng->txt('ecs_server_addr')); if (ilECSSetting::getInstanceByServerId($set['server_id'])->getServer()) { $this->tpl->setVariable('VAL_DESC', ilECSSetting::getInstanceByServerId($set['server_id'])->getServer()); } else { $this->tpl->setVariable('VAL_DESC', $this->lng->txt('ecs_not_configured')); } $dt = ilECSSetting::getInstanceByServerId($set['server_id'])->fetchCertificateExpiration(); if ($dt != NULL) { $this->tpl->setVariable('TXT_CERT_VALID', $this->lng->txt('ecs_cert_valid_until')); $this->tpl->setVariable('VAL_CERT', ilDatePresentation::formatDate($dt)); } // Actions include_once './Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php'; $list = new ilAdvancedSelectionListGUI(); $list->setSelectionHeaderClass('small'); $list->setItemLinkClass('small'); $list->setId('actl_' . $set['server_id']); $list->setListTitle($this->lng->txt('actions')); if (ilECSSetting::getInstanceByServerId($set['server_id'])->isEnabled()) { $list->addItem($this->lng->txt('ecs_deactivate'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'deactivate')); } else { $list->addItem($this->lng->txt('ecs_activate'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'activate')); } $list->addItem($this->lng->txt('edit'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'edit')); $list->addItem($this->lng->txt('copy'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'cp')); $list->addItem($this->lng->txt('delete'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'delete')); $this->tpl->setVariable('ACTIONS', $list->getHTML()); $ilCtrl->clearParameters($this->getParentObject()); }
/** * Fill row * @param type $a_set */ public function fillRow($a_set) { global $ilCtrl; $this->tpl->setVariable('TITLE', $a_set['title']); $this->tpl->setVariable('MAX_BOOKINGS', $a_set['max_books']); $this->tpl->setVariable('ASSIGNED', $a_set['assigned']); include_once './Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php'; $list = new ilAdvancedSelectionListGUI(); $list->setId('act_chgrp_' . $this->user_id . '_' . $a_set['id']); $list->setListTitle($this->lng->txt('actions')); $ilCtrl->setParameter($this->getParentObject(), 'grp_id', $a_set['id']); $list->addItem($this->lng->txt('edit'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'editGroup')); // add members if ($a_set['assigned']) { $list->addItem($this->lng->txt('cal_ch_assign_participants'), '', $ilCtrl->getLinkTargetByClass('ilRepositorySearchGUI', '')); } $list->addItem($this->lng->txt('delete'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'confirmDeleteGroup')); $this->tpl->setVariable('ACTIONS', $list->getHTML()); }
/** * Fill row * @param type $a_set */ public function fillRow($row) { global $ilCtrl; $this->tpl->setVariable('START', $row['start_str']); $this->tpl->setVariable('NAME', $row['name']); $this->tpl->setVariable('COMMENT', $row['comment']); $this->tpl->setVariable('TITLE', $row['title']); $this->tpl->setVariable('VAL_ID', $row['id']); include_once './Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php'; $list = new ilAdvancedSelectionListGUI(); $list->setId('act_chboo_' . $row['id']); $list->setListTitle($this->lng->txt('actions')); $ilCtrl->setParameter($this->getParentObject(), 'bookuser', $row['id']); $start = new ilDateTime($row['start'], IL_CAL_UNIX); if (ilDateTime::_after($start, $this->today, IL_CAL_DAY)) { $list->addItem($this->lng->txt('cal_ch_reject_booking'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'confirmRejectBooking')); } $list->addItem($this->lng->txt('cal_ch_delete_booking'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'confirmDeleteBooking')); $this->tpl->setVariable('ACTIONS', $list->getHTML()); }
/** * show desktop */ function show() { // preload block settings include_once "Services/Block/classes/class.ilBlockSetting.php"; ilBlockSetting::preloadPDBlockSettings(); // add template for content $this->pd_tpl = new ilTemplate("tpl.usr_personaldesktop.html", true, true, "Services/PersonalDesktop"); $this->tpl->getStandardTemplate(); // display infopanel if something happened ilUtil::infoPanel(); //$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_pd_b.png"), // $this->lng->txt("personal_desktop")); // $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_pd_b.png"), // ""); $this->tpl->setTitle($this->lng->txt("overview")); $this->tpl->setVariable("IMG_SPACE", ilUtil::getImagePath("spacer.png", false)); $this->tpl->setContent($this->getCenterColumnHTML()); $this->tpl->setRightContent($this->getRightColumnHTML()); $this->tpl->setLeftContent($this->getLeftColumnHTML()); if (count($this->action_menu->getItems())) { /** * @var $tpl ilTemplate * @var $lng ilLanguage */ global $tpl, $lng; $this->action_menu->setAsynch(false); $this->action_menu->setAsynchUrl(''); $this->action_menu->setListTitle($lng->txt('actions')); $this->action_menu->setId('act_pd'); $this->action_menu->setSelectionHeaderClass('small'); $this->action_menu->setItemLinkClass('xsmall'); $this->action_menu->setLinksMode('il_ContainerItemCommand2'); $this->action_menu->setHeaderIcon(ilAdvancedSelectionListGUI::DOWN_ARROW_DARK); $this->action_menu->setUseImages(false); $htpl = new ilTemplate('tpl.header_action.html', true, true, 'Services/Repository'); $htpl->setVariable('ACTION_DROP_DOWN', $this->action_menu->getHTML()); $tpl->setHeaderActionMenu($htpl->get()); } $this->tpl->show(); }
/** * Fill table row * @param array $a_set */ protected function fillRow($a_set) { global $lng, $ilAccess, $ilCtrl; $this->tpl->setVariable("TXT_TITLE", $a_set["title"]); if ($a_set["is_used"]) { $this->tpl->setVariable("TXT_IS_USED", $lng->txt("yes")); } else { $this->tpl->setVariable("TXT_IS_USED", $lng->txt("no")); } $ilCtrl->setParameter($this->parent_obj, 'schedule_id', $a_set['booking_schedule_id']); include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php"; $alist = new ilAdvancedSelectionListGUI(); $alist->setId($a_set['booking_schedule_id']); $alist->setListTitle($lng->txt("actions")); if ($ilAccess->checkAccess('write', '', $this->ref_id)) { if (!$a_set["is_used"]) { $alist->addItem($lng->txt('delete'), 'delete', $ilCtrl->getLinkTarget($this->parent_obj, 'confirmDelete')); } $alist->addItem($lng->txt('edit'), 'edit', $ilCtrl->getLinkTarget($this->parent_obj, 'edit')); } $this->tpl->setVariable("LAYER", $alist->getHTML()); }
public function showMailingLists() { global $rbacsystem; $this->tpl->setTitle($this->lng->txt('mail_addressbook')); $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.mail_mailing_lists_list.html', 'Services/Contact'); // check if current user may send mails include_once "Services/Mail/classes/class.ilMail.php"; $mail = new ilMail($_SESSION["AccountId"]); $mailing_allowed = $rbacsystem->checkAccess('internal_mail', $mail->getMailObjectReferenceId()); $tbl = new ilTable2GUI($this); $tbl->setId('show_mlng_lists_tbl'); $tbl->setFormAction($this->ctrl->getFormAction($this), 'showForm'); $tbl->setTitle($this->lng->txt('mail_mailing_lists')); $tbl->setRowTemplate('tpl.mail_mailing_lists_listrow.html', 'Services/Contact'); $tbl->setDefaultOrderField('title'); $result = array(); $tbl->addColumn('', 'check', '10%', true); $tbl->addColumn($this->lng->txt('title'), 'title', '30%'); $tbl->addColumn($this->lng->txt('description'), 'description', '30%'); $tbl->addColumn($this->lng->txt('members'), 'members', '20%'); $tbl->addColumn($this->lng->txt('actions'), '', '10%'); $entries = $this->mlists->getAll(); if (count($entries)) { $tbl->enable('select_all'); $tbl->setSelectAllCheckbox('ml_id'); $counter = 0; include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php"; foreach ($entries as $entry) { if ($entry->getMode() == ilMailingList::MODE_TEMPORARY) { continue; } $result[$counter]['check'] = ilUtil::formCheckbox(0, 'ml_id[]', $entry->getId()); $result[$counter]['title'] = $entry->getTitle() . " [#il_ml_" . $entry->getId() . "]"; $result[$counter]['description'] = $entry->getDescription(); $result[$counter]['members'] = count($entry->getAssignedEntries()); $this->ctrl->setParameter($this, 'ml_id', $entry->getId()); //$result[$counter]['edit_text'] = $this->lng->txt("edit"); //$result[$counter]['edit_url'] = $this->ctrl->getLinkTarget($this, "showForm"); //$result[$counter]['members_text'] = $this->lng->txt("members"); //$result[$counter]['members_url'] = $this->ctrl->getLinkTarget($this, "showMembersList"); $current_selection_list = new ilAdvancedSelectionListGUI(); $current_selection_list->setListTitle($this->lng->txt("actions")); $current_selection_list->setId("act_" . $counter); $current_selection_list->addItem($this->lng->txt("edit"), '', $this->ctrl->getLinkTarget($this, "showForm")); $current_selection_list->addItem($this->lng->txt("members"), '', $this->ctrl->getLinkTarget($this, "showMembersList")); if ($mailing_allowed) { $current_selection_list->addItem($this->lng->txt("send_mail_to"), '', $this->ctrl->getLinkTarget($this, "mailToList")); } $current_selection_list->addItem($this->lng->txt("delete"), '', $this->ctrl->getLinkTarget($this, "confirmDelete")); $result[$counter]['COMMAND_SELECTION_LIST'] = $current_selection_list->getHTML(); ++$counter; } if ($mailing_allowed) { $tbl->addMultiCommand('mailToList', $this->lng->txt('send_mail_to')); } $tbl->addMultiCommand('confirmDelete', $this->lng->txt('delete')); } else { $tbl->disable('header'); $tbl->disable('footer'); $tbl->setNoEntriesText($this->lng->txt('mail_search_no')); } $tbl->setData($result); $tbl->addCommandButton('showForm', $this->lng->txt('add')); if (isset($_GET['ref']) && $_GET['ref'] == 'mail') { $tbl->addCommandButton('cancel', $this->lng->txt('cancel')); } $this->tpl->setVariable('MAILING_LISTS', $tbl->getHTML()); $this->tpl->show(); return true; }
/** * Fill table row */ protected function fillRow($term) { global $lng, $ilCtrl; include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php"; $defs = ilGlossaryDefinition::getDefinitionList($term["id"]); $ilCtrl->setParameterByClass("ilobjglossarygui", "term_id", $term["id"]); $ilCtrl->setParameterByClass("ilglossarytermgui", "term_id", $term["id"]); $ilCtrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term["id"]); // actions drop down if ($this->glossary->getId() == $term["glo_id"]) { $list = new ilAdvancedSelectionListGUI(); $list->addItem($lng->txt("cont_edit_term"), "", $ilCtrl->getLinkTargetByClass("ilglossarytermgui", "editTerm")); if (count($defs) > 1) { $list->addItem($lng->txt("cont_edit_definitions"), "", $ilCtrl->getLinkTargetByClass("ilglossarytermgui", "listDefinitions")); } else { if (count($defs) == 1) { $ilCtrl->setParameterByClass("ilglossarydefpagegui", "def", $defs[0]["id"]); $list->addItem($lng->txt("cont_edit_definition"), "", $ilCtrl->getLinkTargetByClass(array("ilglossarytermgui", "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit")); } } $list->addItem($lng->txt("cont_add_definition"), "", $ilCtrl->getLinkTargetByClass("ilobjglossarygui", "addDefinition")); $ilCtrl->setParameterByClass("ilglossarydefpagegui", "def", ""); $list->setId("act_term_" . $term["id"]); $list->setListTitle($lng->txt("actions")); $this->tpl->setVariable("ACTIONS", $list->getHTML()); } for ($j = 0; $j < count($defs); $j++) { $def = $defs[$j]; /*if ($this->glossary->getId() == $term["glo_id"]) { // up if ($j > 0) { $this->tpl->setCurrentBlock("move_up"); $this->tpl->setVariable("TXT_UP", $lng->txt("up")); $ilCtrl->setParameter($this->parent_obj, "term_id", $term["id"]); $ilCtrl->setParameter($this->parent_obj, "def", $def["id"]); $this->tpl->setVariable("LINK_UP", $ilCtrl->getLinkTarget($this->parent_obj, "moveDefinitionUp")); $this->tpl->parseCurrentBlock(); } // down if ($j+1 < count($defs)) { $this->tpl->setCurrentBlock("move_down"); $this->tpl->setVariable("TXT_DOWN", $lng->txt("down")); $ilCtrl->setParameter($this->parent_obj, "term_id", $term["id"]); $ilCtrl->setParameter($this->parent_obj, "def", $def["id"]); $this->tpl->setVariable("LINK_DOWN", $ilCtrl->getLinkTarget($this->parent_obj, "moveDefinitionDown")); $this->tpl->parseCurrentBlock(); } // delete $this->tpl->setCurrentBlock("delete"); $ilCtrl->setParameter($this->parent_obj, "term_id", $term["id"]); $ilCtrl->setParameter($this->parent_obj, "def", $def["id"]); $this->tpl->setVariable("LINK_DELETE", $ilCtrl->getLinkTarget($this->parent_obj, "confirmDefinitionDeletion")); $this->tpl->setVariable("TXT_DELETE", $lng->txt("delete")); $this->tpl->parseCurrentBlock(); // edit $this->tpl->setCurrentBlock("edit"); $ilCtrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term["id"]); $ilCtrl->setParameterByClass("ilglossarydefpagegui", "def", $def["id"]); $this->tpl->setVariable("LINK_EDIT", $ilCtrl->getLinkTargetByClass(array("ilglossarytermgui", "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit")); $this->tpl->setVariable("TXT_EDIT", $lng->txt("edit")); $this->tpl->parseCurrentBlock(); }*/ // text $this->tpl->setCurrentBlock("definition"); $short_str = $def["short_text"]; // replace tex // if a tex end tag is missing a tex end tag $ltexs = strrpos($short_str, "[tex]"); $ltexe = strrpos($short_str, "[/tex]"); if ($ltexs > $ltexe) { $page = new ilGlossaryDefPage($def["id"]); $page->buildDom(); $short_str = $page->getFirstParagraphText(); $short_str = strip_tags($short_str, "<br>"); $ltexe = strpos($short_str, "[/tex]", $ltexs); $short_str = ilUtil::shortenText($short_str, $ltexe + 6, true); } $short_str = ilUtil::insertLatexImages($short_str); $short_str = ilPCParagraph::xml2output($short_str); $this->tpl->setVariable("DEF_SHORT", $short_str); $this->tpl->parseCurrentBlock(); $this->tpl->setCurrentBlock("definition_row"); $this->tpl->parseCurrentBlock(); } $this->tpl->setCurrentBlock("check_col"); $this->tpl->setVariable("CHECKBOX_ID", $term["id"]); $this->tpl->parseCurrentBlock(); $ilCtrl->setParameter($this->parent_obj, "term_id", $term["id"]); // usage if (in_array("usage", $this->getSelectedColumns())) { $nr_usage = ilGlossaryTerm::getNumberOfUsages($term["id"]); if ($nr_usage > 0 && $this->glossary->getId() == $term["glo_id"]) { $this->tpl->setCurrentBlock("link_usage"); $ilCtrl->setParameterByClass("ilglossarytermgui", "term_id", $term["id"]); $this->tpl->setVariable("LUSAGE", ilGlossaryTerm::getNumberOfUsages($term["id"])); $this->tpl->setVariable("LINK_USAGE", $ilCtrl->getLinkTargetByClass("ilglossarytermgui", "listUsages")); $ilCtrl->setParameterByClass("ilglossarytermgui", "term_id", ""); $this->tpl->parseCurrentBlock(); } else { $this->tpl->setCurrentBlock("usage"); $this->tpl->setVariable("USAGE", ilGlossaryTerm::getNumberOfUsages($term["id"])); $this->tpl->parseCurrentBlock(); } $this->tpl->setCurrentBlock("td_usage"); $this->tpl->parseCurrentBlock(); } // glossary title if (in_array($this->glossary->getVirtualMode(), array("level", "subtree"))) { $this->tpl->setCurrentBlock("glossary"); $this->tpl->setVariable("GLO_TITLE", ilObject::_lookupTitle($term["glo_id"])); $this->tpl->parseCurrentBlock(); } // output language if (in_array("language", $this->getSelectedColumns())) { $this->tpl->setCurrentBlock("td_lang"); $this->tpl->setVariable("TEXT_LANGUAGE", $lng->txt("meta_l_" . $term["language"])); $this->tpl->parseCurrentBlock(); } foreach ($this->adv_cols_order as $c) { if ($c["id"] == 0) { $this->tpl->setCurrentBlock("td"); $this->tpl->setVariable("TD_VAL", $term["term"]); $this->tpl->parseCurrentBlock(); } else { if (in_array("md_" . $c["id"], $this->selected_cols)) { $id = (int) $c["id"]; $val = " "; if (isset($term["md_" . $id . "_presentation"])) { $pb = $term["md_" . $id . "_presentation"]->getHTML(); if ($pb) { $val = $pb; } } $this->tpl->setCurrentBlock("td"); $this->tpl->setVariable("TD_VAL", $val); $this->tpl->parseCurrentBlock(); } } } }
/** * Fill row * * @access public * @param array row data * */ public function fillRow($a_set) { global $ilCtrl; $this->tpl->setVariable('S_ID', $this->getServer()->getServerId()); $this->tpl->setVariable('M_ID', $a_set['mid']); $this->tpl->setVariable('VAL_ID', $this->getServer()->getServerId() . '_' . $a_set['mid']); $this->tpl->setVariable('VAL_ORG', (string) $a_set['org']); $this->tpl->setVariable('VAL_CHECKED', $a_set['checked'] ? 'checked="checked"' : ''); $this->tpl->setVariable('VAL_TITLE', $a_set['participants']); $this->tpl->setVariable('VAL_DESC', $a_set['description']); $this->tpl->setVariable('VAL_EMAIL', $a_set['email']); $this->tpl->setVariable('VAL_DNS', $a_set['dns']); $this->tpl->setVariable('VAL_ABR', $a_set['abr']); $this->tpl->setVariable('TXT_EMAIL', $this->lng->txt('ecs_email')); $this->tpl->setVariable('TXT_DNS', $this->lng->txt('ecs_dns')); $this->tpl->setVariable('TXT_ABR', $this->lng->txt('ecs_abr')); $this->tpl->setVariable('TXT_ID', $this->lng->txt('ecs_unique_id')); $this->tpl->setVariable('TXT_ORG', $this->lng->txt('organization')); include_once './Services/WebServices/ECS/classes/class.ilECSParticipantSetting.php'; $part = new ilECSParticipantSetting($this->getServer()->getServerId(), $a_set['mid']); if ($part->isExportEnabled()) { foreach ($part->getExportTypes() as $obj_type) { $this->tpl->setCurrentBlock('obj_erow'); $this->tpl->setVariable('TXT_OBJ_EINFO', $this->lng->txt('objs_' . $obj_type)); $this->tpl->parseCurrentBlock(); } } else { $this->lng->loadLanguageModule('administration'); $this->tpl->setVariable('TXT_OBJ_EINFO', $this->lng->txt('disabled')); } if ($part->isImportEnabled()) { foreach ($part->getImportTypes() as $obj_type) { $this->tpl->setCurrentBlock('obj_irow'); $this->tpl->setVariable('TXT_OBJ_IINFO', $this->lng->txt('objs_' . $obj_type)); $this->tpl->parseCurrentBlock(); } } else { $this->lng->loadLanguageModule('administration'); $this->tpl->setVariable('TXT_OBJ_IINFO', $this->lng->txt('disabled')); } // :TODO: what types are to be supported? $sel = ilUtil::formSelect($part->getImportType(), 'import_type[' . $this->getServer()->getServerId() . '][' . $a_set['mid'] . ']', array(ilECSParticipantSetting::IMPORT_RCRS => $this->lng->txt('obj_rcrs'), ilECSParticipantSetting::IMPORT_CRS => $this->lng->txt('obj_crs'), ilECSParticipantSetting::IMPORT_CMS => $this->lng->txt('ecs_import_cms')), false, true); $this->tpl->setVariable('IMPORT_SEL', $sel); include_once './Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php'; $list = new ilAdvancedSelectionListGUI(); $list->setItemLinkClass('small'); $list->setSelectionHeaderClass('small'); $list->setId('actl_' . $a_set['server_id'] . '_' . $a_set['mid']); $list->setListTitle($this->lng->txt('actions')); $ilCtrl->setParameter($this->getParentObject(), 'server_id', $this->getServer()->getServerId()); $ilCtrl->setParameter($this->getParentObject(), 'mid', $a_set['mid']); $list->addItem($this->lng->txt('edit'), '', $ilCtrl->getLinkTargetByClass('ilecsparticipantsettingsgui', 'settings')); switch ($part->getImportType()) { case ilECSParticipantSetting::IMPORT_RCRS: // Do nothing break; case ilECSParticipantSetting::IMPORT_CRS: // Possible action => Edit course allocation $ilCtrl->setParameter($this->getParentObject(), 'server_id', $this->getServer()->getServerId()); $ilCtrl->setParameter($this->getParentObject(), 'mid', $a_set['mid']); $list->addItem($this->lng->txt('ecs_crs_alloc_set'), '', $ilCtrl->getLinkTargetByClass('ilecsmappingsettingsgui', 'cStart')); break; case ilECSParticipantSetting::IMPORT_CMS: $ilCtrl->setParameter($this->getParentObject(), 'server_id', $this->getServer()->getServerId()); $ilCtrl->setParameter($this->getParentObject(), 'mid', $a_set['mid']); // Possible action => Edit course allocation, edit node mapping $list->addItem($this->lng->txt('ecs_dir_alloc_set'), '', $ilCtrl->getLinkTargetByClass('ilecsmappingsettingsgui', 'dStart')); $list->addItem($this->lng->txt('ecs_crs_alloc_set'), '', $ilCtrl->getLinkTargetByClass('ilecsmappingsettingsgui', 'cStart')); break; } $this->tpl->setVariable('ACTIONS', $list->getHTML()); }
/** * fill row * * @access public * @param $a_set */ public function fillRow(ilDataCollectionField $a_set) { global $lng, $ilCtrl; $this->tpl->setVariable('NAME', "order[" . $a_set->getId() . "]"); $this->tpl->setVariable('VALUE', $this->order); $this->tpl->setVariable("CHECKBOX_VISIBLE", "visible[" . $a_set->getId() . "]"); if ($a_set->isVisible()) { $this->tpl->setVariable("CHECKBOX_VISIBLE_CHECKED", "checked"); } $this->tpl->setVariable("CHECKBOX_FILTERABLE", "filterable[" . $a_set->getId() . "]"); if ($a_set->isFilterable()) { $this->tpl->setVariable("CHECKBOX_FILTERABLE_CHECKED", "checked"); } if (!$a_set->isStandardField()) { $this->tpl->setVariable("CHECKBOX_NAME_LOCKED", "locked[" . $a_set->getId() . "]"); if ($a_set->getLocked()) { $this->tpl->setVariable("CHECKBOX_CHECKED_LOCKED", "checked"); } } else { $this->tpl->setVariable("NOT_LOCKED", "-"); } $this->order = $this->order + 10; $this->tpl->setVariable("ORDER_NAME", "order[" . $a_set->getId() . "]"); $this->tpl->setVariable("ORDER_VALUE", $this->order); $this->tpl->setVariable('TITLE', $a_set->getTitle()); $this->tpl->setVariable('DESCRIPTION', $a_set->getDescription()); $this->tpl->setVariable('DATATYPE', $a_set->getDatatypeTitle()); if (!$a_set->isStandardField()) { switch ($a_set->getRequired()) { case 0: $required = ilUtil::getImagePath('icon_not_ok.png'); break; case 1: $required = ilUtil::getImagePath('icon_ok.png'); break; } switch ($a_set->isUnique()) { case 0: $uniq = ilUtil::getImagePath('icon_not_ok.png'); break; case 1: $uniq = ilUtil::getImagePath('icon_ok.png'); break; } $this->tpl->setVariable('REQUIRED', $required); $this->tpl->setVariable('UNIQUE', $uniq); } else { $this->tpl->setVariable('NO_REQUIRED', "-"); $this->tpl->setVariable('NO_UNIQUE', "-"); } $ilCtrl->setParameterByClass("ildatacollectionfieldeditgui", "field_id", $a_set->getId()); if (!$a_set->isStandardField()) { include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php"; $alist = new ilAdvancedSelectionListGUI(); $alist->setId($a_set->getId()); $alist->setListTitle($lng->txt("actions")); if ($this->table->hasPermissionToFields($this->parent_obj->parent_obj->ref_id)) { $alist->addItem($lng->txt('edit'), 'edit', $ilCtrl->getLinkTargetByClass("ildatacollectionfieldeditgui", 'edit')); $alist->addItem($lng->txt('delete'), 'delete', $ilCtrl->getLinkTargetByClass("ildatacollectionfieldeditgui", 'confirmDelete')); } $this->tpl->setVariable("ACTIONS", $alist->getHTML()); } }
protected function buildActions($a_ref_id, $a_type) { global $lng, $ilCtrl, $objDefinition; include_once "Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php"; $agui = new ilAdvancedSelectionListGUI(); $agui->setId($this->id . "-" . $a_ref_id); $agui->setListTitle($lng->txt("actions")); $ilCtrl->setParameter($this->parent_obj, "ownid", $a_ref_id); include_once "Services/Link/classes/class.ilLink.php"; $agui->addItem($lng->txt("show"), "", ilLink::_getLink($a_ref_id, $a_type), "", "", "_blank"); $agui->addItem($lng->txt("move"), "", $ilCtrl->getLinkTarget($this->parent_obj, "move"), "", "", ""); $agui->addItem($lng->txt("change_owner"), "", $ilCtrl->getLinkTarget($this->parent_obj, "changeOwner"), "", "", ""); if (!in_array($a_type, array("crsr", "catr")) && $objDefinition->allowExport($a_type)) { $agui->addItem($lng->txt("export"), "", $ilCtrl->getLinkTarget($this->parent_obj, "export"), "", "", ""); } $agui->addItem($lng->txt("delete"), "", $ilCtrl->getLinkTarget($this->parent_obj, "delete"), "", "", ""); $ilCtrl->setParameter($this->parent_obj, "ownid", ""); return $agui->getHTML(); }
/** * Get skill presentation HTML * * @return */ function getSkillHTML($a_top_skill_id, $a_user_id = 0, $a_edit = false) { global $ilUser, $lng, $ilCtrl, $ilSetting; $this->tooltips = array(); if ($a_user_id == 0) { $user = $ilUser; } else { $user = new ilObjUser($a_user_id); } $tpl = new ilTemplate("tpl.skill_pres.html", true, true, "Services/Skill"); include_once "./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php"; include_once "./Services/Skill/classes/class.ilSkillTree.php"; $stree = new ilSkillTree(); include_once "./Services/Skill/classes/class.ilSkillTreeNode.php"; include_once "./Services/Skill/classes/class.ilSkillTreeNodeFactory.php"; // general settings for the action drop down include_once "Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php"; $act_list = new ilAdvancedSelectionListGUI(); $act_list->setListTitle($lng->txt("actions")); $act_list->setSelectionHeaderClass("small"); // $act_list->setLinksMode("il_ContainerItemCommand2"); $act_list->setHeaderIcon(ilAdvancedSelectionListGUI::DOWN_ARROW_DARK); $act_list->setUseImages(false); $b_skills = ilSkillTreeNode::getSkillTreeNodes($a_top_skill_id, true); foreach ($b_skills as $bs) { $path = $stree->getSkillTreePath($bs["id"], $bs["tref"]); // check draft foreach ($path as $p) { if ($p["draft"]) { continue 2; } } reset($path); $se_level = ilPersonalSkill::getSelfEvaluation($user->getId(), $a_top_skill_id, $bs["tref"], $bs["id"]); $skill = ilSkillTreeNodeFactory::getInstance($bs["id"]); $level_data = $skill->getLevelData(); // check, if current self eval level is in current level data $valid_sel_level = false; if ($se_level > 0) { foreach ($level_data as $k => $v) { if ($v["id"] == $se_level) { $valid_sel_level = true; } } } reset($level_data); $found = false; foreach ($level_data as $k => $v) { // level $tpl->setCurrentBlock("level_td"); $tpl->setVariable("VAL_LEVEL", $v["title"]); $tt_id = "skmg_skl_tt_" . self::$skill_tt_cnt; self::$skill_tt_cnt++; $tpl->setVariable("TT_ID", $tt_id); if ($v["description"] != "") { ilTooltipGUI::addTooltip($tt_id, $v["description"]); } $tpl->parseCurrentBlock(); // self evaluation $tpl->setCurrentBlock("self_eval_td"); if ($valid_sel_level && !$found) { $tpl->setVariable("VAL_SELF_EVAL", "x"); $tpl->setVariable("CLASS_SELF_EVAL", "ilSkillSelf"); } else { $tpl->setVariable("VAL_SELF_EVAL", " "); } $tpl->parseCurrentBlock(); if ($v["id"] == $se_level) { $found = true; } // assigned materials if ($this->use_materials) { $mat_cnt = ilPersonalSkill::countAssignedMaterial($user->getId(), $bs["tref"], $v["id"]); if ($mat_cnt == 0) { $tpl->setCurrentBlock("material_td"); $tpl->setVariable("VAL_MATERIAL", " "); $tpl->parseCurrentBlock(); } else { // links to material files $tpl->setCurrentBlock("material_links"); $mat_tt = array(); $cnt = 1; foreach (ilPersonalSkill::getAssignedMaterial($user->getId(), $bs["tref"], $v["id"]) as $item) { $mat_data = $this->getMaterialInfo($item["wsp_id"]); $tpl->setVariable("URL_MATERIAL", $mat_data[1]); $tpl->setVariable("TXT_MATERIAL", $cnt); // tooltip $mat_tt_id = "skmg_skl_tt_mat_" . self::$skill_tt_cnt; self::$skill_tt_cnt++; $tpl->setVariable("TOOLTIP_MATERIAL_ID", $mat_tt_id); if (!$this->offline_mode) { ilTooltipGUI::addTooltip($mat_tt_id, $mat_data[0]); } else { $this->tooltips[] = ilTooltipGUI::getTooltip($mat_tt_id, $mat_data[0]); } $tpl->parseCurrentBlock(); $cnt++; } $tpl->setCurrentBlock("material_td"); $tpl->setVariable("CLASS_MAT", "ilSkillMat"); $tpl->parseCurrentBlock(); } } } $title = $sep = ""; $found = false; foreach ($path as $p) { if ($found) { $title .= $sep . $p["title"]; $sep = " > "; } if ($a_top_skill_id == $p["child"]) { $found = true; } } $tpl->setCurrentBlock("skill"); $tpl->setVariable("BSKILL_TITLE", $title); $tpl->setVariable("TXT_LEVEL", $lng->txt("skmg_level")); $tpl->setVariable("TXT_SELF_EVAL", $lng->txt("skmg_self_evaluation")); if ($this->use_materials) { $tpl->setVariable("TXT_MATERIAL", $lng->txt("skmg_material")); } if ($a_edit) { $act_list->flush(); $act_list->setId("act_" . $a_top_skill_id . "_" . $bs["id"]); $ilCtrl->setParameterByClass("ilpersonalskillsgui", "skill_id", $a_top_skill_id); $ilCtrl->setParameterByClass("ilpersonalskillsgui", "tref_id", $bs["tref"]); $ilCtrl->setParameterByClass("ilpersonalskillsgui", "basic_skill_id", $bs["id"]); if ($this->use_materials) { $act_list->addItem($lng->txt('skmg_assign_materials'), "", $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "assignMaterials")); } $act_list->addItem($lng->txt('skmg_self_evaluation'), "", $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "selfEvaluation")); $tpl->setVariable("ACTIONS2", $act_list->getHTML()); } $tpl->parseCurrentBlock(); } $tpl->setVariable("SKILL_TITLE", ilSkillTreeNode::_lookupTitle($a_top_skill_id)); if ($a_edit) { $act_list->flush(); $act_list->setId("act_" . $a_top_skill_id); $ilCtrl->setParameterByClass("ilpersonalskillsgui", "skill_id", $a_top_skill_id); // $act_list->addItem($lng->txt('skmg_assign_materials'), "", // $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "assignMaterials")); $act_list->addItem($lng->txt('skmg_remove_skill'), "", $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "confirmSkillRemove")); $tpl->setVariable("ACTIONS1", $act_list->getHTML()); } return $tpl->get(); }
/** * Show user's courses */ public function showMyCourses() { global $lng, $ilUser, $ilObjDataCache, $tree, $tpl, $rbacsystem; include_once 'Modules/Course/classes/class.ilCourseParticipants.php'; $this->tpl->setTitle($this->lng->txt('mail_addressbook')); $searchTpl = new ilTemplate('tpl.mail_search_template.html', true, true, 'Services/Contact'); $_GET['view'] = 'mycourses'; $lng->loadLanguageModule('crs'); include_once 'Services/Contact/classes/class.ilMailSearchCoursesTableGUI.php'; $table = new ilMailSearchCoursesTableGUI($this, "crs", $_GET["ref"]); $table->setId('search_crs_tbl'); include_once 'Modules/Course/classes/class.ilCourseParticipants.php'; $crs_ids = ilCourseParticipants::_getMembershipByType($ilUser->getId(), 'crs'); $counter = 0; $tableData = array(); if (is_array($crs_ids) && count($crs_ids) > 0) { $num_courses_hidden_members = 0; include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php"; foreach ($crs_ids as $crs_id) { /** * @var $oTmpCrs ilObjCourse */ $oTmpCrs = ilObjectFactory::getInstanceByObjId($crs_id); $isOffline = !$oTmpCrs->isActivated(); $hasUntrashedReferences = ilObject::_hasUntrashedReference($crs_id); $showMemberListEnabled = (bool) $oTmpCrs->getShowMembers(); $ref_ids = array_keys(ilObject::_getAllReferences($crs_id)); $isPrivilegedUser = $rbacsystem->checkAccess('write', $ref_ids[0]); if ($hasUntrashedReferences && (!$isOffline && $showMemberListEnabled || $isPrivilegedUser)) { $oCrsParticipants = ilCourseParticipants::_getInstanceByObjId($crs_id); $crs_members = $oCrsParticipants->getParticipants(); foreach ($crs_members as $key => $member) { $tmp_usr = new ilObjUser($member); if ($tmp_usr->checkTimeLimit() == false || $tmp_usr->getActive() == false) { unset($crs_members[$key]); } } unset($tmp_usr); $hiddenMembers = false; if ((int) $oTmpCrs->getShowMembers() == $oTmpCrs->SHOW_MEMBERS_DISABLED) { ++$num_courses_hidden_members; $hiddenMembers = true; } unset($oTmpCrs); $ref_ids = ilObject::_getAllReferences($crs_id); $ref_id = current($ref_ids); $path_arr = $tree->getPathFull($ref_id, $tree->getRootId()); $path_counter = 0; $path = ''; foreach ($path_arr as $data) { if ($path_counter++) { $path .= " -> "; } $path .= $data['title']; } $path = $this->lng->txt('path') . ': ' . $path; $current_selection_list = new ilAdvancedSelectionListGUI(); $current_selection_list->setListTitle($this->lng->txt("actions")); $current_selection_list->setId("act_" . $counter); $this->ctrl->setParameter($this, 'search_crs', $crs_id); $this->ctrl->setParameter($this, 'view', 'mycourses'); if ($_GET["ref"] == "mail") { if ($this->mailing_allowed) { $current_selection_list->addItem($this->lng->txt("mail_members"), '', $this->ctrl->getLinkTarget($this, "mail")); } } else { if ($_GET["ref"] == "wsp") { $current_selection_list->addItem($this->lng->txt("wsp_share_with_members"), '', $this->ctrl->getLinkTarget($this, "share")); } } $current_selection_list->addItem($this->lng->txt("mail_list_members"), '', $this->ctrl->getLinkTarget($this, "showMembers")); $this->ctrl->clearParameters($this); $rowData = array("CRS_ID" => $crs_id, "CRS_NAME" => $ilObjDataCache->lookupTitle($crs_id), "CRS_NO_MEMBERS" => count($crs_members), "CRS_PATH" => $path, 'COMMAND_SELECTION_LIST' => $current_selection_list->getHTML(), "hidden_members" => $hiddenMembers); $counter++; $tableData[] = $rowData; } } //if((int)$counter) //{ // $table->addCommandButton('mail',$lng->txt('mail_members')); // $table->addCommandButton('showMembers',$lng->txt('mail_list_members')); //} if ($num_courses_hidden_members > 0) { $searchTpl->setCurrentBlock('caption_block'); $searchTpl->setVariable('TXT_LIST_MEMBERS_NOT_AVAILABLE', $this->lng->txt('mail_crs_list_members_not_available')); $searchTpl->parseCurrentBlock(); } } $searchTpl->setVariable('TXT_MARKED_ENTRIES', $lng->txt('marked_entries')); $table->setData($tableData); if ($_GET['ref'] == 'mail') { $this->tpl->setVariable('BUTTON_CANCEL', $lng->txt('cancel')); } $searchTpl->setVariable('TABLE', $table->getHtml()); $tpl->setContent($searchTpl->get()); if ($_GET["ref"] != "wsp") { $tpl->show(); } }
/** * * @see ilLinkCheckerGUIRowHandling::formatInvalidLinkArray() * @param array Unformatted array * @return array Formatted array * @access public * */ public function formatInvalidLinkArray(array $row) { $row['title'] = ilLMPageObject::_getPresentationTitle($row['page_id'], $this->object->getPageHeader()); require_once 'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php'; $actions = new ilAdvancedSelectionListGUI(); $actions->setSelectionHeaderClass('small'); $actions->setItemLinkClass('xsmall'); $actions->setListTitle($this->lng->txt('actions')); $actions->setId($row['page_id']); $this->ctrl->setParameterByClass('ilLMPageObjectGUI', 'obj_id', $row['page_id']); $actions->addItem($this->lng->txt('edit'), '', $this->ctrl->getLinkTargetByClass('ilLMPageObjectGUI', 'edit')); $this->ctrl->clearParametersByClass('ilLMPageObjectGUI'); $row['action_html'] = $actions->getHTML(); return $row; }
private function getActionsHTML($sourcePoolDefinitionId) { require_once 'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php'; $selectionList = new ilAdvancedSelectionListGUI(); $selectionList->setId('sourcePoolDefinitionActions_' . $sourcePoolDefinitionId); $selectionList->setListTitle($this->lng->txt("actions")); $selectionList->addItem($this->lng->txt('edit'), '', $this->getEditHref($sourcePoolDefinitionId)); $selectionList->addItem($this->lng->txt('delete'), '', $this->getDeleteHref($sourcePoolDefinitionId)); return $selectionList->getHTML(); }
/** * Build posting month list * * @param array $items * @param string $a_month * @param string $a_cmd * @param bool $a_link_template * @param bool $a_show_inactive * @return string */ function renderList(array $items, $a_month, $a_cmd = "preview", $a_link_template = null, $a_show_inactive = false) { global $lng, $ilCtrl; include_once "Services/Calendar/classes/class.ilCalendarUtil.php"; $wtpl = new ilTemplate("tpl.blog_list.html", true, true, "Modules/Blog"); // title according to current "filter"/navigation if ($this->keyword) { $title = $lng->txt("blog_keyword") . ": " . $this->keyword; } else { if ($this->author) { include_once "Services/User/classes/class.ilUserUtil.php"; $title = $lng->txt("blog_author") . ": " . ilUserUtil::getNamePresentation($this->author); } else { include_once "Services/Calendar/classes/class.ilCalendarUtil.php"; $title = ilCalendarUtil::_numericMonthToString((int) substr($a_month, 5)) . " " . substr($a_month, 0, 4); } } $wtpl->setVariable("TXT_CURRENT_MONTH", $title); $can_approve = $this->object->hasApproval() && $this->checkPermissionBool("write"); $can_deactivate = $this->checkPermissionBool("write"); include_once "./Modules/Blog/classes/class.ilBlogPostingGUI.php"; foreach ($items as $item) { // only published items $is_active = ilBlogPosting::_lookupActive($item["id"], "blp"); if (!$is_active && !$a_show_inactive) { continue; } if (!$a_link_template) { $ilCtrl->setParameterByClass("ilblogpostinggui", "bmn", $this->month); $ilCtrl->setParameterByClass("ilblogpostinggui", "blpg", $item["id"]); $preview = $ilCtrl->getLinkTargetByClass("ilblogpostinggui", $a_cmd); } else { $preview = $this->buildExportLink($a_link_template, "posting", $item["id"]); } // actions $item_contribute = $this->mayContribute($item["id"], $item["author"]); if (($item_contribute || $can_approve || $can_deactivate) && !$a_link_template && $a_cmd == "preview") { include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php"; $alist = new ilAdvancedSelectionListGUI(); $alist->setId($item["id"]); $alist->setListTitle($lng->txt("actions")); if ($is_active && $this->object->hasApproval() && !$item["approved"]) { if ($can_approve) { $ilCtrl->setParameter($this, "apid", $item["id"]); $alist->addItem($lng->txt("blog_approve"), "approve", $ilCtrl->getLinkTarget($this, "approve")); $ilCtrl->setParameter($this, "apid", ""); } $wtpl->setVariable("APPROVAL", $lng->txt("blog_needs_approval")); } if ($item_contribute) { $alist->addItem($lng->txt("edit_content"), "edit", $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "edit")); // #11858 if ($is_active) { $alist->addItem($lng->txt("blog_toggle_draft"), "deactivate", $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "deactivatePageToList")); } else { $alist->addItem($lng->txt("blog_toggle_final"), "activate", $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "activatePageToList")); } $alist->addItem($lng->txt("rename"), "rename", $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "edittitle")); $alist->addItem($lng->txt("blog_edit_keywords"), "keywords", $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "editKeywords")); $alist->addItem($lng->txt("blog_edit_date"), "editdate", $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "editdate")); $alist->addItem($lng->txt("delete"), "delete", $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "deleteBlogPostingConfirmationScreen")); } else { if ($can_deactivate) { // #10513 if ($is_active) { $ilCtrl->setParameter($this, "apid", $item["id"]); $alist->addItem($lng->txt("blog_toggle_draft_admin"), "deactivate", $ilCtrl->getLinkTarget($this, "deactivateAdmin")); $ilCtrl->setParameter($this, "apid", ""); } $alist->addItem($lng->txt("delete"), "delete", $ilCtrl->getLinkTargetByClass("ilblogpostinggui", "deleteBlogPostingConfirmationScreen")); } } $wtpl->setCurrentBlock("actions"); $wtpl->setVariable("ACTION_SELECTOR", $alist->getHTML()); $wtpl->parseCurrentBlock(); } // comments if ($this->object->getNotesStatus() && !$a_link_template && !$this->disable_notes) { // count (public) notes include_once "Services/Notes/classes/class.ilNote.php"; $count = sizeof(ilNote::_getNotesOfObject($this->obj_id, $item["id"], "blp", IL_NOTE_PUBLIC)); if ($a_cmd != "preview") { $wtpl->setCurrentBlock("comments"); $wtpl->setVariable("TEXT_COMMENTS", $lng->txt("blog_comments")); $wtpl->setVariable("URL_COMMENTS", $preview); $wtpl->setVariable("COUNT_COMMENTS", $count); $wtpl->parseCurrentBlock(); } /* we disabled comments in edit mode (should always be done via pagegui) else { $hash = ilCommonActionDispatcherGUI::buildAjaxHash(ilCommonActionDispatcherGUI::TYPE_WORKSPACE, $this->node_id, "blog", $this->obj_id, "blp", $item["id"]); $notes_link = "#\" onclick=\"".ilNoteGUI::getListCommentsJSCall($hash); } */ } // permanent link if ($a_cmd != "preview" && $a_cmd != "previewEmbedded") { if ($this->id_type == self::WORKSPACE_NODE_ID) { $goto = $this->getAccessHandler()->getGotoLink($this->node_id, $this->obj_id, "_" . $item["id"]); } else { include_once "Services/Link/classes/class.ilLink.php"; $goto = ilLink::_getStaticLink($this->node_id, $this->getType(), true, "_" . $item["id"]); } $wtpl->setCurrentBlock("permalink"); $wtpl->setVariable("URL_PERMALINK", $goto); $wtpl->setVariable("TEXT_PERMALINK", $lng->txt("blog_permanent_link")); $wtpl->parseCurrentBlock(); } $snippet = ilBlogPostingGUI::getSnippet($item["id"]); if ($snippet) { $wtpl->setCurrentBlock("more"); $wtpl->setVariable("URL_MORE", $preview); $wtpl->setVariable("TEXT_MORE", $lng->txt("blog_list_more")); $wtpl->parseCurrentBlock(); } $wtpl->setCurrentBlock("posting"); if (!$is_active) { $wtpl->setVariable("DRAFT_CLASS", " ilBlogListItemDraft"); } $author = ""; if ($this->id_type == self::REPOSITORY_NODE_ID) { $author_id = $item["author"]; if ($author_id) { include_once "Services/User/classes/class.ilUserUtil.php"; $author = ilUserUtil::getNamePresentation($author_id) . " - "; } } // title $wtpl->setVariable("URL_TITLE", $preview); $wtpl->setVariable("TITLE", $item["title"]); $wtpl->setVariable("DATETIME", $author . ilDatePresentation::formatDate($item["created"], IL_CAL_DATE)); // content $wtpl->setVariable("CONTENT", $snippet); $wtpl->parseCurrentBlock(); } // notes /* if($a_cmd == "previewFullscreen" && $this->object->getNotesStatus()) { $wtpl->setVariable("NOTES", $this->getNotesHTML()); } */ // permalink if ($a_cmd == "previewFullscreen") { $wtpl->setVariable("PERMALINK", $this->getPermanentLinkWidget(null, true)); } return $wtpl->get(); }
/** * @param ilDataCollectionField $a_set */ public function fillRow(ilDataCollectionField $a_set) { global $lng, $ilCtrl; if (!$a_set->isStandardField()) { $this->tpl->setVariable('FIELD_ID', $a_set->getId()); } $this->tpl->setVariable('NAME', 'order[' . $a_set->getId() . ']'); $this->tpl->setVariable('VALUE', $this->order); $this->tpl->setVariable('CHECKBOX_VISIBLE', 'visible[' . $a_set->getId() . ']'); if ($a_set->isVisible()) { $this->tpl->setVariable('CHECKBOX_VISIBLE_CHECKED', 'checked'); } /* Don't enable setting filter for MOB fields or reference fields that reference a MOB field */ $show_filter = true; $show_exportable = true; if ($a_set->getDatatypeId() == ilDataCollectionDatatype::INPUTFORMAT_MOB || $a_set->getDatatypeId() == ilDataCollectionDatatype::INPUTFORMAT_FILE) { $show_filter = false; } if ($a_set->getDatatypeId() == ilDataCollectionDatatype::INPUTFORMAT_REFERENCE) { $ref_field = ilDataCollectionCache::getFieldCache((int) $a_set->getFieldRef()); if ($ref_field && ($ref_field->getDatatypeId() == ilDataCollectionDatatype::INPUTFORMAT_MOB || $ref_field->getDatatypeId() == ilDataCollectionDatatype::INPUTFORMAT_FILE)) { $show_filter = false; } } if ($a_set->getId() == 'comments') { $show_filter = false; $show_exportable = false; } if ($show_filter) { $this->tpl->setVariable('CHECKBOX_FILTERABLE', 'filterable[' . $a_set->getId() . ']'); if ($a_set->isFilterable()) { $this->tpl->setVariable('CHECKBOX_FILTERABLE_CHECKED', 'checked'); } } else { $this->tpl->setVariable('NO_FILTER', ''); } if ($show_exportable) { $this->tpl->setVariable('CHECKBOX_EXPORTABLE', 'exportable[' . $a_set->getId() . ']'); if ($a_set->getExportable()) { $this->tpl->setVariable('CHECKBOX_EXPORTABLE_CHECKED', 'checked'); } } else { $this->tpl->setVariable('NO_FILTER_EXPORTABLE', ''); } if (!$a_set->isStandardField()) { $this->tpl->setVariable('CHECKBOX_NAME_LOCKED', 'locked[' . $a_set->getId() . ']'); if ($a_set->getLocked()) { $this->tpl->setVariable('CHECKBOX_CHECKED_LOCKED', 'checked'); } } else { $this->tpl->setVariable('NOT_LOCKED', ''); } $this->order = $this->order + 10; $this->tpl->setVariable('ORDER_NAME', 'order[' . $a_set->getId() . ']'); $this->tpl->setVariable('ORDER_VALUE', $this->order); $this->tpl->setVariable('TITLE', $a_set->getTitle()); $this->tpl->setVariable('DESCRIPTION', $a_set->getDescription()); $this->tpl->setVariable('DATATYPE', $a_set->getDatatypeTitle()); if (!$a_set->isStandardField()) { switch ($a_set->getRequired()) { case 0: $required = ilUtil::getImagePath('icon_not_ok.svg'); break; case 1: $required = ilUtil::getImagePath('icon_ok.svg'); break; } switch ($a_set->isUnique()) { case 0: $uniq = ilUtil::getImagePath('icon_not_ok.svg'); break; case 1: $uniq = ilUtil::getImagePath('icon_ok.svg'); break; } $this->tpl->setVariable('REQUIRED', $required); $this->tpl->setVariable('UNIQUE', $uniq); } else { $this->tpl->setVariable('NO_REQUIRED', ''); $this->tpl->setVariable('NO_UNIQUE', ''); } $ilCtrl->setParameterByClass('ildatacollectionfieldeditgui', 'field_id', $a_set->getId()); if (!$a_set->isStandardField()) { include_once './Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php'; $alist = new ilAdvancedSelectionListGUI(); $alist->setId($a_set->getId()); $alist->setListTitle($lng->txt('actions')); if ($this->table->hasPermissionToFields($this->parent_obj->parent_obj->ref_id)) { $alist->addItem($lng->txt('edit'), 'edit', $ilCtrl->getLinkTargetByClass('ildatacollectionfieldeditgui', 'edit')); $alist->addItem($lng->txt('delete'), 'delete', $ilCtrl->getLinkTargetByClass('ildatacollectionfieldeditgui', 'confirmDelete')); } $this->tpl->setVariable('ACTIONS', $alist->getHTML()); } }
/** * Fill footer row */ function fillFooter() { global $lng, $ilCtrl, $ilUser; $footer = false; // select all checkbox if (strlen($this->getFormName()) && strlen($this->getSelectAllCheckbox()) && $this->dataExists()) { $this->tpl->setCurrentBlock("select_all_checkbox"); $this->tpl->setVariable("SELECT_ALL_TXT_SELECT_ALL", $lng->txt("select_all")); $this->tpl->setVariable("SELECT_ALL_CHECKBOX_NAME", $this->getSelectAllCheckbox()); $this->tpl->setVariable("SELECT_ALL_FORM_NAME", $this->getFormName()); $this->tpl->setVariable("CHECKBOXNAME", "chb_select_all_" . $this->unique_id); $this->tpl->parseCurrentBlock(); } // table footer numinfo if ($this->enabled["numinfo"] && $this->enabled["footer"]) { $start = $this->offset + 1; // compute num info if (!$this->dataExists()) { $start = 0; } $end = $this->offset + $this->limit; if ($end > $this->max_count or $this->limit == 0) { $end = $this->max_count; } if ($this->max_count > 0) { if ($this->lang_support) { $numinfo = "(" . $start . " - " . $end . " " . strtolower($this->lng->txt("of")) . " " . $this->max_count . ")"; } else { $numinfo = "(" . $start . " - " . $end . " of " . $this->max_count . ")"; } } if ($this->max_count > 0) { if ($this->getEnableNumInfo()) { $this->tpl->setCurrentBlock("tbl_footer_numinfo"); $this->tpl->setVariable("NUMINFO", $numinfo); $this->tpl->parseCurrentBlock(); } } $footer = true; } // table footer linkbar if ($this->enabled["linkbar"] && $this->enabled["footer"] && $this->limit != 0 && $this->max_count > 0) { $layout = array("link" => $this->footer_style, "prev" => $this->footer_previous, "next" => $this->footer_next); //if (!$this->getDisplayAsBlock()) //{ $linkbar = $this->getLinkbar("1"); $this->tpl->setCurrentBlock("tbl_footer_linkbar"); $this->tpl->setVariable("LINKBAR", $linkbar); $this->tpl->parseCurrentBlock(); $linkbar = true; //} $footer = true; } // column selector if (count($this->getSelectableColumns()) > 0) { $items = array(); foreach ($this->getSelectableColumns() as $k => $c) { $items[$k] = array("txt" => $c["txt"], "selected" => $this->isColumnSelected($k)); } include_once "./Services/UIComponent/CheckboxListOverlay/classes/class.ilCheckboxListOverlayGUI.php"; $cb_over = new ilCheckboxListOverlayGUI("tbl_" . $this->getId()); $cb_over->setLinkTitle($lng->txt("columns")); $cb_over->setItems($items); //$cb_over->setUrl("./ilias.php?baseClass=ilTablePropertiesStorage&table_id=". // $this->getId()."&cmd=saveSelectedFields&user_id=".$ilUser->getId()); $cb_over->setFormCmd($this->getParentCmd()); $cb_over->setFieldVar("tblfs" . $this->getId()); $cb_over->setHiddenVar("tblfsh" . $this->getId()); $cb_over->setSelectionHeaderClass("ilTableMenuItem"); $column_selector = $cb_over->getHTML(); $footer = true; } if ($this->getShowTemplates() && is_object($ilUser)) { // template handling if (isset($_REQUEST["tbltplcrt"]) && $_REQUEST["tbltplcrt"]) { if ($this->saveTemplate($_REQUEST["tbltplcrt"])) { ilUtil::sendSuccess($lng->txt("tbl_template_created")); } } else { if (isset($_REQUEST["tbltpldel"]) && $_REQUEST["tbltpldel"]) { if ($this->deleteTemplate($_REQUEST["tbltpldel"])) { ilUtil::sendSuccess($lng->txt("tbl_template_deleted")); } } } $create_id = "template_create_overlay_" . $this->getId(); $delete_id = "template_delete_overlay_" . $this->getId(); $list_id = "template_stg_" . $this->getId(); include_once "./Services/Table/classes/class.ilTableTemplatesStorage.php"; $storage = new ilTableTemplatesStorage(); $templates = $storage->getNames($this->getContext(), $ilUser->getId()); include_once "./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php"; // form to delete template if (count($templates)) { $overlay = new ilOverlayGUI($delete_id); $overlay->setTrigger($list_id . "_delete"); $overlay->setAnchor("ilAdvSelListAnchorElement_" . $list_id); $overlay->setAutoHide(false); $overlay->add(); $lng->loadLanguageModule("form"); $this->tpl->setCurrentBlock("template_editor_delete_item"); $this->tpl->setVariable("TEMPLATE_DELETE_OPTION_VALUE", ""); $this->tpl->setVariable("TEMPLATE_DELETE_OPTION", "- " . $lng->txt("form_please_select") . " -"); $this->tpl->parseCurrentBlock(); foreach ($templates as $name) { $this->tpl->setVariable("TEMPLATE_DELETE_OPTION_VALUE", $name); $this->tpl->setVariable("TEMPLATE_DELETE_OPTION", $name); $this->tpl->parseCurrentBlock(); } $this->tpl->setCurrentBlock("template_editor_delete"); $this->tpl->setVariable("TEMPLATE_DELETE_ID", $delete_id); $this->tpl->setVariable("TXT_TEMPLATE_DELETE", $lng->txt("tbl_template_delete")); $this->tpl->setVariable("TXT_TEMPLATE_DELETE_SUBMIT", $lng->txt("delete")); $this->tpl->setVariable("TEMPLATE_DELETE_CMD", $this->parent_cmd); $this->tpl->parseCurrentBlock(); } // form to save new template $overlay = new ilOverlayGUI($create_id); $overlay->setTrigger($list_id . "_create"); $overlay->setAnchor("ilAdvSelListAnchorElement_" . $list_id); $overlay->setAutoHide(false); $overlay->add(); $this->tpl->setCurrentBlock("template_editor"); $this->tpl->setVariable("TEMPLATE_CREATE_ID", $create_id); $this->tpl->setVariable("TXT_TEMPLATE_CREATE", $lng->txt("tbl_template_create")); $this->tpl->setVariable("TXT_TEMPLATE_CREATE_SUBMIT", $lng->txt("save")); $this->tpl->setVariable("TEMPLATE_CREATE_CMD", $this->parent_cmd); $this->tpl->parseCurrentBlock(); // load saved template include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php"; $alist = new ilAdvancedSelectionListGUI(); $alist->setId($list_id); $alist->addItem($lng->txt("tbl_template_create"), "create", "#"); if (count($templates)) { $alist->addItem($lng->txt("tbl_template_delete"), "delete", "#"); foreach ($templates as $name) { $ilCtrl->setParameter($this->parent_obj, $this->prefix . "_tpl", urlencode($name)); $alist->addItem($name, $name, $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd)); $ilCtrl->setParameter($this->parent_obj, $this->prefix . "_tpl", ""); } } $alist->setListTitle($lng->txt("tbl_templates")); $this->tpl->setVariable("TEMPLATE_SELECTOR", " " . $alist->getHTML()); } if ($footer) { $this->tpl->setCurrentBlock("tbl_footer"); $this->tpl->setVariable("COLUMN_COUNT", $this->getColumnCount()); if ($this->getDisplayAsBlock()) { $this->tpl->setVariable("BLK_CLASS", "Block"); } $this->tpl->parseCurrentBlock(); // top navigation, if number info or linkbar given if ($numinfo != "" || $linkbar != "" || $column_selector != "" || count($this->filters) > 0 || count($this->optional_filters) > 0) { if (is_object($ilUser) && (count($this->filters) || count($this->optional_filters))) { $this->tpl->setCurrentBlock("filter_activation"); $this->tpl->setVariable("TXT_ACTIVATE_FILTER", $lng->txt("show_filter")); $this->tpl->setVariable("FILA_ID", $this->getId()); if ($this->getId() != "") { $this->tpl->setVariable("SAVE_URLA", "./ilias.php?baseClass=ilTablePropertiesStorage&table_id=" . $this->getId() . "&cmd=showFilter&user_id=" . $ilUser->getId()); } $this->tpl->parseCurrentBlock(); if (!$this->getDisableFilterHiding()) { $this->tpl->setCurrentBlock("filter_deactivation"); $this->tpl->setVariable("TXT_HIDE", $lng->txt("hide_filter")); if ($this->getId() != "") { $this->tpl->setVariable("SAVE_URL", "./ilias.php?baseClass=ilTablePropertiesStorage&table_id=" . $this->getId() . "&cmd=hideFilter&user_id=" . $ilUser->getId()); $this->tpl->setVariable("FILD_ID", $this->getId()); } $this->tpl->parseCurrentBlock(); } } if ($numinfo != "" && $this->getEnableNumInfo()) { $this->tpl->setCurrentBlock("top_numinfo"); $this->tpl->setVariable("NUMINFO", $numinfo); $this->tpl->parseCurrentBlock(); } if ($linkbar != "" && !$this->getDisplayAsBlock()) { $linkbar = $this->getLinkbar("2"); $this->tpl->setCurrentBlock("top_linkbar"); $this->tpl->setVariable("LINKBAR", $linkbar); $this->tpl->parseCurrentBlock(); } // column selector $this->tpl->setVariable("COLUMN_SELECTOR", $column_selector); // row selector if ($this->getShowRowsSelector() && is_object($ilUser)) { include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php"; $alist = new ilAdvancedSelectionListGUI(); $alist->setId("sellst_rows_" . $this->getId()); $hpp = $ilUser->getPref("hits_per_page") != 9999 ? $ilUser->getPref("hits_per_page") : $lng->txt("unlimited"); $options = array(0 => $lng->txt("default") . " (" . $hpp . ")", 5 => 5, 10 => 10, 15 => 15, 20 => 20, 30 => 30, 40 => 40, 50 => 50, 100 => 100, 200 => 200, 400 => 400, 800 => 800); foreach ($options as $k => $v) { $ilCtrl->setParameter($this->parent_obj, $this->prefix . "_trows", $k); $alist->addItem($v, $k, $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd)); $ilCtrl->setParameter($this->parent_obj, $this->prefix . "_trows", ""); } $alist->setListTitle($this->getRowSelectorLabel() ? $this->getRowSelectorLabel() : $lng->txt("rows")); $this->tpl->setVariable("ROW_SELECTOR", $alist->getHTML()); } // export if (count($this->export_formats) && $this->dataExists()) { include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php"; $alist = new ilAdvancedSelectionListGUI(); $alist->setId("sellst_xpt"); foreach ($this->export_formats as $format => $caption_lng_id) { $ilCtrl->setParameter($this->parent_obj, $this->prefix . "_xpt", $format); $url = $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd); $ilCtrl->setParameter($this->parent_obj, $this->prefix . "_xpt", ""); $caption = $lng->txt($caption_lng_id); //this part is necessary, because the labels for xls- and csv-Export are fetched from the ilias-lang-files, while the label for pdf-export is fetched from the lang-file of the plugin. If the ilias-lang-file does not contain a translation for the caption_lng_id, it will set it into '-'es. In that case the caption comes from the plugin and we just use the string that is there. if (strpos($caption, '-') === 0 && strpos($caption, '-', strlen($caption) - 1) === strlen($caption) - 1) { $alist->addItem($caption_lng_id, $format, $url); } else { $alist->addItem($lng->txt($caption_lng_id), $format, $url); } } $alist->setListTitle($lng->txt("export")); $this->tpl->setVariable("EXPORT_SELECTOR", " " . $alist->getHTML()); } $this->tpl->setCurrentBlock("top_navigation"); $this->tpl->setVariable("COLUMN_COUNT", $this->getColumnCount()); if ($this->getDisplayAsBlock()) { $this->tpl->setVariable("BLK_CLASS", "Block"); } $this->tpl->parseCurrentBlock(); } } }
/** * Fill table row */ protected function fillRow($user) { global $ilCtrl, $lng; $this->tpl->setVariable("VAL_FIRSTNAME", $user["firstname"]); $this->tpl->setVariable("VAL_LASTNAME", $user["lastname"]); if ($user['usr_id'] != SYSTEM_USER_ID and ($user['usr_id'] != ANONYMOUS_USER_ID or $this->getRoleId() != ANONYMOUS_ROLE_ID) and $this->isRoleAssignmentEditable()) { $this->tpl->setVariable("ID", $user["usr_id"]); } include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php"; $actions = new ilAdvancedSelectionListGUI(); $actions->setSelectionHeaderClass("small"); $actions->setItemLinkClass("small"); $actions->setListTitle($lng->txt('actions')); $actions->setId($user['usr_id']); #$link_contact = ilMailFormCall::getLinkTarget( # $this->topGuiObj, 'frameset', # array('fr' => rawurlencode(base64_encode($ilCtrl->getLinkTarget($this->getParentObject(), 'userassignment', '', false, false)))), # array('type' => 'new', 'rcp_to' => urlencode($user['login'])) #); $actions->addItem($lng->txt('message'), '', $link_contact); if (strtolower($_GET["baseClass"]) == 'iladministrationgui' && $_GET["admin_mode"] == "settings") { $ilCtrl->setParameterByClass("ilobjusergui", "ref_id", 7); $ilCtrl->setParameterByClass("ilobjusergui", "obj_id", $user["usr_id"]); $link_change = $ilCtrl->getLinkTargetByClass(array("iladministrationgui", "ilobjusergui"), "view"); $this->tpl->setVariable('VAL_LOGIN', $user['login']); $this->tpl->setVariable('HREF_LOGIN', $link_change); $actions->addItem($this->lng->txt("edit"), '', $link_change); } else { $this->tpl->setVariable('VAL_PLAIN_LOGIN', $user['login']); } if (($this->getRoleId() != SYSTEM_ROLE_ID or $user['usr_id'] != SYSTEM_USER_ID) and ($this->getRoleId() != ANONYMOUS_ROLE_ID or $user['usr_id'] != ANONYMOUS_USER_ID) and $this->isRoleAssignmentEditable()) { $ilCtrl->setParameter($this->getParentObject(), "user_id", $user["usr_id"]); $link_leave = $ilCtrl->getLinkTarget($this->getParentObject(), "deassignUser"); $actions->addItem($this->lng->txt('remove'), '', $link_leave); } $this->tpl->setVariable('VAL_ACTIONS', $actions->getHTML()); }
/** * Show user's courses */ public function showMyGroups() { global $lng, $ilUser, $ilObjDataCache, $tree; include_once 'Modules/Group/classes/class.ilGroupParticipants.php'; $this->tpl->setTitle($this->lng->txt('mail_addressbook')); $searchTpl = new ilTemplate('tpl.mail_search_template.html', true, true, 'Services/Contact'); $_GET['view'] = 'mygroups'; $lng->loadLanguageModule('crs'); $this->ctrl->setParameter($this, 'view', 'mygroups'); include_once 'Services/Contact/classes/class.ilMailSearchCoursesTableGUI.php'; $table = new ilMailSearchCoursesTableGUI($this, 'grp', $_GET["ref"]); $table->setId('search_grps_tbl'); $grp_ids = ilGroupParticipants::_getMembershipByType($ilUser->getId(), 'grp'); $counter = 0; $tableData = array(); if (is_array($grp_ids) && count($grp_ids) > 0) { include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php"; foreach ($grp_ids as $grp_id) { if (ilObject::_hasUntrashedReference($grp_id)) { $oGroupParticipants = ilGroupParticipants::_getInstanceByObjId($grp_id); $grp_members = $oGroupParticipants->getParticipants(); foreach ($grp_members as $key => $member) { $tmp_usr = new ilObjUser($member); if ($tmp_usr->checkTimeLimit() == false || $tmp_usr->getActive() == false) { unset($grp_members[$key]); } } unset($tmp_usr); $ref_ids = ilObject::_getAllReferences($grp_id); $ref_id = current($ref_ids); $path_arr = $tree->getPathFull($ref_id, $tree->getRootId()); $path_counter = 0; $path = ''; foreach ($path_arr as $data) { if ($path_counter++) { $path .= " -> "; } $path .= $data['title']; } $path = $this->lng->txt('path') . ': ' . $path; $current_selection_list = new ilAdvancedSelectionListGUI(); $current_selection_list->setListTitle($this->lng->txt("actions")); $current_selection_list->setId("act_" . $counter); $this->ctrl->setParameter($this, 'search_grp', $grp_id); $this->ctrl->setParameter($this, 'view', 'mygroups'); if ($_GET["ref"] == "mail") { if ($this->mailing_allowed) { $current_selection_list->addItem($this->lng->txt("mail_members"), '', $this->ctrl->getLinkTarget($this, "mail")); } } else { if ($_GET["ref"] == "wsp") { $current_selection_list->addItem($this->lng->txt("wsp_share_with_members"), '', $this->ctrl->getLinkTarget($this, "share")); } } $current_selection_list->addItem($this->lng->txt("mail_list_members"), '', $this->ctrl->getLinkTarget($this, "showMembers")); $this->ctrl->clearParameters($this); $rowData = array('CRS_ID' => $grp_id, 'CRS_NAME' => $ilObjDataCache->lookupTitle($grp_id), 'CRS_NO_MEMBERS' => count($grp_members), 'CRS_PATH' => $path, 'COMMAND_SELECTION_LIST' => $current_selection_list->getHTML()); $counter++; $tableData[] = $rowData; } } } $table->setData($tableData); if ($counter > 0) { $this->tpl->setVariable('TXT_MARKED_ENTRIES', $lng->txt('marked_entries')); } $searchTpl->setVariable('TABLE', $table->getHtml()); $this->tpl->setContent($searchTpl->get()); if ($_GET["ref"] != "wsp") { $this->tpl->show(); } }
/** * Get skill presentation HTML * * @return */ function getSkillHTML($a_top_skill_id, $a_user_id = 0, $a_edit = false, $a_tref_id = 0) { global $ilUser, $lng, $ilCtrl, $ilSetting; $this->tooltips = array(); if ($a_user_id == 0) { $user = $ilUser; } else { $user = new ilObjUser($a_user_id); } $tpl = new ilTemplate("tpl.skill_pres.html", true, true, "Services/Skill"); include_once "./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php"; include_once "./Services/Skill/classes/class.ilSkillTree.php"; $stree = new ilSkillTree(); include_once "./Services/Skill/classes/class.ilSkillTreeNode.php"; include_once "./Services/Skill/classes/class.ilSkillTreeNodeFactory.php"; // general settings for the action drop down include_once "Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php"; $act_list = new ilAdvancedSelectionListGUI(); $act_list->setListTitle($lng->txt("actions")); $act_list->setSelectionHeaderClass("small"); // $act_list->setLinksMode("il_ContainerItemCommand2"); $act_list->setHeaderIcon(ilAdvancedSelectionListGUI::DOWN_ARROW_DARK); $act_list->setUseImages(false); $b_skills = ilSkillTreeNode::getSkillTreeNodes($a_top_skill_id, true, $a_tref_id); foreach ($b_skills as $bs) { $path = $stree->getSkillTreePath($bs["id"], $bs["tref"]); // check draft foreach ($path as $p) { if ($p["draft"]) { continue 2; } } reset($path); $skill = ilSkillTreeNodeFactory::getInstance($bs["id"]); $level_data = $skill->getLevelData(); if ($this->mode == "gap") { if ($this->getProfileId() > 0) { $this->renderProfileTargetRow($tpl, $level_data, $a_top_skill_id, $bs["id"], $bs["tref"]); } $this->renderActualLevelsRow($tpl, $level_data, $a_top_skill_id, $bs["id"], $bs["tref"]); $this->renderGapSelfEvalRow($tpl, $level_data, $a_top_skill_id, $bs["id"], $bs["tref"]); $this->renderSuggestedResources($tpl, $level_data, $bs["id"], $bs["tref"]); } else { if ($this->getProfileId() > 0) { $this->renderProfileTargetRow($tpl, $level_data, $a_top_skill_id, $bs["id"], $bs["tref"]); } $this->renderMaterialsRow($tpl, $level_data, $a_top_skill_id, $bs["id"], $bs["tref"]); // get date of self evaluation $se_date = ilPersonalSkill::getSelfEvaluationDate($user->getId(), $a_top_skill_id, $bs["tref"], $bs["id"]); $se_rendered = $se_date == "" ? true : false; // get all object triggered entries and render them foreach ($skill->getAllLevelEntriesOfUser($bs["tref"], $user->getId()) as $level_entry) { // render the self evaluation at the correct position within the list of object triggered entries if ($se_date > $level_entry["status_date"] && !$se_rendered) { $this->renderSelfEvaluationRow($tpl, $level_data, $a_top_skill_id, $bs["id"], $bs["tref"]); $se_rendered = true; } $this->renderObjectEvalRow($tpl, $level_data, $level_entry); } // if not rendered yet, render self evaluation now if (!$se_rendered) { $this->renderSelfEvaluationRow($tpl, $level_data, $a_top_skill_id, $bs["id"], $bs["tref"]); } } $too_low = true; $current_target_level = 0; foreach ($level_data as $k => $v) { // level $tpl->setCurrentBlock("level_td"); $tpl->setVariable("VAL_LEVEL", $v["title"]); $tt_id = "skmg_skl_tt_" . self::$skill_tt_cnt; self::$skill_tt_cnt++; $tpl->setVariable("TT_ID", $tt_id); if ($v["description"] != "") { ilTooltipGUI::addTooltip($tt_id, $v["description"]); } $tpl->parseCurrentBlock(); // profile targel level /* foreach ($this->profile_levels as $pl) { if ($pl["level_id"] == $v["id"] && $pl["base_skill_id"] == $v["skill_id"]) { $too_low = true; $current_target_level = $v["id"]; } } else { $tpl->setVariable("VAL_SELF_EVAL", " "); } $tpl->parseCurrentBlock(); if ($v["id"] == $se_level) { $found = true; } // assigned materials if ($this->use_materials) { $mat_cnt = ilPersonalSkill::countAssignedMaterial($user->getId(), $bs["tref"], $v["id"]); if ($mat_cnt == 0) { $tpl->setCurrentBlock("material_td"); $tpl->setVariable("VAL_MATERIAL", " "); $tpl->parseCurrentBlock(); } else { // links to material files $tpl->setCurrentBlock("material_links"); $mat_tt = array(); $cnt = 1; foreach(ilPersonalSkill::getAssignedMaterial($user->getId(), $bs["tref"], $v["id"]) as $item) { $mat_data = $this->getMaterialInfo($item["wsp_id"]); $tpl->setVariable("URL_MATERIAL", $mat_data[1]); $tpl->setVariable("TXT_MATERIAL", $cnt); // tooltip $mat_tt_id = "skmg_skl_tt_mat_".self::$skill_tt_cnt; self::$skill_tt_cnt++; $tpl->setVariable("TOOLTIP_MATERIAL_ID", $mat_tt_id); if(!$this->offline_mode) { ilTooltipGUI::addTooltip($mat_tt_id, $mat_data[0]); } else { $this->tooltips[] = ilTooltipGUI::getTooltip($mat_tt_id, $mat_data[0]); } $tpl->parseCurrentBlock(); $cnt++; } $tpl->setCurrentBlock("material_td"); $tpl->setVariable("CLASS_MAT", "ilSkillMat"); $tpl->parseCurrentBlock(); } } */ } $title = $sep = ""; $found = false; foreach ($path as $p) { if ($found) { $title .= $sep . $p["title"]; $sep = " > "; } if ($a_top_skill_id == $p["child"]) { $found = true; } } $tpl->setCurrentBlock("skill"); $tpl->setVariable("BSKILL_TITLE", $title); /* $tpl->setVariable("TXT_LEVEL", $lng->txt("skmg_level")); $tpl->setVariable("TXT_SELF_EVAL", $lng->txt("skmg_self_evaluation")); if ($this->use_materials) { $tpl->setVariable("TXT_MATERIAL", $lng->txt("skmg_material")); }*/ $tpl->setVariable("TXT_TARGET", $lng->txt("skmg_target_level")); $tpl->setVariable("TXT_360_SURVEY", $lng->txt("skmg_360_survey")); if ($a_edit) { $act_list->flush(); $act_list->setId("act_" . $a_top_skill_id . "_" . $bs["id"]); $ilCtrl->setParameterByClass("ilpersonalskillsgui", "skill_id", $a_top_skill_id); $ilCtrl->setParameterByClass("ilpersonalskillsgui", "tref_id", $bs["tref"]); $ilCtrl->setParameterByClass("ilpersonalskillsgui", "basic_skill_id", $bs["id"]); if ($this->use_materials) { $act_list->addItem($lng->txt('skmg_assign_materials'), "", $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "assignMaterials")); } $act_list->addItem($lng->txt('skmg_self_evaluation'), "", $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "selfEvaluation")); $tpl->setVariable("ACTIONS2", $act_list->getHTML()); } $tpl->parseCurrentBlock(); } $tpl->setVariable("SKILL_TITLE", ilSkillTreeNode::_lookupTitle($a_top_skill_id)); if ($a_edit) { $act_list->flush(); $act_list->setId("act_" . $a_top_skill_id); $ilCtrl->setParameterByClass("ilpersonalskillsgui", "skill_id", $a_top_skill_id); // $act_list->addItem($lng->txt('skmg_assign_materials'), "", // $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "assignMaterials")); $act_list->addItem($lng->txt('skmg_remove_skill'), "", $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "confirmSkillRemove")); $tpl->setVariable("ACTIONS1", $act_list->getHTML()); } return $tpl->get(); }
/** * renders a table row by filling wor data to table row template * * @access public * @global ilCtrl $ilCtrl * @global ilLanguage $lng * @param array $rowData */ public function fillRow($rowData) { global $ilCtrl, $lng; if ($this->tableMode == self::TBL_MODE_ADMINISTRATION) { $editHref = $ilCtrl->getLinkTargetByClass('ilAssQuestionHintGUI', ilAssQuestionHintGUI::CMD_SHOW_FORM); $editHref = ilUtil::appendUrlParameterString($editHref, "hint_id={$rowData['hint_id']}", true); $deleteHref = $ilCtrl->getLinkTarget($this->parent_obj, ilAssQuestionHintsGUI::CMD_CONFIRM_DELETE); $deleteHref = ilUtil::appendUrlParameterString($deleteHref, "hint_id={$rowData['hint_id']}", true); $list = new ilAdvancedSelectionListGUI(); $list->setListTitle($lng->txt('actions')); $list->setId("advsl_hint_{$rowData['hint_id']}_actions"); $list->addItem($lng->txt('tst_question_hints_table_link_edit_hint'), '', $editHref); $list->addItem($lng->txt('tst_question_hints_table_link_delete_hint'), '', $deleteHref); $this->tpl->setVariable('ACTIONS', $list->getHTML()); $this->tpl->setVariable('HINT_ID', $rowData['hint_id']); $hintIndex = $rowData['hint_index'] * self::INDEX_TO_POSITION_FACTOR; } else { $showHref = $ilCtrl->getLinkTarget($this->parent_obj, ilAssQuestionHintRequestGUI::CMD_SHOW_HINT); $showHref = ilUtil::appendUrlParameterString($showHref, "hintId={$rowData['hint_id']}", true); $this->tpl->setVariable('HINT_HREF', $showHref); $hintIndex = sprintf($lng->txt('tst_question_hints_index_column_label'), $rowData['hint_index']); } $this->tpl->setVariable('HINT_INDEX', $hintIndex); $this->tpl->setVariable('HINT_TEXT', $rowData['hint_text']); $this->tpl->setVariable('HINT_POINTS', $rowData['hint_points']); }
/** * GetDropDownHTML * * @param * @return */ function renderDropDown($a_tpl, $a_id) { global $lng, $ilSetting, $rbacsystem; $id = strtolower($a_id); $id_up = strtoupper($a_id); $a_tpl->setCurrentBlock("entry_" . $id); include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php"; $selection = new ilAdvancedSelectionListGUI(); if ($this->active == $a_id || $this->active == "" && $a_id == "repository") { $selection->setSelectionHeaderClass("MMActive"); $a_tpl->setVariable("SEL", '<span class="ilAccHidden">(' . $lng->txt("stat_selected") . ')</span>'); } else { $selection->setSelectionHeaderClass("MMInactive"); } $selection->setSelectionHeaderSpanClass("MMSpan"); $selection->setHeaderIcon(ilAdvancedSelectionListGUI::ICON_ARROW); $selection->setItemLinkClass("small"); $selection->setUseImages(false); switch ($id) { // desktop drop down case "desktop": $selection->setListTitle($lng->txt("personal_desktop")); $selection->setId("dd_pd"); // overview $selection->addItem($lng->txt("overview"), "", "ilias.php?baseClass=ilPersonalDesktopGUI", "", "", "_top"); if (!$ilSetting->get("disable_personal_workspace")) { // workspace $selection->addItem($lng->txt("personal_workspace"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToWorkspace", "", "", "_top"); } // profile $selection->addItem($lng->txt("personal_profile"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToProfile", "", "", "_top"); // skills $skmg_set = new ilSetting("skmg"); if ($skmg_set->get("enable_skmg")) { $selection->addItem($lng->txt("skills"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToSkills", "", "", "_top"); } // portfolio if ($ilSetting->get('user_portfolios')) { $selection->addItem($lng->txt("portfolio"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToPortfolio", "", "", "_top"); } // news if ($ilSetting->get("block_activated_news")) { $selection->addItem($lng->txt("news"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToNews", "", "", "_top"); } // Learning Progress include_once "Services/Tracking/classes/class.ilObjUserTracking.php"; if (ilObjUserTracking::_enabledLearningProgress()) { //$ilTabs->addTarget("learning_progress", $this->ctrl->getLinkTargetByClass("ilLearningProgressGUI")); $selection->addItem($lng->txt("learning_progress"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToLP", "", "", "_top"); } // calendar include_once './Services/Calendar/classes/class.ilCalendarSettings.php'; $settings = ilCalendarSettings::_getInstance(); if ($settings->isEnabled()) { $selection->addItem($lng->txt("calendar"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToCalendar", "", "", "_top"); } // mail if ($this->mail) { $selection->addItem($lng->txt('mail'), '', 'ilias.php?baseClass=ilMailGUI', '', '', '_top'); } // contacts if (!$this->ilias->getSetting('disable_contacts') && ($this->ilias->getSetting('disable_contacts_require_mail') || $rbacsystem->checkAccess('internal_mail', ilMailGlobalServices::getMailObjectRefId()))) { $selection->addItem($lng->txt('mail_addressbook'), '', 'ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToContacts', '', '', '_top'); } // private notes if (!$this->ilias->getSetting("disable_notes")) { $selection->addItem($lng->txt("notes_and_comments"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToNotes", "", "", "_top"); } // bookmarks if (!$this->ilias->getSetting("disable_bookmarks")) { $selection->addItem($lng->txt("bookmarks"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToBookmarks", "", "", "_top"); } // settings $selection->addItem($lng->txt("personal_settings"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToSettings", "", "", "_top"); break; // shop // shop case 'shop': $selection->setListTitle($lng->txt("shop")); $selection->setId("dd_shp"); $selection->addItem($lng->txt("shop"), "", "ilias.php?baseClass=ilShopController&cmd=firstpage", "", "", "_top"); break; // administration // administration case "administration": $selection->setListTitle($lng->txt("administration")); $selection->setId("dd_adm"); $selection->setAsynch(true); $selection->setAsynchUrl("ilias.php?baseClass=ilAdministrationGUI&cmd=getDropDown&cmdMode=asynch"); //$this->renderEntry($a_tpl, "administration", // $lng->txt("administration"), // $this->getScriptTarget("ilias.php?baseClass=ilAdministrationGUI"), // $this->target); break; } // $selection->setTriggerEvent("mouseover"); // $selection->setAutoHide(true); // bs-patch start global $ilUser; $a_tpl->setVariable("TXT_ADMINISTRATION", $lng->txt("administration")); $a_tpl->parseCurrentBlock(); return; // bs-patch end $html = $selection->getHTML(); $a_tpl->setVariable($id_up . "_DROP_DOWN", $html); $a_tpl->parseCurrentBlock(); }