本文整理汇总了PHP中ilAdvancedSelectionListGUI::getHTML方法的典型用法代码示例。如果您正苦于以下问题:PHP ilAdvancedSelectionListGUI::getHTML方法的具体用法?PHP ilAdvancedSelectionListGUI::getHTML怎么用?PHP ilAdvancedSelectionListGUI::getHTML使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilAdvancedSelectionListGUI
的用法示例。
在下文中一共展示了ilAdvancedSelectionListGUI::getHTML方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getHTML
/**
* 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;
}
示例2: fillRow
/**
* 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());
}
示例3: fillRow
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);
}
示例4: buildActions
/**
* 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;
}
示例5: formatActionsList
/**
* @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();
}
示例6: fillRow
/**
* 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());
}
示例7: fillRow
/**
* 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());
}
示例8: asyncGetContent
/**
* @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;
}
}
示例9: fillRow
/**
* 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());
}
示例10: fillRow
/**
* 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());
}
示例11: fillRow
/**
* 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());
}
示例12: show
/**
* 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();
}
示例13: fillRow
/**
* 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());
}
示例14: showMailingLists
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;
}
示例15: fillRow
/**
* 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");
//.........这里部分代码省略.........