本文整理汇总了PHP中ilAdvancedSelectionListGUI::setItemLinkClass方法的典型用法代码示例。如果您正苦于以下问题:PHP ilAdvancedSelectionListGUI::setItemLinkClass方法的具体用法?PHP ilAdvancedSelectionListGUI::setItemLinkClass怎么用?PHP ilAdvancedSelectionListGUI::setItemLinkClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilAdvancedSelectionListGUI
的用法示例。
在下文中一共展示了ilAdvancedSelectionListGUI::setItemLinkClass方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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;
}
}
示例4: 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.svg'));
$this->tpl->setVariable('TXT_OK', $this->lng->txt('ecs_activated'));
} else {
$this->tpl->setVariable('IMAGE_OK', ilUtil::getImagePath('icon_not_ok.svg'));
$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'));
$now = new ilDateTime(time(), IL_CAL_UNIX);
$now->increment(IL_CAL_MONTH, 2);
if (ilDateTime::_before($dt, $now)) {
$this->tpl->setCurrentBlock('invalid');
$this->tpl->setVariable('VAL_ICERT', ilDatePresentation::formatDate($dt));
$this->tpl->parseCurrentBlock();
} else {
$this->tpl->setCurrentBlock('valid');
$this->tpl->setVariable('VAL_VCERT', ilDatePresentation::formatDate($dt));
$this->tpl->parseCurrentBlock();
}
}
// 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());
}
示例5: 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();
}
示例6: formatInvalidLinkArray
/**
*
* @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;
}
示例7: fillRow
/**
* 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());
}
示例8: renderDropDown
/**
* 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;
//.........这里部分代码省略.........
示例9: fillRow
/**
* 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());
}
示例10: showActionLinks
/**
* Show action links (mail ; edit crs|grp data)
* @param type $a_set
*/
public function showActionLinks($a_set)
{
if (!self::$has_odf_definitions) {
$this->ctrl->setParameterByClass(get_class($this->getParentObject()), 'member_id', $a_set['usr_id']);
$link = $this->ctrl->getLinkTargetByClass(get_class($this->getParentObject()), 'sendMailToSelectedUsers');
$this->tpl->setVariable('MAIL_LINK', $link);
$this->tpl->setVariable('MAIL_TITLE', $this->lng->txt('crs_mem_send_mail'));
return TRUE;
}
// show action menu
include_once './Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
$list = new ilAdvancedSelectionListGUI();
$list->setSelectionHeaderClass('small');
$list->setItemLinkClass('small');
$list->setId('actl_' . $a_set['usr_id'] . '_' . $this->getId());
$list->setListTitle($this->lng->txt('actions'));
$this->ctrl->setParameterByClass(get_class($this->getParentObject()), 'member_id', $a_set['usr_id']);
$this->ctrl->setParameter($this->parent_obj, 'member_id', $a_set['usr_id']);
$trans = $this->lng->txt($this->getParentObject()->object->getType() . '_mem_send_mail');
$link = $this->ctrl->getLinkTargetByClass(get_class($this->getParentObject()), 'sendMailToSelectedUsers');
$list->addItem($trans, '', $link, 'sendMailToSelectedUsers');
$this->ctrl->setParameterByClass('ilobjectcustomuserfieldsgui', 'member_id', $a_set['usr_id']);
$trans = $this->lng->txt($this->getParentObject()->object->getType() . '_cdf_edit_member');
$list->addItem($trans, '', $this->ctrl->getLinkTargetByClass('ilobjectcustomuserfieldsgui', 'editMember'));
$this->tpl->setVariable('ACTION_USER', $list->getHTML());
}
示例11: showActionLinks
/**
* show edit links
* @param type $a_set
* @return boolean
*/
protected function showActionLinks($a_set)
{
if (!$this->show_edit_link) {
return true;
}
if (!self::$has_odf_definitions) {
$this->ctrl->setParameter($this->parent_obj, 'member_id', $a_set['usr_id']);
$this->tpl->setCurrentBlock('link');
$this->tpl->setVariable('LINK_NAME', $this->ctrl->getLinkTarget($this->parent_obj, 'editMember'));
$this->tpl->setVariable('LINK_TXT', $this->lng->txt('edit'));
$this->tpl->parseCurrentBlock();
return true;
}
// show action menu
include_once './Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
$list = new ilAdvancedSelectionListGUI();
$list->setSelectionHeaderClass('small');
$list->setItemLinkClass('small');
$list->setId('actl_' . $a_set['usr_id'] . '_' . $this->getId());
$list->setListTitle($this->lng->txt('actions'));
$this->ctrl->setParameter($this->parent_obj, 'member_id', $a_set['usr_id']);
$list->addItem($this->lng->txt('edit'), '', $this->ctrl->getLinkTarget($this->getParentObject(), 'editMember'));
$this->ctrl->setParameterByClass('ilobjectcustomuserfieldsgui', 'member_id', $a_set['usr_id']);
$trans = $this->lng->txt($this->getParentObject()->object->getType() . '_cdf_edit_member');
$list->addItem($trans, '', $this->ctrl->getLinkTargetByClass('ilobjectcustomuserfieldsgui', 'editMember'));
$this->tpl->setVariable('ACTION_USER', $list->getHTML());
}
示例12: fillRow
/**
* @see ilTable2GUI::fillRow()
*/
protected function fillRow($a_set)
{
global $ilCtrl, $lng;
$ilCtrl->setParameterByClass(get_class($this->getParentObject()), 'link_id', $a_set['link_id']);
$this->tpl->setVariable('TITLE', $a_set['title']);
if (strlen($a_set['description'])) {
$this->tpl->setVariable('DESCRIPTION', $a_set['description']);
}
// $this->tpl->setVariable('TARGET',$a_set['target']);
$this->tpl->setVariable('TARGET', $ilCtrl->getLinkTarget($this->parent_obj, "callLink"));
if (!$this->isEditable()) {
return;
}
if ($this->isLinkSortingEnabled()) {
$this->tpl->setVariable('VAL_POS', $a_set['position']);
$this->tpl->setVariable('VAL_ITEM', $a_set['link_id']);
}
$actions = new ilAdvancedSelectionListGUI();
$actions->setSelectionHeaderClass("small");
$actions->setItemLinkClass("xsmall");
$actions->setListTitle($lng->txt('actions'));
$actions->setId($a_set['link_id']);
$actions->addItem($lng->txt('edit'), '', $ilCtrl->getLinkTargetByClass(get_class($this->getParentObject()), 'editLink'));
$actions->addItem($lng->txt('webr_deactivate'), '', $ilCtrl->getLinkTargetByClass(get_class($this->getParentObject()), 'deactivateLink'));
$actions->addItem($lng->txt('delete'), '', $ilCtrl->getLinkTargetByClass(get_class($this->getParentObject()), 'confirmDeleteLink'));
$this->tpl->setVariable('ACTION_HTML', $actions->getHTML());
}
示例13: formatInvalidLinkArray
/**
*
* @see ilLinkCheckerGUIRowHandling::formatInvalidLinkArray()
* @param array Unformatted array
* @return array Formatted array
* @access public
*
*/
public function formatInvalidLinkArray(array $row)
{
$this->object->items_obj->readItem($row['page_id']);
$row['title'] = $this->object->items_obj->getTitle();
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->setParameter($this, 'link_id', $row['page_id']);
$actions->addItem($this->lng->txt('edit'), '', $this->ctrl->getLinkTarget($this, 'editLink'));
$this->ctrl->clearParameters($this);
$row['action_html'] = $actions->getHTML();
return $row;
}
示例14: fillAdminPanel
/**
* Put admin panel into template:
* - creation selector
* - admin view on/off button
*/
function fillAdminPanel()
{
global $lng, $ilHelp;
$adm_view_cmp = $adm_cmds = $creation_selector = $adm_view = false;
$toolb = new ilToolbarGUI();
// admin panel commands
if (count($this->admin_panel_commands) > 0) {
foreach ($this->admin_panel_commands as $cmd) {
$toolb->addFormButton($cmd["txt"], $cmd["cmd"]);
}
$adm_cmds = true;
} elseif ($this->admin_panel_commands_toolbar instanceof ilToolbarGUI) {
$toolb = $this->admin_panel_commands_toolbar;
$adm_cmds = true;
}
// Add arrow if desired
if ($this->admin_panel_arrow) {
$toolb->setLeadingImage(ilUtil::getImagePath("arrow_upright.png"), $lng->txt("actions"));
}
if ($adm_cmds) {
$this->fillPageFormAction();
$this->setCurrentBlock("adm_view_components");
$this->setVariable("ADM_PANEL1", $toolb->getHTML());
$this->parseCurrentBlock();
$adm_view_cmp = true;
}
// admin view button
if ($this->page_actions != "") {
$this->setVariable("PAGE_ACTIONS", $this->page_actions);
$adm_view = true;
}
// creation selector
if (is_array($this->creation_selector)) {
$this->setCurrentBlock("add_commands");
if ($adm_cmds) {
$this->setVariable("ADD_COM_WIDTH", 'width="1"');
}
include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
$selection = new ilAdvancedSelectionListGUI();
$selection->setListTitle($lng->txt("cntr_add_new_item"));
$selection->setId("item_creation");
$selection->setHeaderIcon(ilUtil::getImagePath("cmd_add_s.png"));
$selection->setItemLinkClass("xsmall");
$selection->setUseImages(true);
foreach ($this->creation_selector["options"] as $item) {
$link = $this->page_form_action . "&new_type=" . $item["value"];
$link = str_replace("cmd=post", "cmd=" . $this->creation_selector["command"], $link);
$ttip = ilHelp::getObjCreationTooltipText($item["value"]);
$selection->addItem($item["title"], $item["value"], $link, $item["img"], $item["title"], "", "", false, "", $ttip, "right center", "left center", false);
}
$this->setVariable("SELECT_OBJTYPE_REPOS", $selection->getHTML());
$this->setVariable("CENTER_COL_CLASS", trim($this->right_content) != "" ? "one_side_col" : "");
$this->parseCurrentBlock();
$creation_selector = true;
}
if ($adm_cmds and $this->admin_panel_bottom) {
$this->setCurrentBlock("adm_view_components2");
if ($this->admin_panel_arrow) {
$toolb->setLeadingImage(ilUtil::getImagePath("arrow_downright.png"), $lng->txt("actions"));
}
$this->setVariable("ADM_PANEL2", $toolb->getHTML());
$this->parseCurrentBlock();
}
}