本文整理汇总了PHP中ilAdvancedSelectionListGUI::setSelectionHeaderClass方法的典型用法代码示例。如果您正苦于以下问题:PHP ilAdvancedSelectionListGUI::setSelectionHeaderClass方法的具体用法?PHP ilAdvancedSelectionListGUI::setSelectionHeaderClass怎么用?PHP ilAdvancedSelectionListGUI::setSelectionHeaderClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilAdvancedSelectionListGUI
的用法示例。
在下文中一共展示了ilAdvancedSelectionListGUI::setSelectionHeaderClass方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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());
}
示例2: 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;
}
示例3: 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());
}
示例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: getSkillHTML
/**
* 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)
{
//.........这里部分代码省略.........
示例10: 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());
}
示例11: getSkillHTML
/**
* 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]);
}
//.........这里部分代码省略.........
示例12: 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());
}
示例13: 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());
}
示例14: 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;
}
示例15: getCharStyleSelector
/**
* Get character style selector
*/
static function getCharStyleSelector($a_par_type, $a_use_callback = true)
{
global $lng;
include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
$selection = new ilAdvancedSelectionListGUI();
$selection->setFormSelectMode("char_characteristic", "", false, "", "", "", "", "", "", "");
$selection->setId("char_style_selection");
$selection->setSelectionHeaderClass("ilEditSubmit");
$selection->setHeaderIcon(ilAdvancedSelectionListGUI::DOWN_ARROW_DARK);
//$selection->setSelectedValue($a_selected);
$selection->setUseImages(false);
$selection->setOnClickMode(ilAdvancedSelectionListGUI::ON_ITEM_CLICK_NOP);
if ($a_use_callback) {
$selection->setSelectCallback("ilCOPage.setCharacterClass");
}
//$chars = $a_chars;
//$title_char = ($chars[$a_selected] != "")
// ? $chars[$a_selected]
// : $a_selected;
$selection->setListTitle(" <i>A</i>");
/*if ($chars[$a_seleted] == "" && ($a_seleted != ""))
{
$chars = array_merge(array($a_seleted => $a_seleted),
$chars);
}*/
$chars = array("Comment" => array("code" => "com", "txt" => $lng->txt("cont_char_style_com")), "Quotation" => array("code" => "quot", "txt" => $lng->txt("cont_char_style_quot")), "Accent" => array("code" => "acc", "txt" => $lng->txt("cont_char_style_acc")), "Code" => array("code" => "code", "txt" => $lng->txt("cont_char_style_code")));
foreach ($chars as $key => $char) {
if (ilPageEditorSettings::lookupSettingByParentType($a_par_type, "active_" . $char["code"], true)) {
$t = "text_inline";
$tag = "span";
switch ($key) {
case "Code":
$tag = "code";
break;
}
$html = '<' . $tag . ' class="ilc_' . $t . '_' . $key . '" style="font-size:90%; margin-top:2px; margin-bottom:2px; position:static;">' . $char["txt"] . "</" . $tag . ">";
// this next line is very important for IE. The real onclick event is on the surrounding <tr> of the
// advanced selection list. But it is impossible to prevent the tr-event from removing the focus
// on tiny withouth the following line, that receives the click event before and stops the faulty default
// bevaviour of IE, see bug report #8723
$html = '<a class="nostyle" style="display:block;" href="#" onclick="return false;">' . $html . "</a>";
$selection->addItem($char["txt"], $key, "", "", $key, "", $html);
}
}
return $selection->getHTML();
}